/* ===== БАЗА ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: #f6f9fc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 16px 80px;
  margin: 0;
  background: linear-gradient(145deg, #f0f5fa 0%, #e6eef5 100%);
}

h1 {
  margin-bottom: 24px;
  text-align: center;
}

/* ===== КАРТОЧКА ===== */
.card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 42px;
  box-shadow:
    0 20px 50px rgba(0, 20, 40, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.03);
  padding: 32px 28px;
  max-width: 560px;
  width: 100%;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

.header {
  margin-bottom: 28px;
}

.header h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: #0b1a2b;
}

.header p {
  font-size: 14px;
  color: #5e6f88;
  margin-top: 4px;
  font-weight: 400;
  letter-spacing: -0.2px;
}

/* ===== ИНПУТ ===== */
.input-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.input-label span {
  font-size: 15px;
  font-weight: 500;
  color: #1c2e44;
}

.input-label .hint {
  font-size: 12px;
  color: #7b8ba3;
  font-weight: 400;
  background: #f0f4fa;
  padding: 2px 12px;
  border-radius: 40px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.input-wrapper {
  position: relative;
  margin-bottom: 20px;
}

#plateInput {
  width: 100%;
  padding: 16px 20px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 1.5px;
  background: #ffffff;
  border: 1.5px solid #d9e1ea;
  border-radius: 28px;
  outline: none;
  transition: all 0.2s ease;
  color: #0b1a2b;
  font-family: "Inter", monospace;
  box-shadow: 0 2px 6px rgba(0, 20, 40, 0.02);
  caret-color: #1d7cf0;
  text-transform: uppercase;
}

#plateInput::placeholder {
  color: #b0c1d6;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.5px;
  opacity: 0.8;
  text-transform: none;
}

#plateInput:focus {
  border-color: #1d7cf0;
  box-shadow: 0 6px 18px rgba(29, 124, 240, 0.08);
  background: #ffffff;
}

#plateInput.error {
  border-color: #e74c3c;
  background: #fff8f8;
}

.input-hint {
  font-size: 12px;
  color: #7b8ba3;
  margin-top: 6px;
  padding-left: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.input-hint i {
  font-size: 11px;
}

.hidden {
  display: none;
}

/* ===== КНОПКИ ===== */
.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 60px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  background: transparent;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  flex: 1 1 auto;
  min-width: 100px;
  font-family: "Inter", sans-serif;
  letter-spacing: -0.2px;
}

.btn.disabled {
  opacity: 0.2;
  pointer-events: none;
}

.btn-primary {
  background: #1d7cf0;
  color: white;
  box-shadow: 0 4px 12px rgba(29, 124, 240, 0.2);
}

.btn-primary:hover {
  background: #1466d0;
  transform: scale(1.01);
  box-shadow: 0 8px 20px rgba(29, 124, 240, 0.25);
}

.btn-primary:active {
  transform: scale(0.97);
  background: #0f58b3;
}

.btn-secondary {
  background: #eef3f9;
  color: #1f344d;
  border: 1px solid #dce5ef;
}

.btn-secondary:hover {
  background: #e3eaf3;
  border-color: #c7d3e2;
}

.btn-secondary:active {
  background: #d3dde9;
}

.btn i {
  font-size: 15px;
  pointer-events: none;
}

.social-link {
  text-decoration: none;
}

/* ===== СТАТУС ===== */
.status-message {
  margin-top: 18px;
  padding: 10px 16px;
  border-radius: 30px;
  background: #f0f4fa;
  color: #1f344d;
  font-size: 14px;
  display: none;
  align-items: center;
  gap: 10px;
  border-left: 4px solid #1d7cf0;
  transition: all 0.2s;
}

.status-message.visible {
  display: flex;
}

.status-message i {
  color: #1d7cf0;
  font-size: 16px;
}

/* ===== КНОПКА ОПЛАТЫ ===== */
.pay-section {
  margin-top: 18px;
  display: none;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.pay-section.visible {
  display: flex;
}

.btn-pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #1d7cf0;
  color: white;
  padding: 14px 32px;
  border-radius: 60px;
  font-weight: 600;
  font-size: 17px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 16px rgba(29, 124, 240, 0.2);
  font-family: "Inter", sans-serif;
  letter-spacing: -0.2px;
  width: 100%;
  justify-content: center;
}

