/* =========================================================
   Aster Health — auth flow, preferences & care dashboard
   ========================================================= */

/* ---------- auth shell ---------- */

.auth-body {
  background: #f7f8fa;
}

.auth-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #fff;
}

.auth-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 48px, 1340px);
  height: 72px;
  margin-inline: auto;
  border-bottom: 1px solid var(--line);
}

.auth-back {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  transition: background-color 0.2s var(--ease);
}

.auth-back:hover {
  background: var(--bg-soft);
}

.auth-back .icon {
  width: 20px;
  height: 20px;
}

.auth-title {
  position: absolute;
  left: 50%;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 500;
  transform: translateX(-50%);
}

.auth-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-header-right a {
  color: var(--blue);
  font-size: 0.875rem;
  font-weight: 500;
}

.auth-header-right a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-progress {
  height: 4px;
  background: #e9ebef;
}

.auth-progress span {
  display: block;
  width: var(--progress, 25%);
  height: 100%;
  background: var(--blue);
  transition: width 0.5s var(--ease);
}

.auth-main {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 48px;
  align-items: center;
  width: min(100% - 96px, 1320px);
  min-height: calc(100vh - 76px);
  margin-inline: auto;
  padding: 48px 0 64px;
}

.auth-form-wrap {
  width: 100%;
  max-width: 620px;
}

