/* Account route layout, profile, sign-in landing, and family activity panels. */
.section.account-page {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 82px);
  padding: clamp(26px, 4.5vw, 58px) 0 clamp(42px, 6vw, 82px);
  scroll-margin-top: var(--anchor-scroll-margin);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(223, 244, 241, 0.74) 0 92px, transparent 93px),
    radial-gradient(circle at 92% 78%, rgba(255, 226, 141, 0.36) 0 128px, transparent 129px),
    linear-gradient(180deg, rgba(246, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.account-page:focus {
  outline: none;
}

.account-workspace,
.account-dialog-shell {
  width: min(1520px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 14%, rgba(117, 184, 239, 0.22) 0 88px, transparent 89px),
    radial-gradient(circle at 8% 86%, rgba(223, 244, 241, 0.68) 0 118px, transparent 119px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 252, 0.98));
  border: 1px solid rgba(16, 38, 61, 0.1);
  border-radius: 24px;
  box-shadow:
    0 24px 58px rgba(16, 38, 61, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.account-workspace-header,
.account-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 2.4vw, 28px) clamp(18px, 4vw, 48px);
  color: var(--white);
  background:
    radial-gradient(circle at 86% 0%, rgba(117, 184, 239, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(16, 38, 61, 0.98), rgba(13, 111, 167, 0.92));
}

.account-workspace-header .section-kicker,
.account-dialog-header .section-kicker {
  color: rgba(223, 244, 241, 0.92);
}

.account-workspace-header h2,
.account-dialog-header h2 {
  margin: 4px 0 0;
  color: var(--white);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.08;
}

.account-workspace-subtitle {
  max-width: 720px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 760;
  line-height: 1.45;
}

.account-dialog-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 999px;
  font-weight: 950;
  cursor: pointer;
}

.account-dialog-close:hover,
.account-dialog-close:focus-visible {
  color: var(--white);
  background: var(--coral);
  outline: none;
}

.account-workspace-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px clamp(16px, 3vw, 32px);
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(16, 38, 61, 0.08);
  backdrop-filter: blur(14px);
  scrollbar-width: thin;
}

.account-workspace-tabs button {
  min-height: 40px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  color: var(--navy);
  background: rgba(246, 250, 252, 0.9);
  border: 1px solid rgba(16, 38, 61, 0.1);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.account-workspace-tabs button.is-active {
  color: var(--white);
  background: var(--blue);
  border-color: rgba(13, 111, 167, 0.4);
  box-shadow: 0 12px 28px rgba(13, 111, 167, 0.22);
}

.account-workspace-tabs button:hover,
.account-workspace-tabs button:focus-visible {
  color: var(--white);
  background: var(--navy);
  outline: none;
}

.account-workspace-tabs button[hidden],
.account-tab-panel[hidden] {
  display: none !important;
}

.account-page.is-signed-out .account-workspace {
  grid-template-rows: auto minmax(0, 1fr);
}

.account-page.is-signed-out .account-workspace-tabs {
  display: none;
}

.account-dialog-body {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: clamp(14px, 2.2vw, 24px);
  margin: 0;
  padding: clamp(16px, 2.8vw, 30px);
  overflow: visible;
}

.account-workspace > .admin-dashboard {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.account-workspace > .admin-dashboard .admin-dashboard-header {
  display: none;
}

.account-workspace > .admin-dashboard .admin-dashboard-body {
  padding: clamp(14px, 2.4vw, 26px);
}

.account-dialog-body p,
.account-info-panel ul {
  margin: 0;
  color: var(--muted);
}

.account-sidebar,
.account-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.account-sidebar {
  align-self: start;
  position: sticky;
  top: 18px;
}

.account-status {
  padding: 12px 13px;
  color: var(--navy) !important;
  background:
    linear-gradient(180deg, rgba(223, 244, 241, 0.88), rgba(240, 248, 255, 0.9));
  border: 1px solid rgba(13, 111, 167, 0.14);
  border-radius: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.account-status.is-error {
  color: var(--coral-dark) !important;
  background: rgba(255, 241, 235, 0.94);
  border-color: rgba(200, 63, 61, 0.24);
}

.account-profile {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 252, 0.96));
  border: 1px solid rgba(16, 38, 61, 0.1);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(16, 38, 61, 0.08);
}

.account-profile[hidden] {
  display: none;
}

.account-profile img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 50%;
}