.btn-pay:hover {
  background: #1466d0;
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(29, 124, 240, 0.25);
}

.btn-pay:active {
  transform: scale(0.97);
}

.btn-pay i {
  font-size: 18px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ФУТЕР (малозаметный) ===== */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.02);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
}

.footer .btn-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.privacy-link,
.home-link {
  font-size: 12px;
  color: #7b8ba3;
}

.footer .messenger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.2s ease;
  text-decoration: none;
  color: #7b8ba3;
  font-size: 20px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .messenger-btn:hover {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.6);
  /* color: #1f344d; */
}

.footer .messenger-btn:active {
  transform: scale(0.94);
}

.footer .messenger-btn.tg {
  color: #0088cc;
}
.footer .messenger-btn.wapp {
  color: #25d366;
}

/* Кнопка MAX с логотипом */
.footer .messenger-btn.max {
  background: rgba(255, 255, 255, 0.3);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(100%);
}

.footer .messenger-btn.max:hover {
  background: rgba(255, 255, 255, 0.6);
  filter: grayscale(0);
}

.footer .max-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

/* ===== МОДАЛКА ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: white;
  max-width: 420px;
  width: 100%;
  border-radius: 32px;
  padding: 32px 28px 28px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.3s ease;
  position: relative;
  margin: 0 12px;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #8a9bb0;
  cursor: pointer;
  transition: color 0.15s;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 40px;
}

.modal-close:hover {
  color: #1f344d;
  background: #f0f4fa;
}

.modal h2 {
  font-size: 22px;
  font-weight: 600;
  color: #0b1a2b;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal h2 i {
  color: #1d7cf0;
  font-size: 22px;
}

.modal-header-info {
  margin: 12px 0 18px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal .sub {
  font-size: 14px;
  color: #6f7f97;
}

.modal .field {
  margin-bottom: 16px;
}

.modal .field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #1c2e44;
  margin-bottom: 4px;
}

.modal .field label .required {
  color: #e74c3c;
  margin-left: 2px;
}

.modal .field input,
.modal .field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #d9e1ea;
  border-radius: 16px;
  font-size: 15px;
  font-family: "Inter", sans-serif;
  background: #fafcff;
  transition:
    border 0.15s,
    box-shadow 0.15s;
  outline: none;
  color: #0b1a2b;
}

.modal .field input:focus,
.modal .field textarea:focus {
  border-color: #1d7cf0;
  box-shadow: 0 0 0 4px rgba(29, 124, 240, 0.08);
  background: white;
}

.modal .field textarea {
  resize: vertical;
  min-height: 72px;
}

.modal .field .error-hint {
  font-size: 12px;
  color: #e74c3c;
  margin-top: 4px;
  display: none;
}

.modal .field.error input,
.modal .field.error textarea {
  border-color: #e74c3c;
  background: #fff8f8;
}

.modal .field.error .error-hint {
  display: block;
}

.modal .actions-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.modal .actions-row .btn {
  flex: 1;
  padding: 12px 16px;
  font-size: 15px;
  min-width: 0;
}

.card .agree-block,
.modal .agree-block {
  font-size: 11px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.checkbox-input {
  appearance: none;
  position: relative;
  width: 30px;
  height: 30px;
  background: #d9e1ea;
  box-shadow: inset 0 0 5px rgb(0 0 0 / 0.2);
  border-radius: 10px;
  border: 1px solid #ffffff;
  transition: 500ms;
}

.checkbox-input::after {
  content: "";
  position: absolute;
  width: 0px;
  height: 0px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='30' viewBox='0 -960 960 960' width='30' stroke='%23FFFFFF' stroke-width='30' fill='%23FFFFFF'%3E%3Cpath d='M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  transition: 500ms;
}

.checkbox-input:checked::after {
  width: 30px;
  height: 30px;
  transition: 500ms;
}

.information-block {
  max-width: 60vw;
  background: #ffffff;
  border-radius: 32px;
  padding: 36px 40px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid #e9edf2;
}

.information-block .ib-title {
  font-size: 20px;
  font-weight: 600;
  color: #0b1e33;
  letter-spacing: -0.3px;
  padding-bottom: 4px;
  border-bottom: 2px solid #2563eb;
  margin-bottom: 8px;
  display: inline-block;
}

.information-block .ib-text {
  font-size: 15px;
  line-height: 1.7;
  color: #475569;
  margin-bottom: 8px;
  padding: 0 2px;
}

.information-block .ib-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: #0b1e33;
  margin-bottom: 4px;
}

.information-block ol {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.information-block ol li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: #334155;
  padding: 12px 16px;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.information-block ol li:hover {
  background: #f8fafc;
}

.information-block ol li .step-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: #2563eb;
  border-radius: 50%;
  margin-top: 8px;
}

.information-block ol li strong {
  color: #0b1e33;
  font-weight: 600;
}

.information-block a {
  text-decoration: underline;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 600px) {
  body {
    padding: 12px 12px 72px;
  }

  .card {
    padding: 24px 18px;
    border-radius: 32px;
  }

  .header h1 {
    font-size: 22px;
  }

  .header p {
    font-size: 13px;
  }

  #plateInput {
    font-size: 18px;
    padding: 14px 16px;
    letter-spacing: 1px;
  }

  #plateInput::placeholder {
    font-size: 15px;
  }

  .btn {
    padding: 12px 16px;
    font-size: 14px;
    min-width: 70px;
    flex: 1 1 30%;
  }

  .actions {
    gap: 8px;
  }

  .input-label span {
    font-size: 14px;
  }

  .input-label .hint {
    font-size: 11px;
    padding: 2px 10px;
  }

  .btn-pay {
    padding: 12px 24px;
    font-size: 15px;
  }

  .footer {
    padding: 8px 14px;
    gap: 6px;
  }

  .footer .messenger-btn {
    width: 36px;
    height: 36px;
    font-size: 17px;
  }

  .footer .max-logo {
    width: 22px;
    height: 22px;
  }

  .modal {
    padding: 24px 18px 20px;
    border-radius: 28px;
  }

  .modal h2 {
    font-size: 20px;
  }

  .modal .field input,
  .modal .field textarea {
    padding: 10px 14px;
    font-size: 14px;
  }

  .modal .actions-row .btn {
    padding: 10px 14px;
    font-size: 14px;
  }

  .input-hint {
    font-size: 11px;
  }

  .status-message {
    font-size: 13px;
    padding: 8px 14px;
  }
}

@media (max-width: 400px) {
  .card {
    padding: 18px 14px;
    border-radius: 28px;
  }

  .header h1 {
    font-size: 19px;
  }

  #plateInput {
    font-size: 16px;
    padding: 12px 14px;
    letter-spacing: 0.8px;
  }

  .btn {
    font-size: 13px;
    padding: 10px 12px;
    min-width: 60px;
  }

  .btn i {
    font-size: 13px;
  }

  .actions {
    gap: 6px;
  }

  .btn-pay {
    font-size: 14px;
    padding: 10px 18px;
  }

  .footer .messenger-btn {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .footer .max-logo {
    width: 18px;
    height: 18px;
  }

  .modal {
    padding: 20px 14px 16px;
  }

  .modal h2 {
    font-size: 18px;
  }

  .modal .field input,
  .modal .field textarea {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 14px;
  }
}

@media (max-width: 360px) {
  .card {
    padding: 14px 10px;
  }

  .input-label .hint {
    font-size: 10px;
    padding: 1px 8px;
  }

  .btn {
    font-size: 12px;
    padding: 8px 10px;
    min-width: 50px;
  }

  #plateInput {
    font-size: 15px;
    padding: 10px 12px;
  }

  .footer {
    padding: 6px 10px;
    gap: 4px;
  }

  .footer .messenger-btn {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .footer .max-logo {
    width: 16px;
    height: 16px;
  }
}
/* ===== РЕЗУЛЬТАТЫ ПОИСКА ===== */
#resultsContainer {
  margin-top: 20px;
}

