/* ===== Фирменные цвета: зелёная гамма МВД-калькулятора ===== */
:root{
  --brand:#5B9A3C;
  --brand-2:#4a8230;
  --brand-dark:#3f7028;
  --accent:#6fb04a;
  --bg:#eef1f6;
  --surface:#ffffff;
  --surface-2:#f4faf0;
  --text:#1f2933;
  --muted:#7b8794;
  --border:#e4e9f0;
  --note-bg:#f1f9ec;
  --note-text:#5B9A3C;
  --radius-card:24px;
  --radius-field:14px;
  --transition:180ms var(--ease-out, cubic-bezier(.2,.7,.2,1));
}

*{box-sizing:border-box;}

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

body{
  margin:0;
  font-family:'Segoe UI',system-ui,-apple-system,'Inter',Roboto,'Helvetica Neue',Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
  min-height:100vh;
}

/* ===== Кнопка возврата ===== */
.back-button-wrapper{
  padding:16px 0;
  background:var(--surface);
  border-bottom:1px solid var(--border);
}

.back-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  text-decoration:none;
  font-size:.92rem;
  font-weight:500;
  transition:var(--transition);
}

.back-link:hover{
  color:var(--brand);
}

.back-link svg{
  flex:0 0 auto;
}

.container{
  width:100%;
  max-width:760px;
  margin:0 auto;
  padding:0 20px;
}

