:root {
  color-scheme: light;
  --bg: #eef7f5;
  --card: #ffffff;
  --text: #10231f;
  --muted: #5d706b;
  --primary: #0f766e;
  --primary-strong: #0b5f59;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --info: #0284c7;
  --border: rgba(15, 118, 110, 0.16);
  --shadow: 0 20px 50px rgba(15, 118, 110, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.22), transparent 34rem),
    linear-gradient(180deg, #f8fffd 0%, var(--bg) 100%);
  color: var(--text);
}

.app-shell {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px calc(92px + env(safe-area-inset-bottom));
}

.hero-card,
.status-card,
.auth-card,
.profile-card,
.bill-card,
.account-card,
.payment-card,
.payment-detail-card,
.voucher-product-card,
.voucher-order-row,
.reseller-bill-card,
.reseller-hero-panel,
.reseller-action-card,
.reseller-greeting-card,
.reseller-bill-focus,
.reseller-payment-focus,
.admin-product-card,
.admin-form-card,
.downline-row,
.alert-card,
.empty-state,
.qris-frame,
.next-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 26px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.94), rgba(17, 94, 89, 0.96)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 16rem);
}

.hero-badge {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 18px;
  font-size: clamp(2rem, 10vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-card p {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1.55;
}

.status-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.auth-card,
.profile-card {
  margin-top: 16px;
  padding: 20px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.field input,
.field select {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0 16px;
  background: #f9fffd;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  outline: none;
}

.field small {
  color: var(--muted);
  line-height: 1.4;
}

.field input:disabled {
  color: var(--muted);
  background: #eef7f5;
}

.field input:focus,
.field select:focus {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.form-alert {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(220, 38, 38, 0.09);
  color: #991b1b;
  font-weight: 700;
}

.profile-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.profile-card h2 {
  margin-top: 6px;
  font-size: 1.35rem;
}

.profile-card p {
  margin-top: 4px;
  color: var(--muted);
}

.role-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.status-card {
  padding: 18px;
}

.status-label,
.status-card small {
  display: block;
  color: var(--muted);
}

.status-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-card strong {
  display: block;
  margin-top: 7px;
  font-size: 1.3rem;
}

.status-card small {
  margin-top: 6px;
  word-break: break-word;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-success {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.status-danger {
  background: rgba(220, 38, 38, 0.11);
  color: #b91c1c;
}

.status-warning {
  background: rgba(217, 119, 6, 0.14);
  color: #92400e;
}

.status-info {
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1;
}

.is-ok strong {
  color: var(--ok);
}

.is-warn strong {
  color: var(--warn);
}

.is-danger strong {
  color: var(--danger);
}

.next-card {
  margin-top: 16px;
  padding: 20px;
}

.next-card h2 {
  font-size: 1.15rem;
}

.next-card p {
  margin-top: 8px;
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.metric-grid > div {
  min-width: 0;
  border-radius: 18px;
  padding: 13px;
  background: #f4fbf9;
}

.metric-grid strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--primary-strong);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.summary-strip article {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.1);
}

.summary-strip strong {
  display: block;
  margin-top: 7px;
  color: var(--primary-strong);
  font-size: 1.45rem;
}

.summary-strip small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-block {
  margin-top: 18px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-heading h2 {
  font-size: 1.15rem;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.mini-link {
  color: var(--primary-strong);
  font-size: 0.85rem;
  font-weight: 900;
  text-decoration: none;
}

.priority-card {
  padding: 0;
  overflow: hidden;
}

.priority-card > .status-label {
  padding: 18px 18px 0;
}

.priority-card .bill-card {
  margin: 12px;
  box-shadow: none;
}

.bill-list,
.account-list,
.downline-list {
  display: grid;
  gap: 12px;
}

.bill-card {
  padding: 16px;
}

.admin-product-list {
  display: grid;
  gap: 12px;
}

.admin-product-card {
  padding: 16px;
}

.admin-product-top,
.admin-product-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-product-card h3 {
  margin: 6px 0 4px;
  font-size: 1.2rem;
}

.admin-product-card code {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary-strong);
  font-weight: 900;
}

.admin-price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.admin-price-grid > div {
  border-radius: 16px;
  padding: 11px 10px;
  background: #f4fbf9;
}

.admin-price-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-price-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--primary-strong);
  font-size: 0.92rem;
}

.admin-price-grid .success-money {
  color: var(--ok);
}

.admin-product-footer {
  align-items: center;
  margin-top: 14px;
}

.admin-product-footer small {
  color: var(--muted);
  line-height: 1.4;
}

.admin-form-card {
  margin-top: 16px;
  padding: 18px;
}

.admin-form,
.admin-form-grid {
  display: grid;
  gap: 14px;
}

.compact-info {
  margin-top: 0;
  padding: 14px;
}

.reseller-greeting-card {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 12rem),
    rgba(255, 255, 255, 0.94);
}

.reseller-greeting-card strong {
  display: block;
  margin-top: 6px;
  color: var(--primary-strong);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.reseller-greeting-card p {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.5;
}

.reseller-greeting-card .primary-action {
  margin-top: 0;
}

.reseller-hero-panel {
  margin-top: 16px;
  padding: 20px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(220, 38, 38, 0.93), rgba(249, 115, 22, 0.93)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 15rem);
}

.reseller-hero-panel .status-label,
.reseller-hero-panel p {
  color: rgba(255, 255, 255, 0.78);
}

.reseller-hero-panel strong {
  display: block;
  margin-top: 7px;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.reseller-hero-panel p {
  margin-top: 7px;
  line-height: 1.45;
}

.reseller-hero-panel .primary-action {
  margin-top: 16px;
  background: #ffffff;
  color: #b91c1c;
  box-shadow: none;
}

.reseller-action-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.reseller-action-card {
  display: block;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
}

.human-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 16px;
  background: rgba(15, 118, 110, 0.1);
  font-size: 1.3rem;
}

.reseller-action-card strong,
.downline-row strong {
  display: block;
}

.reseller-action-card span,
.downline-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
}

.reseller-action-card .action-icon {
  display: grid;
  margin-top: 0;
  color: var(--primary-strong);
  font-size: 1.3rem;
}

.reseller-bill-card {
  padding: 16px;
}

.reseller-bill-focus {
  margin-top: 14px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(245, 158, 11, 0.13)),
    #ffffff;
  box-shadow: none;
}

.reseller-bill-focus span,
.reseller-payment-focus span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reseller-bill-focus strong,
.reseller-payment-focus strong {
  display: block;
  margin-top: 4px;
  color: var(--primary-strong);
  font-size: 1.7rem;
  letter-spacing: -0.05em;
}

.reseller-bill-focus small,
.reseller-payment-focus small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.reseller-bill-card.is-paid {
  border-color: rgba(22, 163, 74, 0.2);
}

.reseller-bill-card .bill-topline small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.reseller-money-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.reseller-money-grid > div {
  border-radius: 18px;
  padding: 13px;
  background: #f4fbf9;
}

.reseller-money-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.reseller-money-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--primary-strong);
  font-size: 1.02rem;
}

