:root {
  --portal-navy: #0c2543;
  --portal-navy-2: #18385e;
  --portal-blue: #2357f6;
  --portal-orange: #f47a20;
  --portal-gold: #e2b33b;
  --portal-green: #18a058;
  --portal-red: #e24848;
  --portal-bg: #f5f7fb;
  --portal-card: #ffffff;
  --portal-soft: #eef3fa;
  --portal-line: #dfe6f0;
  --portal-text: #071a35;
  --portal-muted: #687894;
  --portal-shadow: 0 16px 40px rgba(7, 28, 56, 0.07);
  --portal-shadow-hover: 0 22px 50px rgba(7, 28, 56, 0.11);
  --portal-shadow-soft: 0 10px 24px rgba(7, 28, 56, 0.045);
  --portal-radius: 18px;
  --portal-radius-sm: 14px;
  --portal-ease: 180ms ease;
}

.portal-body {
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--portal-text);
  background:
    radial-gradient(circle at 72% -12%, rgba(226, 179, 59, 0.18), transparent 34%),
    radial-gradient(circle at 16% 8%, rgba(35, 87, 246, 0.12), transparent 30%),
    var(--portal-bg);
}

.portal-overlay {
  position: fixed;
  inset: 0;
  z-index: 39;
  display: none;
  background: rgba(7, 28, 56, 0.46);
  backdrop-filter: blur(3px);
}

.portal-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 292px minmax(0, 1fr);
}

.portal-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  overflow-y: auto;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 22%),
    linear-gradient(180deg, #14365f 0%, #102f55 54%, #0d2748 100%);
  box-shadow: 10px 0 30px rgba(7, 28, 56, 0.12);
}

.portal-brand {
  display: flex;
  width: 205px;
  padding: 9px 10px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--portal-radius-sm);
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.18);
}

.portal-brand img {
  width: 100%;
  height: 58px;
  object-fit: contain;
}

.portal-kicker {
  margin: 28px 12px 16px;
  color: #f6c94e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portal-nav {
  display: grid;
  gap: 9px;
}

.portal-nav a,
.portal-nav button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 13px;
  padding: 0 13px;
  color: #e9eff8;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--portal-radius-sm);
  cursor: pointer;
  transition: color var(--portal-ease), background var(--portal-ease), border-color var(--portal-ease), transform var(--portal-ease), box-shadow var(--portal-ease);
}

.portal-nav a:hover,
.portal-nav button:hover,
.portal-nav .is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 3px 0 0 var(--portal-gold);
  transform: translateX(2px);
}

.nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  color: #f8d46c;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 9px;
}

.nav-icon svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.nav-badge {
  margin-left: auto;
  min-width: 24px;
  padding: 3px 7px;
  color: #ffffff;
  font-size: 12px;
  text-align: center;
  background: #ee4545;
  border-radius: 999px;
}

.sidebar-help {
  margin-top: 36px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--portal-radius);
}

.sidebar-help strong {
  display: block;
  font-size: 17px;
}

.sidebar-help p {
  margin: 8px 0 14px;
  color: #d6e1f0;
  font-size: 13px;
  line-height: 1.45;
}

.side-action {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: 9px;
  color: #071c38;
  font-weight: 900;
  background: #f6c94e;
  border-radius: var(--portal-radius-sm);
  transition: transform var(--portal-ease), box-shadow var(--portal-ease), background var(--portal-ease);
}

.side-action:hover,
.primary-action:hover,
.soft-action:hover,
.success-action:hover,
.ghost-button:hover,
.mini-button:hover,
.form-card button:hover,
.help-form button:hover {
  transform: translateY(-1px);
  box-shadow: var(--portal-shadow-soft);
}

.side-action.secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.side-action.success {
  color: #ffffff;
  background: #1fa84f;
}

.portal-main {
  min-width: 0;
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(20px, 3vw, 42px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(223, 230, 240, 0.9);
  backdrop-filter: blur(16px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-button,
.top-icon,
.ghost-button,
.mini-button,
.help-form button,
.form-card button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--portal-text);
  font-weight: 900;
  background: #ffffff;
  border: 1px solid var(--portal-line);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--portal-shadow-soft);
  transition: transform var(--portal-ease), box-shadow var(--portal-ease), border-color var(--portal-ease), background var(--portal-ease), color var(--portal-ease);
}

.menu-button,
.top-icon {
  width: 42px;
  padding: 0;
}

.top-icon {
  position: relative;
  color: var(--portal-navy);
  border: 0;
  box-shadow: none;
}

.menu-button {
  display: none;
}

.top-icon:hover,
.menu-button:hover {
  color: var(--portal-blue);
  background: #f2f6ff;
}

.top-icon svg,
.menu-button svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.notification-dot {
  position: absolute;
  top: 2px;
  right: 4px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  background: var(--portal-red);
  border-radius: 999px;
}

.portal-topbar h1 {
  margin: 0;
  color: var(--portal-text);
  font-size: 18px;
  line-height: 1;
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-user {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  overflow: hidden;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #e9b95a, #f47a20);
  border-radius: 50%;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-chip small {
  display: block;
  margin-top: 2px;
  color: var(--portal-muted);
  font-weight: 700;
}

.portal-view {
  padding: 30px clamp(20px, 3.2vw, 46px) 56px;
}

.login-hero {
  display: grid;
  min-height: calc(100vh - 130px);
  align-items: center;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 420px;
}

.login-copy h2 {
  max-width: 760px;
  margin: 0;
  color: var(--portal-text);
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.96;
}

.login-copy p {
  max-width: 620px;
  color: var(--portal-muted);
  font-size: 20px;
  line-height: 1.6;
}

.portal-access-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.auth-card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 28px 30px;
  min-width: 0;
}

.auth-copy,
.auth-hint {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.55;
}

.auth-notice {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  background: #f8fbff;
  border: 1px solid rgba(35, 87, 246, 0.12);
  border-radius: 14px;
}

.auth-notice strong {
  color: var(--portal-text);
}

.auth-notice span {
  color: var(--portal-muted);
  line-height: 1.5;
}

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

.auth-form label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--portal-muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 14px;
  color: var(--portal-text);
  font: inherit;
  background: #ffffff;
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius-sm);
  transition: border-color var(--portal-ease), box-shadow var(--portal-ease), background var(--portal-ease);
}

