.team-body {
  background: #f4f6f7;
}

.team-body [hidden] {
  display: none !important;
}

.team-header {
  position: sticky;
}

.team-main {
  width: min(1460px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 470px);
  align-items: stretch;
  width: min(1050px, 100%);
  min-height: 610px;
  margin: 38px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-context {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 4.5vw, 60px);
  border-right: 1px solid #ccdde2;
  background: #edf4f5;
}

.auth-context h1 {
  max-width: 600px;
  margin: 13px 0 20px;
  color: #203641;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(32px, 3.4vw, 42px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

.auth-context > p {
  max-width: 620px;
  margin: 0;
  color: #50626b;
  font-size: 16px;
  line-height: 1.85;
}

.privacy-ledger {
  display: grid;
  gap: 0;
  margin-top: 44px;
  border-top: 1px solid #cedde1;
}

.privacy-ledger > div {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 13px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid #cedde1;
}

.privacy-ledger span {
  display: grid;
  gap: 2px;
}

.privacy-ledger b {
  color: #293e49;
}

.privacy-ledger small {
  color: #677982;
}

.ledger-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
}

.ledger-dot.teal { background: var(--teal); }
.ledger-dot.gold { background: #a98748; }
.ledger-dot.blue { background: var(--blue); }

.auth-panel {
  align-self: center;
  padding: 52px 46px;
}

.auth-panel h2 {
  margin: 8px 0 7px;
  font-size: 27px;
  letter-spacing: 0;
}

.auth-panel > p {
  margin: 0 0 28px;
  color: var(--ink-soft);
}

.auth-panel form {
  display: grid;
  gap: 17px;
}

.team-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.team-field > span,
.invite-result > label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.team-field input,
.team-field select,
.team-search input,
.invite-result input {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 12px;
  outline: none;
}

.team-field input:focus,
.team-field select:focus,
.team-search:focus-within,
.invite-result input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(53, 107, 140, .12);
}

.auth-submit {
  justify-content: center;
  min-height: 45px;
  margin-top: 5px;
}

.form-error {
  min-height: 21px;
  margin-top: 12px;
  color: var(--coral);
  font-size: 13px;
}

.auth-help {
  margin: 8px 0 0 !important;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint) !important;
  font-size: 12px;
}

.auth-help .text-button {
  margin-left: 4px;
}

.invite-summary {
  margin: 18px 0 22px;
  padding: 13px 14px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
  color: var(--ink-soft);
}

.invite-summary strong {
  display: block;
  color: var(--ink);
}

.invite-code-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.invite-code-entry .button {
  min-height: 43px;
}

.invite-code-entry input,
.invite-code-output {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 750;
  text-transform: uppercase;
}

.registration-confirm {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.registration-confirm input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--teal);
}

.team-dashboard {
  min-width: 0;
}

.dashboard-topline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding: 8px 0 24px;
}

.dashboard-topline h1 {
  margin: 4px 0 5px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 28px;
  letter-spacing: 0;
}

.dashboard-topline p {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--ink-soft);
}

.dashboard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.role-chip,
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #c6dbd7;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 750;
}

.role-chip {
  padding: 2px 8px;
}

.privacy-badge {
  min-height: 34px;
  padding: 6px 11px;
}

.privacy-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.team-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.team-tabs button {
  position: relative;
  align-self: stretch;
  padding: 0 2px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 700;
}

.team-tabs button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: transparent;
}

.team-tabs button.active {
  color: var(--ink);
}

.team-tabs button.active::after {
  background: var(--teal);
}

.team-tab-panel {
  display: none;
  padding-top: 22px;
}

.team-tab-panel.active {
  display: block;
}

.team-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.team-metric {
  min-width: 0;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}

.team-metric:last-child {
  border-right: 0;
}

.team-metric.accent {
  box-shadow: inset 4px 0 0 var(--teal);
  background: #f2f8f7;
}

.team-metric span,
.team-metric small {
  display: block;
  color: var(--ink-faint);
}

.team-metric span {
  font-size: 12px;
  font-weight: 700;
}

.team-metric strong {
  display: block;
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.2;
}

.team-metric small {
  margin-top: 4px;
  font-size: 11px;
}

.records-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(290px, .72fr);
  gap: 14px;
  margin-top: 14px;
}

.roster-panel {
  margin-top: 14px;
}

.roster-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: min(760px, 66%);
}

.roster-toolbar-actions .team-search {
  width: min(360px, 100%);
  flex: 1 1 auto;
}

.team-select {
  min-width: 130px;
  min-height: 38px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
}

