:root {
  --color-primary: #1273eb;
  --color-primary-dark: #0d58b4;
  --color-primary-soft: #eaf4ff;
  --color-secondary: #6ec5ff;
  --color-bg: #f6fbff;
  --color-surface: #ffffff;
  --color-text: #16324a;
  --color-text-soft: #5b7288;
  --color-border: #d9e9f7;
  --color-success: #21a366;
  --color-warning: #ffb648;
  --color-danger: #e55353;
  --shadow-soft: 0 10px 24px rgba(18, 115, 235, 0.10);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 460px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f8fcff 0%, #eef7ff 100%);
  color: var(--color-text);
}

a {
  color: inherit;
  text-decoration: none;
}

body {
  min-height: 100vh;
}

.app-shell {
  width: 100%;
  max-width: var(--container);
  min-height: 100vh;
  margin: 0 auto;
  background: transparent;
  position: relative;
}

.wave-top {
  position: absolute;
  inset: 0 0 auto 0;
  height: 220px;
  background: radial-gradient(circle at top right, rgba(110, 197, 255, 0.65), transparent 40%),
              linear-gradient(160deg, rgba(18, 115, 235, 0.18), rgba(18, 115, 235, 0));
  pointer-events: none;
}

.page {
  position: relative;
  padding: 22px 18px 104px;
}

.hero-card,
.card,
.product-card,
.order-card,
.deposit-card,
.summary-card,
.status-card,
.auth-card {
  background: var(--color-surface);
  border: 1px solid rgba(217, 233, 247, 0.85);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-lg);
}

.hero-card {
  padding: 26px 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  display: grid;
  place-items: center;
  font-size: 28px;
  box-shadow: 0 12px 24px rgba(18, 115, 235, 0.20);
}

.eyebrow {
  font-size: 13px;
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1, h2, h3, h4, p {
  margin: 0;
}

h1 {
  font-size: 31px;
  line-height: 1.08;
  margin: 8px 0 12px;
}

h2 {
  font-size: 24px;
  line-height: 1.15;
}

h3 {
  font-size: 18px;
  line-height: 1.2;
}

.lead,
.subtitle,
.text-soft,
.helper {
  color: var(--color-text-soft);
}

.lead {
  font-size: 16px;
  line-height: 1.5;
}

.hero-illustration {
  margin: 20px 0 24px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(18, 115, 235, 0.10), rgba(110, 197, 255, 0.18));
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  background: linear-gradient(135deg, #1d86ff, #7cd8ff);
  display: grid;
  place-items: center;
  font-size: 42px;
  color: white;
  flex-shrink: 0;
}

.hero-copy small,
.chip,
.tag,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

.chip {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.tag {
  padding: 5px 10px;
  background: #f4f9ff;
  color: var(--color-text-soft);
  font-weight: 600;
}

.badge.success { background: rgba(33, 163, 102, 0.12); color: var(--color-success); }
.badge.warning { background: rgba(255, 182, 72, 0.18); color: #a56a00; }
.badge.danger { background: rgba(229, 83, 83, 0.12); color: var(--color-danger); }
.badge.primary { background: var(--color-primary-soft); color: var(--color-primary); }

.actions,
.stack,
.list {
  display: grid;
  gap: 12px;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: none;
  border-radius: 18px;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #2e9df6);
  color: white;
  box-shadow: 0 14px 22px rgba(18, 115, 235, 0.22);
}
.btn-secondary {
  background: white;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}
.btn-soft {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.btn-danger-soft {
  background: rgba(229, 83, 83, 0.10);
  color: var(--color-danger);
}

.section {
  margin-top: 22px;
}

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

.card,
.auth-card,
.summary-card,
.status-card {
  padding: 18px;
}

.auth-card {
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

label {
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: #fbfdff;
  padding: 15px 14px;
  font-size: 15px;
  color: var(--color-text);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(18, 115, 235, 0.45);
  box-shadow: 0 0 0 4px rgba(18, 115, 235, 0.10);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: white;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.search-box {
  display: flex;
  gap: 10px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 12px 14px;
}

.search-box input {
  padding: 0;
  border: none;
  background: transparent;
}

.deposit-card,
.product-card,
.order-card {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.deposit-header,
.product-header,
.order-header,
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.price {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary);
}

.product-thumb {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(18, 115, 235, 0.12), rgba(110, 197, 255, 0.28));
  display: grid;
  place-items: center;
  font-size: 30px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f4f9ff;
  border-radius: 999px;
  padding: 6px;
}

.qty-control button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: white;
  font-weight: 800;
}

.summary-grid {
  display: grid;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
}

.summary-row.total {
  font-size: 18px;
  font-weight: 800;
}

.status-steps {
  display: grid;
  gap: 14px;
}

.step {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
}

.step-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-top: 4px;
  background: #cfe4fb;
}

.step.active .step-dot {
  background: var(--color-success);
  box-shadow: 0 0 0 6px rgba(33, 163, 102, 0.14);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: calc(var(--container) - 24px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(217, 233, 247, 0.85);
  border-radius: 24px;
  box-shadow: 0 18px 30px rgba(9, 64, 116, 0.16);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 10px;
  z-index: 50;
}

.bottom-nav a {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 8px 0;
  color: var(--color-text-soft);
  font-size: 12px;
  font-weight: 700;
  border-radius: 16px;
}

.bottom-nav a.active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-soft);
}

.divider {
  height: 1px;
  background: var(--color-border);
  margin: 16px 0;
}

@media (min-width: 768px) {
  .page {
    padding-top: 28px;
  }

  h1 {
    font-size: 38px;
  }
}