.auth-form input:focus {
  outline: none;
  border-color: rgba(35, 87, 246, 0.45);
  box-shadow: 0 0 0 4px rgba(35, 87, 246, 0.09);
}

.auth-feedback {
  min-height: 20px;
  margin: 0;
  color: #1f4ed8;
  font-weight: 700;
}

.auth-feedback.is-error {
  color: #c9372c;
}

.auth-internal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-card .advisor-form-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.role-grid {
  display: grid;
  gap: 14px;
}

.role-card,
.panel-card,
.metric-card,
.table-card,
.form-card,
.academic-strip,
.summary-strip,
.welcome-card,
.progress-card,
.timeline-card,
.current-stage-card,
.services-card,
.side-card,
.mini-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(223, 230, 240, 0.9);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow);
  transition: transform var(--portal-ease), box-shadow var(--portal-ease), border-color var(--portal-ease), background var(--portal-ease);
}

.panel-card,
.table-card,
.form-card,
.mini-card,
.side-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 255, 0.96));
}

.metric-card,
.summary-strip,
.academic-strip {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 248, 253, 0.98));
}

.metric-card {
  border-color: rgba(210, 221, 236, 0.95);
}

.form-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 255, 0.98));
  box-shadow: 0 18px 44px rgba(7, 28, 56, 0.06);
}

.table-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(250, 252, 255, 0.99));
}

.mini-card,
.side-card {
  box-shadow: 0 12px 30px rgba(7, 28, 56, 0.05);
}

.role-card:hover,
.panel-card:hover,
.metric-card:hover,
.table-card:hover,
.form-card:hover,
.academic-strip:hover,
.summary-strip:hover,
.welcome-card:hover,
.progress-card:hover,
.timeline-card:hover,
.current-stage-card:hover,
.services-card:hover,
.side-card:hover,
.mini-card:hover {
  border-color: rgba(35, 87, 246, 0.16);
  box-shadow: var(--portal-shadow-hover);
  transform: translateY(-2px);
}

.role-card {
  padding: 22px;
  text-align: left;
  cursor: pointer;
}

.role-card strong {
  display: block;
  color: var(--portal-text);
  font-size: 22px;
}

.role-card span {
  display: block;
  margin-top: 8px;
  color: var(--portal-muted);
  line-height: 1.45;
}

.executive-dashboard {
  display: grid;
  gap: 22px;
}

.executive-hero {
  display: grid;
  gap: 22px;
  align-items: start;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  padding: 24px;
}

.executive-hero h2 {
  margin: 0;
  color: var(--portal-text);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
}

.executive-hero p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--portal-muted);
  font-size: 17px;
  line-height: 1.6;
}

.executive-role-stack {
  display: grid;
  gap: 12px;
}

.role-card-compact {
  padding: 16px 18px;
}

.role-card-compact strong {
  font-size: 18px;
}

.executive-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

.executive-actions-card,
.executive-status-card,
.executive-activity-card,
.executive-overview-card {
  display: grid;
  align-content: start;
  gap: 16px;
}

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

.executive-action {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: var(--portal-text);
  background: #f8fbff;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  transition: transform var(--portal-ease), box-shadow var(--portal-ease), border-color var(--portal-ease), background var(--portal-ease);
}

.executive-action:hover {
  background: #ffffff;
  border-color: rgba(35, 87, 246, 0.2);
  box-shadow: 0 14px 30px rgba(7, 28, 56, 0.08);
  transform: translateY(-1px);
}

.executive-action strong {
  display: block;
  font-size: 15px;
}

.executive-action small {
  display: block;
  margin-top: 4px;
  color: var(--portal-muted);
  line-height: 1.4;
}

.executive-activity-list .message-item {
  padding: 12px 0;
}

.portal-entry {
  display: grid;
  gap: 24px;
}

.portal-entry-hero {
  display: grid;
  gap: 22px;
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  padding: 24px;
}

.portal-entry-copy {
  display: grid;
  align-content: center;
  gap: 14px;
}

.portal-entry-copy h2 {
  max-width: 760px;
  margin: 0;
  color: var(--portal-text);
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.02;
}

.portal-entry-copy p {
  max-width: 640px;
  margin: 0;
  color: var(--portal-muted);
  font-size: 17px;
  line-height: 1.65;
}

.portal-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.portal-entry-visual {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  border-radius: calc(var(--portal-radius) - 2px);
  background: #d8dee8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.portal-entry-visual img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  display: block;
  object-fit: cover;
}

.portal-entry-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(7, 28, 56, 0.1), rgba(7, 28, 56, 0.62));
}

.portal-entry-visual-copy {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  z-index: 1;
  display: grid;
  gap: 8px;
  color: #ffffff;
}

.portal-entry-visual-copy strong {
  font-size: clamp(24px, 2.2vw, 32px);
}

.portal-entry-visual-copy span {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.55;
}

.portal-services-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.portal-service-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
}

.portal-service-card h3 {
  margin: 0;
  font-size: 18px;
}

.portal-service-card p {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.55;
}

