/* ==========================================================================
   Employee onboarding portal (portal.php) — loaded after style.css and built
   on the same tokens, so a re-theme of :root carries over here.
   ========================================================================== */

.portal-body { background: var(--offwhite); }

/* Agenda / event type colors, used by the legend, home and agenda lists */
.type--meeting    { --type: var(--blue); }
.type--training   { --type: var(--teal); }
.type--checkin    { --type: var(--mauve); }
.type--social     { --type: var(--orange); }
.type--relocation { --type: #B8761C; }

/* ---------- Header extras ---------- */
.portal-demo-badge {
  display: none;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(192,124,170,0.16);
  color: #8a4877;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.portal-user-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
}
.portal-user-chip img { width: 34px; height: 34px; border-radius: 50%; }
.portal-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  color: var(--text-soft);
  transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}
.portal-icon-btn svg { width: 18px; height: 18px; }
.portal-icon-btn:hover { color: var(--blue); border-color: var(--blue); }
.portal-back-link { padding: 0.6rem 1.1rem; font-size: 0.88rem; }

@media (min-width: 560px) {
  .portal-demo-badge { display: inline-flex; }
}
@media (max-width: 640px) {
  .portal-user-chip span { display: none; }
}
@media (max-width: 400px) {
  .portal-back-link { display: none; }
}

/* ==========================================================================
   Login
   ========================================================================== */
/* Login page = header + login in exactly one screen (no scrolling on desktop):
   the body is a column and the login area takes the leftover height, so the
   photo panel runs to the bottom edge. */
.portal-body--login { min-height: 100svh; display: flex; flex-direction: column; }
.portal-login {
  flex: 1;
  margin-top: 72px;
  display: grid;
  grid-template-columns: 1fr;
}
.portal-login__visual {
  position: relative;
  display: none;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}
.portal-login__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portal-login__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(6,20,35,0.55) 0%, rgba(6,20,35,0.92) 75%);
}
.portal-login__visual-inner { position: relative; z-index: 1; max-width: 480px; }
.portal-login__visual .eyebrow { color: var(--peach); }
.portal-login__visual h2 {
  color: var(--white);
  font-size: clamp(2rem, 3.2vw, 2.7rem);
  margin-bottom: 1rem;
}
.portal-login__visual p { color: rgba(255,255,255,0.82); margin-bottom: 1.6rem; }
.portal-login__points { display: flex; flex-direction: column; gap: 0.7rem; }
.portal-login__points li { display: flex; gap: 0.7rem; align-items: center; font-weight: 500; }
.portal-login__points svg { width: 18px; height: 18px; color: var(--peach); flex-shrink: 0; }

.portal-login__form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vh, 2.5rem) 1.25rem;
}
.portal-login__form {
  width: 100%;
  max-width: 500px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vh, 2.5rem) clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-md);
}
.portal-login__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(0,86,164,0.09);
  color: var(--blue);
  margin-bottom: 1rem;
}
.portal-login__icon svg { width: 26px; height: 26px; }
.portal-login__form h1 { font-size: 2rem; margin-bottom: 0.4rem; }
.portal-login__text { color: var(--text-soft); margin-bottom: 1.4rem; }
@media (min-width: 560px) {
  .portal-login__text { white-space: nowrap; }
}
.portal-login__form .form-msg { margin: 0 0 1.25rem; }
.portal-login__forgot {
  margin-top: 1.1rem;
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.field--password input { padding-right: 3.2rem; }
.field__toggle {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text-faint);
  transition: color 0.3s ease, background-color 0.3s ease;
}
.field__toggle svg { width: 20px; height: 20px; }
.field__toggle:hover { background: var(--mist); color: var(--text); }
.field__toggle[aria-pressed="true"] { color: var(--blue); }

@media (min-width: 900px) {
  .portal-login { grid-template-columns: 1fr 1fr; }
  .portal-login__visual { display: flex; align-items: flex-end; padding: 3.5rem clamp(2rem, 5vw, 4.5rem); }
}

/* ==========================================================================
   Portal shell: sidebar + content
   ========================================================================== */
