:root {
  --hub-navy: #102a43;
  --hub-slate: #486277;
  --hub-muted: #6c8192;
  --hub-teal: #0aa6a6;
  --hub-blue: #1683f2;
  --hub-bg: #edf8f8;
  --hub-card: #ffffff;
  --hub-border: rgba(16, 42, 67, 0.1);
  --hub-shadow: 0 24px 70px rgba(16, 42, 67, 0.12);
  --hub-soft-shadow: 0 16px 40px rgba(16, 42, 67, 0.09);
}

* {
  box-sizing: border-box;
}

.hub-page {
  min-height: 100vh;
  margin: 0;
  color: var(--hub-navy);
  background:
    radial-gradient(circle at top left, rgba(11, 188, 188, 0.14), transparent 34rem),
    linear-gradient(180deg, #f6fbfb 0%, var(--hub-bg) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hub-page a {
  color: inherit;
}

.hub-login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 18px;
}

.hub-login-card,
.hub-card,
.hub-welcome,
.hub-child-tabs {
  border: 1px solid var(--hub-border);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--hub-soft-shadow);
  backdrop-filter: blur(16px);
}

.hub-login-card {
  width: min(100%, 470px);
  padding: clamp(28px, 5vw, 44px);
  border-radius: 28px;
}

.hub-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--hub-navy);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.hub-brand::before {
  display: inline-block;
  width: 12px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--hub-teal), var(--hub-blue));
  content: "";
}