.portal-internal-access {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.portal-internal-access h3 {
  margin: 0;
  font-size: 18px;
}

.portal-internal-access p {
  margin: 6px 0 0;
  color: var(--portal-muted);
}

.portal-internal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.student-dashboard {
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.dashboard-primary {
  display: grid;
  min-width: 0;
  gap: 26px;
}

.dashboard-side {
  display: grid;
  align-content: start;
  gap: 26px;
}

.welcome-card {
  display: grid;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
}

.welcome-card h2 {
  margin: 0;
  color: var(--portal-text);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.05;
}

.welcome-card p {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 1.35;
}

.status-kpi-card {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-kpi-card div {
  min-width: 0;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid #e1e8f2;
  border-radius: var(--portal-radius-sm);
  box-shadow: 0 8px 20px rgba(7, 28, 56, 0.05);
  transition: transform var(--portal-ease), border-color var(--portal-ease), box-shadow var(--portal-ease);
}

.status-kpi-card div:hover {
  border-color: rgba(35, 87, 246, 0.22);
  box-shadow: 0 14px 28px rgba(7, 28, 56, 0.08);
  transform: translateY(-1px);
}

.status-kpi-card small {
  display: block;
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-kpi-card strong {
  display: block;
  margin-top: 4px;
  color: var(--portal-text);
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.status-kpi-card div:nth-child(3) strong {
  color: var(--portal-blue);
  font-size: 20px;
}

.status-kpi-card div:nth-child(4) {
  border-left: 4px solid var(--portal-orange);
}

.summary-strip {
  display: grid;
  gap: 10px;
  padding: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.academic-strip {
  display: grid;
  gap: 10px;
  padding: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-item,
.academic-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border-radius: var(--portal-radius-sm);
  transition: background var(--portal-ease), transform var(--portal-ease);
}

.summary-item:hover,
.academic-item:hover {
  background: #f8fbff;
  transform: translateY(-1px);
}

.summary-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  color: var(--portal-blue);
  background: #eef2ff;
  border-radius: var(--portal-radius-sm);
}

.summary-icon.orange {
  color: var(--portal-orange);
  background: #fff2e8;
}

.summary-icon.green {
  color: var(--portal-green);
  background: #e9f8ef;
}

.summary-icon.gold {
  color: #9a6a05;
  background: #fff5d8;
}

.summary-icon svg,
.card-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.summary-item small,
.academic-item small {
  display: block;
  color: var(--portal-muted);
  font-weight: 800;
  font-size: 11px;
}

.summary-item strong,
.academic-item strong {
  display: block;
  margin-top: 3px;
  color: var(--portal-text);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.academic-item .avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.summary-metric {
  min-height: 74px;
}

.summary-metric strong {
  font-size: 24px;
  line-height: 1;
}

.overview-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
}

.current-stage-card {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  padding: 16px 18px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(7, 28, 56, 0.98), rgba(13, 43, 79, 0.96)),
    var(--portal-navy);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 22px 52px rgba(7, 28, 56, 0.18);
}

.current-stage-card::after {
  position: absolute;
  right: -54px;
  bottom: -70px;
  width: 190px;
  height: 190px;
  content: "";
  background: radial-gradient(circle, rgba(226, 179, 59, 0.2), transparent 68%);
  pointer-events: none;
}

.current-stage-card .card-head {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

.current-stage-card h3,
.current-stage-card .stage-focus strong,
.current-stage-card .stage-next-grid strong {
  color: #ffffff;
}

.stage-focus {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.stage-focus-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  color: #071c38;
  background: #f6c94e;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(246, 201, 78, 0.24);
}

.stage-focus-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.stage-focus small,
.stage-next-grid small {
  display: block;
  color: #aebbd0;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stage-focus strong {
  display: block;
  margin-top: 2px;
  font-size: 24px;
  line-height: 1;
}

.stage-focus p {
  max-width: 520px;
  margin: 8px 0 0;
  color: #d7e0ee;
  font-size: 13px;
  line-height: 1.4;
}

.stage-next-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stage-next-grid div {
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.stage-next-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.stage-action {
  position: relative;
  z-index: 1;
  width: fit-content;
  min-height: 38px;
  padding: 0 14px;
  color: #071c38;
  font-size: 13px;
  background: #f6c94e;
}

.services-card {
  grid-column: 1 / -1;
  padding: 12px 14px;
  overflow: hidden;
}

.services-card .card-head {
  margin-bottom: 10px;
}

.section-note {
  margin: 4px 0 0;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.45;
}

.services-card .card-head h3 {
  font-size: 15px;
}

.services-grid {
  display: flex;
  gap: 12px;
  margin: 0 -16px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.service-mini {
  display: grid;
  min-width: calc((100% - 36px) / 4);
  min-height: 104px;
  align-content: start;
  gap: 5px;
  padding: 9px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  border: 1px solid #e3eaf4;
  border-radius: 16px;
  scroll-snap-align: start;
  transition: transform var(--portal-ease), box-shadow var(--portal-ease), border-color var(--portal-ease);
}

.service-mini:hover {
  border-color: rgba(35, 87, 246, 0.18);
  box-shadow: 0 16px 32px rgba(7, 28, 56, 0.08);
  transform: translateY(-2px);
}

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.service-status {
  padding: 3px 7px;
  color: #53647a;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  background: #eef3f9;
  border-radius: 999px;
}

.service-mini.urgent {
  border-color: rgba(244, 122, 32, 0.34);
  background: linear-gradient(180deg, #fffaf6, #ffffff);
}

.service-mini.urgent .service-status {
  color: #a84400;
  background: #fff0e4;
}

.service-mini.contracted .service-status {
  color: #0a6b39;
  background: #e4f7eb;
}

.service-mini.process .service-status {
  color: #164be0;
  background: #e9eeff;
}

.service-mini.recommended .service-status {
  color: #7a5707;
  background: #fff5d8;
}

.service-mini strong {
  color: var(--portal-text);
  font-size: 12px;
  line-height: 1.2;
}

.service-mini p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 10px;
  line-height: 1.24;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.service-flow {
  color: #667a95;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.service-mini a {
  align-self: end;
  margin-top: auto;
  color: var(--portal-blue);
  font-size: 10px;
  font-weight: 900;
}

.service-mini.contracted a {
  color: var(--portal-muted);
}

.progress-card,
.timeline-card,
.current-stage-card,
.services-card,
.side-card,
.mini-card,
.panel-card,
.table-card,
.form-card {
  padding: 20px;
}

.mini-card {
  height: fit-content;
}

.process-highlight {
  grid-column: 1 / -1;
  border-color: rgba(35, 87, 246, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  box-shadow: 0 22px 50px rgba(35, 87, 246, 0.1);
}

.process-highlight .card-head {
  margin-bottom: 4px;
}

.process-highlight h3 {
  font-size: 24px;
}

.process-note {
  margin: 0 0 14px;
  color: var(--portal-muted);
  font-size: 13px;
  font-weight: 800;
}

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

.payment-summary div {
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #e3eaf4;
  border-radius: 14px;
}

.payment-summary small {
  display: block;
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--portal-text);
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.payment-summary div:first-child {
  border-color: rgba(244, 122, 32, 0.24);
  background: #fff8f2;
}

.payment-summary div:first-child strong {
  color: var(--portal-orange);
  font-size: 20px;
}

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

.card-head h3,
.side-card h3,
.mini-card h3,
.panel-card h2,
.table-card h2,
.form-card h2 {
  margin: 0;
  color: var(--portal-text);
  font-size: 18px;
  line-height: 1.2;
}

.view-link {
  color: var(--portal-blue);
  font-size: 13px;
  font-weight: 900;
  transition: color var(--portal-ease);
}

.view-link:hover {
  color: var(--portal-orange);
}

.progress-wrap {
  display: grid;
  align-items: center;
  gap: 18px;
  grid-template-columns: 148px 1fr;
}

.progress-ring {
  --value: 0;
  display: grid;
  width: 148px;
  height: 148px;
  place-items: center;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(var(--portal-navy) 0 calc(var(--value) * 1%), var(--portal-gold) calc(var(--value) * 1%) 78%, #e7edf5 0);
  border-radius: 50%;
}

.progress-ring strong {
  display: block;
  color: var(--portal-text);
  font-size: 34px;
}

.progress-ring span {
  display: block;
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.progress-legend {
  display: grid;
  gap: 10px;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--portal-muted);
  font-size: 14px;
}

.legend-row strong {
  color: var(--portal-text);
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  background: #aeb8c8;
  border-radius: 50%;
}

.dot.done {
  background: var(--portal-green);
}

.dot.process {
  background: var(--portal-blue);
}

.dot.review {
  background: var(--portal-orange);
}

.dot.blocked {
  background: var(--portal-red);
}

.timeline {
  display: grid;
  width: 100%;
  max-width: 100%;
  padding: 8px 0 0;
  grid-template-columns: repeat(10, minmax(72px, 1fr));
  overflow: hidden;
}

.timeline-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 4px;
  text-align: center;
}

.timeline-step::before {
  position: absolute;
  top: 17px;
  left: -50%;
  width: 100%;
  height: 3px;
  content: "";
  background: #d5deeb;
}

.timeline-step:first-child::before {
  display: none;
}

.timeline-number {
  position: relative;
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #516176;
  font-weight: 900;
  background: #ffffff;
  border: 2px solid #cfd8e7;
  border-radius: 50%;
}

.timeline-step.done .timeline-number {
  color: #ffffff;
  background: var(--portal-green);
  border-color: var(--portal-green);
}

.timeline-step.process .timeline-number {
  color: #ffffff;
  background: var(--portal-blue);
  border-color: var(--portal-blue);
}

.timeline-step.review .timeline-number {
  color: #ffffff;
  background: var(--portal-orange);
  border-color: var(--portal-orange);
}

.timeline-step.blocked .timeline-number {
  color: #ffffff;
  background: var(--portal-red);
  border-color: var(--portal-red);
}

.timeline-step strong {
  width: 100%;
  max-width: 96px;
  color: var(--portal-text);
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.content-grid {
  display: grid;
  align-items: start;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: 1 / -1;
}

.status {
  display: inline-flex;
  min-width: 92px;
  justify-content: center;
  padding: 6px 9px;
  color: #44546b;
  font-size: 12px;
  font-weight: 900;
  background: #edf2f8;
  border-radius: 999px;
}

.status.completado,
.status.pagado,
.status.aprobado {
  color: #0a6b39;
  background: #e4f7eb;
}

.status.observado,
.status.alta {
  color: #ad2f2f;
  background: #ffe8e8;
}

.status.en-proceso {
  color: #164be0;
  background: #e9eeff;
}

.status.en-gestion {
  color: #164be0;
  background: #e9eeff;
}

.status.activo {
  color: #164be0;
  background: #e9eeff;
}

.status.solicitado {
  color: #7a5707;
  background: #fff5d8;
}

.status.en-revision,
.status.pendiente {
  color: #b75b05;
  background: #fff0e4;
}

.compact-list,
.stage-list,
.plain-list,
.message-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-item,
.stage-item,
.task-item,
.event-item,
.payment-item,
.message-item {
  display: grid;
  align-items: start;
  gap: 10px;
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid #e7edf5;
  border-radius: var(--portal-radius-sm);
  transition: background var(--portal-ease), border-color var(--portal-ease), transform var(--portal-ease), box-shadow var(--portal-ease);
}

.compact-item,
.task-item,
.payment-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.documents-card,
.tasks-card {
  min-width: 0;
}

.messages-card,
.payments-card,
.guide-card {
  grid-column: 1 / -1;
}

.documents-card .compact-item,
.tasks-card .compact-item {
  grid-template-columns: 1fr;
  gap: 12px;
}

.compact-item-stacked .item-meta {
  display: flex;
  justify-content: flex-start;
}

.compact-item:hover,
.stage-item:hover,
.task-item:hover,
.event-item:hover,
.payment-item:hover,
.message-item:hover {
  background: #ffffff;
  border-color: rgba(35, 87, 246, 0.18);
  box-shadow: 0 10px 24px rgba(7, 28, 56, 0.06);
  transform: translateY(-1px);
}

.compact-item p,
.task-item p,
.event-item p,
.payment-item p {
  margin: 4px 0 0;
  color: var(--portal-muted);
  font-size: 13px;
}

.item-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.item-left > div {
  min-width: 0;
}

.item-left strong,
.task-item strong,
.payment-item strong {
  display: block;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  color: var(--portal-blue);
  background: #eef2ff;
  border-radius: var(--portal-radius-sm);
}

.message-item {
  grid-template-columns: 1fr;
  align-items: start;
}

.message-item .item-left {
  align-items: flex-start;
}

.message-body {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.message-headline {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.message-headline strong {
  min-width: 0;
}

.message-headline small {
  flex: 0 0 auto;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.2;
  text-align: right;
}

.message-item p {
  margin: 4px 0 0;
  color: var(--portal-text);
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: normal;
}

.security-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f7fbff, #eef5ff);
  border: 1px solid #dbe7ff;
  border-radius: 16px;
}

.security-banner strong,
.passport-meta strong {
  display: block;
}

.security-banner p {
  margin: 4px 0 0;
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.5;
}

.documents-card,
.tasks-card,
.messages-card {
  align-self: start;
}

.documents-card .compact-list,
.tasks-card .compact-list,
.messages-card .compact-list {
  gap: 10px;
}

.documents-card .compact-item,
.tasks-card .compact-item,
.messages-card .message-item {
  min-height: 0;
}

.documents-card .status,
.tasks-card .status,
.messages-card .status {
  align-self: center;
  justify-self: start;
}

.documents-card .status,
.tasks-card .status {
  min-width: 78px;
  padding: 6px 8px;
  font-size: 11px;
}

.documents-card .item-left,
.tasks-card .item-left {
  min-width: 0;
}

.documents-card .compact-item p,
.tasks-card .compact-item p {
  line-height: 1.25;
}

.passport-card {
  display: grid;
  gap: 14px;
}

.passport-note {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.5;
}

.passport-meta {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.passport-meta small {
  display: block;
  margin-bottom: 4px;
  color: #73849a;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.upload-field {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #fbfcfe;
  border: 1px dashed #cfd9e7;
  border-radius: 16px;
}

.upload-field span {
  color: var(--portal-text);
  font-weight: 800;
}

.passport-security {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: #36506f;
  background: #f7faff;
  border-radius: 14px;
}

.passport-security p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.process-stage-card {
  display: grid;
  gap: 14px;
}

.process-stage-card.is-focused {
  border-color: rgba(244, 122, 32, 0.36);
  box-shadow: 0 18px 34px rgba(244, 122, 32, 0.12);
}

.timeline-step.is-focused .timeline-number {
  box-shadow: 0 0 0 6px rgba(244, 122, 32, 0.12);
}

.process-stage-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}

.process-stage-footer small {
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.45;
}

.advisor-card {
  text-align: center;
}

.advisor-card .avatar {
  width: 76px;
  height: 76px;
  margin: 8px auto 12px;
}

.compact-advisor-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  text-align: left;
}

.compact-advisor-card h3 {
  font-size: 16px;
}

.advisor-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.advisor-compact .avatar,
.advisor-card .advisor-photo {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  margin: 0;
  border: 3px solid #ffffff;
  box-shadow: 0 10px 22px rgba(7, 28, 56, 0.13);
}

.advisor-compact strong {
  display: block;
  color: var(--portal-text);
  font-size: 15px;
  line-height: 1.2;
}

.compact-advisor-card .primary-action {
  min-height: 38px;
  font-size: 13px;
}

.online {
  display: inline-flex;
  margin: 6px 0 0;
  padding: 5px 9px;
  color: #0a6b39;
  font-size: 11px;
  font-weight: 900;
  background: #e4f7eb;
  border-radius: 999px;
}

.primary-action,
.soft-action,
.success-action {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  color: #ffffff;
  font-weight: 900;
  background: var(--portal-navy);
  border: 0;
  border-radius: 9px;
  transition: transform var(--portal-ease), box-shadow var(--portal-ease), background var(--portal-ease), color var(--portal-ease);
}

.soft-action {
  color: var(--portal-blue);
  background: #eef2ff;
  border: 1px solid #dbe4ff;
}

.success-action {
  color: #0a6b39;
  background: #e4f7eb;
}

.guide-card {
  display: grid;
  align-content: start;
  gap: 14px;
  height: 100%;
  overflow: hidden;
}

.guide-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.guide-head h3 {
  margin: 0;
}

.guide-head p {
  margin: 6px 0 0;
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.35;
}

.guide-layout {
  display: grid;
  gap: 12px;
  align-items: start;
  grid-template-columns: 0.8fr 1.2fr;
}

.guide-visual {
  height: 88px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(7, 28, 56, 0.05), rgba(7, 28, 56, 0.24)),
    url("https://images.unsplash.com/photo-1539037116277-4db20889f2d4?auto=format&fit=crop&w=900&q=82") center/cover;
}

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

.guide-resource-grid button,
.guide-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--portal-text);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  background: #f8fbff;
  border: 1px solid #dfe6f0;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color var(--portal-ease), background var(--portal-ease), transform var(--portal-ease), box-shadow var(--portal-ease);
}

.guide-resource-grid button:hover,
.guide-action:hover {
  border-color: rgba(35, 87, 246, 0.22);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(7, 28, 56, 0.06);
  transform: translateY(-1px);
}

.guide-action {
  width: 100%;
  color: var(--portal-blue);
}

.advisor-dashboard {
  align-items: start;
}

.advisor-dashboard > * {
  min-width: 0;
}

.advisor-banner,
.advisor-profile-head,
.advisor-student-top,
.advisor-inline-meta,
.advisor-form-actions,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.advisor-banner {
  padding: 26px 28px;
}

.advisor-banner h2,
.advisor-profile-head h2 {
  margin: 0;
}

.advisor-banner p,
.advisor-profile-head p {
  margin: 6px 0 0;
  color: var(--portal-muted);
}

.advisor-banner-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.advisor-banner-meta strong {
  color: var(--portal-text);
  font-size: 28px;
  font-weight: 900;
}

.advisor-banner-meta small,
.advisor-inline-meta small,
.advisor-action-card small {
  color: var(--portal-muted);
  line-height: 1.45;
}

.advisor-main-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 320px minmax(0, 1fr);
}

.advisor-content-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.advisor-students-panel,
.advisor-action-card,
.advisor-stage-card,
.advisor-profile-card {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.section-head {
  min-width: 0;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.section-head span,
.section-head a {
  color: var(--portal-blue);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.advisor-student-list,
.advisor-doc-grid,
.advisor-action-stack {
  display: grid;
  gap: 12px;
}

.advisor-student-button {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 14px;
  color: inherit;
  text-align: left;
  background: #f8fbff;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  cursor: pointer;
  transition: transform var(--portal-ease), box-shadow var(--portal-ease), border-color var(--portal-ease), background var(--portal-ease);
}

.advisor-student-button:hover,
.advisor-student-button.is-active {
  background: #ffffff;
  border-color: rgba(35, 87, 246, 0.2);
  box-shadow: 0 14px 28px rgba(7, 28, 56, 0.08);
  transform: translateY(-1px);
}

.advisor-student-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--portal-muted);
  font-size: 13px;
}

.advisor-large-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  font-size: 22px;
}

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

.advisor-summary-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.advisor-summary-copy h2,
.advisor-summary-copy p {
  margin: 0;
  overflow-wrap: anywhere;
}

.advisor-summary-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.advisor-summary-list .compact-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: #f8fbff;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  min-width: 0;
}

.advisor-summary-list .compact-item strong,
.advisor-summary-list .compact-item span {
  overflow-wrap: anywhere;
}

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

.advisor-profile-grid .compact-item {
  margin: 0;
  min-width: 0;
}

.advisor-stage-card strong {
  color: var(--portal-text);
  font-size: 22px;
  line-height: 1.15;
}

.advisor-stage-card p,
.advisor-action-card p {
  margin: 0;
  color: var(--portal-text);
  line-height: 1.5;
}

.advisor-kpi-grid,
.advisor-actions-grid,
.advisor-bottom-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.advisor-kpi-grid > *,
.advisor-actions-grid > *,
.advisor-bottom-grid > * {
  min-width: 0;
}

.advisor-kpi-grid .span-2,
.advisor-actions-grid .span-2,
.advisor-bottom-grid .span-2 {
  grid-column: 1 / -1;
}

.advisor-form-grid {
  gap: 12px;
}

.advisor-form-grid textarea {
  min-height: 110px;
}

.advisor-form-actions {
  justify-content: flex-end;
}

.advisor-inline-upload {
  gap: 10px;
}

.advisor-inline-upload input {
  width: 100%;
}

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

.advisor-doc-card {
  min-width: 0;
}

.advisor-doc-card strong,
.advisor-doc-card h4,
.advisor-doc-card p,
.advisor-student-button strong,
.advisor-student-button p,
.advisor-banner h2,
.advisor-banner p,
.advisor-stage-card strong,
.advisor-stage-card p,
.advisor-action-card strong,
.advisor-action-card p,
.advisor-action-card small,
.advisor-profile-card p,
.advisor-profile-card strong {
  overflow-wrap: anywhere;
}

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

.metric-card {
  padding: 22px;
}

.metric-card strong {
  display: block;
  color: var(--portal-muted);
  font-size: 13px;
  text-transform: uppercase;
}

.metric-card span {
  display: block;
  margin-top: 8px;
  color: var(--portal-text);
  font-size: 26px;
  font-weight: 900;
}

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

.data-table th,
.data-table td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid var(--portal-line);
}

.data-table th {
  color: var(--portal-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.table-note {
  margin: 0 0 16px;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-demo-access {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(244, 247, 253, 0.96), rgba(255, 255, 255, 0.96));
}

.auth-demo-access strong {
  display: block;
  margin-bottom: 8px;
  color: var(--portal-text);
}

.auth-demo-access p {
  margin: 0 0 12px;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-demo-access ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-demo-access li {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(37, 84, 183, 0.12);
  color: var(--portal-text);
  font-size: 14px;
}

.admin-activate-button {
  min-width: 136px;
  color: #ffffff;
  background: linear-gradient(135deg, #17345f, #2857a6);
  border-color: transparent;
}

.admin-activate-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(23, 52, 95, 0.22);
}

.admin-activate-button:disabled {
  color: var(--portal-muted);
  background: #eef3fb;
  border-color: var(--portal-line);
  box-shadow: none;
  cursor: not-allowed;
}

.file-input {
  max-width: 210px;
}

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

.form-card label {
  display: grid;
  gap: 7px;
  color: var(--portal-muted);
  font-size: 13px;
  font-weight: 800;
}

.form-card input,
.form-card select,
.form-card textarea,
.help-form input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--portal-text);
  font: inherit;
  background: #ffffff;
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius-sm);
  transition: border-color var(--portal-ease), box-shadow var(--portal-ease), background var(--portal-ease);
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.help-form input:focus {
  outline: none;
  border-color: rgba(35, 87, 246, 0.45);
  box-shadow: 0 0 0 4px rgba(35, 87, 246, 0.09);
}

.form-card textarea {
  min-height: 92px;
  resize: vertical;
}

.service-page {
  align-items: start;
}

.service-hero-card p {
  margin: 10px 0 0;
  color: var(--portal-muted);
  line-height: 1.6;
}

.service-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.final-doc-banner {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
}

.final-doc-banner-meta {
  margin-top: 18px;
}

.service-detail-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.service-info-chip {
  padding: 14px;
  background: #fbfcfe;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
}

.service-info-chip small {
  display: block;
  margin-bottom: 6px;
  color: #74869d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.service-benefits {
  gap: 10px;
}

.benefit-item {
  padding: 12px 14px;
  color: var(--portal-text);
  background: #fbfcfe;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
}

.service-checklist {
  gap: 10px;
}

.checklist-item {
  padding: 12px 14px;
  background: #fbfcfe;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
}

.checklist-item label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--portal-text);
  font-weight: 700;
  cursor: default;
}

.checklist-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--portal-blue);
}

.checklist-item label.is-complete span {
  color: #0a6b39;
}

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

.service-doc-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fbfcfe;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
}

