/* Design Kit – Dark theme loan app */

:root {
  /* Colors */
  --color-bg: #000;
  --color-bg-elevated: #0d0d0d;
  --color-bg-card: #0a0a0a;
  --color-bg-chip: #121212;
  --color-bg-input: #000000;

  --color-border: #313131;
  --color-border-soft: #242424;

  --color-text: #ededed;
  --color-text-muted: rgba(237, 237, 237, 0.6);
  --color-text-dark: #151515;

  --color-accent-primary: #ffd101;
  --color-accent-primary-dark: #e0b600;
  --color-accent-secondary: #f64808;
  --color-accent-secondary-dark: #d83f07;

  --color-success: #00c853;
  --color-error: #f64808;

  /* Layout */
  --radius-pill: 999px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;

  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.7);

  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-14: 14px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-28: 28px;
  --space-32: 32px;

  /* Typography */
  --font-display: 'Bagel Fat One', cursive;
  --font-body: 'Istok Web', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;

  --font-size-display: 38px;
  --font-size-h2: 28px;
  --font-size-h3: 22px;
  --font-size-body: 17px;
  --font-size-caption: 14px;
  --font-size-label: 14px;

  --line-height-tight: 1.1;
  --line-height-normal: 1.4;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #000;
  color: var(--color-text);
  font-family: var(--font-body);
  
}

body {
  display: flex;
  justify-content: center;
  padding: var(--space-24) 0 var(--space-32);
}

.ui-kit-shell {
  width: 390px;
  max-width: 100%;
  background-color: #000;
  border-radius: 32px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  border: 1px solid #202020;
}

.ui-kit-scroll {
  height: calc(100vh - 64px);
  max-height: 900px;
  overflow-y: auto;
  background-color: var(--color-bg);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px 4px;
  font-size: 12px;
  color: var(--color-text);
}

.status-bar__right {
  display: flex;
  gap: 6px;
  opacity: 0.8;
}

.screen {
  padding: 10px 18px 26px;
}

.screen + .screen {
  border-top: 1px solid #121212;
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-20);
}

.screen-header__left,
.screen-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.screen-header__title {
  flex: 1;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
}

.screen-header__step {
  font-size: 13px;
  color: var(--color-text-muted);
}

.icon-back,
.icon-close {
  font-size: 14px;
  cursor: default;
}

.screen-title-display {
  font-family: var(--font-display);
  font-size: var(--font-size-display);
  line-height: var(--line-height-tight);
  margin: 0 0 var(--space-12);
}

.screen-subtitle {
  font-size: var(--font-size-body);
  color: var(--color-text-muted);
  margin-bottom: var(--space-24);
}

.section-label {
  font-size: var(--font-size-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
}

.disclaimer {
  font-size: var(--font-size-caption);
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* Inputs */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--space-16);
}

.field-label {
  font-size: var(--font-size-label);
  color: var(--color-text-muted);
}

.field-input {
  display: flex;
  align-items: center;
  background-color: var(--color-bg-input);
  border-radius: 16px;
  border: 1px solid var(--color-border);
  padding: 10px 14px;
  font-size: var(--font-size-body);
  color: var(--color-text);
}

.field-input input,
.field-input textarea {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
}

.field-input textarea {
  resize: none;
  min-height: 80px;
}

.field-input__prefix {
  margin-right: 6px;
  color: var(--color-text-muted);
}

.field-input--amount {
  justify-content: center;
  padding: 18px 14px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
}

.field-input--light {
  background-color: #fefefe;
  border-color: #f1f1f1;
  color: #141414;
}

.field-input--light input {
  color: inherit;
}

.placeholder {
  color: var(--color-text-muted);
}

/* Checkbox */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--font-size-caption);
  color: var(--color-text-muted);
  margin-top: 4px;
}

.checkbox {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background-color: #050505;
  flex-shrink: 0;
}

.checkbox--checked {
  border-color: var(--color-accent-primary);
  background: radial-gradient(circle at 20% 10%, #fff9c5 0, #ffd101 40%, #f69a00 100%);
}

.checkbox--checked::after {
  content: '';
  position: absolute;
  inset: 4px 3px 3px 6px;
  border: 2px solid #111;
  border-top: none;
  border-right: none;
  transform: rotate(-45deg);
}

.checkbox-text a {
  color: var(--color-accent-primary);
  text-decoration: none;
}

.checkbox-text a:hover {
  text-decoration: underline;
}

/* Chips */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: var(--space-20) 0 var(--space-24);
}

