:root {
  --ink: #4f2132;
  --ink-soft: #76505d;
  --cream: #fffafb;
  --paper: #ffffff;
  --mint: #ffe6ec;
  --mint-light: #fff2f5;
  --line: #edd7de;
  --muted: #866873;
  --lime: #4bd584;
  --coral: #f3b5c5;
  --shadow: 0 10px 28px rgba(79, 33, 50, .08);
  --radius: 16px;
}

html { background: #f3f1f2; }
body {
  background: #f3f1f2;
  font-size: 14px;
}

.app-shell {
  width: min(100%, 402px);
  min-height: 100dvh;
  padding-bottom: 82px;
  background: var(--cream);
  box-shadow: 0 0 42px rgba(79, 33, 50, .07);
  overflow: visible;
}

.topbar {
  height: 66px;
  padding: 18px 16px 8px;
  background: var(--cream);
}
.brand img { width: 111px; }
.avatar {
  width: 40px;
  height: 40px;
  border: 0;
  background: #ffe3eb;
  color: var(--ink);
  font-size: 13px;
}

main { min-height: calc(100dvh - 148px); }
.page { padding: 10px 16px 28px; }
.page-title { margin: 4px 0 20px; }
.page-title.compact-title { margin: 2px 0 12px; }
.page-title.compact-title h1,
.page-title h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.page-title.compact-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.eyebrow {
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .1em;
}
h2 { font-size: 18px; letter-spacing: -.02em; }
h3 { font-size: 16px; }
.section { margin-top: 20px; }
.section-head {
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.section-head h2 { font-size: 18px; }
.section-head .muted { font-size: 11px; }

.button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
}
.button:hover { transform: none; }
.button-dark { background: var(--ink); color: #fff; }
.button-outline {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.button-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.button-danger {
  color: #b8433c;
  background: #fff0ed;
  border: 1px solid #f1d4cf;
}

.pill {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff1f4;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}
.pill.is-approved { background: #e8f9ef; color: #20aa68; }
.pill.is-pending { background: #fff4d8; color: #9c6813; }
.pill.is-rejected { background: #ffeded; color: #b54c44; }

/* Home */
.home-compact { display: grid; gap: 12px; }
.home-summary-card {
  padding: 16px;
  border: 0;
  border-radius: 16px;
  background: #fff1f4;
  box-shadow: none;
}
.home-product-main {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.home-product-main .product-thumb-image,
.home-product-main .mini-device {
  grid-row: auto;
  width: 84px;
  height: 84px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
}
.home-product-main h1 {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.18;
  letter-spacing: -.01em;
}
.home-product-main p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}
.home-summary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.home-summary-actions .button { width: 100%; min-height: 44px; }

.product-status-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.35;
}
.product-status-line i {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}
.product-status-line.is-approved { color: #24bb73; }
.product-status-line.is-approved i { background: #24bb73; }
.product-status-line.is-pending { color: #9c6813; }
.product-status-line.is-pending i { background: #e4b14e; }
.product-status-line.is-rejected { color: #b54c44; }
.product-status-line.is-rejected i { background: #b54c44; }

.usage-panel {
  display: block;
  padding: 18px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  box-shadow: none;
}
.usage-copy h2 { margin: 0 0 6px; font-size: 20px; }
.usage-copy .muted { margin: 0; color: rgba(255,255,255,.72); font-size: 12px; }
.usage-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.usage-actions .button { width: 100%; min-height: 46px; }
.usage-actions .button:first-child { background: #fff; color: var(--ink); }
.usage-actions .button-secondary { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.28); }
.habit-plan { margin-top: 14px; }
.habit-window {
  padding: 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
}
.habit-plan-top { font-size: 12px; }
.habit-plan-top strong { font-size: 14px; }
.habit-window-range { color: rgba(255,255,255,.65); font-size: 10px; }
.habit-progress { height: 7px; background: rgba(255,255,255,.17); }
.habit-progress i { background: #ff4f93; }
.habit-milestones { gap: 8px; }
.habit-milestones > div { padding: 10px; border-radius: 12px; background: rgba(255,255,255,.08); }
.habit-milestones strong { font-size: 12px; }
.habit-milestones span { font-size: 11px; }
.habit-milestones small { display: none; }

/* Products */
.product-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.product-card {
  position: relative;
  padding: 16px;
  border: 0;
  border-radius: 16px;
  background: #fff1f4;
  box-shadow: none;
}
.product-card-main {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.product-card-main .product-thumb-image,
.product-card-main .mini-device {
  grid-row: auto;
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
}
.product-card-copy h3 { margin: 0 0 5px; font-size: 16px; line-height: 1.18; }
.product-card-copy p { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.35; }
.product-actions { gap: 9px; margin-top: 14px; }
.product-actions .button { min-height: 48px; }
.feedback-note {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  font-size: 12px;
}
.product-warranty-prompt {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #fff4dc;
}
.product-warranty-prompt strong { font-size: 14px; }
.empty-card {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.empty-card .action-icon { width: 38px; height: 38px; border-radius: 12px; }
.empty-card h3 { margin: 0; font-size: 14px; }
.empty-card p { display: none; }

/* Benefits */
.benefit-summary {
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 14px 12px 0;
}
.benefit-summary div {
  padding: 12px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  text-align: center;
  background: #48d06f;
}
.benefit-summary div:nth-child(2) { background: #999; }
.benefit-summary strong { font-size: 17px; letter-spacing: 0; }
.benefit-summary span { color: inherit; font-size: 10px; }
.benefit-member-profile {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}
.benefit-member-card,
.member-card-panel.single-card .benefit-member-card,
.mobile-flow .member-card-panel.single-card .benefit-member-card,
.profile-benefit-card {
  width: 100%;
  min-height: 190px;
  padding: 20px;
  border-radius: 16px;
  box-shadow: none;
}
.benefit-member-card strong { font-size: 23px; }
.benefit-member-card em { font-size: 12px; line-height: 1.35; }
.benefit-member-profile-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}
.benefit-member-profile-actions .button { width: 100%; }
.benefit-focus {
  display: block;
  padding: 18px;
  border-radius: 16px;
  background: #fff1f4;
}
.benefit-focus h2 { font-size: 18px; }
.benefit-focus p { font-size: 12px; }
.benefit-focus .button { width: 100%; margin-top: 12px; }
.benefit-list { gap: 10px; }
.benefit-list.two-col { grid-template-columns: 1fr; }
.benefit-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.benefit-badge,
.benefit-image {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
}
.benefit-title-line { display: block; }
.benefit-title-line h3 { margin: 0 0 5px; font-size: 14px; }
.benefit-title-line .pill { display: inline-flex; }
.benefit-row-copy p { display: none; }
.benefit-row > .button,
.benefit-row > .campaign-countdown {
  min-width: 72px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  font-size: 11px;
}
.campaign-countdown { display: grid; place-items: center; text-align: center; }

/* Manuals */
.manual-finder {
  display: block;
  padding: 16px;
  border-radius: 16px;
  background: var(--ink);
}
.manual-finder-copy .tag,
.manual-finder-copy p { display: none; }
.manual-finder-copy h2 { margin: 0 0 12px; color: #fff; font-size: 17px; }
.manual-fields { padding: 14px; border-radius: 14px; }
.manual-fields .field { margin-bottom: 10px; }
.manual-finder .button-primary { background: var(--ink); color: #fff; }
.manual-card,
.mobile-flow .manual-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.manual-cover {
  min-height: 166px;
  padding: 14px;
  border-radius: 8px 14px 14px 8px;
  font-size: 18px;
}
.manual-info h3 { margin: 10px 0 12px; font-size: 16px; }
.manual-info p,
.manual-meta { display: none; }
.manual-info .button { width: 100%; min-height: 46px; }
.manual-help { padding: 16px; border-radius: 16px; }

/* Support */
.support-page-grid,
.mobile-flow .support-page-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.support-page-form,
.mobile-flow .support-page-form {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.form-grid { grid-template-columns: 1fr; gap: 0; }
.field { margin-bottom: 14px; }
.field label { font-size: 12px; }
input,
select,
textarea {
  min-height: 50px;
  border-radius: 14px;
  border-color: var(--line);
}
textarea { min-height: 124px; }
.upload-box { min-height: 110px; border-radius: 14px; }
.support-side { display: grid !important; gap: 12px; }
.whatsapp-card.large {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff1f4;
  text-align: center;
}
.whatsapp-card.large p { display: block; font-size: 12px; line-height: 1.45; }
.whatsapp-card .qr-card {
  width: min(100%, 266px);
  aspect-ratio: 1;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: #fff;
}
.whatsapp-card .qr-card img { width: 100%; height: 100%; object-fit: contain; }
.whatsapp-card .whatsapp-direct { margin-top: 12px; }
.support-note.standard { display: none; }
.ticket-list { gap: 10px; }
.ticket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
}
.ticket-row h3 { margin: 8px 0 3px; font-size: 14px; }
.ticket-row p { display: none; }
.ticket-row small { font-size: 10px; }
.ticket-row .button { min-height: 38px; padding: 0 14px; font-size: 11px; }

/* Profile */
.profile-compact .page-title p { display: none; }
.profile-grid.account-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.account-side-stack { display: grid; gap: 12px; }
.progress-card,
.account-security-card { padding: 16px; border-radius: 16px; box-shadow: none; }
.account-security-card .button { margin-top: 10px; }

/* Navigation */
.bottom-nav {
  left: 50%;
  bottom: 0;
  width: min(100%, 402px);
  height: 74px;
  padding: 7px 10px max(7px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255,255,255,.97);
  box-shadow: 0 -8px 20px rgba(79,33,50,.04);
}
.nav-item {
  border-radius: 0;
  color: #8e7480;
  font-size: 9px;
}
.nav-item.active { color: var(--ink); background: transparent; font-weight: 600; }
.nav-item svg { width: 20px; height: 20px; }

/* Auth keeps the approved 318 × 56 component system. */
.auth-page { background: var(--cream); }
.auth-card { border-radius: 20px; }
.auth-card input,
.auth-card select,
.auth-card .button {
  min-height: 56px;
}

@media (min-width: 700px) {
  body { padding: 0; }
  .app-shell { min-height: 100dvh; }
}

@media (max-width: 430px) {
  .page { padding-inline: 16px; }
  .habit-milestones { grid-template-columns: 1fr 1fr; }
  .mobile-flow .benefit-row { grid-template-columns: 54px minmax(0, 1fr) auto; }
  .mobile-flow .benefit-row > .button,
  .mobile-flow .benefit-row > .campaign-countdown { width: auto; }
}