.account-profile-copy {
  min-width: 0;
  flex: 1 1 170px;
  display: grid;
}

.account-profile strong,
.account-profile small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile strong {
  color: var(--navy);
  font-size: 1rem;
}

.account-profile small {
  color: var(--muted);
  font-weight: 750;
}

.account-sign-out-button {
  flex: 1 1 100%;
  min-height: 38px;
  white-space: nowrap;
}

.account-profile [hidden] {
  display: none !important;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.account-actions .button,
.account-actions .google-signin-button {
  flex: 1 1 190px;
}

.account-actions [hidden] {
  display: none !important;
}

.account-intro,
.account-info-panel {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(16, 38, 61, 0.1);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(16, 38, 61, 0.07);
}

.account-intro strong,
.account-panel-kicker {
  width: max-content;
  max-width: 100%;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.account-info-panel {
  position: relative;
  overflow: hidden;
  gap: 10px;
  padding: clamp(18px, 2.4vw, 24px);
  background:
    radial-gradient(circle at 100% 0%, rgba(117, 184, 239, 0.18) 0 96px, transparent 97px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 255, 0.92));
  border-color: rgba(13, 111, 167, 0.16);
}

.account-info-panel[hidden] {
  display: none;
}

.account-info-panel h3 {
  max-width: 620px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.account-info-panel p {
  max-width: 680px;
  line-height: 1.55;
}

.account-info-panel ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  list-style: none;
}

.account-info-panel li {
  min-width: 0;
  padding: 9px 10px 9px 28px;
  position: relative;
  color: rgba(16, 38, 61, 0.8);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(13, 111, 167, 0.1);
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.3;
}

.account-info-panel li::before {
  content: "";
  width: 8px;
  height: 8px;
  position: absolute;
  top: 14px;
  left: 12px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(47, 109, 85, 0.12);
}

.account-signin-landing {
  min-height: 100%;
  position: relative;
  overflow: hidden;
  justify-content: center;
  padding: clamp(22px, 3.2vw, 34px);
  background:
    radial-gradient(circle at 90% 12%, rgba(244, 211, 94, 0.3) 0 82px, transparent 83px),
    radial-gradient(circle at 8% 88%, rgba(223, 244, 241, 0.76) 0 120px, transparent 121px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 255, 0.94));
}

.account-signin-landing > * {
  position: relative;
  z-index: 1;
}

.account-landing-illustration {
  width: min(100%, 340px);
  justify-self: end;
  margin: -8px -8px -6px 0;
  pointer-events: none;
}

.account-landing-illustration svg {
  width: 100%;
  height: auto;
  display: block;
}

.account-illustration-shadow {
  fill: rgba(16, 38, 61, 0.1);
}

.account-illustration-paper {
  stroke: rgba(13, 111, 167, 0.28);
  stroke-width: 3;
}

.account-illustration-line {
  fill: none;
  stroke: rgba(13, 111, 167, 0.38);
  stroke-linecap: round;
  stroke-width: 5;
}

.account-illustration-star {
  fill: var(--gold);
  stroke: rgba(201, 151, 53, 0.38);
  stroke-width: 2;
}

.account-illustration-pencil {
  stroke: rgba(16, 38, 61, 0.18);
  stroke-width: 2;
}

.account-illustration-pencil-tip {
  fill: #f8dfb9;
  stroke: rgba(16, 38, 61, 0.2);
  stroke-width: 2;
}

.account-illustration-pencil-band,
.account-illustration-check {
  fill: none;
  stroke: var(--white);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.account-illustration-badge {
  fill: var(--green);
  stroke: var(--white);
  stroke-width: 6;
}

.account-illustration-heart {
  fill: #ef7d62;
  stroke: var(--white);
  stroke-width: 4;
}

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

.account-landing-grid article {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(13, 111, 167, 0.12);
  border-radius: 16px;
  box-shadow:
    0 12px 28px rgba(16, 38, 61, 0.08),
    inset 0 1px rgba(255, 255, 255, 0.78);
}

.account-landing-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: var(--blue);
  background: rgba(223, 244, 241, 0.9);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(13, 111, 167, 0.1);
}