.student-name-cell small {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
}

.roster-status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 10px;
  font-weight: 750;
}

.roster-status.assessed {
  background: var(--green-soft);
  color: var(--green);
}

.team-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-tight);
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-toolbar.compact {
  min-height: 72px;
}

.domain-summary .panel-toolbar > div {
  flex: 0 0 auto;
}

.domain-summary .panel-toolbar h2 {
  white-space: nowrap;
}

.domain-summary .panel-toolbar > small {
  max-width: 110px;
  text-align: right;
}

.panel-toolbar h2 {
  margin: 2px 0 0;
  font-size: 17px;
  letter-spacing: 0;
}

.panel-toolbar > p,
.panel-toolbar > small {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.team-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(330px, 45%);
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.team-search svg {
  width: 17px;
  color: var(--ink-faint);
}

.team-search input {
  min-height: 36px;
  padding: 0;
  border: 0;
  box-shadow: none !important;
}

.team-table-scroll {
  overflow-x: auto;
}

.team-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.team-table th,
.team-table td {
  padding: 11px 13px;
  border-bottom: 1px solid #e8ecee;
  text-align: left;
  vertical-align: middle;
}

.team-table th {
  background: #f8fafb;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 750;
}

.team-table td {
  color: var(--ink-soft);
  font-size: 12px;
}

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

.team-table tbody tr:hover {
  background: #fafcfc;
}

.team-table strong {
  color: var(--ink);
}

.table-action {
  padding: 3px 0;
  border-bottom: 1px solid var(--blue);
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-weight: 700;
}

.table-action-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.care-count,
.care-due {
  display: block;
}

.care-count {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.care-count.due,
.care-due {
  color: var(--coral);
}

.care-due {
  margin-top: 2px;
  font-size: 10px;
}

.score-pill,
.version-pill,
.member-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  min-height: 22px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}

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

.score-pill.low {
  background: var(--coral-soft);
  color: var(--coral);
}

.version-pill {
  background: var(--amber-soft);
  color: var(--amber);
}

.team-empty {
  padding: 55px 20px;
  color: var(--ink-faint);
  text-align: center;
}

.team-domain-chart {
  display: grid;
  gap: 12px;
  max-height: 470px;
  padding: 17px;
  overflow-y: auto;
}

.team-domain-row {
  display: grid;
  grid-template-columns: minmax(105px, 1fr) 1.6fr 28px;
  gap: 10px;
  align-items: center;
}

.team-domain-row span {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-track {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #e6ebee;
}

.domain-track i {
  display: block;
  height: 100%;
  background: var(--blue);
}

.team-domain-row.low .domain-track i { background: var(--coral); }
.team-domain-row.mid .domain-track i { background: #c08334; }
.team-domain-row strong { font-size: 11px; text-align: right; }

.management-grid {
  display: grid;
  grid-template-columns: minmax(480px, 1.2fr) minmax(300px, .8fr);
  gap: 14px;
}

.invite-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
}

.invite-result {
  display: grid;
  gap: 7px;
  margin: 0 18px 18px;
  padding: 14px;
  border: 1px solid #bcd8d3;
  border-radius: 6px;
  background: var(--teal-soft);
}

.invite-result > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.invite-result p {
  margin: 0;
  color: var(--teal-dark);
  font-size: 11px;
}

.invite-panel > .form-error {
  padding: 0 18px;
}

.pending-list {
  display: grid;
  max-height: 268px;
  overflow-y: auto;
}

.pending-item {
  display: grid;
  gap: 3px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.pending-item:last-child { border-bottom: 0; }
.pending-item strong { font-size: 12px; }
.pending-item span { color: var(--ink-faint); font-size: 11px; }

.members-panel {
  margin-top: 14px;
}

.member-table select {
  min-height: 31px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  padding: 4px 7px;
  font-size: 11px;
}

.member-status.active {
  background: var(--green-soft);
  color: var(--green);
}

.member-status.disabled {
  background: var(--coral-soft);
  color: var(--coral);
}

.audit-list {
  display: grid;
}

.audit-item {
  display: grid;
  grid-template-columns: 160px 1fr 190px;
  gap: 18px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.audit-item:last-child { border-bottom: 0; }
.audit-item strong { font-size: 12px; }
.audit-item span { color: var(--ink-soft); font-size: 12px; }
.audit-item time { color: var(--ink-faint); font-size: 11px; text-align: right; }

.team-privacy-footer {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1fr minmax(150px, .45fr);
  gap: 1px;
  margin-top: 14px;
  border: 1px solid #ccdade;
  border-radius: var(--radius);
  overflow: hidden;
  background: #ccdade;
}

.team-privacy-footer > div {
  display: grid;
  gap: 3px;
  padding: 13px 16px;
  background: #edf3f5;
}

.team-privacy-footer strong { color: #334b56; font-size: 11px; }
.team-privacy-footer span { color: #65777f; font-size: 10px; }

.team-record-dialog {
  width: min(960px, calc(100% - 28px));
  max-height: 90vh;
}

.team-record-detail {
  display: grid;
  gap: 20px;
  max-height: 65vh;
  overflow-y: auto;
}

.team-record-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.team-record-meta div {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.team-record-meta div:nth-child(4n) { border-right: 0; }
.team-record-meta div:nth-last-child(-n+4) { border-bottom: 0; }
.team-record-meta span { display: block; color: var(--ink-faint); font-size: 12px; }
.team-record-meta strong { display: block; overflow-wrap: anywhere; margin-top: 3px; font-size: 15px; }

.detail-section h3 {
  margin: 0 0 9px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  color: #294858;
  font-size: 17px;
}

.detail-section p { color: var(--ink-soft); font-size: 14px; line-height: 1.75; }
.detail-section ul,
.detail-section ol { display: grid; gap: 9px; margin: 0; padding-left: 25px; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.detail-section ol li { padding-left: 3px; }
.detail-section ol li::marker { color: var(--teal-dark); font-weight: 800; }

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

.detail-domain-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-subtle);
  color: var(--ink-soft);
  font-size: 14px;
}

.version-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.version-list span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-soft);
  font-size: 11.5px;
}

.team-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.team-dialog-actions > div {
  display: flex;
  gap: 9px;
  margin-left: auto;
}

.account-dialog {
  width: min(500px, calc(100% - 28px));
}

.password-form {
  display: grid;
  gap: 14px;
}

.student-profile-dialog {
  width: min(1180px, calc(100% - 28px));
  max-height: min(920px, calc(100vh - 28px));
}

.student-profile-head {
  align-items: flex-start;
}

.student-profile-head h2 {
  margin-top: 2px;
  font-size: 22px;
}

.student-profile-head p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
}

.student-profile-body {
  display: grid;
  gap: 0;
  max-height: calc(100vh - 190px);
  padding: 0;
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.profile-metrics > div {
  min-width: 0;
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}

.profile-metrics > div:last-child {
  border-right: 0;
}

.profile-metrics span,
.profile-metrics small {
  display: block;
  color: var(--ink-faint);
  font-size: 11px;
}

.profile-metrics strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 25px;
}

.profile-tabs {
  display: flex;
  gap: 22px;
  min-height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
}

.profile-tabs button {
  position: relative;
  padding: 0 1px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.profile-tabs button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: transparent;
}

.profile-tabs button.active {
  color: var(--teal-dark);
}

.profile-tabs button.active::after {
  background: var(--teal);
}

.profile-tab-panel {
  display: none;
  padding: 18px;
}

.profile-tab-panel.active {
  display: grid;
  gap: 14px;
}

.profile-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 14px;
}

.profile-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.profile-section-head,
.profile-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.profile-section-head span {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 750;
}

.profile-section-head h3,
.profile-action-bar h3 {
  margin: 2px 0 0;
  font-size: 16px;
}

.profile-section-head small {
  max-width: 300px;
  color: var(--ink-faint);
  font-size: 10px;
  text-align: right;
}

.profile-trend {
  min-height: 230px;
  padding: 14px;
}

.profile-trend svg {
  display: block;
  width: 100%;
  height: 210px;
  overflow: visible;
}

.trend-grid-line {
  stroke: #e4eaed;
  stroke-width: 1;
}

.trend-axis-label {
  fill: #74818a;
  font-size: 12px;
  font-weight: 700;
}

.trend-line {
  fill: none;
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.trend-point {
  fill: var(--surface);
  stroke: var(--teal-dark);
  stroke-width: 3;
}

.profile-reminders {
  display: grid;
  max-height: 230px;
  overflow-y: auto;
}

.profile-reminder {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.profile-reminder:last-child {
  border-bottom: 0;
}

.profile-reminder i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c08334;
}

.profile-reminder.overdue i {
  background: var(--coral);
}

.profile-reminder strong,
.profile-reminder span {
  display: block;
}

.profile-reminder strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-reminder span,
.profile-reminder time {
  color: var(--ink-faint);
  font-size: 10px;
}

.profile-domain-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  padding: 14px;
}

.profile-domain-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(110px, 1fr) 32px;
  gap: 10px;
  align-items: center;
}

.profile-domain-row span,
.profile-domain-row strong {
  font-size: 11px;
}

.profile-domain-row span {
  overflow: hidden;
  color: var(--ink-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-domain-row strong {
  text-align: right;
}

.profile-insight-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  padding: 14px;
}

.profile-insight-grid > div {
  min-width: 0;
  padding: 0 16px;
  border-right: 1px solid var(--line);
}

.profile-insight-grid > div:first-child {
  padding-left: 0;
}

.profile-insight-grid > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.profile-insight-grid h4 {
  margin: 0 0 7px;
  color: var(--teal-dark);
  font-size: 12px;
}

.profile-insight-grid p,
.profile-insight-grid ol {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.profile-insight-grid ol {
  display: grid;
  gap: 5px;
  padding-left: 21px;
}

.profile-insight-grid li::marker {
  color: var(--teal-dark);
  font-weight: 800;
}

.profile-action-bar {
  padding: 0 0 13px;
  border-bottom: 1px solid var(--line);
}

.goal-list,
.intervention-list,
.assessment-timeline {
  display: grid;
  gap: 10px;
}

.goal-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 7px;
  background: var(--surface);
}

.goal-item.priority-high {
  border-left-color: var(--coral);
}

.goal-item.status-achieved {
  border-left-color: var(--green);
}

.goal-item h4 {
  margin: 0;
  font-size: 14px;
}

.goal-item p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.goal-meta,
.intervention-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 10px;
}

.goal-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  align-items: center;
}