.auth-h1 {
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.auth-lede {
  max-width: 560px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 26px;
  padding: 14px 16px;
  border: 1px solid #cfe3ff;
  border-radius: 10px;
  background: #f2f8ff;
  color: #3c4a5e;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.info-banner .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--blue);
}

.info-banner strong {
  color: var(--ink);
  font-weight: 600;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.auth-submit {
  justify-self: start;
  margin-top: 4px;
}

.auth-alt {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.875rem;
}

.auth-alt a {
  color: var(--blue);
  font-weight: 500;
}

.auth-alt a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-footnote {
  margin-top: 22px;
  color: var(--muted-2);
  font-size: 0.75rem;
  line-height: 1.55;
}

.auth-footnote a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- form fields ---------- */

.field {
  position: relative;
}

.field label {
  position: absolute;
  top: 9px;
  left: 16px;
  z-index: 1;
  color: var(--muted-2);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  pointer-events: none;
}

.field .req {
  margin-left: 2px;
  color: var(--red);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 64px;
  padding: 23px 16px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}

.field textarea {
  height: auto;
  min-height: 108px;
  padding-top: 28px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a5adb8;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #c2c9d2;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(11, 92, 255, 0.12);
}

.field select {
  padding-right: 42px;
  appearance: none;
  -webkit-appearance: none;
}

.field .select-icon {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #e15b52;
  background: #fff7f6;
}

.field.has-error label {
  color: #b43a31;
}

.field.has-error input:focus,
.field.has-error select:focus,
.field.has-error textarea:focus {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

.field-error {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: var(--red);
  font-size: 0.75rem;
  line-height: 1.4;
}

.field-error[hidden] {
  display: none;
}

.field-password input {
  padding-right: 52px;
}

.eye-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted-2);
  transform: translateY(-50%);
}

.eye-btn:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.eye-btn .icon {
  width: 18px;
  height: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pw-reqs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.75rem;
}

.pw-req {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.pw-req::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c4c9d1;
  content: "";
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.pw-req.is-met {
  color: var(--green);
}

.pw-req.is-met::before {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(13, 138, 95, 0.1);
}

/* checkboxes */

.check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  line-height: 1.55;
  cursor: pointer;
}

.check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-box {
  display: grid;
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  place-items: center;
  border: 1px solid #c9ced6;
  border-radius: 5px;
  background: #fff;
  color: #fff;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.check-box::after {
  width: 11px;
  height: 11px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.check input:checked + .check-box {
  border-color: var(--blue);
  background: var(--blue);
}

.check input:checked + .check-box::after {
  opacity: 1;
  transform: none;
}

.check input:focus-visible + .check-box {
  outline: 3px solid rgba(11, 92, 255, 0.35);
  outline-offset: 2px;
}

.check.has-error .check-box {
  border-color: var(--red);
}

.check a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #b8c0ca;
  text-underline-offset: 2px;
}

.check a:hover {
  text-decoration-color: var(--blue);
}

.check-group {
  display: grid;
  gap: 12px;
}

.check-group-error {
  margin-top: -4px;
  color: var(--red);
  font-size: 0.75rem;
}

.check-group-error[hidden] {
  display: none;
}

/* ---------- auth illustration ---------- */

.auth-art {
  display: grid;
  align-self: center;
  justify-items: center;
  width: 100%;
}

.auth-art svg {
  width: min(100%, 600px);
  height: auto;
  overflow: visible;
}

.auth-art figcaption {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ---------- preferences ---------- */

.pref-main {
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  align-items: start;
}

.pref-form {
  margin-top: 28px;
}

.interest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.interest {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.interest:hover {
  border-color: #c2c9d2;
}

.interest input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.interest .icon {
  width: 19px;
  height: 19px;
  color: var(--muted-2);
}

.interest .interest-check {
  display: grid;
  width: 18px;
  height: 18px;
  margin-left: auto;
  place-items: center;
  border: 1px solid #c9ced6;
  border-radius: 50%;
  background: #fff;
  color: #fff;
}

.interest .interest-check .icon {
  width: 10px;
  height: 10px;
  color: currentColor;
  opacity: 0;
}

.interest:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-050);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.interest:has(input:checked) > .icon {
  color: var(--blue);
}

.interest:has(input:checked) .interest-check {
  border-color: var(--blue);
  background: var(--blue);
}

.interest:has(input:checked) .interest-check .icon {
  opacity: 1;
}

.interest:has(input:focus-visible) {
  outline: 3px solid rgba(11, 92, 255, 0.35);
  outline-offset: 2px;
}

.visit-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.visit-option {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.visit-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.visit-option .icon {
  width: 20px;
  height: 20px;
  color: var(--muted-2);
}

.visit-option strong {
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
}

.visit-option small {
  color: var(--muted-2);
  font-size: 0.6875rem;
  line-height: 1.35;
}

.visit-option:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-050);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.visit-option:has(input:checked) .icon {
  color: var(--blue);
}

.visit-option:has(input:focus-visible) {
  outline: 3px solid rgba(11, 92, 255, 0.35);
  outline-offset: 2px;
}

.pref-preview {
  position: sticky;
  top: 100px;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 34, 64, 0.11);
}

.pref-preview-top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.pref-preview-top .brand-mark {
  width: 28px;
  height: 28px;
}

.pref-preview-top strong {
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pref-preview-top .tag {
  margin-left: auto;
  padding: 3px 7px;
  font-size: 0.5625rem;
}

.pref-preview-body {
  padding: 22px;
}

.pref-hello {
  color: var(--muted-2);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pref-name {
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.pref-rows {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.pref-row {
  display: grid;
  gap: 7px;
}

.pref-row > span {
  color: var(--muted-2);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pref-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pref-chip {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue-050);
  color: var(--blue);
  font-size: 0.625rem;
  font-weight: 500;
}

.pref-chip.empty {
  background: var(--bg-soft);
  color: var(--muted-2);
}

.pref-row strong {
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 500;
}

.pref-preview-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
  color: var(--muted-2);
  font-size: 0.625rem;
  line-height: 1.4;
}

.pref-preview-foot .icon {
  width: 14px;
  height: 14px;
  color: var(--green);
}

/* success */

.success-wrap {
  grid-column: 1 / -1;
  width: min(100%, 660px);
  margin: 24px auto;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.success-mark {
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  box-shadow: 0 0 0 10px rgba(13, 138, 95, 0.06);
}

.success-mark .icon {
  width: 34px;
  height: 34px;
}

.success-wrap h1,
.success-wrap h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.success-wrap > p {
  max-width: 460px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.success-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.success-summary span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.75rem;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.success-note {
  margin-top: 22px;
  color: var(--muted-2);
  font-size: 0.75rem;
}

/* ---------- login ---------- */

.login-main {
  display: grid;
  min-height: calc(100vh - 73px);
  padding: 48px 24px;
  place-items: center;
  background:
    radial-gradient(700px 400px at 50% -10%, rgba(11, 92, 255, 0.09), transparent 65%),
    #f7f8fa;
}

.login-card {
  width: min(100%, 460px);
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 34, 64, 0.09);
}

.login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.login-card h1 {
  font-size: 2rem;
  text-align: center;
}

.login-card > p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.login-form .btn {
  width: 100%;
  margin-top: 4px;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2px;
}

.login-row .check {
  font-size: 0.8125rem;
}

.login-row a {
  color: var(--blue);
  font-size: 0.8125rem;
  font-weight: 500;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--muted-2);
  font-size: 0.75rem;
}

.login-divider::before,
.login-divider::after {
  flex: 1;
  height: 1px;
  background: var(--line);
  content: "";
}

.login-alt {
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

.login-alt a {
  color: var(--blue);
  font-weight: 500;
}

.login-preview {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--muted-2);
  font-size: 0.75rem;
  line-height: 1.5;
}

.login-preview .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: var(--blue);
}

.reset-success {
  margin-top: 4px;
  text-align: center;
}

.reset-success .success-mark {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
}

.reset-success h2 {
  font-size: 1.75rem;
}

.reset-success p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.reset-success strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.reset-success .reset-success-note {
  color: var(--muted-2);
  font-size: 0.75rem;
}

.reset-success .success-actions {
  margin-top: 24px;
}

.reset-success .success-actions .btn {
  flex: 1;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 200;
  max-width: min(92vw, 520px);
  padding: 12px 18px;
  border-radius: 999px;
  background: #0a1020;
  color: #fff;
  box-shadow: 0 18px 48px rgba(10, 16, 32, 0.3);
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- dashboard ---------- */

.dash-body {
  background: #f5f7fa;
}

.dash-shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}

.dash-side {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.dash-brand {
  padding: 4px 8px 0;
}

.dash-nav {
  display: grid;
  gap: 2px;
  margin-top: 24px;
}

.dash-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.dash-nav a:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.dash-nav a.is-active {
  background: var(--blue-050);
  color: var(--blue);
  font-weight: 600;
}

.dash-nav .icon {
  width: 18px;
  height: 18px;
}

.dash-nav-label {
  margin: 18px 11px 6px;
  color: var(--muted-2);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dash-side-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 14px 8px 4px;
  border-top: 1px solid var(--line);
}

.dash-side-foot .avatar {
  width: 32px;
  height: 32px;
  font-size: 0.5625rem;
}

.dash-side-foot strong {
  display: block;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.dash-side-foot small {
  display: block;
  color: var(--muted-2);
  font-size: 0.625rem;
}

.dash-side-foot .icon-btn {
  margin-left: auto;
  width: 32px;
  height: 32px;
}

.dash-main {
  min-width: 0;
}

.dash-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.dash-search-wrap {
  position: relative;
  width: min(100%, 380px);
  min-width: 0;
}

.dash-search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-soft);
  color: var(--muted-2);
}

.dash-search .icon {
  width: 16px;
  height: 16px;
}

.dash-search input {
  width: 100%;
  border: 0;
  background: none;
  outline: 0;
  color: var(--ink);
  font-size: 0.8125rem;
}

.dash-search input::placeholder {
  color: var(--muted-2);
}

.dash-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  width: min(420px, calc(100vw - 32px));
  max-height: min(420px, 62vh);
  padding: 8px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(16, 34, 64, 0.16);
}

.dash-search-label {
  padding: 8px 10px 6px;
  color: var(--muted-2);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-search-results ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dash-search-results a {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
}

.dash-search-results a small {
  color: var(--muted-2);
  font-size: 0.6875rem;
  font-weight: 400;
}

.dash-search-results a:hover,
.dash-search-results a:focus-visible {
  background: #f1f5fb;
}

.dash-search-empty {
  padding: 12px 10px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.dash-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
}

.icon-btn:hover {
  color: var(--ink);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

.icon-btn .dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 6px;
  height: 6px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--blue);
}

.dash-top-actions .avatar {
  width: 38px;
  height: 38px;
  font-size: 0.625rem;
}

.dash-content {
  width: min(100%, 1180px);
  margin-inline: auto;
  padding: 26px 32px 56px;
}

.preview-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid #cfe3ff;
  border-radius: 10px;
  background: #f2f8ff;
  color: #3c4a5e;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.preview-banner .icon {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--blue);
}

.preview-banner strong {
  color: var(--ink);
  font-weight: 600;
}

.preview-banner p {
  flex: 1;
}

.preview-banner .banner-close {
  display: grid;
  width: 26px;
  height: 26px;
  flex: none;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted-2);
}

