/* Veículos — só o que é do módulo; module-* vem da casca do host. */

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.vehicles-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.vehicles-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.vehicles-plate {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid var(--border, #d5d9e0);
    background: var(--surface-2, #f4f6f9);
}

.vehicles-meta {
    display: block;
    color: var(--text-muted, #67707e);
    font-size: 0.82rem;
}

.vehicles-verdict {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 3px 10px;
    border-radius: 999px;
}

.vehicles-verdict.is-regular { background: #e2f4e6; color: #1c6b34; }
.vehicles-verdict.is-issues { background: #fdeceb; color: #a3271f; }
.vehicles-verdict.is-pending { background: var(--surface-2, #f0f2f5); color: var(--text-muted, #67707e); }
.vehicles-verdict.is-archived { background: var(--surface-2, #f0f2f5); color: var(--text-muted, #67707e); }

.vehicles-issues {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.vehicles-issue {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-2, #f7f8fa);
    border: 1px solid var(--border, #e2e5ea);
}

.vehicles-issue.is-resolved,
.vehicles-issue.is-dismissed { opacity: 0.6; }

.vehicles-issue-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.vehicles-issue-title { font-weight: 600; font-size: 0.9rem; }
.vehicles-issue-amount { font-weight: 700; white-space: nowrap; }
.vehicles-issue-due { font-size: 0.8rem; color: var(--text-muted, #67707e); }
.vehicles-issue-due.is-urgent { color: #a3271f; font-weight: 600; }

.vehicles-issue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.vehicles-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- Página do veículo ---- */

.vehicles-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease;
}

.vehicles-card-link:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.vehicles-detail-top { margin-bottom: 4px; }

.vehicles-detail-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.vehicles-plate-lg { font-size: 1rem; padding: 4px 12px; }

.vehicles-detail-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.module-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border-radius: 10px;
    background: var(--surface-2, #eef0f4);
}

.module-tabs [role="tab"] {
    border: 0;
    border-radius: 8px;
    padding: 7px 16px;
    font-weight: 500;
    background: transparent;
    cursor: pointer;
}

.module-tabs [role="tab"][aria-selected="true"] {
    background: var(--surface, #fff);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.vehicles-step {
    display: grid;
    gap: 12px;
    justify-items: start;
    padding: 8px 0;
}

.vehicles-step-title { margin: 0; font-size: 1rem; }

.vehicles-step-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 6px;
    color: var(--text-muted, #67707e);
}

.vehicles-step-list .is-done {
    color: #1c6b34;
    text-decoration: line-through;
}

.vehicles-service-group {
    margin-top: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border, #e2e5ea);
    background: var(--surface-2, #f7f8fa);
}

.vehicles-service-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.vehicles-service-title { margin: 0; font-size: 0.95rem; }

.vehicles-plan-foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; }

.vehicles-timeline {
    list-style: none;
    margin: 12px 0 0;
    padding: 0 0 0 18px;
    border-left: 2px solid var(--border, #e2e5ea);
    display: grid;
    gap: 16px;
}

.vehicles-timeline-item { position: relative; }

.vehicles-timeline-item::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent, #2a6df4);
}

.vehicles-record-items {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.vehicles-record-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.vehicles-record-label { flex: 1; font-size: 0.9rem; }
.vehicles-record-cost { font-size: 0.85rem; color: var(--text-muted, #67707e); white-space: nowrap; }

.vehicles-action-chip {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.vehicles-action-chip.is-replaced { background: #e2f4e6; color: #1c6b34; }
.vehicles-action-chip.is-repaired { background: #fdf3e0; color: #8a5a00; }
.vehicles-action-chip.is-checked { background: var(--surface-2, #eef0f4); color: var(--text-muted, #67707e); }

/* Wizard de revisão: item em bloco — o toggle em cima, ação+custo embaixo SÓ quando marcado.
   (A grade de 3 colunas da primeira versão espremia tudo dentro do modal — "toda torta".) */
.vehicles-wizard-list { display: grid; gap: 6px; }

.vehicles-wizard-row {
    display: grid;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--border, #e2e5ea);
    border-radius: 10px;
    background: var(--surface-2, #f7f8fa);
}

.vehicles-wizard-row .vehicles-wizard-controls { display: flex; gap: 8px; }
.vehicles-wizard-row.is-off { opacity: 0.6; }
.vehicles-wizard-row.is-off .vehicles-wizard-controls { display: none; }

.vehicles-wizard-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    min-width: 0;
}

.vehicles-wizard-action { flex: 1; }
.vehicles-wizard-cost { flex: 0 0 110px; }

/* O form-modal do host estica TODO input para 100% x 42px (.form-modal-field input) — no wizard
   isso deixava o checkbox gigante e tudo torto. Especificidade maior devolve o tamanho certo. */
.form-modal-field .vehicles-wizard-items input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 0;
    padding: 0;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--accent, #2a6df4);
}

.form-modal-field .vehicles-wizard-items select.vehicles-wizard-action,
.form-modal-field .vehicles-wizard-items input.vehicles-wizard-cost,
.form-modal-field .vehicles-wizard-items .vehicles-wizard-adder input {
    width: auto;
    min-height: 34px;
    padding: 5px 10px;
    font-size: 0.85rem;
}

.form-modal-field .vehicles-wizard-items .vehicles-wizard-adder input { flex: 1; }
.form-modal-field .vehicles-wizard-items input.vehicles-wizard-cost { width: 110px; }

.vehicles-wizard-action, .vehicles-wizard-cost {
    font: inherit;
    font-size: 0.85rem;
    padding: 5px 8px;
    border: 1px solid var(--border, #d5d9e0);
    border-radius: 8px;
    background: var(--surface, #fff);
}

.vehicles-wizard-cost { width: 100%; }

.vehicles-wizard-adder {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.vehicles-wizard-adder input {
    flex: 1;
    font: inherit;
    font-size: 0.9rem;
    padding: 6px 10px;
    border: 1px solid var(--border, #d5d9e0);
    border-radius: 8px;
}

.vehicles-maintenance {
    margin-top: 12px;
    border-top: 1px solid var(--border, #e2e5ea);
    padding-top: 8px;
}

.vehicles-maintenance-body {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

/* O display:grid acima vence o [hidden] do navegador — sem isto o "Ocultar" não oculta. */
.vehicles-maintenance-body[hidden] {
    display: none;
}

.vehicles-maintenance-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.vehicles-maintenance-title {
    margin: 4px 0 0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #67707e);
}

.vehicles-card-footer {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted, #67707e);
}