.portal-wrap { padding-top: calc(72px + 1.75rem); padding-bottom: 4rem; }
.portal {
  max-width: 1400px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}
.portal-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Mobile: the section menu is a horizontal, scrollable pill strip. */
.portal-nav__user { display: none; }
.portal-nav ul {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: calc(clamp(1.25rem, 4.5vw, 3rem) * -1);
  padding: 0.2rem clamp(1.25rem, 4.5vw, 3rem);
}
.portal-nav ul::-webkit-scrollbar { display: none; }
.portal-nav a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-soft);
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.portal-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.portal-nav a:hover { color: var(--blue); }
.portal-nav a.is-active { background: var(--blue); border-color: var(--blue); color: var(--white); }

@media (min-width: 1000px) {
  .portal { grid-template-columns: 264px minmax(0, 1fr); gap: 2.25rem; align-items: start; }
  .portal-nav {
    position: sticky;
    top: calc(72px + 1.75rem);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
  }
  .portal-nav__user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.25rem 0.4rem 1.2rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
  }
  .portal-nav__user img { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
  .portal-nav__user strong { display: block; color: var(--navy); line-height: 1.3; }
  .portal-nav__user span { display: block; font-size: 0.8rem; color: var(--text-soft); line-height: 1.35; }
  .portal-nav ul { flex-direction: column; gap: 0.2rem; overflow: visible; margin: 0; padding: 0; }
  .portal-nav a { border: none; background: none; border-radius: var(--radius-sm); padding: 0.7rem 0.85rem; font-size: 0.94rem; }
  .portal-nav a:hover { background: var(--offwhite); }
  .portal-nav a.is-active { background: rgba(0,86,164,0.09); color: var(--blue); }
}


/* ---------- Page heading ---------- */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.page-head h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 0.35rem; }
.page-head p { color: var(--text-soft); max-width: 62ch; }
.page-head .btn { padding: 0.75rem 1.3rem; font-size: 0.92rem; }
.page-head__progress {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 240px;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.page-head__progress strong { color: var(--navy); }

/* ---------- Generic building blocks ---------- */
.p-card {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow-sm);
}
.p-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.1rem;
}
.p-card__head h2 { display: flex; align-items: center; gap: 0.65rem; font-size: 1.2rem; }
.p-card__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(0,86,164,0.08);
  color: var(--blue);
}
.p-card__icon svg { width: 18px; height: 18px; }
.p-card__meta { font-size: 0.88rem; font-weight: 600; color: var(--text-soft); }
.p-card__lede { color: var(--text-soft); margin-bottom: 1rem; }

.p-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 760px) {
  .p-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1150px) {
  .p-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.p-section { display: flex; flex-direction: column; gap: 1.1rem; }
.p-section__head h2 { font-size: 1.45rem; margin-bottom: 0.25rem; }
.p-section__head p { color: var(--text-soft); font-size: 0.95rem; }

.btn--sm { padding: 0.5rem 1rem; font-size: 0.85rem; gap: 0.4rem; }
.btn--sm svg { width: 16px; height: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--mist);
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--neutral::before { display: none; }
.chip--done { background: rgba(0,150,152,0.12); color: #036b6d; }
.chip--in_progress { background: rgba(0,86,164,0.1); color: var(--blue); }
.chip--action,
.chip--upload,
.chip--sign { background: rgba(235,96,10,0.12); color: #a84408; }
.chip--pending { background: rgba(248,174,88,0.22); color: #8a5208; }
.chip--review { background: rgba(192,124,170,0.16); color: #8a4877; }

.progress {
  display: block;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--mist);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent, var(--teal));
}
.progress--thin { height: 5px; }

.avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent, var(--blue));
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}
.avatar--lg { width: 64px; height: 64px; font-size: 1.15rem; }

.person { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.1rem; min-width: 0; }
.person > div { min-width: 0; }
.person strong { display: block; color: var(--navy); font-size: 1.02rem; line-height: 1.35; }
.person > div span { display: block; color: var(--text-soft); font-size: 0.86rem; line-height: 1.4; }

.icon-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.1rem; font-size: 0.92rem; }
.icon-list li { display: flex; align-items: flex-start; gap: 0.65rem; min-width: 0; color: var(--text-soft); }
.icon-list svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 0.2rem; color: var(--blue); }
.icon-list a { color: var(--blue); overflow-wrap: anywhere; }
.icon-list a:hover { text-decoration: underline; }

