html {
  font-size: 14px;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --front-bg: #f5f8fa;
  --front-bg-accent: radial-gradient(circle at top left, rgba(62, 151, 255, 0.18), transparent 28%), radial-gradient(circle at bottom right, rgba(114, 57, 234, 0.14), transparent 30%);
  --front-card-bg: rgba(255, 255, 255, 0.96);
  --front-card-border: rgba(219, 223, 233, 0.9);
  --front-text: #181c32;
  --front-muted: #7e8299;
  --front-primary: #3e97ff;
  --front-primary-dark: #2884ef;
  --front-success: #50cd89;
  --front-danger: #f1416c;
  --front-warning: #ffc700;
  --front-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --front-radius-xl: 1.75rem;
  --front-radius-lg: 1rem;
  --front-input-radius: 0.85rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--front-text);
  background: var(--front-bg);
}

a {
  color: var(--front-primary-dark);
  text-decoration: none;
}

a:hover {
  color: var(--front-primary);
}

.front-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.front-shell__background {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(245, 248, 250, 0.94)),
    var(--front-bg-accent);
  pointer-events: none;
  z-index: 0;
}

.front-shell__content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 32px 16px;
}

.wrapper {
  max-width: 760px;
  margin: 0 auto;
}

.wrapper.wrapper-wide {
  max-width: 1080px;
}

.card-bank {
  border: 1px solid var(--front-card-border);
  border-radius: var(--front-radius-xl);
  background: var(--front-card-bg);
  box-shadow: var(--front-shadow);
  backdrop-filter: blur(12px);
}

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  letter-spacing: -0.03em;
  color: var(--front-text);
}

.subtitle {
  margin: 8px 0 0;
  color: var(--front-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(62, 151, 255, 0.12);
  color: #0f5eb7;
  border: 1px solid rgba(62, 151, 255, 0.18);
  font-weight: 700;
}

.section {
  border: 1px solid #eff2f5;
  border-radius: var(--front-radius-lg);
  padding: 22px;
  background: #ffffff;
  margin-top: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--front-text);
  font-size: 0.98rem;
  font-weight: 700;
}

.form-label {
  font-weight: 600;
  color: #3f4254;
  margin-bottom: 0.6rem;
}

.form-control,
.input-group-text,
.btn,
.form-select {
  border-radius: var(--front-input-radius);
}

.form-control,
.form-select {
  min-height: 48px;
  border: 1px solid #e4e6ef;
  background-color: #fff;
  color: var(--front-text);
  padding: 0.75rem 0.95rem;
  box-shadow: none;
}

.form-control::placeholder {
  color: #a1a5b7;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(62, 151, 255, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(62, 151, 255, 0.16);
}

.input-group-text {
  border: 1px solid #e4e6ef;
  background: #f9f9f9;
  color: #5e6278;
  font-weight: 600;
}

.form-check-input {
  border-color: #c1c7d0;
}

.form-check-input:checked {
  background-color: var(--front-primary);
  border-color: var(--front-primary);
}

.btn {
  min-height: 48px;
  font-weight: 700;
  padding: 0.8rem 1.2rem;
  border-width: 1px;
}

.btn-primary {
  border-color: var(--front-primary);
  background: linear-gradient(135deg, var(--front-primary), var(--front-primary-dark));
  box-shadow: 0 10px 24px rgba(62, 151, 255, 0.22);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  border-color: var(--front-primary-dark);
  background: linear-gradient(135deg, var(--front-primary-dark), #1f6ed4);
}

.btn-outline-secondary {
  border-color: #e4e6ef;
  color: #5e6278;
  background: #fff;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  border-color: #d8dce6;
  background: #f9f9f9;
  color: var(--front-text);
}

.btn-outline-success {
  border-color: rgba(80, 205, 137, 0.45);
  color: #0d7a45;
  background: rgba(80, 205, 137, 0.12);
}

.invalid-feedback {
  font-size: 0.85rem;
}

.hint {
  color: var(--front-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.text-danger {
  color: var(--front-danger) !important;
}

.otp-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.otp-input {
  width: 52px;
  min-width: 52px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background-image: none !important;
}

.otp-input.otp-ok {
  border-color: rgba(80, 205, 137, 0.75) !important;
  box-shadow: 0 0 0 0.2rem rgba(80, 205, 137, 0.14) !important;
}

.otp-input.otp-bad {
  border-color: rgba(241, 65, 108, 0.75) !important;
  box-shadow: 0 0 0 0.2rem rgba(241, 65, 108, 0.12) !important;
}

.spinner-inline {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
  vertical-align: -0.125em;
  margin-right: 0.5rem;
}

.product-card {
  max-width: 980px;
  margin: 0 auto;
}

.product-visual {
  position: relative;
  background: linear-gradient(135deg, rgba(62, 151, 255, 0.08), rgba(114, 57, 234, 0.08));
  border: 1px solid #eff2f5;
  border-radius: 1.5rem;
  padding: 24px;
  height: 100%;
}

.product-image-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.product-image-stage img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  filter: drop-shadow(0 18px 38px rgba(15, 23, 42, 0.18));
}

.product-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #eff2f5;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #3f4254;
}

.product-summary {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 8px 0;
}

.product-price {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.product-price__value {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.product-price__suffix {
  color: var(--front-muted);
  font-weight: 600;
}

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

.feature-list__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #eff2f5;
  border-radius: 1rem;
  background: #fff;
}

.feature-list__icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background: rgba(62, 151, 255, 0.12);
  color: var(--front-primary-dark);
}

.pulse {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--front-primary);
  box-shadow: 0 0 0 0 rgba(62, 151, 255, 0.45);
  animation: pulse 1.6s infinite;
  flex: 0 0 auto;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 151, 255, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(62, 151, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 151, 255, 0); }
}

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

.progress-bar-indeterminate {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--front-primary-dark), var(--front-primary));
  border-radius: 999px;
  animation: indeterminate 1.2s infinite ease-in-out;
}

@keyframes indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(260%); }
}

.document-frame {
  border: 1px solid #eff2f5;
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty-state__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.25rem;
  background: rgba(62, 151, 255, 0.1);
  color: var(--front-primary-dark);
  font-size: 1.5rem;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus,
.form-select:focus {
  outline: none;
}

@media (max-width: 991.98px) {
  .front-shell__content {
    padding: 20px 12px;
  }

  .header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .section {
    padding: 18px;
  }
}

@media (max-width: 575.98px) {
  .card-bank {
    border-radius: 1.25rem;
  }

  .otp-input {
    width: 46px;
    min-width: 46px;
  }

  .product-image-stage {
    min-height: 260px;
  }
}