.goal-progress .domain-track {
  grid-column: 1 / -1;
}

.goal-progress span,
.goal-progress strong {
  font-size: 11px;
}

.goal-progress strong {
  color: var(--teal-dark);
}

.goal-actions {
  display: flex;
  justify-content: flex-end;
}

.intervention-item {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.intervention-date {
  display: grid;
  gap: 2px;
}

.intervention-date strong {
  font-size: 13px;
}

.intervention-date span {
  color: var(--ink-faint);
  font-size: 10px;
}

.intervention-content h4 {
  margin: 0 0 5px;
  font-size: 13px;
}

.intervention-content p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.intervention-content .next-step {
  margin-top: 6px;
  color: #44606b;
}

.assessment-timeline {
  position: relative;
  padding-left: 18px;
}

.assessment-timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 5px;
  width: 1px;
  background: var(--line-strong);
}

.assessment-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.assessment-timeline-item::before {
  content: "";
  position: absolute;
  top: 20px;
  left: -18px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--teal);
}

.assessment-timeline-item strong,
.assessment-timeline-item span {
  display: block;
}

.assessment-timeline-item strong {
  font-size: 13px;
}

.assessment-timeline-item span {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10px;
}

.profile-dialog-actions .profile-manage-actions {
  margin: 0;
}