.reseller-money-grid .success-money {
  color: var(--ok);
}

.payment-reseller-grid {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.reseller-payment-focus {
  margin-top: 16px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(15, 118, 110, 0.12)),
    #ffffff;
  text-align: center;
}

.reseller-payment-focus strong {
  font-size: 2rem;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.filter-row a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.filter-row a.active {
  border-color: transparent;
  background: var(--primary);
  color: #ffffff;
}

.downline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
}

.downline-row > div:last-child {
  text-align: right;
}

.bill-overdue {
  border-color: rgba(220, 38, 38, 0.28);
}

.bill-topline,
.bill-footer,
.account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bill-topline h3 {
  margin: 5px 0 0;
  font-size: 1.16rem;
}

.bill-amount {
  margin-top: 16px;
  color: var(--primary-strong);
  font-size: 1.7rem;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.bill-meta {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.bill-footer {
  align-items: flex-end;
  margin-top: 14px;
}

.bill-footer small {
  color: var(--muted);
  text-align: right;
}

.compact-action {
  width: auto;
  min-height: 38px;
  margin-top: 0;
  border-radius: 13px;
  padding: 0 12px;
  box-shadow: none;
  font-size: 0.78rem;
}

.account-card {
  padding: 15px;
}

.account-card strong {
  display: block;
  margin-top: 5px;
  line-height: 1.35;
}

.alert-card,
.empty-state,
.qris-frame {
  margin-top: 16px;
  padding: 18px;
}

.alert-card strong,
.empty-state strong,
.qris-frame strong {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
}

.alert-card p,
.empty-state p,
.qris-frame p {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.5;
}

.danger-alert {
  border-color: rgba(220, 38, 38, 0.26);
  background: rgba(255, 247, 247, 0.94);
}

.danger-alert strong {
  color: #b91c1c;
}

.success-empty {
  border-color: rgba(22, 163, 74, 0.2);
  background: rgba(240, 253, 244, 0.9);
}

.qris-frame {
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(2, 132, 199, 0.06)),
    rgba(255, 255, 255, 0.92);
  text-align: center;
}

.payment-detail-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
}

