:root {
  font-family: Inter, 'Segoe UI', sans-serif;
  color: #30382f;
  background: #f8f9f5;
  font-size: 15px;
  --green: #315b41;
  --muted: #697166;
  --line: #e3e7de;
  --orange: #ef9e50;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #df943c;
  outline-offset: 3px;
}
button {
  cursor: pointer;
  border: 1px solid #d8dfd2;
  border-radius: 10px;
  padding: 11px 17px;
  background: white;
  color: var(--green);
  font-weight: 600;
  min-height: 44px;
}
button:hover {
  background: #edf2e8;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary:hover {
  background: #244c34;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(26px, 2.5vw, 35px);
  letter-spacing: -1px;
  margin-bottom: 10px;
  font-weight: 650;
}
h2 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 18px;
  margin-bottom: 5px;
}
p {
  line-height: 1.6;
}
.muted,
.label {
  color: var(--muted);
}
.good {
  color: #2c6442;
}
.warn {
  color: #805714;
}
.error {
  color: #a33c30;
  overflow-wrap: anywhere;
}
.error:empty {
  display: none;
}
#chrome {
  width: 248px;
  position: fixed;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--line);
  background: #fffefa;
  z-index: 5;
}
.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 33px 20px 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 750;
  color: #294733;
  letter-spacing: -0.8px;
}
.brand:hover {
  text-decoration: none;
}
.brand-sun {
  color: #e4a049;
  font-size: 36px;
  line-height: 1;
}
.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #7c8477;
  margin: 48px 12px 16px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav a {
  padding: 12px 14px;
  border-radius: 11px;
  color: #667060;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 500;
}
.nav a:hover,
.nav a.current {
  background: #edf2e7;
  color: #315b41;
  text-decoration: none;
}
.nav a.current {
  font-weight: 700;
}
.nav-icon {
  font-size: 21px;
  width: 23px;
  text-align: center;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 28px;
}
.side-note {
  border: 1px solid #e7e7d8;
  border-radius: 13px;
  padding: 17px;
  background: #faf9ee;
  font-size: 12px;
  margin-bottom: 25px;
}
.side-note p {
  margin: 7px 0 0;
  font-size: 11px;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.who {
  font-size: 12px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.sidebar-bottom > button {
  font-size: 12px;
  width: 100%;
}
#root {
  margin-left: 248px;
  min-height: 100vh;
}
.topbar {
  height: 78px;
  border-bottom: 1px solid var(--line);
  padding: 0 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fffefa;
  color: #737b6d;
  font-size: 11px;
  letter-spacing: 1px;
}
.page {
  padding: 36px 42px 64px;
  max-width: 1480px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 26px;
}
.page-heading p {
  margin-bottom: 0;
}
.eyebrow {
  font-size: 10px !important;
  letter-spacing: 1.7px;
  font-weight: 750;
  color: #708265;
  margin-bottom: 12px !important;
}
.welcome-banner {
  background: #edf1e4;
  border: 1px solid #e1e7d6;
  border-radius: 20px;
  padding: 30px 36px;
  display: flex;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  min-height: 232px;
  margin-bottom: 24px;
}
.welcome-banner h2 {
  font-size: 31px;
  line-height: 1.2;
  white-space: pre-line;
  margin: 14px 0;
  color: #34573b;
}
.welcome-banner p {
  font-size: 13px;
  white-space: pre-line;
  margin: 0;
  color: #6b7963;
}
.mini-orbits {
  position: relative;
  width: 270px;
  min-width: 240px;
  background: radial-gradient(
    ellipse at center,
    transparent 37%,
    #d8dfcb 37.5%,
    transparent 38%,
    transparent 61%,
    #d8dfcb 61.5%,
    transparent 62%
  );
  margin: -25px 12px;
}
.mini-sun {
  position: absolute;
  width: 94px;
  height: 94px;
  left: calc(50% - 47px);
  top: calc(50% - 47px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edb15c;
  color: #795525;
  font-size: 47px;
  box-shadow:
    0 0 0 12px #f0c77b44,
    0 0 0 25px #edb15c11;
}
.mini-orbits .avatar {
  position: absolute;
  width: 43px;
  height: 43px;
  border: 4px solid #edf1e4;
  font-size: 12px;
}
.mini-orbits .avatar:nth-child(2) {
  left: 9%;
  top: 15%;
}
.mini-orbits .avatar:nth-child(3) {
  right: 1%;
  top: 45%;
}
.mini-orbits .avatar:nth-child(4) {
  left: 23%;
  bottom: 3%;
}
.mini-orbits .avatar:nth-child(5) {
  right: 18%;
  top: -1%;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: white;
  border: 1px solid var(--line);
  padding: 21px 23px;
  border-radius: 14px;
  position: relative;
  font-size: 11px;
  color: #677362;
}
.metric:hover {
  border-color: #a7b799;
  text-decoration: none;
}
.metric > .muted {
  font-size: 13px;
}
.metric strong {
  font-size: 31px;
  color: #354932;
  font-weight: 600;
}
.metric-arrow {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 22px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin-bottom: 16px;
}
.section-title h2 {
  margin: 0;
}
.section-title span {
  font-size: 11px;
}
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 20px;
  margin-bottom: 27px;
}
.member-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 17px;
  padding: 23px;
}
.member-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.member-head p {
  font-size: 11px;
  margin: 0;
}
.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfebda;
  color: #446244;
  font-weight: 650;
  font-size: 17px;
  flex-shrink: 0;
}
.avatar.small {
  width: 32px;
  height: 32px;
  font-size: 12px;
}
.color-1 {
  background: #f7e3c8;
  color: #865c30;
}
.color-2 {
  background: #e7e2f1;
  color: #66578a;
}
.color-3 {
  background: #d9e9ed;
  color: #486f7d;
}
.round-link {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.usage-number {
  font-size: 32px;
  letter-spacing: -1px;
  font-weight: 600;
  color: #344d36;
  margin-top: 28px;
}
.member-card > .muted {
  font-size: 11px;
  margin: 6px 0;
}
.member-action {
  display: block;
  border-top: 1px solid var(--line);
  padding-top: 17px;
  margin-top: 23px;
  font-size: 12px;
  font-weight: 650;
}
.card {
  background: white;
  border: 1px solid var(--line);
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 20px;
  min-width: 0;
}
.card p {
  font-size: 13px;
}
.card h2 {
  margin-bottom: 18px;
}
.card > button {
  margin: 5px 8px 5px 0;
}
.card.good {
  border-color: #c8dec9;
}
.card.warn {
  border-color: #ead9b4;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #edf0e9;
  font-size: 13px;
}
.row:last-child {
  border: 0;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.empty {
  padding: 24px;
  border: 1px dashed #d6dece;
  border-radius: 12px;
  color: #747c6e;
  background: #fafbf8;
  line-height: 1.7;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin: 0 0 28px;
  padding-bottom: 12px;
}
.tabs a {
  padding: 10px 14px;
  border-radius: 8px;
  color: #667160;
  font-size: 13px;
}
.tabs a.current {
  background: #e7efdf;
  color: #365339;
  font-weight: 650;
}
.back-link {
  display: block;
  font-size: 12px;
  margin-bottom: 22px;
}
.text-link {
  font-size: 13px;
  font-weight: 600;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  table-layout: fixed;
}
th {
  color: #697364;
  font-size: 11px;
  font-weight: 650;
  background: #f7f9f3;
  padding: 14px 10px;
}
td {
  padding: 15px 10px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
input,
select {
  padding: 12px;
  border: 1px solid #d7dece;
  border-radius: 8px;
  background: #fff;
  color: #354332;
  min-width: 0;
  max-width: 100%;
}
input:disabled {
  background: #f0f2ed;
}
input[type='checkbox'] {
  width: 19px;
  height: 19px;
  accent-color: var(--green);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #576550;
}
.editor {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 640px;
}
.editor [role='status']:empty {
  display: none;
}
.editor [role='status'] {
  font-size: 12px;
  margin: 0;
}
.time-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.days {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
}
.days legend {
  font-size: 12px;
}
.days .field {
  align-items: center;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  width: 440px;
  max-width: calc(100% - 30px);
  box-shadow: 0 20px 70px #18301d30;
}
dialog::backdrop {
  background: #24352270;
}
dialog > button {
  margin-top: 14px;
}
.loading {
  padding: 25px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.signed-out #chrome {
  display: none;
}
.signed-out #root {
  margin: 0;
}
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.signin {
  padding: 60px clamp(32px, 8vw, 145px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  max-width: 800px;
}
.signin > .brand {
  margin-bottom: 55px;
}
.signin h1 {
  white-space: pre-line;
  font-size: 43px;
  line-height: 1.15;
  letter-spacing: -1.7px;
}
.signin label {
  font-size: 12px;
  font-weight: 600;
  margin-top: 9px;
}
.signin > .primary {
  margin-top: 17px;
}
.signin > .muted {
  font-size: 12px;
}
.login-art {
  background: #e9eedd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 35px;
  text-align: center;
}
.login-art h2 {
  font-size: 36px;
  white-space: pre-line;
  color: #3a5538;
  line-height: 1.2;
}
.login-art p {
  font-size: 14px;
  color: #6a795e;
  white-space: pre-line;
}
.orbit-art {
  position: relative;
  width: 360px;
  height: 360px;
  max-width: 100%;
  margin-bottom: 35px;
}
.orbit {
  position: absolute;
  border: 1px solid #c8d1b8;
  border-radius: 50%;
  inset: 0;
}
.o2 {
  inset: 48px;
}
.sun {
  position: absolute;
  inset: 120px;
  border-radius: 50%;
  background: #ecb568;
  color: #83602c;
  display: grid;
  place-items: center;
  font-size: 70px;
  box-shadow:
    0 0 0 13px #efcd8f66,
    0 0 0 29px #efcd8f33;
}
.planet {
  position: absolute;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  border: 6px solid #e9eedd;
  background: #9dac86;
}
.p1 {
  top: 25px;
  left: 54px;
  width: 65px;
  height: 65px;
}
.p2 {
  right: 20px;
  bottom: 60px;
  background: #d39c79;
}
.p3 {
  bottom: 14px;
  left: 70px;
  background: #ada3be;
  width: 53px;
  height: 53px;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 10px;
  z-index: 99;
  background: white;
  padding: 12px;
}
.skip-link:focus {
  top: 10px;
}
@media (min-width: 1600px) {
  .page {
    padding-top: 48px;
  }
  .welcome-banner {
    min-height: 265px;
  }
}
@media (max-width: 1100px) {
  #chrome {
    width: 212px;
  }
  .sidebar-inner {
    padding: 28px 15px;
  }
  .brand {
    font-size: 21px;
  }
  #root {
    margin-left: 212px;
  }
  .page {
    padding: 28px;
  }
  .topbar {
    padding: 0 28px;
  }
  .mini-orbits {
    min-width: 200px;
    width: 200px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading > button {
    font-size: 12px;
  }
  .member-grid {
    grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  }
}
@media (max-width: 760px) {
  #chrome {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-inner {
    padding: 18px 18px 10px;
  }
  .nav-label,
  .sidebar-bottom .side-note,
  .account {
    display: none;
  }
  .nav {
    flex-direction: row;
    overflow-x: auto;
    margin-top: 16px;
    gap: 5px;
  }
  .nav a {
    white-space: nowrap;
    padding: 9px 12px;
    font-size: 12px;
  }
  .nav-icon {
    display: none;
  }
  .sidebar-bottom {
    position: absolute;
    right: 18px;
    top: 13px;
    padding: 0;
    margin: 0;
  }
  .sidebar-bottom > button {
    padding: 6px 13px;
    min-height: 35px;
  }
  #root {
    margin-left: 0;
  }
  .topbar {
    padding: 0 20px;
    height: 53px;
    font-size: 9px;
  }
  .page {
    padding: 25px 18px;
  }
  .page-heading {
    flex-direction: column;
    gap: 17px;
  }
  .page-heading > button {
    align-self: flex-start;
  }
  .welcome-banner {
    padding: 26px;
    min-height: 205px;
  }
  .welcome-banner h2 {
    font-size: 27px;
  }
  .welcome-banner p {
    font-size: 12px;
  }
  .mini-orbits {
    display: none;
  }
  .stats {
    gap: 9px;
  }
  .metric {
    padding: 16px 12px;
    font-size: 10px;
  }
  .metric > .muted {
    font-size: 11px;
  }
  .metric-arrow {
    display: none;
  }
  .metric strong {
    font-size: 26px;
  }
  .section-title {
    align-items: flex-start;
  }
  .section-title span {
    max-width: 130px;
    text-align: right;
    line-height: 1.5;
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .card {
    padding: 20px;
  }
  .login-layout {
    display: block;
  }
  .login-art {
    display: none;
  }
  .signin {
    min-height: 100vh;
    padding: 32px;
    max-width: 500px;
    margin: auto;
  }
  .signin h1 {
    font-size: 37px;
  }
  .signin > .brand {
    margin-bottom: 45px;
  }
  .tabs {
    gap: 2px;
  }
  .tabs a {
    padding: 9px;
    font-size: 12px;
  }
  .member-grid {
    grid-template-columns: 1fr;
  }
  .row {
    gap: 12px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .page,
  .signin {
    animation: arrive 0.25s ease-out;
  }
  @keyframes arrive {
    from {
      opacity: 0;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Parent management flows */
.auth-page {
  max-width: 640px;
  margin: 4rem auto;
  padding: 1.5rem;
}
.table-scroll {
  overflow-x: auto;
  max-width: 100%;
}
dialog {
  border: 1px solid var(--line, #ddd);
  border-radius: 24px;
  padding: 28px;
  max-width: min(520px, calc(100vw - 32px));
  box-shadow: 0 24px 80px #162b2533;
}
dialog::backdrop {
  background: #10241ba6;
}
dialog input {
  width: 100%;
}
.critical {
  border: 2px solid #a53333;
}
button.danger {
  color: #952d2d;
  border-color: #dca9a9;
}
.editor input[type='checkbox'] {
  width: 22px;
  height: 22px;
  accent-color: #285b48;
}
.editor .field:has(input[type='checkbox']) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav {
  gap: 2px;
}
.nav a {
  padding-top: 9px;
  padding-bottom: 9px;
}
.sidebar-inner {
  overflow-y: auto;
  max-height: 100vh;
}
@media (max-width: 760px) {
  .sidebar-inner {
    max-height: none;
  }
  .auth-page {
    margin: 1rem auto;
  }
  .page .card {
    overflow-wrap: anywhere;
  }
}

.mobile-navigation {
  display: none;
}
@media (max-width: 760px) {
  .mobile-navigation {
    display: block;
    width: 100%;
    grid-column: 1/-1;
    margin: 0 0 10px;
  }
  .nav {
    display: none;
  }
}
