/* Базовая настройка */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #e0f2ff, #f9f9f9);
}

/* Центрирование */
.center-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

/* Контейнер формы */
.form-box {
  width: 100%;
  max-width: 400px;
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* Заголовок */
.form-box h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  font-weight: 600;
}

/* Поля и кнопка — одинаковая ширина */
.form-box input,
.form-box button {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  font-size: 1rem;
}

/* Поля ввода */
.form-box input {
  border: 1px solid #ccc;
  background-color: #fff;
}

/* Кнопка */
.form-box button {
  border: none;
  background: #2563eb;
  color: white;
  font-weight: bold;
  transition: background 0.2s ease;
}

.form-box button:hover {
  background: #1e4fd1;
}

/* Ссылка */
.form-box a {
  display: block;
  text-align: center;
  margin-top: 1rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.form-box a:hover {
  text-decoration: underline;
}

.dashboard {
  text-align: center;
  margin-bottom: 5rem;
}

.info-block {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.info-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.info-item .label {
  color: #64748b;
}

.info-item .value {
  font-weight: 600;
  color: #0f172a;
}

/* Нижняя навигация */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-around;
  padding: 0.75rem 0;
  z-index: 100;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #ffffff;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}

.nav-item {
  flex: 1;
  text-align: center;
  color: #555;
  font-size: 14px;
  padding: 10px 0;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-item:hover {
  color: #007bff;
}

.nav-item.active {
  color: #007bff;
  font-weight: bold;
  border-top: 2px solid #007bff;
}

.history-block {
  margin-top: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.history-block {
  margin-top: 20px;
  padding: 15px;
  background-color: #fdfdfd;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.history-list {
  list-style: none;
  padding-left: 0;
}

.history-list li {
  padding: 10px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

.history-list li.positive {
  color: #28a745;
}

.history-list li.negative {
  color: #dc3545;
}

.history-list .date {
  font-weight: bold;
}

.history-list .desc {
  margin-left: 10px;
  flex: 1;
}

.history-block {
  margin-top: 20px;
  padding: 20px;
  background: #fdfdfd;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.history-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: background 0.3s;
}

.history-item:hover {
  background-color: #f0f8ff;
}

.history-icon {
  font-size: 20px;
  margin-right: 12px;
}

.history-details {
  flex: 1;
}

.history-desc {
  font-weight: 500;
  font-size: 15px;
  margin-bottom: 4px;
}

.history-date {
  font-size: 13px;
  color: #888;
}

.history-item.positive {
  border-left: 4px solid #28a745;
}

.history-item.negative {
  border-left: 4px solid #dc3545;
}

.history-item.neutral {
  border-left: 4px solid #6c757d;
}

.tariff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.tariff-card {
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
  display: block;
  text-align: center;
}

.tariff-card:hover {
  border-color: #0d6efd;
  background: #e9f5ff;
}

.tariff-card input[type="radio"] {
  display: none;
}

.tariff-card input[type="radio"]:checked + .tariff-content {
  border: 2px solid #198754;
  background-color: #d1e7dd;
  border-radius: 8px;
}

.tariff-content h5 {
  margin-bottom: 8px;
  font-weight: 600;
}

.payment-methods {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.method-option {
  flex: 1;
  padding: 12px;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
}

.method-option:hover {
  background-color: #f0f8ff;
  border-color: #0d6efd;
}

.method-option input[type="radio"] {
  display: none;
}

.method-option input[type="radio"]:checked + span {
  font-weight: bold;
  color: #198754;
}

.method-group {
  margin-top: 12px;
  margin-bottom: 24px;
}

.payment-methods {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.method-option {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s ease;
  background-color: #f8f9fa;
}

.method-option:hover {
  background-color: #e9f5ff;
  border-color: #0d6efd;
}

.method-option input[type="radio"] {
  display: none;
}

.method-option input[type="radio"]:checked + span {
  font-weight: bold;
  color: #198754;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.tariff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.tariff-card {
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
  display: block;
  text-align: center;
  position: relative;
}

.tariff-card.selected {
  border-color: #198754;
  background-color: #d1e7dd;
}

.tariff-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tariff-content h5 {
  margin-bottom: 8px;
  font-weight: 600;
}

.method-group {
  margin-top: 12px;
  margin-bottom: 24px;
}

.payment-methods {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.method-option {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s ease;
  background-color: #f8f9fa;
  position: relative;
}

.method-option.active {
  border-color: #198754;
  background-color: #d1e7dd;
  font-weight: bold;
}

.method-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.payment-success {
  padding: 40px 20px;
  background-color: #f8f9fa;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.checkmark-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  width: 100px;
  height: 100px;
}

.checkmark {
  width: 100%;
  height: 100%;
  stroke: #28a745;
  stroke-width: 2;
  stroke-miterlimit: 10;
  box-sizing: border-box;
  animation: scaleIn 0.3s ease-in-out forwards;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke: #28a745;
  animation: strokeCircle 0.6s ease-out forwards;
}

.checkmark-check {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: #28a745;
  animation: strokeCheck 0.3s 0.6s ease-out forwards;
}

@keyframes strokeCircle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes strokeCheck {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes scaleIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.payment-failed {
  padding: 40px 20px;
  background-color: #fff0f0;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.crossmark-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  width: 100px;
  height: 100px;
}

.crossmark {
  width: 100%;
  height: 100%;
  stroke: #dc3545;
  stroke-width: 2;
  stroke-miterlimit: 10;
  box-sizing: border-box;
  animation: scaleIn 0.3s ease-in-out forwards;
}

.crossmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke: #dc3545;
  animation: strokeCircle 0.6s ease-out forwards;
}

.crossmark-x {
  stroke-dasharray: 64;
  stroke-dashoffset: 64;
  stroke: #dc3545;
  animation: strokeX 0.4s 0.6s ease-out forwards;
}

@keyframes strokeCircle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes strokeX {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes scaleIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.retry-button {
  display: inline-block;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: 600;
  color: #fff !important; /* ← принудительно белый текст */
  background: linear-gradient(135deg, #dc3545, #ff6b6b);
  border: none;
  border-radius: 12px;
  text-decoration: none !important; /* ← убирает подчёркивание */
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.retry-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}

.retry-button:active {
  transform: scale(0.98);
}

.support-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: white !important;
  background: linear-gradient(135deg, #0088cc, #006699);
  border: none;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.support-btn:hover {
  background: linear-gradient(135deg, #00aaff, #0077aa);
  transform: scale(1.05);
}
.support-btn:active {
  transform: scale(0.98);
}
.support-btn svg {
  margin-right: 8px;
}
.support-text {
  color: white;
}

form label {
  display: block;
  margin-bottom: 15px;
}
form input {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  box-sizing: border-box;
}

form small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #666;
}

.alert-danger {
  background-color: #ffdddd;
  border-left: 6px solid #d9534f;
  color: #a94442;
  padding: 15px;
  font-weight: bold;
  font-size: 1.1em;
  animation: pulse 1.5s infinite;
  border-radius: 8px;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0px rgba(217, 83, 79, 0.5); }
  50% { box-shadow: 0 0 10px rgba(217, 83, 79, 0.9); }
  100% { box-shadow: 0 0 0px rgba(217, 83, 79, 0.5); }
}


.btn-spacing {
  margin-top: 20px;
}

/* Кнопка ПСКОВ */
.pskov-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  text-decoration: none;
  text-align: center;
  transition: background 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.pskov-btn:hover {
  background: linear-gradient(135deg, #1e4fd1, #1e3a8a);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.pskov-btn:active {
  transform: translateY(0);
}