.hub-eyebrow,
.hub-card-label {
  margin: 0 0 10px;
  color: var(--hub-teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hub-login-card h1,
.hub-welcome h1,
.hub-card h2 {
  margin: 0;
  color: var(--hub-navy);
  letter-spacing: -0.04em;
}

.hub-login-card h1 {
  margin-top: 28px;
  font-size: clamp(2rem, 7vw, 3rem);
}

.hub-login-copy,
.hub-helper,
.hub-welcome p,
.hub-summary,
.hub-empty,
.hub-small {
  color: var(--hub-slate);
  line-height: 1.55;
}

.hub-login-copy {
  margin: 12px 0 24px;
  font-size: 1.03rem;
}

.hub-alert {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(214, 98, 61, 0.24);
  border-radius: 16px;
  color: #8a351f;
  background: #fff2ed;
  line-height: 1.45;
}

.hub-save-toast {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(10, 166, 166, 0.2);
  border-radius: 18px;
  color: #08765f;
  background: #e8fbf4;
  font-weight: 800;
}

.hub-form {
  display: grid;
  gap: 16px;
}

.hub-form label {
  display: grid;
  gap: 8px;
  color: var(--hub-navy);
  font-weight: 700;
}

.hub-form input {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid rgba(16, 42, 67, 0.14);
  border-radius: 16px;
  color: var(--hub-navy);
  background: #fff;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hub-form input:focus {
  border-color: rgba(10, 166, 166, 0.75);
  box-shadow: 0 0 0 4px rgba(10, 166, 166, 0.14);
}

.hub-form .btn {
  width: 100%;
  margin-top: 4px;
}

.hub-helper {
  margin: 18px 0 0;
  font-size: 0.93rem;
}

.hub-child-tabs button {
  cursor: pointer;
  font: inherit;
}

.hub-site-header {
  background-color: rgba(255, 255, 255, 0.92);
}

.hub-site-header .nav-inner {
  max-width: var(--container-max);
}

.hub-nav-links {
  gap: var(--space-4);
}

.hub-parent-email {
  max-width: min(34vw, 270px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-nav-form {
  margin: 0;
}

.hub-nav-logout {
  min-height: 38px;
  color: var(--color-navy);
  background: var(--color-white);
  border-color: var(--color-gray-200);
  box-shadow: none;
}

.hub-nav-logout:hover {
  color: var(--color-navy);
  background: var(--color-gray-50);
  border-color: var(--color-gray-400);
  transform: translateY(-1px);
}

.hub-dashboard {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 64px;
}

.hub-welcome {
  padding: clamp(24px, 3.5vw, 36px);
  border-radius: 30px;
}

.hub-welcome h1 {
  font-size: clamp(1.95rem, 3.5vw, 3rem);
  line-height: 1.05;
}

.hub-welcome p {
  max-width: 780px;
  margin: 12px 0 0;
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
}

.hub-child-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 18px 0;
  padding: 10px;
  border-radius: 24px;
}

.hub-child-tab-item {
  min-width: 0;
}

.hub-child-select-form {
  margin: 0;
}

.hub-child-card {
  position: relative;
  display: grid;
  gap: 9px;
  min-height: 94px;
  padding: 15px 16px;
  border: 1px solid rgba(16, 42, 67, 0.12);
  border-radius: 18px;
  color: var(--hub-slate);
  background: rgba(255, 255, 255, 0.72);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hub-child-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  z-index: 1;
}

.hub-child-label {
  position: relative;
  display: block;
  overflow: hidden;
  color: var(--hub-navy);
  font-size: 1rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

.hub-child-label span {
  color: var(--hub-muted);
  font-size: 0.92rem;
  font-weight: 760;
}

.hub-customize-toggle {
  position: relative;
  justify-self: start;
  min-height: 28px;
  padding: 0;
  border: 0;
  color: var(--hub-teal);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
  z-index: 3;
}

.hub-customize-toggle:hover,
.hub-customize-toggle:focus {
  color: #08765f;
  text-decoration: none;
  transform: translateY(-1px);
}

.hub-child-card:hover,
.hub-child-card:focus-within,
.hub-child-card.is-active {
  border-color: rgba(10, 166, 166, 0.34);
  background: #eafafa;
  box-shadow: 0 10px 24px rgba(10, 166, 166, 0.1);
  transform: translateY(-1px);
}

.hub-personalization-panel {
  overflow: hidden;
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 0.3s ease, margin-top 0.2s ease, opacity 0.22s ease, transform 0.22s ease;
}

.hub-personalization-panels {
  width: 100%;
}

.hub-personalization-panel.is-open {
  max-height: 860px;
  margin: 2px 0 18px;
  opacity: 1;
  transform: translateY(0);
}

.hub-personalization-form {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(10, 166, 166, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f3fcfc 100%);
  box-shadow: 0 14px 32px rgba(16, 42, 67, 0.08);
}

.hub-personalization-heading h2 {
  margin: 0;
  color: var(--hub-navy);
  font-size: 1.08rem;
  letter-spacing: 0;
}

.hub-personalization-heading p,
.hub-field-group p {
  margin: 7px 0 0;
  color: var(--hub-slate);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hub-field-group {
  display: grid;
  gap: 10px;
}

.hub-field-group label {
  color: var(--hub-navy);
  font-size: 0.92rem;
  font-weight: 850;
}

.hub-chip-list,
.hub-selected-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hub-chip,
.hub-selected-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.hub-chip {
  border: 1px solid rgba(16, 42, 67, 0.12);
  color: var(--hub-slate);
  background: #fff;
  cursor: pointer;
}

.hub-chip.is-selected,
.hub-chip:hover,
.hub-chip:focus {
  border-color: rgba(10, 166, 166, 0.42);
  color: #08765f;
  background: #e8fbf4;
}

.hub-selected-chip {
  gap: 7px;
  border: 1px solid rgba(10, 166, 166, 0.22);
  color: #08765f;
  background: #ddf7ed;
}

.hub-selected-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #08765f;
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1;
}

.hub-custom-tag-row {
  display: flex;
  gap: 8px;
}

.hub-custom-tag-row input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 42, 67, 0.14);
  border-radius: 14px;
  color: var(--hub-navy);
  background: #fff;
  font: inherit;
  outline: none;
}

.hub-custom-tag-row input:focus {
  border-color: rgba(10, 166, 166, 0.72);
  box-shadow: 0 0 0 3px rgba(10, 166, 166, 0.12);
}

.hub-personalization-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hub-personalization-actions .btn {
  min-height: 42px;
}

.hub-cancel-changes {
  min-height: 42px;
  padding: 0 1rem;
  border: 1px solid rgba(16, 42, 67, 0.14);
  border-radius: 999px;
  color: var(--hub-navy);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hub-cancel-changes:hover,
.hub-cancel-changes:focus {
  border-color: rgba(10, 166, 166, 0.3);
  background: #f2fbfb;
  transform: translateY(-1px);
}

.hub-save-message {
  color: #08765f;
  font-size: 0.9rem;
  font-weight: 800;
}

.hub-unsaved-modal[hidden] {
  display: none;
}

.hub-unsaved-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 42, 67, 0.46);
}

.hub-unsaved-dialog {
  width: min(100%, 520px);
  padding: clamp(22px, 4vw, 30px);
  border: 1px solid rgba(10, 166, 166, 0.18);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(16, 42, 67, 0.24);
}

.hub-unsaved-dialog h2 {
  margin: 0;
  color: var(--hub-navy);
  font-size: 1.35rem;
  letter-spacing: 0;
}

.hub-unsaved-dialog p {
  margin: 10px 0 0;
  color: var(--hub-slate);
  font-size: 0.98rem;
  line-height: 1.5;
}

.hub-unsaved-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hub-unsaved-actions .btn,
.hub-unsaved-actions .hub-cancel-changes,
.hub-unsaved-actions .hub-outline-button {
  min-height: 42px;
}

.hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.hub-card {
  padding: clamp(22px, 3vw, 30px);
  border-radius: 26px;
}

.hub-card--hero {
  box-shadow: var(--hub-shadow);
}

.hub-card h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.hub-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 0;
}