.service-doc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.service-doc-head strong,
.service-doc-meta strong {
  display: block;
}

.service-doc-head small,
.service-doc-meta span {
  display: block;
  margin-top: 4px;
  color: #74869d;
  font-size: 12px;
  font-weight: 800;
}

.service-doc-card p {
  margin: 0;
  color: var(--portal-text);
  line-height: 1.5;
}

.service-doc-meta {
  display: grid;
  gap: 4px;
}

.service-doc-action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.service-doc-links {
  flex-wrap: wrap;
  gap: 10px;
}

.doc-link-button {
  min-height: 40px;
  padding-inline: 14px;
}

.agency-doc-note {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  background: #f7faff;
  border: 1px solid #dbe7ff;
  border-radius: 14px;
}

.agency-doc-note strong {
  color: var(--portal-text);
}

.agency-doc-note p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.45;
}

.review-doc-button {
  min-height: 42px;
  padding-inline: 16px;
}

.service-upload-field {
  padding: 12px 14px;
}

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

.evaluation-item small {
  display: block;
  margin-bottom: 6px;
  color: #74869d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.evaluation-item strong {
  color: var(--portal-text);
  line-height: 1.45;
}

.service-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.insurance-flow-card p {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.6;
}

.agenda-note {
  margin: 14px 0 0;
  color: var(--portal-muted);
  line-height: 1.6;
}

