:root {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #243c34;
  background: #f7f8f4;
  font-synthesis: none;
  --green: #246954;
  --muted: #78837b;
  --line: #e3e8df;
  --paper: #fff;
  --soft: #edf2e7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #aece79;
  outline-offset: 4px;
}
button {
  transition:
    background 0.15s,
    transform 0.15s;
}
button:active {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 36px;
  line-height: 1.18;
  letter-spacing: -1.3px;
  font-weight: 620;
  margin-bottom: 12px;
}
h2 {
  font-size: 26px;
  letter-spacing: -0.7px;
  font-weight: 600;
}
h3 {
  font-weight: 600;
  letter-spacing: -0.3px;
}
p {
  color: var(--muted);
  line-height: 1.65;
}
a {
  color: var(--green);
}
.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2px;
  color: #71846e;
  margin-bottom: 17px;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  padding: 13px 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.primary:hover {
  background: #174b3d;
}
.secondary {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  color: var(--green);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
}
.secondary:hover {
  background: #f0f4ed;
}
.text-button {
  background: none;
  border: 0;
  color: var(--green);
  font-size: 12px;
  padding: 8px;
}
.danger {
  color: #a54135;
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 244px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 32px 22px;
}
.brand {
  display: flex;
  gap: 9px;
  align-items: center;
  text-decoration: none;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
  flex-wrap: wrap;
}
.brand .beta {
  margin-left: 47px;
  margin-top: -8px;
  font-size: 8px;
  letter-spacing: 2px;
  color: #8c978e;
}
.nav-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.7px;
  color: #9aa399;
  margin: 57px 12px 16px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #758078;
  padding: 14px 15px;
  margin-bottom: 6px;
  border-radius: 9px;
  text-align: left;
  font-size: 13px;
}
.nav > span:first-child {
  font-size: 19px;
}
.nav.active {
  background: #edf3e9;
  color: #225b48;
  font-weight: 650;
}
.nav b {
  font-size: 10px;
  border-radius: 20px;
  background: #dce8d6;
  padding: 3px 7px;
  margin-left: auto;
}
.sidebar-note {
  margin-top: auto;
  background: #f6f8f1;
  border-radius: 12px;
  padding: 20px 17px;
}
.account-nav {
  margin-top: auto;
}
.account-password summary {
  cursor: pointer;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 0;
}
.account-password form {
  padding-top: 12px;
}
body:has(dialog[open]) {
  overflow: hidden;
}
#family-parents {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 24px;
}
.parent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.parent-row span {
  overflow-wrap: anywhere;
}
.parent-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
#invite-parent-form {
  margin-top: 20px;
}
#invite-result {
  margin-top: 16px;
}
.note-icon {
  font-size: 34px;
  color: #849b52;
  display: block;
  margin-bottom: 12px;
}
.sidebar-note strong {
  font-size: 12px;
}
.sidebar-note p {
  font-size: 11px;
  margin: 8px 0 0;
  line-height: 1.8;
}
.signout {
  margin-top: 22px;
  margin-bottom: 0;
}
.signout span {
  font-size: 12px !important;
}
main {
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 83px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 44px;
  font-size: 11px;
  color: #7f8c80;
  background: #fafbf8;
}
.tiny-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #60906c;
  border-radius: 50%;
  margin-right: 8px;
}
.main-content {
  padding: 42px 44px 20px;
  max-width: 1440px;
  margin: auto;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.page-title p {
  font-size: 13px;
  margin: 0;
}
.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 27px 0 32px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  padding: 20px 23px;
  border-radius: 12px;
}
.metric-top {
  display: flex;
  justify-content: space-between;
  color: #778576;
  font-size: 11px;
  margin-bottom: 15px;
}
.metric-top span:last-child {
  background: #f1f5eb;
  border-radius: 8px;
  padding: 5px 8px;
  color: #7c9260;
}
.metric strong {
  font-size: 30px;
  font-weight: 550;
  letter-spacing: -1px;
}
.metric small {
  font-size: 10px;
  color: #8b958a;
  margin-left: 12px;
}
.device-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
  overflow-x: auto;
}
.device-tab {
  border: 1px solid transparent;
  border-radius: 30px;
  background: none;
  color: #7a867c;
  white-space: nowrap;
  padding: 9px 15px;
  font-size: 12px;
}
.device-tab.selected {
  border-color: #ccdac5;
  background: #eaf1e4;
  color: #315c43;
  font-weight: 600;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.device-overview {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 25px 27px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.avatar {
  height: 52px;
  width: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #eef1e6;
  font-size: 22px;
  color: #6f8056;
  flex-shrink: 0;
}
.device-info {
  flex: 1;
}
.device-info h2 {
  font-size: 18px;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}
.device-info p {
  font-size: 11px;
  margin: 0;
}
.status {
  display: inline-block;
  font-size: 10px;
  padding: 5px 9px;
  border-radius: 20px;
  background: #edf4e9;
  color: #56804b;
}
.status.warn {
  background: #fff4df;
  color: #9b741e;
}
.status.bad {
  background: #f9ece7;
  color: #a05b44;
}
.device-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.policy-strip {
  background: #f5f8ef;
  padding: 13px 27px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: #748064;
}
.apps-heading {
  padding: 27px 27px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.apps-heading h3 {
  font-size: 16px;
  margin: 0 0 5px;
}
.apps-heading p {
  font-size: 11px;
  margin: 0;
}
.search {
  width: 225px !important;
  margin: 0 !important;
  background: #fafbf7 !important;
  font-size: 11px !important;
  padding: 10px 12px !important;
}
.app-row {
  display: flex;
  align-items: center;
  padding: 17px 27px;
  gap: 13px;
  border-top: 1px solid #f0f2ec;
}
.app-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 10px;
  background: #f0f3eb;
  color: #6b7d5f;
  font-size: 14px;
  font-weight: 650;
}
.app-description {
  flex: 1;
  min-width: 0;
}
.app-description strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.app-description small {
  display: block;
  font-size: 10px;
  color: #94a08f;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.app-description .schedule-note {
  color: #8d7646;
}
.rule-select {
  border: 1px solid var(--line);
  background: #fff;
  color: #496847;
  font-size: 11px;
  border-radius: 7px;
  padding: 8px;
  max-width: 140px;
}
.app-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-bottom {
  border-top: 1px solid var(--line);
  padding: 14px 27px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-bottom p {
  font-size: 10px;
  margin: 0;
}
.empty {
  padding: 65px 28px;
  text-align: center;
  background: #fff;
  border: 1px dashed #d5dfcd;
  border-radius: 14px;
}
.empty-icon {
  font-size: 36px;
  color: #91a278;
  margin-bottom: 22px;
  display: block;
}
.empty h2 {
  font-size: 22px;
}
.empty p {
  font-size: 13px;
  max-width: 420px;
  margin: 0 auto 24px;
}
.empty-inline {
  padding: 35px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 10px;
  color: #99a290;
  margin: 32px 0 0;
  flex-wrap: wrap;
}
.banner {
  border: 1px solid #d8e3cd;
  background: #eef6e9;
  color: #537342;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.6;
  padding: 13px 17px;
  margin-bottom: 18px;
}
.error {
  color: #a44335;
}
.banner.error {
  background: #fff1ec;
  border-color: #f2d8cc;
}
.fine {
  font-size: 11px;
  line-height: 1.7;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #52624f;
  margin: 16px 0 7px;
}
input {
  display: block;
  width: 100%;
  border: 1px solid #dbe1d5;
  border-radius: 8px;
  padding: 12px;
  color: #344d3d;
  background: #fff;
  margin: 8px 0 20px;
  outline: none;
}
input:focus {
  border-color: #76986d;
  box-shadow: 0 0 0 3px #eaf1e4;
}
dialog {
  width: min(460px, calc(100% - 30px));
  border: 0;
  border-radius: 18px;
  padding: 34px;
  color: #243c34;
  box-shadow: 0 25px 100px #17322133;
}
dialog::backdrop {
  background: #19352766;
  backdrop-filter: blur(4px);
}
dialog p {
  font-size: 13px;
}
.close {
  position: absolute;
  right: 16px;
  top: 12px;
  background: none;
  border: 0;
  font-size: 25px;
  color: #8a9784;
}
.time-fields {
  display: flex;
  gap: 18px;
}
.time-fields label {
  flex: 1;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 8px 0 20px;
}
legend {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.days {
  display: flex;
  gap: 7px;
}
.days label {
  margin: 0;
  position: relative;
}
.days input {
  position: absolute;
  opacity: 0;
  width: 1px;
}
.days span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
}
.days input:checked + span {
  background: var(--green);
  color: #fff;
}
.days input:focus-visible + span {
  outline: 3px solid #aece79;
}
.pair-code {
  display: block;
  text-align: center;
  font-size: 25px;
  letter-spacing: 3px;
  background: var(--soft);
  padding: 18px;
  border-radius: 10px;
  margin: 20px 0;
  user-select: all;
}
.pair-url {
  overflow-wrap: anywhere;
  font-size: 12px;
}
.request-row {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.request-row > div {
  flex: 1;
}
.request-row h3 {
  font-size: 14px;
  margin: 0 0 5px;
}
.request-row p {
  font-size: 11px;
  margin: 0;
}
.activity-row {
  padding: 18px 25px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
}
.activity-row time {
  color: #8c9786;
  font-size: 11px;
  white-space: nowrap;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.login-intro {
  background: #eaf0e1;
  padding: 65px 12%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-intro > img {
  margin-bottom: 50px;
}
.login-intro h1 {
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 550;
}
.login-intro p {
  font-size: 14px;
}
.orbit {
  width: 230px;
  height: 150px;
  margin-top: 40px;
  position: relative;
  border: 1px solid #ccd7bd;
  border-radius: 50%;
  transform: rotate(-20deg);
}
.orbit span {
  position: absolute;
  top: 55px;
  left: 30px;
  font-size: 11px;
  color: #7c8d66;
  transform: rotate(20deg);
}
.orbit-leaf {
  position: absolute;
  right: 0;
  top: 0;
  width: 80px;
  height: 55px;
  background: #a5b883;
  border-radius: 50% 0 50% 0;
}
.orbit-dot {
  width: 22px;
  height: 22px;
  background: #577753;
  border-radius: 50%;
  position: absolute;
  bottom: 5px;
  left: 10px;
}
.login-card {
  min-width: 0;
  width: min(380px, 80%);
  align-self: center;
  justify-self: center;
  padding: 50px 0;
}
.login-card h2 {
  font-size: 32px;
}
.login-card p {
  font-size: 13px;
}
.login-card button {
  width: 100%;
  justify-content: space-between;
}
.login-card .fine {
  font-size: 11px;
  margin-top: 25px;
}
.child-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.child-download:hover {
  text-decoration: underline;
}
.loading {
  padding: 80px;
  text-align: center;
  font-size: 14px;
  color: #7f8d74;
}
code {
  font-size: 10px;
}
@media (min-width: 1600px) {
  .main-content {
    padding-top: 55px;
  }
  .summary {
    margin-bottom: 40px;
  }
  .app-row {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}
@media (max-width: 1000px) {
  .sidebar {
    width: 205px;
    padding: 26px 16px;
  }
  .brand {
    font-size: 16px;
  }
  .main-content {
    padding: 30px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  h1 {
    font-size: 29px;
  }
  .apps-heading {
    flex-wrap: wrap;
  }
  .metric {
    padding: 17px;
  }
  .metric small {
    display: block;
    margin: 6px 0 0;
  }
  .device-actions {
    margin-left: 65px;
  }
}
@media (max-width: 720px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: auto;
    height: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 17px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 7px;
  }
  .brand {
    width: 100%;
    margin-bottom: 12px;
  }
  .brand .beta {
    margin: 0 0 0 auto;
  }
  .nav-label,
  .sidebar-note {
    display: none;
  }
  .nav {
    width: auto;
    margin: 0;
    padding: 9px 10px;
    gap: 6px;
    font-size: 11px;
  }
  .nav > span:first-child {
    font-size: 15px;
  }
  .signout {
    margin-left: auto;
  }
  .topbar {
    height: 50px;
    padding: 0 20px;
    font-size: 10px;
  }
  .main-content {
    padding: 28px 18px 20px;
  }
  .page-title {
    align-items: flex-start;
  }
  .page-title h1 {
    font-size: 25px;
  }
  .page-title .primary {
    font-size: 0;
    padding: 12px;
  }
  .page-title .primary::before {
    content: "＋";
    font-size: 18px;
  }
  .eyebrow {
    font-size: 8px;
    margin-bottom: 12px;
  }
  .summary {
    gap: 8px;
    margin: 23px 0;
  }
  .metric {
    padding: 13px;
  }
  .metric-top {
    font-size: 9px;
    margin-bottom: 8px;
  }
  .metric-top span:last-child {
    display: none;
  }
  .metric strong {
    font-size: 25px;
  }
  .metric small {
    font-size: 9px;
  }
  .device-overview {
    padding: 20px;
  }
  .device-actions {
    margin-left: 0;
    width: 100%;
  }
  .policy-strip {
    padding: 12px 20px;
    flex-direction: column;
    font-size: 10px;
    gap: 5px;
  }
  .apps-heading {
    padding: 22px 20px 16px;
  }
  .search {
    width: 100% !important;
  }
  .app-row {
    padding: 16px 17px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .app-description {
    min-width: 120px;
  }
  .app-controls {
    gap: 2px;
  }
  .app-controls .text-button {
    font-size: 10px;
    padding: 5px;
  }
  .rule-select {
    font-size: 10px;
    max-width: 113px;
  }
  .card-bottom {
    padding: 15px 20px;
    gap: 10px;
  }
  .card-bottom p {
    font-size: 9px;
  }
  .request-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .request-row > div {
    flex-basis: 100%;
  }
  .activity-row {
    font-size: 11px;
    padding: 18px;
  }
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-intro {
    padding: 35px 30px;
  }
  .login-intro > img {
    width: 40px;
    height: 40px;
    margin-bottom: 25px;
  }
  .login-intro h1 {
    font-size: 32px;
  }
  .login-intro p,
  .orbit {
    display: none;
  }
  .login-card {
    padding: 40px 0;
  }
  .login-card h2 {
    font-size: 27px;
  }
  footer {
    font-size: 9px;
    gap: 7px;
  }
  .days {
    gap: 4px;
  }
  .days span {
    width: 35px;
  }
}

/* Account entry keeps the same quiet visual language as the dashboard. */
.login-card .auth-switch {
  justify-content: center;
  margin-top: 6px;
}
.login-card .auth-hint {
  font-size: 12px;
  margin: 0 0 16px;
  color: #627267;
}
.login-card .verification-intro {
  line-height: 1.7;
  margin-bottom: 28px;
  overflow-wrap: anywhere;
}
.verification-intro strong {
  display: block;
  font-weight: 500;
  color: #294c3e;
}
#verification-code {
  font-size: 28px;
  letter-spacing: 0.3em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.login-card .spam-hint {
  color: #627267;
  line-height: 1.7;
  margin: 22px 0 14px;
}
.auth-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.login-card .auth-actions button {
  width: auto;
  font-size: 12px;
}
#verify-status:empty,
#verify-error:empty,
#login-error:empty {
  display: none;
}