.chip {
  min-width: 90px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: linear-gradient(145deg, #101010, #050505);
  color: var(--color-text);
  font-size: var(--font-size-body);
  text-align: center;
}

.chip--selected {
  border-color: var(--color-accent-primary);
  background: radial-gradient(circle at 20% 0, #fffbd1 0, #ffd101 40%, #f3a300 100%);
  color: #151515;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9);
}

/* Buttons – pill shape, 100% as on screenshot */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 200;
  text-decoration: none;
  transition: transform 0.1s ease-out, box-shadow 0.1s ease-out,
    background-color 0.1s ease-out, border-color 0.1s ease-out, color 0.1s;
  overflow: visible;
}

@media (max-width: 1023px) {
  .btn--primary,
  .btn--outline,
  .btn--outline-light {
    width: 100%;
    min-width: 0;
  }
}

@media (min-width: 1024px) {
  .btn--primary,
  .btn--outline,
  .btn--outline-light {
    width: 280px;
    min-width: 280px;
  }
}

/* Primary: блик из UI‑kit (Group 5) — внутри, отступ несколько px от левого верхнего угла */
.btn--primary::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 5px;
  width: 38px;
  height: 36px;
  background: url("../assets/btn-glare-primary.svg") no-repeat 0 0;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 0;
}

/* Primary: две линии сверху слева + одна справа снизу (как в Group 5), за бордером */
.btn--primary::after {
  content: '';
  position: absolute;
  left: -4px;
  top: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  background-image:
    url("../assets/btn-lines-topleft-white.svg"),
    url("../assets/btn-lines-bottomright-white.svg");
  background-repeat: no-repeat;
  background-size: 24px 24px, 24px 24px;
  background-position: 0 0, 100% 100%;
  pointer-events: none;
  z-index: 0;
}