.hub-meta-grid div {
  min-height: 96px;
  padding: 16px;
  border: 1px solid rgba(16, 42, 67, 0.08);
  border-radius: 20px;
  background: #f7fbfb;
}

.hub-meta-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--hub-muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub-meta-grid strong {
  color: var(--hub-navy);
  font-size: 1.02rem;
  line-height: 1.35;
}

.hub-summary {
  margin: 20px 0 0;
}

.hub-empty {
  margin: 14px 0 0;
  padding: 16px;
  border-radius: 18px;
  background: #f6fbfb;
}

.hub-small {
  margin: 14px 0 0;
  color: var(--hub-muted);
  font-size: 0.9rem;
}

.hub-card form {
  margin: 18px 0 0;
}

.hub-section-card {
  margin-top: 18px;
}

.hub-section-heading h2 {
  margin-top: 0;
}

.hub-snapshot-meta {
  margin: 8px 0 0;
  color: var(--hub-muted);
  font-size: 1rem;
  font-weight: 700;
}

.hub-snapshot-card {
  margin-top: 18px;
}

.hub-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.hub-stat-card {
  min-height: 116px;
  padding: 16px;
  border: 1px solid rgba(16, 42, 67, 0.08);
  border-radius: 20px;
  background: #f7fbfb;
}

.hub-stat-card span {
  display: block;
  margin-bottom: 9px;
  color: var(--hub-muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub-stat-card strong {
  display: block;
  color: var(--hub-navy);
  font-size: clamp(1.05rem, 2vw, 1.38rem);
  line-height: 1.25;
}

.hub-stat-card small {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  color: #08765f;
  font-size: 0.86rem;
  font-weight: 800;
}

.hub-stat-card--points {
  border-color: rgba(10, 166, 166, 0.2);
  background:
    radial-gradient(circle at top right, rgba(10, 166, 166, 0.24), transparent 58%),
    #effcf9;
  box-shadow: 0 18px 42px rgba(10, 166, 166, 0.14);
}

.hub-stat-card--points strong {
  color: #08765f;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
}

.hub-stat-card--next {
  grid-column: span 2;
}

.hub-table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid rgba(16, 42, 67, 0.08);
  border-radius: 22px;
  background: #f8fcfc;
}

.hub-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  color: var(--hub-slate);
}

.hub-focus-text {
  display: -webkit-box;
  max-width: 360px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hub-table th,
.hub-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(16, 42, 67, 0.08);
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}