.fines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 4px;
}

#cardsContainer {
  display: none;
}

.fine-card {
  background: #f7fafc;
  border-radius: 16px;
  padding: 18px 20px;
  border-left: 5px solid #48bb78;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fine-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  background: #f0f4fa;
}

/* Верхняя строка: номер + сумма */
.fine-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid #edf2f7;
}

.fine-card .protocol-no {
  font-weight: 700;
  font-size: 16px;
  color: #1c2e44;
  font-family: monospace;
  letter-spacing: 0.5px;
}

.fine-card .amount {
  font-weight: 700;
  font-size: 20px;
  color: #e53e3e;
  white-space: nowrap;
}

.fine-card .amount .currency {
  font-size: 14px;
  color: #718096;
}

/* Дата и статус */
.fine-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: #4a5568;
}

.fine-card .card-meta .date {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fine-card .card-meta .date i {
  color: #718096;
}

/* Статус "Осталось дней" */
.fine-card .days-badge {
  display: inline-block;
  padding: 2px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}

.fine-card .days-badge.urgent {
  background: #fefcbf;
  color: #975a16;
}

.fine-card .days-badge.overdue {
  background: #fed7d7;
  color: #9b2c2c;
}

.fine-card .days-badge.ok {
  background: #c6f6d5;
  color: #276749;
}

/* Детали (место, статья, срок) */
.fine-card .card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  padding-top: 8px;
  font-size: 13px;
}

