.brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.logo {
  background: none;
  display: block;
  color: white;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo img {
  width: auto;
  height: 100px;
  object-fit: contain;
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(13, 26, 43, 0.12);
}

.welcome-debtor {
  margin: 0;
}

.debtor-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin-left: 8px;
  margin-bottom: 0;
}

form {
  display: grid;
  gap: 18px;
}

.field label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);

  font-size: 1rem;
}

.field input:focus {
  border-color: var(--primary);
  outline: none;
}

.field-error {
  color: #b00020;
  font-size: 0.85rem;
  margin-top: 6px;
}

.recaptcha-wrapper {
  display: flex;
  justify-content: flex-start;
  overflow-x: auto;
}

.field input.input-error {
  border-color: rgba(176, 0, 32, 0.5);
  box-shadow: 0 0 0 2px rgba(176, 0, 32, 0.1);
}

button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease-in-out;
}

button:hover {
  opacity: 0.9;
  transition: opacity 0.2s ease-in-out;
}

.button-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

.button-loading::after {
  content: "";
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: #ffffff;
  display: inline-block;
  vertical-align: middle;
  animation: spin 0.9s linear infinite;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-actions button {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(11, 95, 255, 0.3);
}

.results-actions button:hover {
  background: rgba(11, 95, 255, 0.08);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  width: fit-content;
}

.badge-ok {
  background: rgba(14, 168, 117, 0.12);
  color: #0b7d55;
}

.badge-warn {
  background: rgba(255, 107, 0, 0.15);
  color: #b44b00;
}

.credit-card {
  background: var(--card);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.credit-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.credit-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
  margin-top: 12px;
}

.amount {
  font-weight: 700;
  font-size: 1.5rem;
}

.credit-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.credit-buttons .pay-button {
  min-width: 160px;
  padding: 12px 28px;
}

.history-button {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(11, 95, 255, 0.3);
  font-size: 0.9rem;
  padding: 10px 16px;
}

.history-button:hover {
  background: rgba(11, 95, 255, 0.08);
}

.history-button.button-loading::after {
  border-color: rgba(11, 95, 255, 0.3);
  border-top-color: var(--primary);
}

.history-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 26, 43, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.history-modal {
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(13, 26, 43, 0.2);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.history-modal-header {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 0 16px;
}

.history-modal-close {
  background: rgba(0, 0, 0, 0.06);
  color: #333;
  border: none;
  font-size: 1rem;
  padding: 6px 10px;
  line-height: 1;
  border-radius: 8px;
  cursor: pointer;
}

.history-modal-close:hover {
  background: rgba(0, 0, 0, 0.12);
  opacity: 1;
}

.history-table-wrapper {
  flex: 1 1 auto;
  overflow-x: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.history-table-inner {
  min-width: 500px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.history-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
}

.history-modal-footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.history-modal-footer .amount {
  margin: 0;
}

.credit-history-empty,
.credit-history-error {
  font-size: 0.9rem;
  color: #666;
  padding: 8px 0;
}

.credit-history-error {
  color: #b00020;
}

.history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
  table-layout: fixed;
}

.history-table th,
.history-table td {
  text-align: left;
  padding: 10px 16px 10px 28px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.history-table th {
  font-weight: 600;
  color: #444;
  background: var(--card, #fff);
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.history-row-reversed td {
  opacity: 0.6;
}

.badge-reversed {
  background: rgba(176, 0, 32, 0.1);
  color: #b00020;
}

.title-account-status {
  margin: 0;
}

.mock-container {
  max-width: 720px;
  margin: 60px auto;
}

.mock-box {
  text-align: center;
  padding: 32px;
}

.visual-card {
  background: linear-gradient(
    140deg,
    rgba(11, 95, 255, 0.18),
    rgba(244, 180, 0, 0.18)
  );
  padding: 32px;
  border-radius: 28px;
  display: grid;
  gap: 16px;
}

.visual-chip {
  background: var(--card);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(13, 26, 43, 0.12);
}

.padlock-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-left: 64px;
  padding-right: 64px;
  padding-bottom: 64px;
}

.padlock-footer a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-decoration: none;
}

.padlock-footer img {
  height: 90px;
  width: auto;
}

.padlock-footer-mobile {
  display: none;
}

.padlock-footer-mobile a {
  display: flex;
  flex-direction: row;
  align-items: end;
  justify-content: center;
  gap: 24px;
  text-decoration: none;
}

.padlock-footer-text p {
  margin: 0;
  font-size: 0.75rem;
  color: #003764;
}

@media (max-width: 1024px) {
  .credit-card {
    grid-template-columns: 1fr;
  }

  .credit-actions {
    justify-items: start;
  }

  .credit-buttons {
    flex-direction: column;
    width: 100%;
  }

  .credit-buttons button {
    width: 100%;
  }

  .debtor-name {
    display: block;
    margin-left: 0;
    margin-top: 8px;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 24px;
  }

  .results-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .results-actions button {
    width: 100%;
  }

  .badge-select {
    display: none;
  }
}

@media (max-width: 1024px) {
  .brand {
    justify-content: center;
  }

  .debtor-container {
    text-align: center;
    margin-bottom: 12px;
  }

  .padlock-footer-mobile {
    display: flex;
    flex-direction: row;
    align-items: end;
    justify-content: center;
    padding: 8px 0 32px 0;
    margin-top: 0;
    width: 100%;
    gap: 24px;
  }

  .padlock-footer-mobile img {
    height: 64px;
    width: auto;
  }

  .padlock-footer {
    display: none;
  }
}

@media (max-width: 600px) {
  .history-modal-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .history-modal-footer .credit-buttons {
    width: 100%;
    flex-direction: column;
  }

  .history-modal-footer .credit-buttons button {
    width: 100%;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fab-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab-whatsapp:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
  opacity: 1;
}

.fab-whatsapp svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
}

@media (max-width: 600px) {
  .fab-whatsapp {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
  }

  .fab-whatsapp svg {
    width: 24px;
    height: 24px;
  }
}