.preview-banner .banner-close:hover {
  background: rgba(11, 92, 255, 0.08);
  color: var(--ink);
}

.preview-banner .banner-close .icon {
  width: 15px;
  height: 15px;
  color: currentColor;
}

.dash-greet {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 26px 0 30px;
}

.dash-date {
  margin-bottom: 8px;
  color: var(--muted-2);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dash-greet h1 {
  font-size: clamp(1.75rem, 2.6vw, 2.125rem);
  letter-spacing: -0.04em;
}

.dash-greet p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.875rem;
}

.dash-greet .btn {
  flex: none;
}

.dash-section {
  margin-top: 36px;
  scroll-margin-top: 84px;
}

.dash-card[id] {
  scroll-margin-top: 84px;
}

.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.dash-section-head h2 {
  font-size: 1.125rem;
  letter-spacing: -0.025em;
}

.dash-section-head .text-link {
  font-size: 0.8125rem;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 16px;
}

.dash-grid-equal {
  grid-template-columns: 1fr 1fr;
}

.dash-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dash-card-head h3 {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dash-card-head .tag {
  padding: 3px 7px;
  font-size: 0.5625rem;
}

.dash-visit {
  position: relative;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(300px 220px at 100% 0%, rgba(255, 255, 255, 0.1), transparent 65%),
    linear-gradient(135deg, #0746c4, #0b5cff 60%, #1e63e6);
  color: #fff;
}

.dash-visit::after {
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
}

.dash-visit .dash-card-head h3 {
  color: #fff;
}

.dash-visit .tag {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(5, 24, 70, 0.32);
  color: #fff;
}

.dash-visit-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.dash-visit-main .avatar {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(140deg, #dbe8ff, #8db2f7);
  font-size: 0.75rem;
}

.dash-visit-main strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dash-visit-main small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.75rem;
}

.dash-visit-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.75rem;
}

.dash-visit-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dash-visit-meta .icon {
  width: 14px;
  height: 14px;
}

.dash-visit-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.dash-visit-actions .btn {
  min-height: 36px;
  padding: 0 15px;
  font-size: 0.75rem;
}

.dash-visit-actions .link-quiet {
  color: #fff;
  font-size: 0.75rem;
}

.dash-visit-actions .link-quiet:hover {
  color: #fff;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 500;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.quick-link:hover {
  border-color: var(--blue-200);
  background: var(--blue-050);
}

.quick-link .icon {
  width: 17px;
  height: 17px;
  color: var(--blue);
}

.dash-progress {
  height: 6px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}

.dash-progress span {
  display: block;
  width: 60%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.3s var(--ease);
}

.dash-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 0.6875rem;
}