.data-list > div {
  display: grid;
  grid-template-columns: minmax(110px, 38%) minmax(0, 1fr);
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
}
.data-list > div:first-child { border-top: none; padding-top: 0; }
.data-list dt { color: var(--text-soft); font-size: 0.88rem; }
.data-list dd { color: var(--text); font-weight: 500; font-size: 0.94rem; overflow-wrap: anywhere; }
.data-list--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem 1.5rem;
  margin-bottom: 1.5rem;
}
.data-list--grid > div,
.data-list--grid > div:first-child { display: block; padding: 0; border: none; }
.data-list--grid dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.15rem;
}

/* ==========================================================================
   Welcome (home)
   ========================================================================== */
.welcome-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 1.5rem 2.25rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 55%, var(--blue) 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.welcome-card::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -90px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248,174,88,0.3), transparent 70%);
}
.welcome-card__photo {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.85);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.welcome-card__body { position: relative; z-index: 1; min-width: 0; }
.welcome-card__eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--peach);
  margin-bottom: 0.4rem;
}
.welcome-card h1 { color: var(--white); font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 0.35rem; }
.welcome-card__name { color: rgba(255,255,255,0.82); margin-bottom: 1.4rem; }
.welcome-card__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(235px, 100%), 1fr));
  gap: 0.9rem 1.5rem;
}
.welcome-card__facts li { display: flex; align-items: flex-start; gap: 0.65rem; min-width: 0; font-size: 0.93rem; }
.welcome-card__facts svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1.05rem; color: var(--peach); }
.welcome-card__facts span { min-width: 0; overflow-wrap: anywhere; }
.welcome-card__facts small {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.welcome-card__facts a { color: var(--white); }
.welcome-card__facts a:hover { color: var(--peach); }
@media (min-width: 700px) {
  .welcome-card { grid-template-columns: auto minmax(0, 1fr); }
}

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 1150px) {
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding: 1.2rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card__label { font-size: 0.8rem; font-weight: 600; color: var(--text-soft); }
.stat-card__value { font-family: var(--font-display); font-size: 1.8rem; line-height: 1.1; color: var(--navy); }
.stat-card__sub { font-size: 0.82rem; color: var(--text-faint); }

.step-list li + li { border-top: 1px solid var(--border); }
.step-list a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 0;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}
.step-list li:first-child a { padding-top: 0; }
.step-list a > svg { width: 18px; height: 18px; flex-shrink: 0; margin-left: auto; color: var(--text-faint); transition: transform 0.3s var(--ease); }
.step-list a:hover { color: var(--blue); }
.step-list a:hover > svg { transform: translateX(3px); }
.step-list__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(235,96,10,0.1);
  color: var(--orange);
}
.step-list__icon svg { width: 18px; height: 18px; }

.mini-agenda { display: flex; flex-direction: column; gap: 0.85rem; }
.mini-agenda li { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.mini-agenda__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--type) 12%, white);
  color: var(--type);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}
.mini-agenda__date strong { font-family: var(--font-display); font-size: 1.25rem; }
.mini-agenda li > span:last-child { min-width: 0; }
.mini-agenda li > span:last-child strong { display: block; color: var(--navy); font-size: 0.95rem; font-weight: 600; line-height: 1.35; }
.mini-agenda small { color: var(--text-soft); font-size: 0.82rem; }

.people-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.people-row li { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.people-row strong { display: block; color: var(--navy); font-size: 0.95rem; line-height: 1.35; }
.people-row small { display: block; color: var(--text-soft); font-size: 0.82rem; line-height: 1.4; }

/* ==========================================================================
   Profile
   ========================================================================== */
.profile-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.profile-hero img { width: 96px; height: 96px; border-radius: 50%; }
.profile-hero h2 { font-size: 1.5rem; }
.profile-hero p { color: var(--text-soft); }
.profile-hero .chip { margin-left: auto; }

/* ==========================================================================
   Pre-boarding
   ========================================================================== */
.done-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem 2.5rem; }
@media (min-width: 760px) {
  .done-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.done-list li { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.94rem; }
.done-list svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 0.15rem; color: var(--teal); }
.done-list small { margin-left: auto; padding-top: 0.15rem; white-space: nowrap; font-size: 0.8rem; color: var(--text-faint); }