.account-landing-icon--staff {
  color: var(--green);
  background: rgba(255, 252, 239, 0.95);
}

.account-landing-icon--spark {
  color: var(--coral);
  background: rgba(255, 241, 235, 0.92);
}

.account-landing-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.account-landing-grid strong {
  color: var(--navy);
  font-size: 0.98rem;
}

.account-landing-grid small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.account-admin-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: clamp(16px, 2vw, 22px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(240, 248, 255, 0.92));
  border: 1px solid rgba(13, 111, 167, 0.18);
  border-left: 6px solid var(--blue);
  border-radius: 14px;
  box-shadow: 0 16px 38px rgba(16, 38, 61, 0.08);
}

.account-admin-panel[hidden] {
  display: none;
}

.account-admin-panel span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-admin-actions,
.admin-dashboard-tool-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.account-admin-actions [hidden],
.admin-dashboard-tool-actions [hidden] {
  display: none !important;
}

.account-admin-panel strong {
  color: var(--navy);
  font-size: 0.98rem;
}

.account-admin-panel small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.account-admin-panel .button[hidden] {
  display: none;
}

.account-family-panel {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 2vw, 22px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 239, 0.94));
  border: 1px solid rgba(201, 151, 53, 0.24);
  border-left: 6px solid var(--gold);
  border-radius: 14px;
  box-shadow: 0 16px 38px rgba(16, 38, 61, 0.08);
}

.account-family-panel[hidden] {
  display: none;
}

.account-family-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-family-heading span,
.account-family-card {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.account-family-heading strong,
.account-family-section h3,
.account-family-card strong {
  color: var(--navy);
}

.account-family-heading small,
.account-family-card small,
.account-empty-state {
  color: var(--muted);
  font-weight: 800;
}

.account-empty-state.is-error {
  color: var(--coral-dark);
}

.account-family-section {
  display: grid;
  gap: 8px;
}

.account-family-section {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(201, 151, 53, 0.16);
  border-radius: 14px;
}

.account-family-section summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.account-family-section summary::-webkit-details-marker {
  display: none;
}

.account-family-section summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  color: var(--navy);
  background: rgba(223, 244, 241, 0.84);
  border-radius: 999px;
  font-weight: 950;
}

.account-family-section[open] summary::after {
  content: "-";
}

.account-family-section summary span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.account-family-section summary strong {
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.25;
}

.account-family-section summary small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.account-family-section summary em {
  min-width: 30px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  color: var(--white);
  background: var(--blue);
  border-radius: 999px;
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 950;
}

.account-family-section > .account-family-list {
  padding: 0 12px 12px;
}

.account-family-list {
  display: grid;
  gap: 8px;
}

.account-family-card {
  padding: 11px 12px;
  background: var(--white);
  border: 1px solid rgba(16, 38, 61, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(16, 38, 61, 0.07);
}

.account-family-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.account-family-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0;
}

.account-family-meta span {
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  color: rgba(16, 38, 61, 0.78);
  background: rgba(226, 238, 247, 0.72);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 850;
}

.account-family-kicker {
  width: max-content;
  padding: 3px 8px;
  color: var(--green);
  background: rgba(47, 109, 85, 0.1);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-family-reply {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  padding: 9px 10px;
  background: rgba(223, 244, 241, 0.72);
  border-left: 4px solid var(--blue);
  border-radius: 10px;
}

.account-family-reply span {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-family-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 4px;
}

.account-family-actions .button {
  min-height: 40px;
  padding: 9px 12px;
}

.google-signin-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 18px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid rgba(16, 38, 61, 0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.google-signin-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: block;
}

.google-signin-button:hover,
.google-signin-button:focus-visible {
  border-color: rgba(13, 111, 167, 0.32);
  outline: none;
  transform: translateY(-1px);
}

.google-signin-button:disabled,
.account-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}
