/* Payment schedule page — matches landing.css palette */
:root {
  --bg: #000;
  --panel: rgba(255, 255, 255, .04);
  --panel2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .12);
  --text: #fff;
  --muted: #A0A0A0;
  --soft: #6E6E6E;
  --accent: #296FA1;
  --accentSoft: rgba(41, 111, 161, .16);
  --ok: #34C77B;
  --okSoft: rgba(52, 199, 123, .14);
  --warn: #F2B544;
  --warnSoft: rgba(242, 181, 68, .14);
  --bad: #FF5A5F;
  --badSoft: rgba(255, 90, 95, .14);
  --r2: 28px;
  --r3: 20px;
  --font: 'Montserrat', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(41, 111, 161, .42), transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(41, 111, 161, .14), transparent 65%),
    linear-gradient(180deg, #000 0%, #020508 50%, #000 100%);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.pay-container {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.pay-header {
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.pay-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.pay-logo img { height: 34px; width: auto; display: block; }
.pay-header-actions { display: flex; align-items: center; gap: 16px; }
.pay-phone {
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: rgba(255, 255, 255, .85);
}
.pay-phone:hover { color: #fff; }
.pay-lang {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.pay-lang a {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 5px 11px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
}
.pay-lang a.is-active { background: var(--accent); color: #fff; }

/* ── Main ───────────────────────────────────────────────────────────────── */
.pay-main { flex: 1; padding: 28px 0 72px; }

.pay-back {
  display: table;
  margin-left: auto;
  margin-right: auto;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 28px;
}
.pay-back:hover { color: #fff; }

.pay-intro { max-width: 640px; margin: 0 auto 28px; text-align: center; }
.pay-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: 10px;
}
.pay-intro h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 14px;
}
.pay-intro p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

.pay-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r2);
}

/* ── Form ───────────────────────────────────────────────────────────────── */
.pay-form { padding: 28px; max-width: 640px; margin: 0 auto; }
.pay-form[hidden] { display: none; }

.pay-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.pay-field { display: flex; flex-direction: column; gap: 8px; }
.pay-label { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .8); }
.pay-label small { font-weight: 500; color: var(--soft); margin-left: 4px; }

.pay-field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font: 600 17px/1 var(--font);
  letter-spacing: .03em;
  color: #fff;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color .2s, background .2s;
}
.pay-field input::placeholder { color: var(--soft); font-weight: 500; letter-spacing: 0; }
.pay-field input:focus { border-color: var(--accent); background: rgba(41, 111, 161, .08); }
.pay-field input.is-invalid { border-color: var(--bad); }
.pay-field-err { min-height: 16px; font-size: 12px; color: var(--bad); }

.pay-captcha { margin-top: 6px; }
.pay-captcha-row { display: flex; align-items: center; gap: 10px; }
.pay-captcha-row img {
  flex: 0 0 auto;
  width: 165px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid var(--line);
  user-select: none;
}
.pay-captcha-refresh {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: #fff;
  cursor: pointer;
  transition: background .2s, transform .3s;
}
.pay-captcha-refresh:hover { background: var(--accentSoft); }
.pay-captcha-refresh:active { transform: rotate(90deg); }
.pay-captcha-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .25em; }

.pay-form-alert {
  margin: 4px 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  background: var(--badSoft);
  border: 1px solid rgba(255, 90, 95, .35);
  color: #ffd2d3;
}
.pay-form-alert[hidden] { display: none; }

.pay-submit {
  position: relative;
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 700 16px/1 var(--font);
  cursor: pointer;
  transition: filter .2s, transform .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.pay-submit:hover { filter: brightness(1.12); }
.pay-submit:active { transform: scale(.99); }
.pay-submit:disabled { cursor: progress; filter: saturate(.6); }
.pay-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pay-spin .7s linear infinite;
}
.pay-submit.is-loading .pay-spinner { display: inline-block; }
@keyframes pay-spin { to { transform: rotate(360deg); } }

.pay-privacy { margin: 14px 0 0; font-size: 12px; color: var(--soft); text-align: center; }