/* #map height comes from style.css; the portal card wants a shorter one. The
   isolated stacking context keeps Leaflet's panes under the fixed header. */
.p-card #map {
  height: 220px;
  margin-bottom: 1.1rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  isolation: isolate;
}
.location-name { font-size: 1.1rem; margin-bottom: 0.2rem; }
.location-address { color: var(--text-soft); font-size: 0.92rem; margin-bottom: 1rem; }

.quote {
  margin-bottom: 1.1rem;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--offwhite);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--navy);
  line-height: 1.6;
}

.timeline li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 1rem; }
.timeline time {
  padding-top: 0.05rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.timeline li > div {
  position: relative;
  padding: 0 0 1.15rem 1.4rem;
  border-left: 2px solid var(--border);
}
.timeline li:last-child > div { padding-bottom: 0; border-left-color: transparent; }
.timeline li > div::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--blue);
}
.timeline strong { display: block; color: var(--navy); font-weight: 600; line-height: 1.4; }
.timeline small { color: var(--text-soft); font-size: 0.85rem; }

.contract-card h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }

/* ==========================================================================
   Onboarding: 30/60/90 plan, surveys, probation review
   ========================================================================== */
.phase-card {
  min-width: 0;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.phase-card__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; }
.phase-card__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.phase-card h3 { font-size: 1.5rem; margin-bottom: 0.15rem; }
.phase-card__count { font-size: 0.85rem; color: var(--text-soft); margin-bottom: 1rem; }

.goal-list { display: flex; flex-direction: column; gap: 0.6rem; }
.goal-list li { display: flex; align-items: flex-start; gap: 0.65rem; }
.goal-list input {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.15rem;
  border: 1.5px solid #C5D0D9;
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.goal-list input:checked { background: var(--accent); border-color: var(--accent); }
.goal-list input:checked::after {
  content: "";
  width: 5px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.goal-list input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.goal-list label { font-size: 0.92rem; line-height: 1.5; cursor: pointer; transition: color 0.25s ease; }
.goal-list input:checked + label { color: var(--text-faint); text-decoration: line-through; }

.survey-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 1150px) {
  .survey-layout { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; }
}
.survey-list { display: flex; flex-direction: column; gap: 0.75rem; }
.survey-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  padding: 1rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.survey-list li.is-current { border-color: rgba(235,96,10,0.45); box-shadow: 0 0 0 3px rgba(235,96,10,0.08); }
.survey-list__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(0,86,164,0.08);
  color: var(--blue);
}
.survey-list__icon svg { width: 18px; height: 18px; }
.survey-list li > span:nth-child(2) { flex: 1 1 160px; min-width: 0; }
.survey-list strong { display: block; color: var(--navy); font-size: 0.94rem; line-height: 1.35; }
.survey-list small { color: var(--text-soft); font-size: 0.82rem; }

.survey h3 { font-size: 1.3rem; margin-bottom: 1.2rem; }
.survey fieldset { border: none; margin-bottom: 1.4rem; }
.survey legend { font-weight: 600; font-size: 0.94rem; color: var(--navy); margin-bottom: 0.7rem; }
.rating, .options { position: relative; }
.rating input, .options input { position: absolute; opacity: 0; pointer-events: none; }
.rating { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
.rating label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.25rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
}
.rating label:hover { border-color: rgba(0,86,164,0.45); transform: translateY(-2px); }
.rating__face { font-size: 1.6rem; line-height: 1; }
.rating input:checked + label { border-color: var(--blue); background: rgba(0,86,164,0.06); color: var(--blue); font-weight: 600; }
.options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.options label {
  padding: 0.55rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.options label:hover { border-color: rgba(0,86,164,0.45); }
.options input:checked + label { border-color: var(--blue); background: var(--blue); color: var(--white); }
.rating input:focus-visible + label,
.options input:focus-visible + label { outline: 2px solid var(--blue); outline-offset: 2px; }
.survey__field { margin-bottom: 1.4rem; }
.survey__field label { display: block; font-weight: 600; font-size: 0.94rem; color: var(--navy); margin-bottom: 0.5rem; }
.survey__field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--offwhite);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.survey__field textarea:focus { outline: none; border-color: var(--blue); background: var(--white); box-shadow: 0 0 0 4px rgba(0,86,164,0.1); }
.survey__field small { display: block; margin-top: 0.35rem; font-size: 0.8rem; color: var(--text-faint); }