.page-wrapper{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* ===== Основной контент ===== */
.main-content{
  flex:1;
  padding:48px 0 72px;
  display:flex;
  align-items:flex-start;
  justify-content:center;
}

/* ===== Карточка калькулятора ===== */
.calculator-card{
  width:100%;
  max-width:600px;
  margin:0 auto;
  background:var(--surface);
  border-radius:var(--radius-card);
  box-shadow:0 20px 50px -20px rgba(31,41,51,.25), 0 4px 12px rgba(31,41,51,.06);
  overflow:hidden;
}



/* ===== Индикатор прогресса (вынесен в зелёную зону) ===== */
.progress-indicator{
  position:relative;
  background:linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  padding:26px 28px 30px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  overflow:hidden;
}

.progress-indicator::before{
  content:"МВД · ПЕНСИЯ";
  position:absolute;
  top:20px;
  left:28px;
  font-size:11px;
  letter-spacing:.12em;
  font-weight:700;
  color:rgba(255,255,255,.75);
}

.progress-indicator::after{
  content:"Калькулятор военной пенсии";
  position:absolute;
  top:38px;
  left:28px;
  font-size:clamp(1.3rem,4vw,1.55rem);
  font-weight:800;
  color:#fff;
  letter-spacing:-.01em;
}

/* Декоративные круги */
.calculator-card{position:relative;}

.progress-indicator{
  padding-top:96px;
}

.progress-step{
  position:relative;
  z-index:2;
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}

/* Соединительные линии */
.progress-step:not(:last-child)::after{
  content:"";
  position:absolute;
  top:15px;
  left:calc(50% + 18px);
  right:calc(-50% + 18px);
  height:2px;
  background:rgba(255,255,255,.3);
  z-index:1;
}

.progress-step.done:not(:last-child)::after{
  background:rgba(255,255,255,.65);
}

.step-number{
  width:30px;
  height:30px;
  border-radius:50%;
  background:rgba(255,255,255,.25);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:14px;
  margin-bottom:8px;
  transition:var(--transition);
}

.progress-step.active .step-number{
  background:#fff;
  color:var(--brand);
  box-shadow:0 4px 10px rgba(0,0,0,.15);
}

.progress-step.done .step-number{
  background:rgba(255,255,255,.85);
  color:var(--brand);
}

.step-label{
  font-size:12px;
  color:rgba(255,255,255,.85);
  font-weight:500;
  line-height:1.2;
}

.progress-step.active .step-label{
  color:#fff;
  font-weight:600;
}

/* ===== Тело шага ===== */
.calc-step{
  padding:28px 28px 24px;
  animation:fadeIn .3s var(--ease-out, ease);
}

@keyframes fadeIn{
  from{opacity:0;transform:translateY(8px);}
  to{opacity:1;transform:translateY(0);}
}

@media (prefers-reduced-motion:reduce){
  .calc-step{animation:none;}
}

.step-icon-box{
  width:44px;
  height:44px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:14px;
}

.step-heading{
  font-size:1.15rem;
  font-weight:700;
  margin:0 0 4px;
  color:var(--text);
}

.step-desc{
  font-size:.9rem;
  color:var(--muted);
  margin:0 0 22px;
}

/* ===== Поля формы ===== */
.form-group{
  margin-bottom:18px;
}

.form-group label{
  display:block;
  font-size:.88rem;
  color:var(--muted);
  margin-bottom:8px;
  font-weight:500;
}

.form-select{
  width:100%;
  padding:14px 42px 14px 16px;
  font-size:1rem;
  font-family:inherit;
  color:var(--text);
  background:var(--surface);
  border:1.5px solid var(--border);
  border-radius:var(--radius-field);
  appearance:none;
  -webkit-appearance:none;
  cursor:pointer;
  transition:var(--transition);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237b8794' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
}

.form-select:focus{
  outline:none;
  border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(91,154,60,.15);
}

.form-select:invalid,
.form-select option[value=""]{
  color:var(--muted);
}

/* ===== Кнопки ===== */
.step-actions{
  display:flex;
  gap:12px;
  margin-top:22px;
}

.btn-next,
.btn-calculate{
  flex:1;
  padding:15px 20px;
  font-size:1rem;
  font-weight:600;
  font-family:inherit;
  color:#fff;
  background:var(--brand);
  border:none;
  border-radius:var(--radius-field);
  cursor:pointer;
  transition:var(--transition);
}

.btn-next:hover:not(:disabled),
.btn-calculate:hover:not(:disabled){
  background:var(--brand-2);
  transform:translateY(-1px);
  box-shadow:0 6px 16px -4px rgba(91,154,60,.5);
}

.btn-next:active:not(:disabled),
.btn-calculate:active:not(:disabled){
  transform:translateY(0);
}

.btn-next:disabled,
.btn-calculate:disabled{
  background:#eceff3;
  color:#aab2bd;
  cursor:not-allowed;
}

.btn-back{
  flex:0 0 auto;
  padding:15px 22px;
  font-size:1rem;
  font-weight:600;
  font-family:inherit;
  color:var(--text);
  background:var(--surface);
  border:1.5px solid var(--border);
  border-radius:var(--radius-field);
  cursor:pointer;
  transition:var(--transition);
}

.btn-back:hover{
  border-color:var(--brand);
  color:var(--brand);
}

.btn-reset{
  flex:1;
  padding:15px 20px;
  font-size:1rem;
  font-weight:600;
  font-family:inherit;
  color:var(--text);
  background:var(--surface);
  border:1.5px solid var(--border);
  border-radius:var(--radius-field);
  cursor:pointer;
  transition:var(--transition);
}

.btn-reset:hover{
  border-color:var(--brand);
  color:var(--brand);
}

/* ===== Примечание ===== */
.step-note{
  margin:24px -28px -24px;
  padding:16px 28px;
  background:var(--note-bg);
  font-size:.86rem;
  color:var(--note-text);
  font-weight:500;
  display:flex;
  align-items:center;
  gap:8px;
}

.step-note::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--brand);
  flex:0 0 auto;
}

/* ===== Итоговый экран ===== */
.result-box{
  background:linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  border-radius:16px;
  padding:26px 24px;
  margin-bottom:20px;
  color:#fff;
}

.result-label{
  font-size:.92rem;
  opacity:.9;
  margin-bottom:6px;
  font-weight:500;
}

.result-amount{
  font-size:clamp(2rem,7vw,2.6rem);
  font-weight:800;
  letter-spacing:-.02em;
  line-height:1.1;
}

.result-details{
  border:1.5px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  margin-bottom:20px;
}

.detail-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:15px 18px;
  font-size:.94rem;
}

.detail-row:not(:last-child){
  border-bottom:1px solid var(--border);
}

.detail-row span{
  color:var(--muted);
}

.detail-row strong{
  color:var(--text);
  font-weight:700;
  text-align:right;
  white-space:nowrap;
}