.help-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  min-height: 50px;
  padding: 0 20px;
  color: #0f2744;
  font-weight: 900;
  background: linear-gradient(180deg, #edd48a 0%, #e2bf63 100%);
  border: 1px solid rgba(177, 136, 37, 0.24);
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(165, 128, 40, 0.2);
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: transform var(--portal-ease), box-shadow var(--portal-ease), filter var(--portal-ease);
}

.help-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(165, 128, 40, 0.24);
  filter: saturate(0.95);
}

.help-panel {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 31;
  display: none;
  width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: 0 22px 60px rgba(7, 28, 56, 0.24);
}

.help-panel.is-open {
  display: block;
}

.help-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  color: #ffffff;
  background: var(--portal-navy);
}

.help-panel-header button {
  color: #ffffff;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.help-panel-body {
  display: grid;
  max-height: 260px;
  gap: 10px;
  padding: 16px;
  overflow-y: auto;
}

.help-panel-body p {
  margin: 0;
  padding: 10px 12px;
  background: #f1f5f9;
  border-radius: 9px;
}

.help-panel-body .user {
  color: #ffffff;
  background: var(--portal-blue);
}

.help-form {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
  padding: 12px;
  border-top: 1px solid var(--portal-line);
}

@media (max-width: 1220px) {
  .portal-entry-hero,
  .portal-services-grid,
  .portal-access-grid {
    grid-template-columns: 1fr;
  }

  .advisor-main-grid,
  .advisor-kpi-grid,
  .advisor-actions-grid,
  .advisor-bottom-grid,
  .advisor-profile-grid,
  .advisor-doc-grid,
  .auth-form {
    grid-template-columns: 1fr;
  }

  .advisor-kpi-grid .span-2,
  .advisor-actions-grid .span-2,
  .advisor-bottom-grid .span-2 {
    grid-column: auto;
  }

  .executive-hero,
  .executive-kpis,
  .executive-grid,
  .executive-actions-grid {
    grid-template-columns: 1fr;
  }

  .student-dashboard {
    grid-template-columns: 1fr;
  }

  .advisor-main-grid,
  .advisor-kpi-grid,
  .advisor-actions-grid,
  .advisor-bottom-grid,
  .advisor-doc-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .welcome-card {
    grid-template-columns: 1fr;
  }

  .service-detail-grid {
    grid-template-columns: 1fr;
  }

  .service-doc-grid {
    grid-template-columns: 1fr;
  }

  .evaluation-grid {
    grid-template-columns: 1fr;
  }

  .overview-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3 {
    grid-column: auto;
  }
}