.payment-detail-card strong {
  display: block;
  margin-top: 7px;
  color: var(--primary-strong);
  font-size: 1rem;
}

.payment-card {
  margin-top: 16px;
  padding: 18px;
}

.payment-notice {
  border-radius: 20px;
  padding: 14px;
  background: rgba(2, 132, 199, 0.09);
  color: #075985;
}

.payment-notice strong,
.payment-notice small {
  display: block;
}

.payment-notice p {
  margin-top: 6px;
  line-height: 1.5;
}

.payment-notice small {
  margin-top: 6px;
  word-break: break-word;
}

.qris-image-shell {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  border-radius: 26px;
  padding: 14px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.14);
}

.qris-image {
  width: min(100%, 310px);
  height: auto;
  image-rendering: pixelated;
}

.payment-total {
  margin-top: 18px;
  border-radius: 22px;
  padding: 16px;
  background: rgba(217, 119, 6, 0.12);
  color: #92400e;
  text-align: center;
}

.payment-total span,
.payment-total small {
  display: block;
}

.payment-total strong {
  display: block;
  margin-top: 5px;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}

.payment-total small {
  margin-top: 4px;
  color: #78350f;
}

.payment-mini-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-top: 14px;
  border-radius: 18px;
  padding: 14px;
  background: #f4fbf9;
}

.payment-mini-info span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.payment-mini-info strong {
  color: var(--primary-strong);
  word-break: break-word;
}

.payment-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.payment-actions .primary-action,
.payment-actions .secondary-action {
  margin-top: 0;
}

.payment-hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.payment-state-card .primary-action,
.payment-state-card .secondary-action {
  margin-top: 12px;
}

.voucher-grid,
.voucher-history {
  display: grid;
  gap: 12px;
}

.voucher-product-card,
.voucher-order-row {
  padding: 16px;
}

.voucher-product-card {
  display: grid;
  gap: 14px;
}

.voucher-product-main {
  min-width: 0;
}

.voucher-product-card h3 {
  margin: 6px 0 4px;
  font-size: 1.2rem;
}

.voucher-product-card code {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary-strong);
  font-weight: 900;
}

.voucher-price {
  color: var(--primary-strong);
  font-size: 1.65rem;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.voucher-price-row small {
  display: block;
  margin-top: 3px;
  color: var(--ok);
  font-weight: 800;
}

.voucher-product-card .primary-action {
  margin-top: 0;
}

.voucher-order-main,
.voucher-order-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.voucher-order-main strong,
.voucher-order-main small {
  display: block;
}

.voucher-order-main strong {
  margin-top: 5px;
  font-size: 1.02rem;
}

.voucher-order-main small {
  margin-top: 4px;
  color: var(--muted);
}

.voucher-order-footer {
  align-items: center;
  margin-top: 14px;
}

.voucher-order-footer span {
  color: var(--primary-strong);
  font-size: 1.2rem;
  font-weight: 950;
}

.voucher-order-footer small {
  color: var(--muted);
  line-height: 1.4;
  text-align: right;
}

.primary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 16px;
  border-radius: 18px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.24);
  border: 0;
  cursor: pointer;
}

.primary-action:disabled {
  cursor: progress;
  opacity: 0.75;
}

.secondary-action {
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  color: var(--primary-strong);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.bottom-nav {
  position: fixed;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 12px;
  z-index: 20;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 24px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 60px rgba(15, 118, 110, 0.18);
  backdrop-filter: blur(16px);
  overflow-x: auto;
  scrollbar-width: none;
}

.bottom-nav::-webkit-scrollbar {
  display: none;
}

.bottom-nav a,
.bottom-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 92px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.bottom-nav a.active,
.bottom-nav button:active {
  background: var(--primary);
  color: #ffffff;
}

@media (min-width: 700px) {
  .app-shell {
    padding-top: 34px;
  }

  .status-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