.fine-card .card-details .detail-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 0;
}

.fine-card .card-details .detail-item .label {
  font-size: 11px;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.fine-card .card-details .detail-item .value {
  color: #1c2e44;
  font-weight: 500;
  word-break: break-word;
}

.fine-card .card-details .detail-item .value.place {
  font-size: 12px;
  font-weight: 400;
}

/* Место занимает две колонки */
.fine-card .card-details .detail-item.place-full {
  grid-column: 1 / -1;
}

/* ===== ПУСТОЙ РЕЗУЛЬТАТ ===== */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: #718096;
}

.empty-state .icon {
  font-size: 56px;
  margin-bottom: 12px;
}

.empty-state h3 {
  color: #1c2e44;
  margin-bottom: 6px;
  font-size: 20px;
}

.empty-state p {
  font-size: 15px;
  color: #a0aec0;
}

.empty-state.hidden {
  display: none;
}

.grecaptcha-badge {
  visibility: hidden;
}
.recapcha-block {
  text-align: center;
}
.recapcha-block .sub {
  margin-bottom: 0;
  font-size: 12px;
}

form {
  margin-bottom: 20px;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
  .fines-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .fine-card {
    padding: 14px 16px;
    border-left-width: 4px;
  }

  .fine-card .protocol-no {
    font-size: 14px;
  }

  .fine-card .amount {
    font-size: 18px;
  }

  .fine-card .card-details {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .fine-card .card-details .detail-item.place-full {
    grid-column: 1;
  }

  .fine-card .card-meta {
    font-size: 12px;
  }

  .empty-state {
    padding: 30px 16px;
  }

  .empty-state .icon {
    font-size: 40px;
  }

  .empty-state h3 {
    font-size: 17px;
  }
}

@media (max-width: 400px) {
  .fine-card {
    padding: 12px 14px;
  }

  .fine-card .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .fine-card .protocol-no {
    font-size: 13px;
  }

  .fine-card .amount {
    font-size: 16px;
  }

  .fine-card .card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ===== ПУСТОЙ РЕЗУЛЬТАТ ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #718096;
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state h3 {
  color: #1c2e44;
  margin-bottom: 6px;
  font-size: 18px;
}

.empty-state p {
  font-size: 14px;
}

/* ===== АДАПТИВ ТАБЛИЦЫ ===== */
@media (max-width: 768px) {
  .table-wrapper table {
    display: none;
  }
  #cardsContainer {
    display: block;
  }
}

@media (min-width: 769px) {
  #cardsContainer {
    display: none !important;
  }
}