@media (max-width: 1040px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: static;
    height: auto;
  }

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

  .sidebar-help {
    display: none;
  }

  .academic-strip,
  .summary-strip,
  .status-kpi-card,
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    row-gap: 24px;
    overflow: hidden;
    padding-bottom: 0;
  }

  .timeline-step:nth-child(6)::before {
    display: none;
  }

  .dashboard-side {
    grid-template-columns: 1fr;
  }

  .login-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .portal-topbar,
  .portal-user,
  .welcome-card,
  .compact-item,
  .stage-item,
  .task-item,
  .event-item,
  .payment-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-topbar {
    position: static;
  }

  .portal-nav,
  .academic-strip,
  .summary-strip,
  .status-kpi-card,
  .dashboard-grid,
  .form-grid,
  .progress-wrap {
    grid-template-columns: 1fr;
  }

  .profile-chip div,
  #activeRole,
  .ghost-button {
    display: none;
  }

  .guide-tabs {
    grid-template-columns: 1fr;
  }

  .timeline {
    display: grid;
    gap: 0;
    grid-template-columns: 1fr;
  }

  .timeline-step {
    display: grid;
    min-height: 72px;
    justify-items: start;
    gap: 2px 14px;
    padding: 0 0 20px 52px;
    text-align: left;
    grid-template-columns: auto 1fr;
  }

  .timeline-step::before {
    top: 36px;
    left: 17px;
    display: block;
    width: 3px;
    height: calc(100% - 18px);
  }

  .timeline-step:first-child::before {
    display: block;
  }

  .timeline-step:last-child::before {
    display: none;
  }

  .timeline-number {
    position: absolute;
    top: 0;
    left: 0;
  }

  .timeline-step strong {
    max-width: none;
    padding-top: 8px;
    font-size: 14px;
  }

  .advisor-banner,
  .advisor-profile-head,
  .advisor-student-top,
  .advisor-inline-meta,
  .advisor-form-actions,
  .section-head,
  .advisor-student-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Mobile first experience: 320px-768px */
