:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--fg);
  background: var(--canvas);
  --fg: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --surface: #fff;
  --canvas: #fafafa;
  --soft: #f4f4f5;
  --blue: #007aff;
  --blue-soft: #edf5ff;
  --green: #16825d;
  color-scheme: light;
  font-synthesis: none;
}
:root[data-theme="dark"] {
  --fg: #fafafa;
  --muted: #a1a1aa;
  --line: #27272a;
  --surface: #111113;
  --canvas: #09090b;
  --soft: #1d1d20;
  --blue: #3395ff;
  --blue-soft: #152333;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 13px;
  min-height: 36px;
  font-size: 12px;
  font-weight: 550;
  border-radius: 6px;
  white-space: nowrap;
}
button:hover {
  background: var(--soft);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 550;
}
button.text {
  border: 0;
  color: var(--blue);
  background: none;
  padding: 6px;
}
button:focus-visible,
input:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
a {
  color: var(--blue);
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.6px;
}
h2 {
  font-size: 15px;
  font-weight: 600;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
p {
  color: var(--muted);
  margin-top: 5px;
}
.small,
small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.full {
  width: 100%;
}
.section-gap {
  margin-top: 20px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.hint {
  background: var(--soft);
  border-radius: 6px;
  padding: 13px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin: 14px 0;
}
.inline-error {
  background: #fff1f0;
  color: #a02d25;
  padding: 14px;
  border: 1px solid #ffd2ce;
  border-radius: 7px;
  margin-bottom: 20px;
}
.qa-banner {
  padding: 9px 14px;
  background: #fff6da;
  color: #805b07;
  border-radius: 7px;
  margin-bottom: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.4px;
}
.brand-logo {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-size: 16px;
  flex-shrink: 0;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 1px;
  font-weight: 500;
}
.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 25px 16px 18px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  padding: 0 8px;
}
.nav-title {
  font-size: 11px;
  color: var(--muted);
  padding: 30px 12px 10px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  text-align: left;
  padding: 9px 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.nav button span {
  font-size: 17px;
  width: 19px;
  text-align: center;
}
.nav button:hover {
  background: var(--soft);
}
.nav button.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 550;
}
.sidebar-foot {
  margin-top: auto;
  padding: 18px 12px 0;
  font-size: 11px;
  color: var(--muted);
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 56px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 5;
  font-size: 12px;
  color: var(--muted);
}
.topbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
}
.topbar button {
  padding: 4px 8px;
  border: 0;
  background: none;
}
.avatar {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--fg);
}
.main {
  padding: 30px;
  max-width: 1600px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
}
.page-heading p {
  margin-top: 6px;
}
.eyebrow {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.4px;
  margin-bottom: 14px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.card-header {
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}
.card-header p {
  font-size: 12px;
}
.card-body {
  padding: 20px;
}
.stat {
  padding: 20px;
}
.stat-label {
  color: var(--muted);
  font-size: 12px;
}
.stat strong {
  display: block;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 9px;
  letter-spacing: -0.6px;
}
.stat strong small {
  font-size: 16px;
  color: var(--muted);
  font-weight: 400;
}
.stat p {
  font-size: 11px;
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--soft);
  padding: 3px 8px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.badge.green {
  color: #16734f;
  background: #eaf8f0;
}
.badge.blue {
  color: var(--blue);
  background: var(--blue-soft);
}
.badge.amber {
  color: #926711;
  background: #fff5d9;
}
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.connection-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.connection-mark {
  font-size: 26px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.connection-head p {
  font-size: 11px;
}
.consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: 14px 0;
}
.consent input {
  margin-top: 4px;
  flex-shrink: 0;
  accent-color: var(--blue);
}
.empty {
  text-align: center;
  padding: 42px 22px;
  color: var(--muted);
}
.empty h3 {
  color: var(--fg);
}
.empty p {
  max-width: 400px;
  margin: 8px auto 18px;
  font-size: 12px;
}
.empty-icon {
  font-size: 28px;
  color: var(--blue);
  margin-bottom: 14px;
}
.plan {
  padding: 19px 20px;
  border-bottom: 1px solid var(--line);
}
.plan:last-child {
  border: 0;
}
.plan p {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.plan h3 {
  overflow-wrap: anywhere;
}
.plan summary {
  cursor: pointer;
}
.plan pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.8 inherit;
}
.form-item {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 19px 20px;
  white-space: normal;
  gap: 20px;
}
.form-item p {
  font-size: 11px;
}
.arrow {
  font-size: 18px;
  color: var(--muted);
}
.footer-btn {
  border: 0;
  border-radius: 0;
  width: 100%;
  padding: 14px;
  color: var(--blue);
  font-size: 12px;
}
.details {
  margin-top: 20px;
}
.record {
  padding: 20px;
  border-top: 1px solid var(--line);
}
.record header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
dl {
  margin: 12px 0;
}
.answer {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 15px;
  padding: 5px 0;
}
dt {
  color: var(--muted);
  font-size: 12px;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.note-line {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 11px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
}
.field input,
.field select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--fg);
  min-width: 0;
  min-height: 39px;
  font-size: 13px;
  font-weight: 400;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.field input::placeholder {
  color: #a1a1aa;
}
.field input:hover,
.field select:hover {
  border-color: #a1a1aa;
}
.field input:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 15%, transparent);
  outline: none;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
