*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f2f2f2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #2d3748;
}

/* ===== HEADER ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}
.logo-money {
  font-size: 20px;
  font-weight: 800;
  color: #1a202c;
  letter-spacing: -0.5px;
}
.logo-money span { color: #e8263d; }
.logo-express {
  font-size: 11px;
  color: #9ca3af;
  letter-spacing: 2px;
  text-transform: lowercase;
  margin-top: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #2d3748;
  font-size: 14px;
  font-weight: 600;
}
.header-phone svg { color: #25d366; }

.lang-switch {
  display: flex;
  gap: 4px;
}
.lang-btn {
  padding: 4px 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #9ca3af;
}
.lang-btn.active {
  border-color: #e8263d;
  color: #e8263d;
}

/* ===== MAIN CONTENT ===== */
.page-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  position: relative;
  overflow: hidden;
}

/* Декоративные круги как на оригинале */
.page-main::before {
  content: '';
  position: absolute;
  left: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 50px solid #b8d8e8;
  opacity: 0.4;
  pointer-events: none;
}
.page-main::after {
  content: '';
  position: absolute;
  right: -100px;
  top: 30%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 60px solid #f4a0a8;
  opacity: 0.35;
  pointer-events: none;
}

.container { width: 100%; max-width: 520px; position: relative; z-index: 1; }

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
  padding: 40px 36px 32px;
}

/* ===== TYPOGRAPHY ===== */
h1 { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 8px; color: #1a202c; }
.subtitle { font-size: 14px; color: #6b7280; text-align: center; margin-bottom: 28px; line-height: 1.5; }
.borrower-name { font-size: 18px; font-weight: 600; text-align: center; margin-bottom: 20px; color: #1a202c; }

/* ===== FORM ===== */
.form-group { margin-bottom: 20px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #374151; }

input[type="text"] {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid #e5e7eb; border-radius: 10px;
  font-size: 16px; letter-spacing: 2px;
  transition: border-color .2s; outline: none;
}
input[type="text"]:focus { border-color: #e8263d; }
.hint { font-size: 12px; color: #9ca3af; margin-top: 4px; display: block; }
.h-captcha { display: flex; justify-content: center; margin: 20px 0; }

/* ===== BUTTONS ===== */
.btn-primary, .btn-pay {
  width: 100%; padding: 14px; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 600; cursor: pointer; transition: background .2s;
}
.btn-primary { background: #e8263d; color: #fff; }
.btn-primary:hover { background: #c81e32; }
.btn-pay { background: #e8263d; color: #fff; margin-top: 12px; }
.btn-pay:hover { background: #c81e32; }
.btn-secondary {
  display: inline-block; margin-top: 16px;
  font-size: 14px; color: #e8263d; text-decoration: none; font-weight: 500;
}
.btn-secondary:hover { text-decoration: underline; }

/* ===== CREDIT CARD ===== */
.credit-card { border: 1.5px solid #e5e7eb; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.credit-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.contract { font-size: 13px; font-weight: 600; color: #374151; }

.days-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }
.badge-red    { background: #fef2f2; color: #dc2626; }
.badge-orange { background: #fff7ed; color: #ea580c; }
.badge-yellow { background: #fefce8; color: #ca8a04; }

.debt-breakdown { border-top: 1px solid #f3f4f6; padding-top: 12px; }
.debt-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; color: #4b5563; border-bottom: 1px solid #f9fafb; }
.total-row { border-bottom: none; border-top: 2px solid #e5e7eb; margin-top: 4px; padding-top: 12px; font-weight: 700; color: #1a202c; }
.total-amount { font-size: 18px; color: #e8263d; }

/* ===== ALERTS ===== */
.alert { padding: 14px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; font-weight: 500; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ===== FOOTER NOTE ===== */
.footer-note { font-size: 12px; color: #9ca3af; text-align: center; margin-top: 24px; line-height: 1.6; }
.footer-note a { color: #25d366; text-decoration: none; font-weight: 600; }
.footer-note a:hover { text-decoration: underline; }

/* ===== SITE FOOTER ===== */
.site-footer {
  background: #2b3245;
  color: #a0aec0;
  text-align: center;
  padding: 20px 32px;
  font-size: 13px;
}

/* ===== MOBILE ===== */
@media (max-width: 480px) {
  .site-header { padding: 0 16px; }
  .card { padding: 28px 20px 24px; }
  h1 { font-size: 19px; }
  .page-main::before, .page-main::after { display: none; }
}

.captcha-hint {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
  text-align: center;
}
