@import url("/theme.css");
:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #24332b;
  background: #f5f6f2;
  font-synthesis: none;
  --ink: #172622;
  --muted: #788079;
  --line: #e2e7de;
  --green: #cef092;
  --accent: #46765b;
  --white: #fff;
  --radius: 18px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button,
.button {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 600;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
}
button.secondary,
.button.secondary {
  background: #edf1e9;
  color: var(--ink);
}
button.small,
.button.small {
  padding: 8px 12px;
  font-size: 12px;
}
button.danger {
  background: #fff0ed;
  color: #a34738;
}
input,
select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  max-width: 100%;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  font-weight: 650;
  margin-bottom: 12px;
}
h2 {
  font-size: 19px;
  font-weight: 650;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.7;
}
small,
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}
.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
.shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--ink);
  color: #c3cec6;
  padding: 35px 22px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  letter-spacing: -0.6px;
  font-weight: 700;
  color: white;
}
.brand img {
  width: 33px;
  height: 33px;
}
.brand-sub {
  margin: 10px 0 45px 44px;
  font-size: 10px;
  letter-spacing: 2px;
  color: #7c9486;
}
.nav {
  display: grid;
  gap: 7px;
}
.nav button {
  justify-content: flex-start;
  padding: 14px 17px;
  background: transparent;
  color: #a8bbae;
  font-weight: 500;
}
.nav button.active {
  background: #2f4239;
  color: #e0f3c8;
}
.nav .symbol {
  font-size: 17px;
  width: 19px;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid #34443b;
  padding-top: 22px;
  font-size: 12px;
  line-height: 1.9;
}
.user-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #3a5043;
  color: var(--green);
  display: grid;
  place-items: center;
  font-weight: 700;
}
.sidebar-foot button {
  color: #a8bbae;
  background: transparent;
  padding: 0;
  font-size: 12px;
}
.main {
  min-width: 0;
  padding: 0 42px 40px;
}
.topbar {
  height: 83px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.topbar .crumb {
  font-size: 13px;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #739b71;
  margin-right: 7px;
}
.content {
  max-width: 1210px;
  margin: auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin: 38px 0 26px;
}
.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.page-head .eyebrow {
  color: #879587;
  margin-bottom: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #edf4e7;
  border: 1px solid #dce8d2;
  border-radius: 30px;
  padding: 7px 11px;
  font-size: 11px;
  white-space: nowrap;
  color: #517649;
}
.badge.warn {
  background: #fff5df;
  border-color: #f2e2b9;
  color: #946b27;
}
.badge.gray {
  color: #737d73;
  background: #edf0ea;
  border-color: #dfe4d9;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card,
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card {
  padding: 25px;
}
.card.primary {
  background: #e6f0d7;
  border-color: #dae9c6;
}
.card-label {
  font-size: 12px;
  color: #6c7d69;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.metric {
  font-size: 43px;
  letter-spacing: -2px;
  margin: 24px 0 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.metric span {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 5px;
  color: #819076;
}
.card small {
  font-size: 11px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
  gap: 20px;
  margin-top: 22px;
}
.panel {
  padding: 26px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.panel-head h2 {
  margin: 0;
}
.panel-head small {
  font-size: 11px;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin: 20px 0 10px;
}
.progress-track {
  height: 9px;
  background: #edf1e9;
  border-radius: 8px;
  overflow: hidden;
}
.progress-track > i {
  display: block;
  height: 100%;
  background: #7ea65b;
  border-radius: 8px;
}
.progress-caption {
  font-size: 12px;
  margin: 12px 0 24px;
  color: var(--muted);
}
.chart {
  display: flex;
  align-items: end;
  gap: 16px;
  height: 176px;
  padding-top: 15px;
}
.chart-day {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: end;
  flex-direction: column;
  min-width: 0;
  gap: 8px;
}
.chart-bar {
  background: #dce8d0;
  width: 100%;
  max-width: 45px;
  border-radius: 7px 7px 3px 3px;
  min-height: 4px;
}
.chart-bar.today {
  background: #86a968;
}
.chart-day span {
  font-size: 10px;
  color: var(--muted);
}
.chart-day small {
  font-size: 10px;
  color: #678452;
}
.device-icon {
  width: 62px;
  height: 62px;
  border-radius: 17px;
  background: #eff3e9;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: #6b8555;
  font-size: 29px;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.6px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.device-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.notice {
  background: #eef2e8;
  border: 1px solid #dde6d5;
  border-radius: 12px;
  padding: 14px 17px;
  font-size: 12px;
  line-height: 1.8;
  color: #5f7354;
  margin-bottom: 22px;
}
.notice.warning {
  background: #fff7e8;
  border-color: #f1e0b8;
  color: #806226;
}
.notice a {
  text-underline-offset: 3px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 13px;
}
th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
  border-bottom: 1px solid var(--line);
  padding: 13px 12px;
}
td {
  border-bottom: 1px solid #edf0e9;
  padding: 17px 12px;
}
tr:last-child td {
  border-bottom: 0;
}
td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rank {
  font-size: 16px;
  color: #899680;
  font-weight: 600;
}
.rank.top {
  color: #3d6b44;
}
.me-row {
  background: #f4f8ee;
}
.person {
  display: flex;
  align-items: center;
  gap: 10px;
}
.person .avatar {
  background: #eef2e8;
  color: #6f8e5a;
  width: 30px;
  height: 30px;
  font-size: 12px;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.segmented {
  display: flex;
  background: #e7ebe2;
  border-radius: 9px;
  padding: 3px;
}
.segmented button {
  background: transparent;
  color: #788370;
  padding: 8px 16px;
  font-size: 12px;
}
.segmented button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px #0000000a;
}
.empty {
  padding: 36px 12px;
  text-align: center;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.section-gap {
  margin-top: 22px;
}
.wide-panel {
  max-width: 780px;
}
.steps {
  counter-reset: step;
  padding: 0;
  list-style: none;
}
.steps li {
  position: relative;
  padding: 2px 0 22px 42px;
  font-size: 13px;
  line-height: 1.8;
  color: #63715f;
}
.steps li:before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 27px;
  height: 27px;
  background: #edf3e4;
  color: #6a8754;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.steps strong {
  color: #293d2f;
  display: block;
  margin-bottom: 4px;
}
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.guide-grid .panel h2 {
  margin-bottom: 22px;
}
.faq {
  font-size: 13px;
  line-height: 1.9;
  color: #667361;
}
.faq summary {
  cursor: pointer;
  color: #314630;
  padding: 14px 0;
  font-weight: 600;
}
.faq p {
  margin: 0 0 18px;
}
.footer {
  color: #9aa293;
  font-size: 10px;
  letter-spacing: 0.8px;
  margin-top: 35px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-art {
  background: var(--ink);
  color: white;
  padding: 55px 60px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login-copy {
  margin: auto 0;
  z-index: 1;
  max-width: 540px;
}
.login-copy .eyebrow {
  color: #9eb08e;
  margin-bottom: 25px;
}
.login-copy h1 {
  font-size: 58px;
  line-height: 1.2;
  letter-spacing: -2px;
}
.login-copy h1 em {
  font-style: normal;
  color: var(--green);
}
.login-copy p {
  color: #a4b6a8;
  max-width: 365px;
  font-size: 14px;
  margin: 25px 0;
}
.orbits {
  position: absolute;
  width: 650px;
  height: 650px;
  border: 1px solid #425339;
  border-radius: 50%;
  bottom: -390px;
  right: -280px;
  box-shadow:
    0 0 0 65px #34433240,
    0 0 0 130px #34433225,
    0 0 0 195px #34433215;
}
.login-art footer {
  font-size: 11px;
  letter-spacing: 2px;
  color: #728573;
}
.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 70px;
  max-width: 620px;
  margin: auto;
  width: 100%;
}
.login-form h2 {
  font-size: 29px;
  letter-spacing: -0.8px;
  margin: 18px 0 12px;
}
.login-form p {
  font-size: 13px;
  color: var(--muted);
}
.login-form .button {
  margin-top: 28px;
  padding: 15px;
  font-size: 14px;
}
.login-notes {
  display: grid;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  margin-top: 35px;
  font-size: 12px;
  color: #6c7e62;
}
.login-form small {
  font-size: 11px;
  line-height: 1.8;
  margin-top: 24px;
}
.error-text {
  background: #fff0e9;
  border: 1px solid #f2d8c9;
  border-radius: 10px;
  padding: 14px;
  color: #9b5a43;
  font-size: 13px;
  margin-top: 15px;
}
.state-box {
  max-width: 600px;
  margin: 70px auto;
  text-align: center;
}
.state-box .device-icon {
  margin: 0 auto 25px;
}
#toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  max-width: 380px;
  background: #24392b;
  color: white;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 5px 24px #0002;
  display: none;
  z-index: 10;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.inline-error {
  font-size: 12px;
  color: #a45039;
}
.filter-label {
  font-size: 12px;
  color: var(--muted);
}
.skel {
  min-height: 280px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
@media (min-width: 1550px) {
  .main {
    padding-left: 70px;
    padding-right: 70px;
  }
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    padding: 30px 14px;
  }
  .main {
    padding: 0 25px 30px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 19px;
  }
  .metric {
    font-size: 35px;
  }
  .login-art {
    padding: 40px;
  }
  .login-copy h1 {
    font-size: 45px;
  }
  .login-form {
    padding: 40px;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: relative;
    padding: 18px 20px;
    gap: 16px;
  }
  .brand {
    font-size: 18px;
  }
  .brand-sub,
  .sidebar-foot {
    display: none;
  }
  .nav {
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  .nav button {
    white-space: nowrap;
    font-size: 12px;
    padding: 10px 12px;
  }
  .nav .symbol {
    display: none;
  }
  .main {
    padding: 0 17px 26px;
  }
  .topbar {
    height: 56px;
  }
  .page-head {
    margin: 26px 0 22px;
    align-items: start;
    flex-direction: column;
    gap: 15px;
  }
  h1 {
    font-size: 26px;
  }
  .cards {
    gap: 8px;
  }
  .card {
    padding: 15px 12px;
    border-radius: 12px;
  }
  .card-label {
    font-size: 10px;
  }
  .metric {
    font-size: 27px;
    margin: 17px 0 9px;
  }
  .metric span {
    font-size: 10px;
    margin-left: 2px;
  }
  .card small {
    font-size: 9px;
  }
  .panel {
    padding: 20px 16px;
    border-radius: 14px;
  }
  .panel h2 {
    font-size: 16px;
  }
  .chart {
    gap: 10px;
  }
  .footer {
    font-size: 9px;
  }
  .login-page {
    display: block;
  }
  .login-art {
    min-height: 320px;
    padding: 25px;
  }
  .login-copy {
    margin: 35px 0 15px;
  }
  .login-copy .eyebrow {
    margin-bottom: 13px;
  }
  .login-copy h1 {
    font-size: 39px;
    margin-bottom: 0;
  }
  .login-copy p {
    margin: 17px 0 0;
    font-size: 12px;
  }
  .login-art footer {
    display: none;
  }
  .login-form {
    padding: 32px 25px;
  }
  .login-form h2 {
    font-size: 25px;
  }
  .login-notes {
    margin-top: 28px;
    padding-top: 22px;
  }
  #toast {
    left: 18px;
    right: 18px;
    bottom: 18px;
    max-width: none;
  }
  .toolbar {
    gap: 8px;
  }
  .panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  input[type="date"] {
    font-size: 12px;
    padding: 8px;
  }
}