@media (max-width: 768px) {
  .portal-body {
    padding-bottom: 78px;
  }

  .portal-shell {
    display: block;
    width: 100%;
  }

  .portal-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    width: min(84vw, 310px);
    height: 100dvh;
    padding: 22px 16px 96px;
    transform: translateX(-106%);
    transition: transform 240ms ease;
  }

  .menu-open .portal-sidebar {
    transform: translateX(0);
  }

  .menu-open .portal-overlay {
    display: block;
  }

  .menu-button {
    display: inline-flex;
  }

  .portal-brand {
    width: 190px;
  }

  .portal-nav {
    grid-template-columns: 1fr;
  }

  .portal-topbar {
    position: sticky;
    top: 0;
    min-height: 64px;
    padding: 10px 14px;
  }

  .portal-topbar h1,
  .eyebrow,
  .top-icon,
  .ghost-button {
    display: none;
  }

  .profile-chip .avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .portal-view {
    padding: 14px 12px 92px;
  }

  .student-dashboard,
  .dashboard-primary,
  .dashboard-side,
  .overview-grid,
  .content-grid,
  .advisor-main-grid,
  .advisor-content-stack {
    display: flex;
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    gap: 14px;
  }

  .dashboard-primary,
  .dashboard-side,
  .overview-grid,
  .content-grid {
    display: contents;
  }

  .progress-card {
    order: 6;
  }

  .current-stage-card {
    order: 4;
  }

  .services-card {
    order: 5;
  }

  .appointment-card {
    order: 11;
  }

  .academic-strip {
    order: 2;
  }

  .summary-strip {
    order: 3;
  }

  .tasks-card {
    order: 8;
  }

  .documents-card {
    order: 7;
  }

  .timeline-card {
    order: 12;
  }

  .messages-card {
    order: 9;
  }

  .payments-card {
    order: 10;
  }

  .advisor-card {
    order: 12;
  }

  .guide-card {
    order: 11;
  }

  .help-card {
    order: 14;
  }

  .welcome-card {
    order: 1;
    padding: 14px;
    grid-template-columns: 1fr;
  }

  .welcome-card h2 {
    font-size: 24px;
  }

  .welcome-card p {
    font-size: 13px;
  }

  .status-kpi-card,
  .academic-strip,
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .academic-strip,
  .summary-strip {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .summary-metric {
    min-height: 68px;
    background: #ffffff;
    border: 1px solid var(--portal-line);
  }

  .progress-card,
  .timeline-card,
  .current-stage-card,
  .academic-strip,
  .services-card,
  .side-card,
  .mini-card,
  .panel-card,
  .table-card,
  .form-card {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
  }

  .progress-wrap {
    grid-template-columns: 118px 1fr;
    gap: 14px;
  }

  .stage-focus {
    gap: 12px;
  }

  .stage-focus-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 14px;
  }

  .stage-focus strong {
    font-size: 24px;
  }

  .stage-next-grid {
    grid-template-columns: 1fr;
  }

  .stage-action {
    width: 100%;
  }

  .services-card {
    overflow: hidden;
  }

  .services-grid {
    margin: 0 -16px;
    padding: 0 16px 6px;
  }

  .executive-hero {
    padding: 16px;
  }

  .portal-entry-hero {
    padding: 16px;
  }

  .portal-entry-copy h2 {
    font-size: 28px;
  }

  .portal-entry-actions,
  .portal-internal-access,
  .portal-internal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-entry-visual {
    min-height: 220px;
  }

  .executive-hero h2 {
    font-size: 28px;
  }

  .executive-actions-grid,
  .executive-kpis,
  .executive-grid {
    grid-template-columns: 1fr;
  }

  .service-mini {
    min-width: 78%;
    min-height: 108px;
    scroll-snap-align: start;
  }

  .guide-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .advisor-banner {
    padding: 16px;
  }

  .advisor-banner-meta {
    justify-items: start;
    text-align: left;
  }

  .advisor-profile-grid,
  .advisor-doc-grid {
    grid-template-columns: 1fr;
  }

  .advisor-student-button {
    padding: 12px;
  }

  .advisor-form-actions button,
  .advisor-action-stack .soft-action,
  .advisor-inline-upload {
    width: 100%;
  }

  .guide-visual {
    height: 58px;
  }

  .guide-resource-grid {
    grid-template-columns: 1fr 1fr;
  }

  .guide-resource-grid button,
  .guide-action {
    min-height: 46px;
  }

  .message-headline,
  .process-stage-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-ring {
    width: 118px;
    height: 118px;
  }

  .progress-ring strong {
    font-size: 27px;
  }

  .compact-item,
  .stage-item,
  .task-item,
  .event-item,
  .payment-item,
  .message-item {
    width: 100%;
    align-items: flex-start;
  }

  .timeline {
    display: grid;
    gap: 0;
    width: 100%;
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .timeline-step {
    display: grid;
    min-height: 68px;
    justify-items: start;
    gap: 2px 14px;
    padding: 0 0 18px 52px;
    text-align: left;
    grid-template-columns: auto 1fr;
  }

  .timeline-step::before {
    top: 36px;
    left: 17px;
    display: block;
    width: 3px;
    height: calc(100% - 18px);
  }

  .timeline-step:first-child::before {
    display: block;
  }

  .timeline-step:last-child::before {
    display: none;
  }

  .timeline-number {
    position: absolute;
    top: 0;
    left: 0;
  }

  .timeline-step strong {
    max-width: none;
    padding-top: 8px;
    font-size: 14px;
  }

  .help-fab {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: calc(100% - 24px);
    min-height: 56px;
    border-radius: 16px;
  }

  .help-panel {
    right: 12px;
    bottom: 78px;
    left: 12px;
    width: auto;
  }

  .data-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    overflow: hidden;
  }

  .data-table th,
  .data-table td {
    padding: 10px 6px;
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .file-input {
    width: 100%;
    max-width: 100%;
  }
}