.dash-progress-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.dash-checks {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.dash-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink-2);
  font-size: 0.75rem;
  line-height: 1.45;
  cursor: pointer;
}

.dash-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.dash-check .box {
  display: grid;
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  color: #fff;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.dash-check .box .icon {
  width: 10px;
  height: 10px;
  opacity: 0;
}

.dash-check input:checked + .box {
  border-color: var(--blue);
  background: var(--blue);
}

.dash-check input:checked + .box .icon {
  opacity: 1;
}

.dash-check input:checked ~ span {
  color: var(--muted-2);
  text-decoration: line-through;
}

.dash-check input:focus-visible + .box {
  outline: 3px solid rgba(11, 92, 255, 0.3);
  outline-offset: 2px;
}

.dash-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.dash-message:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.dash-message .avatar {
  width: 30px;
  height: 30px;
  font-size: 0.5625rem;
}

.dash-message strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
}

.dash-message strong .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.dash-message p {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.6875rem;
  line-height: 1.45;
}

.dash-message time {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 0.625rem;
  white-space: nowrap;
}

.family-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.family-card {
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  text-align: center;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.family-card:hover {
  border-color: var(--blue-200);
  background: var(--blue-050);
}

.family-card .avatar {
  width: 42px;
  height: 42px;
  margin-inline: auto;
  font-size: 0.6875rem;
}

.family-card strong {
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
}

.family-card small {
  color: var(--muted-2);
  font-size: 0.625rem;
}

.family-card.add {
  border-style: dashed;
  background: var(--bg-soft);
  color: var(--muted);
}

.family-card.add .plus {
  display: grid;
  width: 42px;
  height: 42px;
  margin-inline: auto;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
}

.family-card.add .plus .icon {
  width: 18px;
  height: 18px;
}

.record-list {
  display: grid;
}

.record-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.record-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.record-item .icon {
  width: 17px;
  height: 17px;
  color: var(--muted-2);
}

.record-item strong {
  display: block;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 500;
}

.record-item small {
  display: block;
  color: var(--muted-2);
  font-size: 0.625rem;
}

.record-item time {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 0.625rem;
}

.dash-footer-note {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 0.6875rem;
  line-height: 1.55;
}

.dash-footer-note a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- app responsive ---------- */

@media (max-width: 1080px) {
  .auth-main {
    width: min(100% - 64px, 1200px);
    gap: 32px;
  }

  .pref-main {
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: 32px;
  }
}

@media (max-width: 960px) {
  .auth-main {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 40px 0 56px;
  }

  .auth-form-wrap {
    max-width: 640px;
    margin-inline: auto;
  }

  .auth-art {
    display: none;
  }

  .pref-main {
    grid-template-columns: 1fr;
  }

  .pref-preview {
    position: static;
    max-width: 640px;
    margin: 8px auto 0;
  }

  .success-wrap {
    margin: 8px auto;
  }

  .dash-grid,
  .dash-grid-equal {
    grid-template-columns: 1fr;
  }

  .family-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .dash-shell {
    grid-template-columns: 1fr;
  }

  .dash-side {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dash-brand {
    padding: 0;
  }

  .dash-nav {
    display: flex;
    gap: 2px;
    margin-top: 0;
  }

  .dash-nav a {
    padding: 8px 10px;
    white-space: nowrap;
  }

  .dash-nav a span:last-child {
    display: inline;
  }

  .dash-nav-label {
    display: none;
  }

  .dash-side-foot {
    display: none;
  }

  .dash-top {
    top: 0;
  }
}

@media (max-width: 760px) {
  .auth-header-inner {
    width: calc(100% - 24px);
    height: 64px;
  }

  .auth-title {
    font-size: 0.8125rem;
  }

  .auth-main {
    width: calc(100% - 32px);
    padding: 32px 0 48px;
  }

  .auth-h1 {
    font-size: clamp(1.9rem, 7.5vw, 2.4rem);
  }

  .auth-lede {
    font-size: 0.9375rem;
  }

  .info-banner {
    margin-top: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .pw-reqs {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .auth-submit {
    width: 100%;
  }

  .interest-grid {
    grid-template-columns: 1fr;
  }

  .visit-options {
    grid-template-columns: 1fr;
  }

  .visit-option {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: center;
    gap: 4px 10px;
    padding: 12px 14px;
  }

  .visit-option .icon {
    grid-row: span 2;
  }

  .success-wrap {
    padding: 32px 22px;
  }

  .login-main {
    padding: 28px 16px;
  }

  .login-card {
    padding: 28px 22px;
  }

  .dash-top {
    height: 58px;
    padding: 0 16px;
  }

  .dash-search {
    width: 100%;
  }

  .dash-top-actions .avatar {
    display: none;
  }

  .dash-content {
    padding: 18px 16px 40px;
  }

  .dash-greet {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin: 22px 0 24px;
  }

  .dash-greet .btn {
    width: 100%;
  }

  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .family-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .preview-banner {
    padding: 12px;
  }

  .preview-banner .banner-close {
    margin-top: -3px;
  }

  .dash-section {
    margin-top: 30px;
  }

  .dash-visit-actions .btn {
    flex: 1;
  }
}

@media (max-width: 430px) {
  .auth-header-right a {
    font-size: 0.8125rem;
  }

  .dash-top {
    height: auto;
    min-height: 58px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
  }

  .dash-search-wrap {
    order: 2;
    flex: 1 1 100%;
    width: 100%;
  }

  .dash-search-results {
    width: 100%;
  }

  .dash-top-actions {
    order: 1;
    margin-left: auto;
  }

  .dash-section,
  .dash-card[id] {
    scroll-margin-top: 126px;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .family-grid {
    grid-template-columns: 1fr;
  }
}
