:root {
  --ink: #172025;
  --muted: #69757c;
  --soft: #8d9aa3;
  --line: #dfe5e6;
  --bg: #eef2f0;
  --panel: #ffffff;
  --panel-2: #f8faf8;
  --navy: #102f3a;
  --navy-2: #174554;
  --cyan: #2bb8c7;
  --lime: #b7d66a;
  --coral: #f06f55;
  --amber: #d9a441;
  --shadow: 0 20px 48px rgba(25, 43, 48, 0.12);
  --tight-shadow: 0 12px 28px rgba(25, 43, 48, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(16, 47, 58, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, #f6f8f5 0%, var(--bg) 48%, #e6ece9 100%);
  background-size: 34px 34px, auto;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a.primary-btn,
a.secondary-btn,
a.ghost-btn {
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  line-height: 1.15;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.icon {
  width: 23px;
  height: 23px;
  display: inline-block;
  color: currentColor;
  flex: none;
}

.auth-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(330px, 0.95fr) minmax(360px, 520px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(24px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(23, 69, 84, 0.93), rgba(16, 47, 58, 0.78)),
    url("/assets/investment-plan.jpeg") center / cover;
}

.auth-visual {
  min-height: min(680px, calc(100svh - 112px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
}

.brand-mark {
  width: min(260px, 58vw);
  height: 150px;
  object-fit: contain;
  object-position: left center;
}

.auth-balance {
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.auth-balance > span,
.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-balance > strong {
  display: block;
  margin-bottom: 18px;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1;
}

.mini-ledger {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.auth-card {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.auth-heading h1 {
  margin-bottom: 28px;
  font-size: clamp(36px, 5vw, 56px);
}

.field {
  margin-bottom: 17px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: #324147;
  font-size: 14px;
  font-weight: 850;
}

.input-wrap {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-wrap:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(43, 184, 199, 0.15);
}

.input-wrap input,
.input-wrap select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.prefix,
.code-chip {
  font-weight: 900;
}

.code-chip {
  padding: 8px 10px;
  border-radius: 7px;
  background: #edf8f8;
  color: var(--navy);
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-btn {
  background: var(--navy);
  color: white;
  box-shadow: 0 12px 24px rgba(16, 47, 58, 0.2);
}

.secondary-btn {
  border: 1px solid rgba(16, 47, 58, 0.14);
  background: #eaf5f5;
  color: var(--navy);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.quick-card:hover,
.metric-card:hover,
.menu-row:hover {
  transform: translateY(-1px);
}

.auth-switch {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-weight: 750;
}

.link-btn,
.text-btn {
  width: auto;
  background: transparent;
  color: var(--navy-2);
  font-weight: 900;
}

.app-layout {
  width: min(1440px, 100%);
  min-height: 100svh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 26px;
  margin: 0 auto;
  padding: 24px;
}

.sidebar {
  position: sticky;
  top: 24px;
  height: calc(100svh - 48px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #102f3a, #0b252e);
  color: white;
  box-shadow: var(--shadow);
}

.side-brand {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.side-logo {
  width: 100%;
  height: 104px;
  object-fit: contain;
  object-position: left center;
}

.side-brand span,
.side-card span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  text-align: left;
  font-weight: 850;
}

.nav-item.active {
  background: rgba(43, 184, 199, 0.18);
  color: white;
}

.side-card {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.side-card strong {
  word-break: break-word;
}

.main {
  min-width: 0;
  padding-bottom: 80px;
}

.topbar,
.page-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.topbar h2,
.page-head h2,
.section-head h2 {
  margin-bottom: 0;
}

.user-chip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 47, 58, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--tight-shadow);
}

.user-chip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.user-chip strong {
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-weight: 950;
}

.avatar.large {
  width: 78px;
  height: 78px;
  margin: 0 auto 16px;
  font-size: 24px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 16px;
  margin-bottom: 18px;
}

.balance-card,
.summary-card,
.hero,
.profile-card {
  border-radius: var(--radius);
  background: linear-gradient(135deg, #102f3a, #174554);
  color: white;
  box-shadow: var(--shadow);
}

.balance-card {
  min-height: 344px;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 4vw, 34px);
}

.balance-top,
.balance-split,
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.balance-top span,
.balance-split span,
.summary-card span,
.small-balance span,
.metric-card span,
.task-card span {
  color: inherit;
  opacity: 0.7;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.balance-card > strong {
  display: block;
  margin: 26px 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 0.98;
}

.balance-split {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.balance-split div {
  display: grid;
  gap: 7px;
}

.balance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.balance-actions .secondary-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: white;
}

.insight-panel {
  display: grid;
  gap: 12px;
}

.metric-card {
  min-height: 106px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(16, 47, 58, 0.08);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--tight-shadow);
}

.metric-card span {
  grid-column: 1 / -1;
  color: var(--muted);
  opacity: 1;
}

.metric-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 24px;
}

.quick-actions,
.features,
.team-grid,
.profile-balances {
  display: grid;
  gap: 14px;
}

.quick-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 26px;
}

.quick-card {
  min-height: 122px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(16, 47, 58, 0.08);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--tight-shadow);
}

.quick-card .icon {
  color: var(--cyan);
}

.quick-card span {
  font-weight: 950;
}

.quick-card b {
  color: var(--muted);
  font-size: 13px;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
}

.product-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(16, 47, 58, 0.08);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--tight-shadow);
}

.product-art {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent, var(--cyan)) 22%, transparent), transparent),
    #eef5f3;
  color: var(--accent, var(--cyan));
}

.product-art .icon {
  width: 48px;
  height: 48px;
}

.product-art span,
.duration {
  padding: 7px 10px;
  border-radius: 999px;
  background: white;
  color: var(--navy);
  font-size: 12px;
  font-weight: 950;
}

.product-body {
  min-width: 0;
}

.product-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.product-meta h3 {
  min-width: 0;
}

.price {
  margin: 10px 0 14px;
  color: var(--navy);
  font-size: 27px;
  font-weight: 950;
  line-height: 1.05;
}

.income-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.income-box,
.amount-tile {
  min-width: 0;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--panel-2);
}

.income-box span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.income-box strong {
  overflow-wrap: anywhere;
}

.hero {
  min-height: min(560px, calc(100svh - 72px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: clamp(28px, 5vw, 54px);
  background:
    linear-gradient(100deg, rgba(16, 47, 58, 0.98), rgba(16, 47, 58, 0.7), rgba(16, 47, 58, 0.1)),
    url("/assets/investment-plan.jpeg") center / cover;
}

.hero-logo {
  width: 210px;
  height: 120px;
  object-fit: contain;
  object-position: left center;
}

.hero-content {
  max-width: 760px;
}

.hero p,
.hero .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.hero .primary-btn {
  max-width: 240px;
  margin-top: 12px;
  background: white;
  color: var(--navy);
}

.features {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 28px;
}

.feature {
  min-height: 160px;
  padding: 18px;
  border: 1px solid rgba(16, 47, 58, 0.08);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--tight-shadow);
}

.feature .icon {
  color: var(--cyan);
}

.back-btn,
.icon-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: white;
}

.icon-btn {
  background: var(--panel);
  color: var(--navy);
  box-shadow: var(--tight-shadow);
}

.head-spacer {
  width: 48px;
}

.card,
.task-card,
.menu-card,
.ledger-row {
  border: 1px solid rgba(16, 47, 58, 0.08);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--tight-shadow);
}

.card {
  padding: 22px;
  margin-bottom: 16px;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.38fr) minmax(0, 0.62fr);
  gap: 16px;
  align-items: start;
}

