/* ============================================================
   PORTAL DO CLIENTE — CONSULTA DE VEÍCULOS
   Design System: Branco & Vermelho | Premium | Responsivo
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── VARIÁVEIS ─────────────────────────────────────────────── */
:root {
  --primary:       #ff0043;
  --primary-dark:  #d10036;
  --primary-light: #fff0f3;
  --bg-page:       #f8f9fa;
  --bg-card:       #ffffff;
  --text-main:     #1f2937;
  --text-muted:    #6b7280;
  --border:        #e5e7eb;
  --border-light:  #f3f4f6;
  --success:       #10b981;
  --shadow-sm:     0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:     0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:     0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-lg:     12px;
  --radius-xl:     16px;
  --radius-2xl:    24px;
  --font-main:     'Inter', sans-serif;
  --transition:    all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }

/* ── HEADER ─────────────────────────────────────────────────── */
.main-header {
  background: var(--bg-card);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-light);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.logo-container img {
  height: 40px;
  width: auto;
}

.badge-security,
.badge-ssl {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
}

.badge-security {
  background: #ecfdf5;
  color: var(--success);
  border-color: #a7f3d0;
}

.badge-ssl {
  background: #fef3c7;
  color: #d97706;
  border-color: #fcd34d;
}

/* ── PÁGINA DE CONSULTA ────────────────────────────────────── */
.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  background: var(--bg-card);
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 40px;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-title {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 12px;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 16px;
}

.form-input {
  width: 100%;
  padding: 14px 14px 14px 42px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
  font-family: var(--font-main);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #fff;
  padding: 16px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(255, 0, 67, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-main);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(255, 0, 67, 0.4);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ── SELOS DE SEGURANÇA ─────────────────────────────────────── */
.security-seals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.seal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.seal-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 18px;
}

.seal-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 700;
}

/* ── CAIXAS DE CONFIANÇA ────────────────────────────────────── */
.trust-box {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  text-align: center;
  transition: var(--transition);
}

.trust-box:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.trust-box i {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 12px;
}

.trust-box h3 {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.trust-box p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── PÁGINA DE LOADING ──────────────────────────────────────── */
.loading-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}

.spinner-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 32px;
}

.spinner-main {
  width: 100%;
  height: 100%;
  border: 4px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.progress-container {
  width: 100%;
  max-width: 320px;
  margin-bottom: 24px;
}

.progress-bar-bg {
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(255, 0, 67, 0.4);
}

.loading-status {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  min-height: 24px;
}

/* ── PÁGINA DE RESULTADO ────────────────────────────────────── */
.result-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  width: 100%;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 20px;
}

.result-title-area h1 {
  font-size: 32px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
}

.result-title-area p {
  color: var(--text-muted);
  font-size: 15px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #ecfdf5;
  color: var(--success);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.grid-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-header i {
  color: var(--primary);
  font-size: 18px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.card-body {
  padding: 24px;
}

/* ── GALERIA DE IMAGENS ─────────────────────────────────────── */
.gallery-main {
  width: 100%;
  aspect-ratio: 16/9;
  background: #f3f4f6;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.thumb-item {
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.thumb-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── TABELAS E DADOS ────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-item label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.info-item span {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.price-box {
  background: var(--primary-light);
  padding: 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 20px;
  border: 1px solid #ffe0e8;
}

.price-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.price-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary-dark);
}

/* ── TABELAS ────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: var(--border-light);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 14px;
  font-size: 14px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-light);
}

.data-table tr:hover td {
  background: var(--border-light);
}

.status-badge-table {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.status-pago {
  background: #ecfdf5;
  color: var(--success);
}

.status-pendente {
  background: #fef3c7;
  color: #d97706;
}

/* ── DOCUMENTOS ─────────────────────────────────────────────── */
.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  transition: var(--transition);
  cursor: pointer;
}

.doc-item:hover {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  padding-left: 13px;
}

.doc-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  background: var(--primary-light);
  color: var(--primary);
}

.doc-info {
  flex: 1;
}

.doc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.doc-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.doc-status {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: #ecfdf5;
  color: var(--success);
}

/* ── GARANTIAS ──────────────────────────────────────────────── */
.garantia-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}

.garantia-icon {
  width: 36px;
  height: 36px;
  background: var(--success);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 16px;
}

.garantia-text h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.garantia-text p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── MODAL ─────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  padding: 32px 24px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  text-align: center;
  animation: slideUp 0.3s ease;
}

.modal-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 12px;
}

.modal-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  flex-direction: column;
}

.modal-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
}

.modal-btn-primary {
  background: var(--primary);
  color: #fff;
}

.modal-btn-primary:hover {
  background: var(--primary-dark);
}

.modal-btn-secondary {
  background: var(--border-light);
  color: var(--text-main);
}

.modal-btn-secondary:hover {
  background: var(--border);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ── RODAPÉ ─────────────────────────────────────────────────── */
.main-footer {
  background: #111827;
  color: #fff;
  padding: 40px 24px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-section h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--primary);
}

.footer-trust {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.footer-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.footer-trust-item i {
  color: var(--success);
  font-size: 14px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  height: 30px;
  width: auto;
}

/* ── CÓPIA DE CÓDIGO ────────────────────────────────────────── */
.copy-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-main);
}

.copy-btn:hover {
  background: var(--primary-dark);
}

.copy-feedback {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--success);
  color: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideUpFeedback 0.3s ease;
  z-index: 999;
}

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

/* ── RESPONSIVIDADE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-layout { grid-template-columns: 1fr; }
  .security-seals { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .auth-card { padding: 24px; }
  .result-header { flex-direction: column; }
  .info-grid { grid-template-columns: 1fr; }
  .security-seals { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .seal-label { font-size: 11px; }
}

@media (max-width: 480px) {
  .auth-title { font-size: 24px; }
  .security-seals { grid-template-columns: repeat(3, 1fr); }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
}
