/* Controle de Frota — ficha + mercado + CRLV */
.agf-frota-main .is-hidden { display: none !important; }

.agf-frota-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.agf-frota-search {
  flex: 1 1 220px;
  min-height: 44px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 16px;
}
.agf-frota-count {
  color: rgba(237, 245, 251, 0.85);
  font-weight: 600;
  font-size: 0.92rem;
}

.agf-frota-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.agf-frota-card {
  padding: 14px 16px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(140, 198, 63, 0.25);
  background: linear-gradient(180deg, rgba(10, 33, 55, 0.96), rgba(14, 39, 65, 0.92));
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  touch-action: manipulation;
  text-align: center;
}
.agf-frota-card:hover,
.agf-frota-card.is-active {
  border-color: rgba(140, 198, 63, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}
.agf-frota-card strong {
  display: block;
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  font-weight: 800;
}
.agf-frota-card small {
  display: block;
  margin-top: 4px;
  color: rgba(237, 245, 251, 0.65);
  font-size: 0.78rem;
}
.agf-frota-card-model {
  color: #8fd7ff !important;
  font-weight: 600;
}
.agf-frota-card-fipe {
  color: #b7d96c !important;
  font-size: 0.72rem !important;
}
.agf-frota-card-thumb {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.08);
}
.agf-frota-card-thumb--empty {
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  opacity: 0.5;
}

.agf-frota-kpi-row {
  margin-top: 0;
}
.agf-frota-fleet-card strong {
  font-size: 1.45rem;
}
.agf-frota-btn-sync {
  display: inline-block;
  margin-top: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #8cc63f, #6bb14a);
  color: #072033;
  font-weight: 800;
  cursor: pointer;
  font-size: 0.88rem;
}
.agf-frota-btn-sync:disabled {
  opacity: 0.55;
  cursor: wait;
}
.agf-frota-auto-status {
  margin: 8px 0 0;
  color: #b7d96c;
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 1.2em;
}

/* Ficha do veículo (layout mockup) */
.agf-frota-sheet {
  display: grid;
  gap: 20px;
  margin-top: 8px;
}

.agf-frota-sheet-top {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(300px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.agf-frota-ficha-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f4f6f8;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(31, 93, 139, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.agf-frota-ficha {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.agf-frota-ficha th,
.agf-frota-ficha td {
  padding: 10px 12px;
  border: 1px solid #c5d0dc;
  vertical-align: top;
  line-height: 1.35;
}
.agf-frota-ficha th {
  width: 38%;
  background: linear-gradient(180deg, #1e4a72, #163a5c);
  color: #fff;
  font-weight: 700;
  text-align: left;
  font-size: 0.78rem;
}
.agf-frota-ficha td {
  background: #eef2f6;
  color: #1a2d42;
  font-weight: 600;
}

.agf-frota-ficha-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #eef2f6;
  border-top: 1px solid #c5d0dc;
}
.agf-frota-brand-badge {
  width: 72px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #d0dae4;
  font-weight: 900;
  font-size: 0.75rem;
  color: #1e4a72;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.agf-frota-btn-retorna {
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, #5a9e2a, #4a8522);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 4px 0 #3d6f1a;
  touch-action: manipulation;
}
.agf-frota-btn-retorna:active {
  transform: translateY(2px);
  box-shadow: none;
}

.agf-frota-market {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(31, 93, 139, 0.35);
  background: linear-gradient(180deg, rgba(10, 33, 55, 0.98), rgba(14, 39, 65, 0.95));
}
.agf-frota-market-head h2 {
  margin: 0;
  color: #fff;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.agf-frota-market-head p {
  margin: 6px 0 0;
}

.agf-frota-vehicle-visual {
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, #e8eef4 0%, #d4dce6 100%);
  min-height: 160px;
  display: grid;
  place-items: center;
}
.agf-frota-vehicle-placeholder {
  text-align: center;
  padding: 24px;
}
.agf-frota-vehicle-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 8px;
  filter: grayscale(0.2);
}
.agf-frota-vehicle-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}
.agf-frota-vehicle-visual.has-photo {
  background: #1a2d42;
}
.agf-frota-vehicle-visual.has-photo .agf-frota-vehicle-placeholder {
  padding: 0;
  width: 100%;
}

.agf-frota-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.agf-frota-price-card {
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  color: #1a2d42;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.agf-frota-price-card .agf-frota-price-brand {
  display: block;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.agf-frota-price-card.icarros .agf-frota-price-brand { color: #e85d04; }
.agf-frota-price-card.fipe .agf-frota-price-brand { color: #1e4a72; }
.agf-frota-price-card strong {
  display: block;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: #0f2741;
}
.agf-frota-price-card small {
  display: block;
  margin-top: 8px;
  color: #5a6b7d;
  font-size: 0.75rem;
  line-height: 1.4;
}

.agf-frota-fipe-details {
  margin-top: 4px;
  border-radius: 12px;
  border: 1px solid rgba(143, 215, 255, 0.2);
  background: rgba(0, 0, 0, 0.15);
  padding: 10px 12px;
}
.agf-frota-fipe-details summary {
  cursor: pointer;
  color: #8fd7ff;
  font-weight: 700;
  font-size: 0.88rem;
}
.agf-fipe-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.agf-fipe-grid select,
.agf-fipe-grid button {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
}
.agf-fipe-grid button {
  grid-column: span 2;
  background: linear-gradient(135deg, #8cc63f, #6bb14a);
  color: #072033;
  font-weight: 800;
  border: none;
  cursor: pointer;
}
.agf-fipe-result-inline {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: rgba(237, 245, 251, 0.8);
}

.agf-frota-crlv-block {
  border-radius: 16px;
  border: 1px solid rgba(31, 93, 139, 0.35);
  background: rgba(10, 33, 55, 0.6);
  overflow: hidden;
}
.agf-frota-crlv-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.agf-frota-crlv-head h3 {
  margin: 0;
  color: #8fd7ff;
  font-size: 1rem;
}
.agf-frota-pdf {
  width: 100%;
  min-height: 480px;
  height: min(75vh, 720px);
  border: 0;
  background: #fff;
}

.agf-frota-docs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
}
.agf-frota-doc-pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #edf5fb;
  text-decoration: none;
  font-size: 0.86rem;
}
.agf-detail-muted {
  color: rgba(237, 245, 251, 0.68);
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .agf-frota-sheet-top {
    grid-template-columns: 1fr;
  }
  .agf-frota-price-row {
    grid-template-columns: 1fr;
  }
  .agf-frota-pdf {
    min-height: 360px;
    height: 55vh;
  }
}

@media (max-width: 520px) {
  .agf-frota-ficha th {
    width: 42%;
    font-size: 0.72rem;
  }
  .agf-frota-ficha td {
    font-size: 0.76rem;
  }
  .agf-fipe-grid {
    grid-template-columns: 1fr;
  }
  .agf-fipe-grid button {
    grid-column: span 1;
  }
}