.summary-card {
  padding: 24px;
}

.summary-card strong {
  display: block;
  margin: 14px 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}

.summary-card p {
  color: rgba(255, 255, 255, 0.72);
}

.notice {
  margin: 12px 0 18px;
  padding: 13px 14px;
  border: 1px solid rgba(43, 184, 199, 0.18);
  border-radius: var(--radius);
  background: #edf8f8;
  color: var(--navy);
  font-weight: 850;
}

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

.amount-tile {
  min-height: 70px;
  color: var(--navy);
  text-align: left;
  font-weight: 950;
}

.bank-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.bank-empty > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bank-empty .secondary-btn {
  width: auto;
}

.muted {
  color: var(--muted);
}

.instruction-list,
.task-list,
.ledger-list {
  display: grid;
  gap: 12px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 750;
}

.check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--navy);
  font-size: 13px;
  font-weight: 950;
  flex: none;
}

.narrow-card {
  max-width: 680px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.summary-strip div,
.small-balance {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--tight-shadow);
}

.summary-strip span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 850;
  text-transform: uppercase;
}

.summary-strip strong,
.small-balance strong {
  display: block;
  font-size: 28px;
  line-height: 1.08;
}

.orders-hero {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 32px);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0a4624, #102f3a);
  color: white;
  box-shadow: var(--shadow);
}