.btn--primary {
  background: #ffd101;
  color: #000;
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--primary:hover {
  background: #ffe033;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Primary: состояние Press — оранжевый фон, блик и линии остаются */
.btn--primary:active,
.btn--primary:focus-visible:active {
  transform: translateY(1px) scale(0.99);
  background: #ff8001;
  color: #000;
  box-shadow:
    0 1px 6px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn--primary[disabled] {
  background: #333;
  color: var(--color-text-muted);
  box-shadow: none;
}

.btn--primary[disabled]::before,
.btn--primary[disabled]::after {
  display: none;
}

.btn--secondary {
  background: transparent;
  border: 2px solid var(--color-accent-secondary);
  color: var(--color-accent-secondary);
  font-family: var(--font-body);
}

.btn--secondary:active {
  background-color: rgba(246, 72, 8, 0.1);
}

.btn--ghost {
  background-color: #151515;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
}

.btn--ghost:active {
  background-color: #101010;
}

/* Outline yellow: black fill, yellow border, блик + линии как в Group 2085662719 */
.btn--outline {
  background: #000;
  border: 2px solid var(--color-accent-primary);
  color: var(--color-accent-primary);
}

/* Top-left: блик строго внутри (отступ от бордера) + две линии снаружи в цвет обводки */
.btn--outline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 52px;
  height: 52px;
  background-image:
    url("../assets/btn-glare-outline.svg"),
    url("../assets/btn-lines-topleft-yellow.svg");
  background-repeat: no-repeat;
  background-size: 28px 26px, 24px 24px;
  background-position: 8px 8px, -2px -2px;
  pointer-events: none;
  z-index: 0;
}

/* Bottom-right: одна линия за бордером, в цвет обводки */
.btn--outline::after {
  content: '';
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 28px;
  height: 28px;
  background: url("../assets/btn-lines-bottomright-yellow.svg") no-repeat 100% 100%;
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

.btn--outline:hover {
  background: #0a0a0a;
  border-color: #ffe033;
  color: #ffe033;
}

.btn--outline:active {
  background: #111;
}

/* Outline white: тот же блик и линии, белая обводка + текст */
.btn--outline-light {
  background: #000;
  border: 2px solid rgba(255, 255, 255, 0.9);
  color: #fff;
}

.btn--outline-light::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  background-image:
    url("../assets/btn-glare-outline.svg"),
    url("../assets/btn-lines-topleft-white.svg");
  background-repeat: no-repeat;
  background-size: 36px 34px, 24px 24px;
  background-position: 5px 5px, -3px -3px;
  pointer-events: none;
  z-index: 0;
}

.btn--outline-light::after {
  content: '';
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 28px;
  height: 28px;
  background: url("../assets/btn-lines-bottomright-white.svg") no-repeat 100% 100%;
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

.btn--outline-light:hover {
  background: #0a0a0a;
  border-color: #fff;
  color: #fff;
}

.btn-label-muted {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Loan amount screen */
.amount-value {
  font-family: var(--font-display);
  font-size: 44px;
  text-align: center;
  margin: 6px 0 2px;
}

.amount-prefix {
  font-size: 24px;
}

.amount-divider {
  margin: var(--space-20) 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
}

.amount-divider::before,
.amount-divider::after {
  content: '';
  display: inline-block;
  vertical-align: middle;
  width: 90px;
  height: 1px;
  background-color: #181818;
  margin: 0 8px;
}

/* Cards */
.card {
  background: radial-gradient(circle at 0 0, #262626 0, #121212 55%);
  border-radius: 28px;
  padding: 18px 18px 16px;
  border: 1px solid #262626;
  box-shadow: var(--shadow-soft);
  margin-bottom: var(--space-16);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
}

.rating-stars {
  display: inline-flex;
  gap: 2px;
  font-size: 13px;
  color: #ffd101;
}

.loan-range {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 8px 0 14px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}

.meta-label {
  color: var(--color-text-muted);
}

.meta-value {
  color: var(--color-text);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 16, 16, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  margin: 6px 0 12px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background-color: var(--color-accent-primary);
}

/* Support screen specific */
.support-note {
  font-size: var(--font-size-caption);
  color: var(--color-text-muted);
  margin-bottom: var(--space-20);
}

/* Menu screen */
.menu-overlay {
  background: rgba(0, 0, 0, 0.8);
  border-radius: 32px;
  padding: 18px;
}

.menu-panel {
  background-color: #050505;
  border-radius: 26px;
  padding: 18px 18px 12px;
  box-shadow: var(--shadow-soft);
}

.menu-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #151515;
  font-size: var(--font-size-body);
}

.menu-row:last-child {
  border-bottom: none;
}

.menu-row-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-row-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background-color: #111;
}

.menu-row-chevron {
  font-size: 16px;
  color: var(--color-text-muted);
}

.menu-footer {
  margin-top: 18px;
}

.menu-footer .chips-row {
  margin-top: 0;
}

.menu-footer .disclaimer {
  margin-top: 12px;
}

/* Loading screen */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 48px;
}

.loading-title {
  font-family: var(--font-display);
  font-size: 26px;
  margin-bottom: 4px;
}

.loading-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.loading-bar {
  position: relative;
  width: 80%;
  height: 24px;
  border-radius: 999px;
  background-color: #111;
  overflow: hidden;
}

.loading-pill {
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: radial-gradient(circle at 0 0, #fffbd3 0, #ffd101 40%, #f69a00 100%);
  transform-origin: left;
  animation: loading-pulse 1.2s ease-in-out infinite;
}

@keyframes loading-pulse {
  0% {
    transform: scaleX(0.2);
  }
  50% {
    transform: scaleX(0.9);
  }
  100% {
    transform: scaleX(0.2);
  }
}

/* Result screens */
.centered-state {
  text-align: center;
  padding: 60px 28px 32px;
}

.state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 32px;
  background: radial-gradient(circle at 0 0, #ffb36a 0, #f64808 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.state-title {
  font-family: var(--font-display);
  font-size: 26px;
  margin-bottom: 8px;
}

.state-body {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.state-title--success {
  color: var(--color-accent-primary);
}

.state-title--error {
  color: var(--color-accent-secondary);
}

/* Legal / tips scrolling content */
.legal-body {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-muted);
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
}

.legal-body h3 {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--color-text);
  margin-top: 14px;
  margin-bottom: 6px;
}

.tips-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.tip-item {
  display: flex;
  gap: 12px;
}

.tip-number {
  min-width: 42px;
  height: 24px;
  border-radius: 999px;
  background-color: #ffd101;
  color: #151515;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tip-content-title {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 2px;
}

.tip-content-body {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* UI Kit buttons / states */
.section-heading {
  font-family: var(--font-display);
  font-size: 32px;
  margin: 0 0 10px;
  letter-spacing: 3px;
}

.button-row-demo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.button-row-demo .btn {
  width: auto;
}

.small-pill {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-state-label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background-color: #121212;
  font-size: 13px;
}

.pill-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background-color: var(--color-accent-primary);
}

.pill-label {
  color: var(--color-text);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* Light card example (for success / legal modal) */
.light-card {
  background-color: #fdfdfd;
  border-radius: 24px;
  padding: 18px;
  color: #151515;
  border: 1px solid #e5e5e5;
}

.light-card-title {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 6px;
  color: #111;
}

.light-card-body {
  font-size: 14px;
  color: #444;
}

.light-card .btn--primary {
  margin-top: 16px;
}

/* Small helpers */
.mt-4 {
  margin-top: 4px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mb-0 {
  margin-bottom: 0;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--color-text-muted);
}

.divider {
  height: 1px;
  background-color: #121212;
  margin: 18px 0;
}