.survey-thanks { padding: 2rem 1rem; text-align: center; animation: panelIn 0.5s var(--ease); }
.survey-thanks[hidden] { display: none; }
.survey-thanks__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(0,150,152,0.12);
  color: var(--teal);
}
.survey-thanks__icon svg { width: 32px; height: 32px; }
.survey-thanks h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.survey-thanks p { color: var(--text-soft); }

.stepper {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.stepper__step { position: relative; display: flex; gap: 1rem; padding-bottom: 1.4rem; }
.stepper__step:last-child { padding-bottom: 0; }
.stepper__step::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.stepper__step:last-child::before { display: none; }
.stepper__step.is-done::before { background: var(--teal); }
.stepper__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text-faint);
  font-weight: 700;
  font-size: 0.9rem;
}
.stepper__dot svg { width: 18px; height: 18px; }
.is-done .stepper__dot { background: var(--teal); border-color: var(--teal); color: var(--white); }
.stepper small {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.stepper strong { display: block; color: var(--navy); line-height: 1.35; margin-bottom: 0.2rem; }
.stepper p { color: var(--text-soft); font-size: 0.88rem; line-height: 1.5; }
@media (min-width: 1150px) {
  .stepper { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
  .stepper__step { flex-direction: column; gap: 0.75rem; padding-bottom: 0; }
  .stepper__step::before { left: 36px; right: -1rem; top: 17px; bottom: auto; width: auto; height: 2px; }
}

/* ==========================================================================
   Documents
   ========================================================================== */
.doc-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
}
.doc-list li:first-child { border-top: none; padding-top: 0; }
.doc-list li:last-child { padding-bottom: 0; }
.doc-list__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--mist);
  color: var(--text-soft);
}
.doc-list__icon svg { width: 20px; height: 20px; }
.doc-list li.is-open .doc-list__icon { background: rgba(235,96,10,0.1); color: var(--orange); }
.doc-list__name { flex: 1 1 220px; min-width: 0; }
.doc-list__name strong { display: block; color: var(--navy); font-size: 0.95rem; font-weight: 600; line-height: 1.35; }
.doc-list__name small { color: var(--text-faint); font-size: 0.82rem; }
.doc-list__date { min-width: 130px; font-size: 0.82rem; color: var(--text-soft); }
.doc-list .chip { min-width: 150px; justify-content: center; }
.doc-list .btn { min-width: 128px; }
/* Phones: name on top, status + action on one line underneath (the chip carries the state). */
@media (max-width: 640px) {
  .doc-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 0.5rem 0.9rem; }
  .doc-list__icon { grid-row: span 2; align-self: start; }
  .doc-list__name { grid-column: 2 / 4; }
  .doc-list__date { display: none; }
  .doc-list .chip { min-width: 0; justify-self: start; }
  .doc-list .btn { min-width: 0; }
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 2.25rem 1.5rem;
  text-align: center;
  background: var(--white);
  border: 2px dashed #C5D0D9;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.dropzone:hover { border-color: var(--blue); background: rgba(0,86,164,0.03); }
.dropzone:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.dropzone__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 0.4rem;
  border-radius: 50%;
  background: rgba(0,86,164,0.08);
  color: var(--blue);
}
.dropzone__icon svg { width: 24px; height: 24px; }
.dropzone strong { color: var(--navy); }
.dropzone span:last-child { color: var(--text-soft); font-size: 0.88rem; }

/* ==========================================================================
   Agenda
   ========================================================================== */
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.85rem; color: var(--text-soft); }
.legend li { display: flex; align-items: center; gap: 0.45rem; }
.legend li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--type); }