/* Tablet experience: 769px-1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  .portal-shell {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .portal-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .menu-button {
    display: inline-flex;
  }

  .portal-nav {
    grid-template-columns: 1fr;
  }

  .student-dashboard {
    grid-template-columns: 1fr;
  }

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

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

  .service-mini {
    min-width: calc((100% - 24px) / 3);
  }

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

  .guide-visual {
    height: 68px;
  }

  .timeline {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    row-gap: 24px;
  }

  .timeline-step:nth-child(6)::before {
    display: none;
  }
}

/* Desktop experience: +1024px */
@media (min-width: 1025px) {
  .portal-sidebar {
    transform: none;
  }

  .portal-overlay {
    display: none !important;
  }
}

@media (min-width: 1680px) {
  .content-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-mini {
    min-width: calc((100% - 36px) / 4);
  }
}

/* Advisor layout hardening */
@media (min-width: 1025px) {
  .advisor-main-grid {
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) !important;
  }

  .advisor-kpi-grid,
  .advisor-actions-grid,
  .advisor-bottom-grid {
    display: grid;
    grid-template-columns: 1fr !important;
  }

  .advisor-profile-card,
  .advisor-stage-card,
  .advisor-action-card,
  .advisor-students-panel,
  .advisor-doc-card,
  .advisor-banner,
  .advisor-kpi-grid > *,
  .advisor-actions-grid > *,
  .advisor-bottom-grid > * {
    min-width: 0;
    overflow: hidden;
  }

  .advisor-profile-card {
    grid-column: 1 / -1 !important;
  }

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

  .advisor-inline-meta,
  .section-head,
  .advisor-banner {
    flex-wrap: wrap;
  }
}