.orders-hero span,
.orders-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 850;
  text-transform: uppercase;
}

.orders-hero strong {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
}

.order-list {
  display: grid;
  gap: 16px;
}

.order-card {
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid rgba(16, 47, 58, 0.08);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--tight-shadow);
}

.order-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.order-card-head h3 {
  margin-bottom: 4px;
  font-size: 24px;
}

.order-card-head p {
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 750;
}

.order-status {
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--lime);
  color: var(--navy);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.order-status.complete {
  background: #e6ece9;
  color: var(--muted);
}

.order-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 13px 18px;
  margin-bottom: 18px;
}

.order-details span,
.order-progress-meta span {
  color: var(--muted);
  font-weight: 850;
}

.order-details strong {
  color: var(--ink);
  text-align: right;
}

.order-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.order-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4eae9;
}

.order-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
}

.next-income {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--navy);
  color: white;
  font-weight: 950;
  text-align: center;
}

.empty-state {
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}

.empty-state .icon {
  width: 42px;
  height: 42px;
  color: var(--cyan);
}

.task-card {
  padding: 20px;
}

.task-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.task-top b {
  color: var(--navy);
  white-space: nowrap;
}

.progress-meta {
  margin: 16px 0 8px;
  color: var(--muted);
  font-weight: 850;
}

.progress-line {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4eae9;
}

.progress-line span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
}

.invite-card {
  padding: clamp(22px, 4vw, 34px);
}

.invite-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 18px 0;
}

.copy-field {
  min-width: 0;
  overflow: hidden;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.invite-box .secondary-btn {
  width: auto;
}

.referral-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.referral-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.referral-row > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.referral-row .icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--cyan);
}

.referral-row h3 {
  margin: 0;
  font-size: 16px;
}

.referral-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.compact-empty {
  min-height: 180px;
}

.accent-text {
  color: var(--navy);
  font-weight: 950;
}

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

.team-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.team-number {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: 25px;
  font-weight: 950;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.34fr) minmax(0, 0.66fr);
  gap: 16px;
  margin-bottom: 16px;
}

.profile-card {
  padding: 26px;
  text-align: center;
}

.profile-card p {
  color: rgba(255, 255, 255, 0.72);
  word-break: break-word;
}

.profile-balances {
  grid-template-columns: 1fr 1fr;
}

.small-balance {
  display: grid;
  gap: 12px;
}

.menu-card {
  overflow: hidden;
}

.menu-row {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--ink);
  text-align: left;
  font-weight: 900;
}

.menu-row:last-child {
  border-bottom: 0;
}

.menu-row .icon:first-child {
  color: var(--cyan);
}

.ledger-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ledger-row:hover {
  border-color: rgba(15, 74, 84, 0.28);
  box-shadow: 0 18px 44px rgba(25, 43, 48, 0.12);
  transform: translateY(-1px);
}

.ledger-row > div {
  min-width: 0;
  display: flex;
  gap: 12px;
}

.ledger-row h3 {
  margin-bottom: 4px;
}

.ledger-row p {
  margin-bottom: 0;
  font-size: 13px;
}

.ledger-row strong {
  color: var(--navy);
  white-space: nowrap;
}

.toast {
  --toast-accent: var(--cyan);
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  width: min(430px, calc(100vw - 32px));
  min-height: 84px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  overflow: hidden;
  padding: 15px 14px 17px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-left: 5px solid var(--toast-accent);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 248, 0.9)),
    var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(25, 43, 48, 0.2);
  backdrop-filter: blur(18px);
  animation: toast-in 260ms ease both;
}

.toast-success {
  --toast-accent: var(--lime);
}

.toast-error {
  --toast-accent: var(--coral);
}

.toast-warning {
  --toast-accent: var(--amber);
}