.agenda-day h2 {
  margin-bottom: 0.7rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.agenda-list { display: flex; flex-direction: column; gap: 0.6rem; }
.agenda-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--type);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.agenda-list time { width: 3.2rem; flex-shrink: 0; font-weight: 700; font-size: 0.92rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.agenda-list__body { flex: 1; min-width: 0; }
.agenda-list__body strong { display: block; color: var(--navy); font-size: 0.95rem; font-weight: 600; line-height: 1.35; }
.agenda-list__body small { color: var(--text-soft); font-size: 0.84rem; }
.agenda-list__type {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--type) 12%, white);
  color: var(--type);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .agenda-list__type { display: none; }
}

/* ==========================================================================
   Videos
   ========================================================================== */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.25rem; }
.video-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.video-card__thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, var(--navy)));
  color: var(--white);
}
.video-card__glyph { position: absolute; right: -18px; bottom: -22px; opacity: 0.2; }
.video-card__glyph svg { width: 130px; height: 130px; }
.video-card__play { position: absolute; inset: 0; display: grid; place-items: center; }
.video-card__play svg {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  transition: transform 0.35s var(--ease);
}
.video-card__thumb:hover .video-card__play svg,
.video-card__thumb:focus-visible .video-card__play svg { transform: scale(1.12); }
.video-card__duration {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgba(10,31,51,0.7);
  font-size: 0.74rem;
  font-weight: 600;
}
.video-card__body { display: flex; flex-direction: column; gap: 0.45rem; flex: 1; padding: 1rem 1.1rem 1.15rem; }
.video-card__cat { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.video-card__cat em { font-style: normal; color: var(--orange); }
.video-card h3 { flex: 1; font-size: 1.02rem; line-height: 1.3; }
.video-card__status { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--text-soft); }
.video-card__status.is-done { color: var(--teal); font-weight: 600; }
.video-card__status svg { width: 14px; height: 14px; }

.video-modal {
  width: min(860px, calc(100% - 2rem));
  margin: auto;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
.video-modal::backdrop { background: rgba(6,20,35,0.75); backdrop-filter: blur(3px); }
.video-modal__screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  aspect-ratio: 16 / 9;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--navy-soft), var(--blue-dark));
}
.video-modal__play svg { width: 72px; height: 72px; opacity: 0.9; }
.video-modal__screen p { max-width: 46ch; font-size: 0.95rem; color: rgba(255,255,255,0.75); }
.video-modal__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; }
.video-modal__bar h2 { color: var(--white); font-size: 1.1rem; }
.video-modal .portal-icon-btn { color: var(--white); border-color: rgba(255,255,255,0.3); }
.video-modal .portal-icon-btn:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

/* ==========================================================================
   Contacts
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.person-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.4rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.person-card__ask {
  margin-bottom: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--offwhite);
  font-size: 0.88rem;
}
.person-card__ask small {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.person-card .icon-list { margin: auto 0 0; }
.person-card--emergency { border-top: 3px solid var(--orange); }
.person-card--add {
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 170px;
  background: transparent;
  border: 2px dashed #C5D0D9;
  box-shadow: none;
  font-weight: 600;
  color: var(--text-soft);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.person-card--add:hover { border-color: var(--blue); color: var(--blue); }
.person-card__plus {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--mist);
  font-size: 1.5rem;
  line-height: 1;
}

.emergency-strip { padding: 1.5rem 1.75rem; border-radius: var(--radius-md); background: var(--navy); color: var(--white); }
.emergency-strip h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
}
.emergency-strip h2 svg { width: 20px; height: 20px; color: var(--peach); }
.emergency-strip ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.emergency-strip li { display: flex; align-items: center; gap: 0.9rem; }
.emergency-strip strong { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--peach); }
.emergency-strip span { font-size: 0.9rem; color: rgba(255,255,255,0.8); }

/* ==========================================================================
   Toast
   ========================================================================== */
.portal-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 120;
  max-width: calc(100% - 2rem);
  padding: 0.85rem 1.3rem;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 20px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
}
.portal-toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