/* ── Result ─────────────────────────────────────────────────────────────── */
.pay-result { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 90px; }
.pay-result[hidden] { display: none; }

.pay-result-head {
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.pay-result-head h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.pay-client { margin: 0; color: var(--muted); font-size: 15px; }
.pay-client b { color: #fff; letter-spacing: .04em; }
.pay-asof { font-size: 13px; color: var(--soft); }

.pay-overdue-note {
  padding: 16px 20px;
  border-radius: var(--r3);
  background: var(--badSoft);
  border: 1px solid rgba(255, 90, 95, .35);
  color: #ffd2d3;
  font-size: 14px;
  line-height: 1.55;
}

.pay-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.pay-stat {
  padding: 18px 20px;
  border-radius: var(--r3);
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pay-stat span { font-size: 12px; font-weight: 600; color: var(--muted); }
.pay-stat b { font-size: 20px; font-weight: 800; white-space: nowrap; }
.pay-stat.is-paid b { color: var(--ok); }
.pay-stat.is-overdue { background: var(--badSoft); border-color: rgba(255, 90, 95, .35); }
.pay-stat.is-overdue b { color: var(--bad); }

.pay-progress-card { padding: 20px 24px; }
.pay-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}
.pay-progress-top b { color: #fff; }
.pay-progress { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pay-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--ok));
  transition: width .8s cubic-bezier(.2, .8, .2, 1);
}

.pay-table-wrap { padding: 8px; overflow-x: auto; }
.pay-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pay-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--soft);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.pay-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pay-table tbody tr:last-child td { border-bottom: 0; }
.pay-table td:first-child { color: var(--soft); }
.pay-table tr.is-paid td:not(:last-child) { color: rgba(255, 255, 255, .55); }
.pay-table tr.is-overdue { background: rgba(255, 90, 95, .05); }

.pay-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.pay-badge.is-paid     { background: var(--okSoft);   color: var(--ok); }
.pay-badge.is-partial  { background: var(--warnSoft); color: var(--warn); }
.pay-badge.is-overdue  { background: var(--badSoft);  color: var(--bad); }
.pay-badge.is-upcoming { background: var(--panel2);   color: var(--muted); }

.pay-new-search {
  align-self: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: #fff;
  font: 600 15px/1 var(--font);
  cursor: pointer;
}
.pay-new-search:hover { background: var(--accentSoft); border-color: var(--accent); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.pay-footer { border-top: 1px solid rgba(255, 255, 255, .07); padding: 24px 0; }
.pay-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--soft);
}
.pay-footer a { color: rgba(255, 255, 255, .75); font-weight: 600; text-decoration: none; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .pay-stats { grid-template-columns: 1fr 1fr; }
  .pay-stat b { font-size: 17px; }

  /* Table → cards */
  .pay-table-wrap { padding: 0; background: none; border: 0; }
  .pay-table thead { display: none; }
  .pay-table, .pay-table tbody, .pay-table tr, .pay-table td { display: block; width: 100%; }
  .pay-table tr {
    margin-bottom: 10px;
    padding: 6px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r3);
    background: var(--panel);
  }
  .pay-table tr.is-overdue { border-color: rgba(255, 90, 95, .35); background: rgba(255, 90, 95, .06); }
  .pay-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
  }
  .pay-table td::before {
    content: attr(data-label);
    color: var(--soft);
    font-size: 12px;
    font-weight: 600;
  }
  .pay-table td:first-child { display: none; }
}

@media (max-width: 560px) {
  .pay-header-inner { height: 60px; }
  .pay-logo img { height: 28px; }
  .pay-phone { display: none; }
  .pay-form { padding: 20px; }
  .pay-fields { grid-template-columns: 1fr; gap: 6px; }
  .pay-captcha-row { flex-wrap: wrap; }
  .pay-captcha-row input { flex-basis: 100%; }
  .pay-result-head { padding: 20px; }
  .pay-result-head h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .pay-progress-bar, .pay-captcha-refresh { transition: none; }
  .pay-spinner { animation-duration: 1.5s; }
}