.toast-info {
  --toast-accent: var(--cyan);
}

.toast-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--toast-accent) 20%, white);
  color: color-mix(in srgb, var(--toast-accent) 72%, var(--navy));
}

.toast-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.toast-copy strong {
  font-size: 14px;
  line-height: 1.2;
}

.toast-copy span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.toast-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(16, 47, 58, 0.06);
  color: var(--muted);
}

.toast-close .icon {
  width: 18px;
  height: 18px;
}

.toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--toast-accent);
  transform-origin: left center;
  animation: toast-progress 3600ms linear both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(8, 22, 27, 0.64);
  backdrop-filter: blur(8px);
}

.modal {
  position: relative;
  width: min(540px, 100%);
  padding: 28px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.modal-logo {
  width: 178px;
  height: 110px;
  object-fit: contain;
  object-position: left center;
}

.modal-body {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.modal-body p {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.modal-body strong {
  color: var(--navy);
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.receipt-modal {
  width: min(560px, calc(100vw - 32px));
  text-align: left;
}

.receipt-modal .modal-logo,
.receipt-modal .eyebrow,
.receipt-modal h2 {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.receipt-total {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px;
  margin: 18px 0;
  border-radius: 12px;
  background: rgba(18, 183, 106, 0.1);
}

.receipt-total > span:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.receipt-total strong {
  color: var(--navy);
  font-size: 30px;
  font-weight: 950;
}

.receipt-details {
  display: grid;
  gap: 10px;
}

.receipt-details div {
  display: grid;
  grid-template-columns: minmax(110px, 0.38fr) minmax(0, 0.62fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.receipt-details div:last-child {
  border-bottom: 0;
}

.receipt-details span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.receipt-details strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-align: right;
}

.telegram {
  background: #198dcc;
}

.whatsapp {
  background: #eaf8ef;
  color: #176a35;
}

.bottom-nav {
  display: none;
}

@media (max-width: 1020px) {
  .app-layout {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 18px;
  }

  .side-logo,
  .side-brand span,
  .side-card {
    display: none;
  }

  .sidebar {
    padding: 14px 10px;
  }

  .nav-item {
    justify-content: center;
  }

  .nav-item span {
    display: none;
  }

  .home-grid,
  .form-layout,
  .profile-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(90deg, rgba(16, 47, 58, 0.04) 1px, transparent 1px),
      linear-gradient(180deg, #f8faf7 0%, #edf2ef 100%);
    background-size: 28px 28px, auto;
  }

  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 27px;
  }

  .auth-shell {
    display: block;
    padding: 18px;
  }

  .auth-visual {
    min-height: auto;
    margin-bottom: 18px;
  }

  .brand-mark {
    height: 104px;
  }

  .auth-balance {
    display: none;
  }

  .auth-card {
    padding: 22px 18px;
  }

  .app-layout {
    display: block;
    padding: 0;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 16px 16px calc(104px + env(safe-area-inset-bottom));
  }

  .topbar {
    align-items: flex-start;
    margin-bottom: 16px;
  }

  .user-chip {
    padding: 8px;
    box-shadow: none;
  }

  .user-chip div:last-child {
    display: none;
  }

  .avatar {
    width: 42px;
    height: 42px;
  }

  .balance-card {
    min-height: 0;
    padding: 22px 18px;
  }

  .balance-card > strong {
    margin: 20px 0;
    font-size: 42px;
  }

  .balance-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 13px;
  }

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

  .quick-card {
    min-height: 112px;
  }

  .section-head {
    align-items: flex-end;
  }

  .product-list {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
  }

  .product-art {
    min-height: 172px;
  }

  .price {
    font-size: 23px;
  }

  .hero {
    min-height: 470px;
    margin: -16px -16px 20px;
    border-radius: 0 0 var(--radius) var(--radius);
    background:
      linear-gradient(180deg, rgba(16, 47, 58, 0.32), rgba(16, 47, 58, 0.96)),
      url("/assets/investment-plan.jpeg") center / cover;
  }

  .hero-logo {
    width: 180px;
  }

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

  .page-head {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: -16px -16px 16px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(223, 229, 230, 0.82);
    background: rgba(248, 250, 247, 0.9);
    backdrop-filter: blur(14px);
  }

  .page-head h2 {
    font-size: 24px;
  }

  .back-btn,
  .icon-btn,
  .head-spacer {
    width: 44px;
    height: 44px;
  }

  .amount-grid,
  .team-grid,
  .profile-balances {
    grid-template-columns: 1fr;
  }

  .bank-empty {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .bank-empty .secondary-btn,
  .invite-box .secondary-btn {
    width: 100%;
  }

  .invite-box {
    grid-template-columns: 1fr;
  }

  .task-top,
  .ledger-row {
    display: grid;
  }

  .order-card-head {
    display: grid;
  }

  .order-status {
    width: max-content;
  }

  .order-details {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .order-details strong {
    margin-bottom: 8px;
    text-align: left;
  }

  .ledger-row strong {
    white-space: normal;
  }

  .bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    overflow: hidden;
    border: 1px solid rgba(16, 47, 58, 0.1);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 18px 42px rgba(25, 43, 48, 0.18);
    backdrop-filter: blur(16px);
  }

  .bottom-nav button {
    min-height: 66px;
    display: grid;
    place-items: center;
    gap: 4px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
  }

  .bottom-nav button.active {
    color: var(--navy);
    background: #edf8f8;
  }

  .bottom-nav .icon {
    width: 21px;
    height: 21px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    width: auto;
    min-height: 78px;
    padding: 13px 12px 16px;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .toast-icon {
    width: 40px;
    height: 40px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 16px;
  }

  .modal {
    padding: 22px 18px;
  }

  .modal-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .balance-actions,
  .income-grid,
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .product-art {
    min-height: 112px;
    grid-template-columns: auto auto;
  }

  .product-art .icon {
    width: 38px;
    height: 38px;
  }

  .quick-card b {
    display: none;
  }

  .bottom-nav button {
    font-size: 11px;
  }
}

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

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

.admin-request {
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid rgba(16, 47, 58, 0.08);
  border-left: 5px solid var(--cyan);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--tight-shadow);
}

.admin-request.withdrawal {
  border-left-color: var(--amber);
}

.admin-request-head,
.admin-actions,
.ledger-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-request-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(26px, 4vw, 38px);
}

.status-chip {
  width: max-content;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e6ece9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.status-chip.pending {
  background: #fff5dc;
  color: #8a5a05;
}

.status-chip.approved {
  background: #e8f7ed;
  color: #176a35;
}

.status-chip.rejected {
  background: #fdece8;
  color: #9b2f1f;
}

.admin-details {
  display: grid;
  grid-template-columns: minmax(120px, 0.32fr) minmax(0, 0.68fr);
  gap: 12px 16px;
  margin: 18px 0;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--panel-2);
}

.admin-details span {
  color: var(--muted);
  font-weight: 850;
}

.admin-details strong {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.request-note,
.reviewed-line {
  margin-bottom: 0;
  font-weight: 800;
}

.admin-actions {
  margin-top: 18px;
}

.admin-actions .primary-btn,
.admin-actions .secondary-btn {
  width: auto;
  min-width: 150px;
}

.ledger-amount {
  flex-direction: column;
  align-items: flex-end;
}

.ledger-amount strong {
  color: var(--navy);
}

@media (max-width: 760px) {
  .admin-strip,
  .admin-details {
    grid-template-columns: 1fr;
  }

  .admin-details strong {
    text-align: left;
  }

  .admin-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .admin-actions .primary-btn,
  .admin-actions .secondary-btn {
    width: 100%;
    min-width: 0;
  }

  .ledger-amount {
    align-items: flex-start;
  }

  .bottom-nav {
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  }
}

.payment-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
  gap: 16px;
  align-items: start;
}

.payment-card {
  display: grid;
  gap: 18px;
}

.payment-account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.payment-account-head h2 {
  margin-bottom: 0;
}

.payment-detail-list {
  display: grid;
  gap: 12px;
}

.payment-detail-list > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 0.3fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.payment-detail-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.payment-detail-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 18px;
}

.payment-detail-list .secondary-btn {
  width: auto;
  min-height: 42px;
  padding: 0 12px;
}

@media (max-width: 760px) {
  .payment-layout,
  .payment-detail-list > div {
    grid-template-columns: 1fr;
  }

  .payment-detail-list .secondary-btn {
    width: 100%;
  }
}