.hub-table th {
  color: var(--hub-muted);
  background: rgba(237, 248, 248, 0.72);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hub-table td:first-child {
  width: 22%;
}

.hub-table td:nth-child(2),
.hub-table td:nth-child(4),
.hub-table td:nth-child(5) {
  width: 12%;
  white-space: nowrap;
}

.hub-table tr:last-child td {
  border-bottom: 0;
}

.hub-table strong {
  color: var(--hub-navy);
}

.hub-table form {
  margin: 0;
}

.hub-table--report {
  min-width: 0;
  table-layout: fixed;
}

.hub-table--report th,
.hub-table--report td {
  overflow-wrap: anywhere;
  word-break: normal;
}

.hub-table--report td:first-child {
  width: 20%;
}

.hub-table--report td:nth-child(2),
.hub-table--report td:nth-child(3),
.hub-table--report td:nth-child(5) {
  width: 14%;
  white-space: normal;
}

.hub-table--report td:nth-child(4) {
  width: 38%;
  white-space: normal;
}

.hub-status-pill,
.hub-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.hub-status-pill {
  color: #08765f;
  background: #ddf7ed;
}

.hub-status-pill--blue {
  color: #1765b8;
  background: #e2f0ff;
}

.hub-score-pill {
  color: var(--hub-navy);
  background: #fff4d6;
}

.hub-outline-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(10, 166, 166, 0.34);
  border-radius: 999px;
  color: var(--hub-teal);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.hub-muted-text {
  color: var(--hub-muted);
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .hub-site-header .nav-links {
    display: flex;
  }

  .hub-site-header .hamburger,
  .hub-site-header .mobile-menu {
    display: none;
  }

  .hub-nav-links {
    gap: var(--space-3);
  }

  .hub-parent-email {
    max-width: 42vw;
  }

  .hub-grid,
  .hub-meta-grid {
    grid-template-columns: 1fr;
  }

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

  .hub-stat-card--next {
    grid-column: auto;
  }

  .hub-child-tabs {
    grid-template-columns: minmax(0, 1fr);
    margin-left: -2px;
    margin-right: -2px;
  }
}

@media (max-width: 560px) {
  .hub-login-shell,
  .hub-dashboard {
    width: min(100% - 24px, 1180px);
  }

  .hub-login-card,
  .hub-welcome,
  .hub-card {
    border-radius: 22px;
  }

  .hub-site-header .nav-inner {
    gap: var(--space-3);
  }

  .hub-nav-links {
    gap: var(--space-2);
  }

  .hub-parent-email {
    max-width: 44vw;
    min-height: 34px;
    padding: 0 var(--space-3);
    font-size: 0.78rem;
  }

  .hub-nav-logout {
    min-height: 34px;
    padding: 0 0.95rem;
    font-size: 0.78rem;
  }

  .hub-child-card {
    min-height: 86px;
  }

  .hub-child-label {
    white-space: normal;
  }

  .hub-personalization-form {
    padding: 15px;
  }

  .hub-custom-tag-row {
    display: grid;
  }

  .hub-custom-tag-row .hub-outline-button {
    width: 100%;
  }

  .hub-personalization-actions,
  .hub-unsaved-actions {
    display: grid;
  }

  .hub-personalization-actions .btn,
  .hub-personalization-actions .hub-cancel-changes,
  .hub-unsaved-actions .btn,
  .hub-unsaved-actions .hub-cancel-changes,
  .hub-unsaved-actions .hub-outline-button {
    width: 100%;
  }

  .hub-table-wrap {
    overflow-x: visible;
    border: 0;
    background: transparent;
  }

  .hub-table,
  .hub-table thead,
  .hub-table tbody,
  .hub-table tr,
  .hub-table th,
  .hub-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .hub-table thead {
    display: none;
  }

  .hub-table tr {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid rgba(16, 42, 67, 0.08);
    border-radius: 18px;
    background: #f8fcfc;
  }

  .hub-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border: 0;
    white-space: normal;
  }

  .hub-focus-text {
    display: block;
    max-width: none;
    overflow: visible;
    -webkit-line-clamp: unset;
  }

  .hub-table td::before {
    color: var(--hub-muted);
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .hub-table td:first-child,
  .hub-table td:nth-child(2),
  .hub-table td:nth-child(3),
  .hub-table td:nth-child(4),
  .hub-table td:nth-child(5),
  .hub-table--report td,
  .hub-table--report td:first-child,
  .hub-table--report td:nth-child(2),
  .hub-table--report td:nth-child(3),
  .hub-table--report td:nth-child(4),
  .hub-table--report td:nth-child(5) {
    width: 100%;
    white-space: normal;
  }
}