.form-dialog {
  width: min(700px, calc(100% - 28px));
}

.structured-form {
  display: grid;
  gap: 14px;
}

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

.team-field textarea {
  width: 100%;
  min-height: 82px;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

.team-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(53, 107, 140, .12);
}

.form-note {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #a98748;
  background: var(--amber-soft);
  color: #6f552c;
  font-size: 11px;
  line-height: 1.6;
}

.range-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 9px;
  align-items: center;
  min-height: 43px;
}

.range-field input {
  min-height: auto;
  padding: 0;
  accent-color: var(--teal);
}

.range-field output {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.split-actions {
  align-items: center;
  justify-content: space-between;
}

.split-actions > div {
  display: flex;
  gap: 8px;
}

.profile-loading {
  min-height: 240px;
  padding: 80px 20px;
  color: var(--ink-faint);
  text-align: center;
}

@media (max-width: 1080px) {
  .records-layout { grid-template-columns: 1fr; }
  .team-domain-chart { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
  .management-grid { grid-template-columns: 1fr; }
  .profile-overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .team-main { width: min(100% - 24px, 1460px); padding-top: 20px; }
  .auth-layout { grid-template-columns: 1fr; margin: 12px auto; }
  .auth-context { padding: 34px; border-right: 0; border-bottom: 1px solid #ccdde2; }
  .auth-context h1 { font-size: 32px; }
  .privacy-ledger { margin-top: 26px; }
  .auth-panel { padding: 36px 30px; }
  .dashboard-topline { align-items: flex-start; flex-direction: column; }
  .dashboard-actions { justify-content: flex-start; }
  .team-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-metric:nth-child(2) { border-right: 0; }
  .team-metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .invite-form { grid-template-columns: 1fr; }
  .team-privacy-footer { grid-template-columns: 1fr; }
  .audit-item { grid-template-columns: 1fr; gap: 3px; }
  .audit-item time { text-align: left; }
  .team-record-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-record-meta div:nth-child(4n) { border-right: 1px solid var(--line); }
  .team-record-meta div:nth-child(2n) { border-right: 0; }
  .team-record-meta div:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .team-record-meta div:nth-last-child(-n+2) { border-bottom: 0; }
  .profile-domain-list { grid-template-columns: 1fr; }
  .profile-insight-grid { grid-template-columns: 1fr; gap: 13px; }
  .profile-insight-grid > div,
  .profile-insight-grid > div:first-child,
  .profile-insight-grid > div:last-child { padding: 0 0 13px; border-right: 0; border-bottom: 1px solid var(--line); }
  .profile-insight-grid > div:last-child { padding-bottom: 0; border-bottom: 0; }
  .goal-item { grid-template-columns: minmax(0, 1fr) 160px; }
  .goal-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 620px) {
  .team-header { align-items: flex-start; }
  .team-header .brand-block p { display: none; }
  .team-header .header-actions .button { width: 38px; padding: 0; justify-content: center; }
  .team-header .header-actions .button svg { margin: 0; }
  .team-header .header-actions .button { font-size: 0; }
  .auth-context { padding: 28px 24px; }
  .auth-context > p { font-size: 14px; }
  .auth-panel { padding: 30px 22px; }
  .privacy-badge { display: none; }
  .dashboard-actions { width: 100%; }
  .dashboard-actions .button { flex: 1; justify-content: center; }
  .team-tabs { gap: 17px; overflow-x: auto; }
  .team-tabs button { flex: 0 0 auto; }
  .team-metric { padding: 15px; }
  .team-metric strong { font-size: 24px; }
  .panel-toolbar { align-items: flex-start; flex-direction: column; }
  .team-search { width: 100%; }
  .roster-toolbar-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .roster-toolbar-actions .team-search,
  .team-select { width: 100%; }
  .team-domain-chart { grid-template-columns: 1fr; }
  .team-domain-row { grid-template-columns: minmax(100px, 1fr) 1.2fr 26px; }
  .team-record-meta { grid-template-columns: 1fr; }
  .team-record-meta div,
  .team-record-meta div:nth-child(2n),
  .team-record-meta div:nth-child(4n),
  .team-record-meta div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .team-record-meta div:last-child { border-bottom: 0; }
  .detail-domain-grid { grid-template-columns: 1fr; }
  .team-dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .team-dialog-actions > div { display: grid; width: 100%; margin: 0; }
  .team-dialog-actions .button { justify-content: center; }
  .team-dialog-actions .button { min-height: 44px; }
  .student-profile-dialog { width: calc(100% - 12px); max-height: calc(100vh - 12px); }
  .student-profile-body { max-height: calc(100vh - 190px); }
  .profile-dialog-actions {
    display: grid;
    grid-template-columns: minmax(88px, .7fr) minmax(0, 1.7fr);
    align-items: stretch;
    flex-direction: row;
  }
  .profile-dialog-actions > div,
  .profile-dialog-actions .profile-manage-actions {
    display: grid;
    width: auto;
  }
  .profile-dialog-actions > div:last-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-dialog-actions .button {
    min-width: 0;
    padding-inline: 8px;
    font-size: 11px;
  }
  .profile-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-metrics > div:nth-child(2) { border-right: 0; }
  .profile-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .profile-tabs { gap: 18px; overflow-x: auto; }
  .profile-tabs button { flex: 0 0 auto; }
  .profile-tab-panel { padding: 12px; }
  .profile-section-head { align-items: flex-start; flex-direction: column; }
  .profile-section-head small { text-align: left; }
  .profile-domain-row { grid-template-columns: minmax(105px, 1fr) minmax(80px, .8fr) 28px; }
  .goal-item { grid-template-columns: 1fr; gap: 12px; }
  .goal-actions { grid-column: auto; }
  .goal-actions .button { width: 100%; justify-content: center; }
  .intervention-item { grid-template-columns: 1fr; }
  .assessment-timeline-item { grid-template-columns: 1fr; gap: 7px; }
  .form-grid.two-columns { grid-template-columns: 1fr; }
  .split-actions { align-items: stretch; flex-direction: column-reverse; }
  .split-actions > div { display: grid; }
}