.weekdays {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.weekdays input {
  accent-color: var(--blue);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 16px;
}
.location-panel {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin: 8px 0 24px;
}
.location-panel p {
  font-size: 12px;
}
iframe {
  width: 100%;
  height: 475px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 15px;
}
.modal-shade {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #0006;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  width: 520px;
  max-width: 100%;
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 20px 80px #0003;
}
.modal p {
  margin-bottom: 14px;
}
.qr {
  text-align: center;
}
.qr img {
  display: block;
  width: 230px;
  max-width: 100%;
  margin: 18px auto;
  border-radius: 6px;
}
.qr p {
  font-size: 12px;
}
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 12px 20px;
  background: var(--fg);
  color: var(--surface);
  border-radius: 8px;
  box-shadow: 0 6px 25px #0002;
  max-width: 90vw;
  font-size: 13px;
}
.toast[hidden] {
  display: none;
}
.loading {
  padding: 60px;
  color: var(--muted);
}
.auth {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 64px 20px;
  position: relative;
}
.auth-story {
  display: none;
}
.auth-form {
  width: 100%;
  max-width: 396px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 35px #00000004;
}
.auth-form h2 {
  font-size: 24px;
  letter-spacing: -0.5px;
}
.auth-form .brand {
  margin-bottom: 30px;
  font-size: 14px;
  letter-spacing: normal;
  line-height: 1.3;
}
.auth-form h2 {
  margin-bottom: 20px;
}
.empty h3 + button {
  margin-top: 18px;
}
.auth-form p {
  font-size: 12px;
  margin: 10px 0 24px;
}
.auth-foot {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
}
.menu-button {
  display: none;
}
.auth-form .eyebrow {
  color: var(--blue);
}
@media (min-width: 1450px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}
@media (max-width: 1100px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .main {
    padding: 24px;
  }
  .sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .brand {
    font-size: 14px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: -260px;
    z-index: 25;
    width: 240px;
    transition: left 0.2s;
    box-shadow: 8px 0 30px #0001;
  }
  .sidebar.open {
    left: 0;
  }
  .menu-button {
    display: block;
  }
  .topbar {
    padding: 0 16px;
    gap: 10px;
  }
  .topbar > span {
    margin-right: auto;
  }
  .topbar-right > span:not(.avatar) {
    display: none;
  }
  .main {
    padding: 22px 16px;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 20px;
  }
  .page-heading > span {
    display: none;
  }
  h1 {
    font-size: 23px;
  }
  .grid3 {
    gap: 10px;
  }
  .stat {
    padding: 14px;
  }
  .stat strong {
    font-size: 21px;
  }
  .stat p {
    font-size: 10px;
  }
  .stat-label {
    font-size: 11px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .card-header,
  .card-body,
  .plan {
    padding: 16px;
  }
  .content-grid {
    gap: 18px;
  }
  .answer {
    grid-template-columns: 95px 1fr;
  }
  .row {
    align-items: flex-start;
  }
  .row h3 {
    min-width: 0;
  }
  .button-row button {
    flex: 1;
  }
  .location-panel {
    padding: 14px;
  }
  .card-header h2 {
    font-size: 14px;
  }
  .plan .button-row {
    gap: 6px;
  }
  .plan .button-row button {
    font-size: 11px;
    padding: 8px;
  }
  .auth-form {
    padding: 26px;
  }
  .topbar {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Login and account forms follow the reference application's control geometry. */
.auth-form .brand-logo {
  width: 33px;
  height: 33px;
  border-radius: 9px;
}
.auth-form .field {
  margin-bottom: 18px;
}
.auth-form .field input {
  padding: 10px 11px;
  min-height: 41px;
}
.password-field {
  position: relative;
}
.field .password-field input {
  padding-right: 46px;
}
.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.password-toggle:hover {
  background: var(--soft);
}
.password-field input::-ms-reveal,
.password-field input::-ms-clear {
  display: none;
}
.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.login-submit {
  min-height: 40px;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
button.primary:hover {
  background: color-mix(in srgb, var(--blue) 85%, #000);
}
.site-remember {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 500;
}
input[type="checkbox"] {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
}
.account-links {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
}
.account-links .text {
  padding: 4px 0;
  min-height: 0;
  font-size: 12px;
  font-weight: 400;
}
.account-links .text:hover {
  text-decoration: underline;
}
.login-utilities {
  position: absolute;
  right: 24px;
  top: 20px;
}
.login-utilities button {
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  color: var(--muted);
  font-size: 18px;
}
.auth-error,
.auth-form .auth-error {
  color: #dc2626;
  font-size: 12px;
  line-height: 1.7;
  margin: 12px 0;
  white-space: pre-line;
}
.auth-error:empty,
.code-status:empty {
  display: none;
}
.account-dialog {
  width: 440px;
  max-width: calc(100vw - 32px);
  max-height: calc(100svh - 48px);
  padding: 24px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 60px #0002;
}
.account-dialog::backdrop {
  background: #0005;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  font-size: 16px;
}
.dialog-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  padding: 0;
  min-height: 32px;
  width: 32px;
  color: var(--muted);
}
.code-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}
.code-row .field {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.code-row button {
  flex: none;
  min-height: 39px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.code-status {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0;
}
.settings-note {
  margin: 0 0 16px;
}
:root[data-theme="dark"] .auth-form {
  box-shadow: none;
}
:root[data-theme="dark"] .auth-error {
  color: #f87171;
}
@media (max-width: 700px) {
  .auth {
    padding: 68px 16px 30px;
  }
  .auth-form {
    padding: 26px;
    max-width: 385px;
  }
  .login-utilities {
    right: 17px;
    top: 16px;
  }
  .field input,
  .field select {
    font-size: 16px;
  }
  .account-dialog {
    padding: 20px;
  }
}