/* ===== Адаптив ===== */
@media (max-width:520px){
  .main-content{padding:24px 0 48px;}
  .container{padding:0 14px;}
  .progress-indicator{
    padding:88px 16px 24px;
  }
  .progress-indicator::before,
  .progress-indicator::after{
    left:20px;
  }
  .step-label{font-size:10.5px;}
  .step-number{width:26px;height:26px;font-size:12px;}
  .progress-step:not(:last-child)::after{
    top:13px;
    left:calc(50% + 15px);
    right:calc(-50% + 15px);
  }
  .calc-step{padding:22px 18px 20px;}
  .step-note{margin:20px -18px -20px;padding:14px 18px;}
  .step-actions{flex-wrap:wrap;}
}

/* --- Недостающие дизайн-токены (значения из theme.css платформы) --- */
:root{
  --font-sans: "Segoe UI", system-ui, -apple-system, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-size-base: var(--step-0, clamp(1rem, .96rem + .2vw, 1.125rem));
  --line-height: 1.6;
}

/* ===== Шапка сайта ===== */
.site-header{
  display:block;
  background:#2961aa;
  color:#fff;
  padding:16px 0;
}

.header-container{
  max-width:1240px;
  margin:0 auto;
  padding:0 20px;
  display:flex;
  align-items:center;
  gap:32px;
}

.header-logo{
  font-size:1.25rem;
  font-weight:700;
  color:#fff;
  text-decoration:none;
  white-space:nowrap;
  letter-spacing:-.01em;
}

.header-logo:hover{
  opacity:.9;
}

.header-nav{
  display:flex;
  gap:24px;
  flex:1;
}

.header-nav a{
  color:rgba(255,255,255,.95);
  text-decoration:none;
  font-size:.94rem;
  font-weight:500;
  white-space:nowrap;
  transition:var(--transition);
}

.header-nav a:hover{
  color:#fff;
  text-decoration:underline;
}

.header-login{
  color:#fff;
  text-decoration:none;
  font-size:.94rem;
  font-weight:600;
  white-space:nowrap;
  padding:10px 18px;
  border:1.5px solid rgba(255,255,255,.4);
  border-radius:8px;
  transition:var(--transition);
}

.header-login:hover{
  background:rgba(255,255,255,.15);
  border-color:rgba(255,255,255,.6);
}

/* ===== Подвал сайта ===== */
.site-footer{
  background:#f8f9fb;
  padding:48px 0 28px;
  border-top:1px solid var(--border);
}

.footer-top{
  max-width:1240px;
  margin:0 auto;
  padding:0 20px 32px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:32px 24px;
}

.footer-col h3{
  font-size:.9rem;
  font-weight:700;
  color:var(--text);
  margin:0 0 14px;
  text-transform:uppercase;
  letter-spacing:.03em;
}

.footer-col{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.footer-col a{
  color:var(--muted);
  text-decoration:none;
  font-size:.88rem;
  transition:var(--transition);
}

.footer-col a:hover{
  color:var(--brand);
  text-decoration:underline;
}

.footer-bottom{
  max-width:1240px;
  margin:0 auto;
  padding:24px 20px 0;
  border-top:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  flex-wrap:wrap;
}

.footer-legal{
  display:flex;
  gap:20px;
  align-items:center;
  flex-wrap:wrap;
}

.footer-legal p{
  margin:0;
  color:var(--muted);
  font-size:.86rem;
}

.footer-legal a{
  color:var(--muted);
  text-decoration:none;
  font-size:.86rem;
  transition:var(--transition);
}

.footer-legal a:hover{
  color:var(--brand);
  text-decoration:underline;
}

.footer-social{
  display:flex;
  gap:14px;
}

.footer-social a{
  width:36px;
  height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  border-radius:8px;
  transition:var(--transition);
}

.footer-social a:hover{
  color:var(--brand);
  background:rgba(91,154,60,.1);
}

@media (max-width:760px){
  .header-container{
    flex-wrap:wrap;
    gap:12px;
  }
  .header-nav{
    order:3;
    flex-basis:100%;
    gap:16px;
    font-size:.88rem;
  }
  .header-login{
    font-size:.88rem;
    padding:8px 14px;
  }
  .footer-top{
    grid-template-columns:1fr 1fr;
    gap:28px 16px;
  }
  .footer-bottom{
    flex-direction:column;
    align-items:flex-start;
    gap:16px;
  }
  .footer-legal{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }
}
