/* ================================================================= */
/* VECTOR: telas da oficina                                          */
/* Usa os tokens --lk-* (variables.css / tema da marca).              */
/* ================================================================= */

.vx-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px 96px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 600px) {
    .vx-page { padding: 16px 12px 112px; gap: 14px; }
}

/* ── Cabeçalho ── */
.vx-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.vx-header h1 {
    font-family: var(--lk-font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: var(--lk-text);
    letter-spacing: -0.01em;
}
.vx-header p { margin: 4px 0 0; color: var(--lk-text-muted); font-size: 0.92rem; }
.vx-header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Cartões ── */
.vx-card {
    background: var(--lk-surface);
    border: 1px solid var(--lk-border-color);
    border-radius: var(--lk-border-radius-lg);
    padding: 18px 20px;
}
.vx-card h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--lk-text);
}
.vx-card h2 small { font-weight: 500; color: var(--lk-text-muted); font-size: 0.82rem; }
.vx-card--flush { padding: 0; overflow: hidden; }
.vx-card--flush > h2 { padding: 16px 20px 0; }

.vx-grid { display: grid; gap: 20px; grid-template-columns: repeat(12, 1fr); }
.vx-col-8 { grid-column: span 8; }
.vx-col-4 { grid-column: span 4; }
.vx-col-6 { grid-column: span 6; }
.vx-col-5 { grid-column: span 5; }
.vx-col-7 { grid-column: span 7; }
.vx-col-12 { grid-column: span 12; }
.vx-grid > * { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.vx-card h2 .mud-icon-button { margin-left: auto; }
@media (max-width: 960px) {
    .vx-col-8, .vx-col-4, .vx-col-6, .vx-col-5, .vx-col-7 { grid-column: span 12; }
}

/* ── KPIs ── */
.vx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.vx-kpi {
    background: var(--lk-surface);
    border: 1px solid var(--lk-border-color);
    border-radius: var(--lk-border-radius-lg);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, transform .15s ease;
}
a.vx-kpi:hover { border-color: var(--lk-primary); transform: translateY(-1px); }
.vx-kpi-label { font-size: 0.78rem; color: var(--lk-text-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.vx-kpi-value { white-space: nowrap; font-size: 1.35rem; font-weight: 700; color: var(--lk-text); line-height: 1.15; font-variant-numeric: tabular-nums; }
.vx-kpi-hint { font-size: 0.8rem; color: var(--lk-text-muted); }
.vx-kpi--alerta .vx-kpi-value { color: var(--lk-primary); }
.vx-kpi--ok .vx-kpi-value { color: #15803d; }

/* ── Hero do painel ── */
.vx-hero {
    border-radius: var(--lk-border-radius-xl);
    background: linear-gradient(120deg, #1F2A37 0%, #2b3a4c 60%, #3a1520 100%);
    color: #fff;
    padding: 22px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.vx-hero h1 { margin: 0; font-size: 1.5rem; font-weight: 700; font-family: var(--lk-font-display); }
.vx-hero p { margin: 4px 0 0; color: #cbd5e1; }
.vx-hero .mud-button-root { background: #fff !important; color: #1F2A37 !important; }

/* ── Chips de status ── */
.vx-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.6;
}
.vx-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.vx-chip--neutro { background: #eef2f7; color: #334155; }
.vx-chip--azul { background: #e0ecff; color: #1d4ed8; }
.vx-chip--amarelo { background: #fff4d6; color: #92400e; }
.vx-chip--verde { background: #dcfce7; color: #15803d; }
.vx-chip--cinza { background: #f1f5f9; color: #64748b; }
.vx-chip--vermelho { background: #fee2e2; color: #b91c1c; }
.vx-tag-atraso { color: var(--lk-primary); font-weight: 600; font-size: 0.8rem; }

/* ── Tabela ── */
.vx-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.vx-table th {
    text-align: left;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--lk-text-muted);
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 1px solid var(--lk-border-color);
    white-space: nowrap;
}
.vx-table td { padding: 11px 12px; border-bottom: 1px solid var(--lk-border-color); vertical-align: middle; }
.vx-table tr:last-child td { border-bottom: none; }
.vx-table tbody tr.vx-click { cursor: pointer; }
.vx-table tbody tr.vx-click:hover { background: var(--lk-primary-background); }
.vx-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vx-table .muted { color: var(--lk-text-muted); font-size: 0.82rem; }
.vx-table-wrap { overflow-x: auto; }

/* Em telas pequenas, tabelas viram cartões */
@media (max-width: 700px) {
    .vx-table--cards thead { display: none; }
    .vx-table--cards, .vx-table--cards tbody, .vx-table--cards tr, .vx-table--cards td { display: block; width: 100%; }
    .vx-table--cards tr { padding: 12px 14px; border-bottom: 1px solid var(--lk-border-color); }
    .vx-table--cards td { border: none; padding: 2px 0; }
    .vx-table--cards td.num { text-align: left; }
    .vx-table--cards td[data-label]::before { content: attr(data-label) ": "; color: var(--lk-text-muted); font-size: 0.8rem; }
}

.vx-placa {
    display: inline-block;
    font-family: "DIN Alternate", "Roboto Mono", monospace;
    font-weight: 700;
    letter-spacing: .06em;
    border: 1.5px solid #1F2A37;
    border-top: 5px solid #1d4ed8;
    border-radius: 4px;
    padding: 0 6px;
    font-size: 0.82rem;
    background: #fff;
    color: #111827;
}

/* ── Filtros ── */
.vx-filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.vx-filtros .mud-input-control { max-width: 320px; }
.vx-filtros > * { flex: 0 1 auto; width: auto; }
.vx-filtros .mud-picker { min-width: 270px; }
.vx-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.vx-pill {
    border: 1px solid var(--lk-border-color);
    background: var(--lk-surface);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.84rem;
    cursor: pointer;
    color: var(--lk-text);
}
.vx-pill.ativo { background: #1F2A37; color: #fff; border-color: #1F2A37; }
.vx-pill .qtd { opacity: .7; margin-left: 4px; }

/* ── Etapas da OS ── */
.vx-etapas { display: flex; flex-direction: column; gap: 0; }
.vx-etapa { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--lk-border-color); align-items: start; }
.vx-etapa:last-child { border-bottom: none; }
.vx-etapa-num {
    width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 700; font-size: 0.85rem;
    background: #eef2f7; color: #475569;
}
.vx-etapa--concluida .vx-etapa-num { background: #16a34a; color: #fff; }
.vx-etapa--pulada .vx-etapa-num { background: #cbd5e1; color: #fff; }
.vx-etapa--andamento .vx-etapa-num { background: var(--lk-primary); color: #fff; box-shadow: 0 0 0 4px rgba(200, 16, 46, .15); }
.vx-etapa-nome { font-weight: 600; }
.vx-etapa-info { font-size: 0.82rem; color: var(--lk-text-muted); margin-top: 2px; }
.vx-etapa-acoes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.vx-progresso { height: 6px; background: #e5e7eb; border-radius: 99px; overflow: hidden; min-width: 70px; }
.vx-progresso > span { display: block; height: 100%; background: var(--lk-primary); border-radius: 99px; }

/* ── Fotos ── */
.vx-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.vx-foto { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; background: #f1f5f9; }
.vx-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vx-foto-tag { position: absolute; left: 6px; top: 6px; background: rgba(17, 24, 39, .75); color: #fff; font-size: 0.7rem; padding: 2px 8px; border-radius: 99px; }
.vx-foto-acoes { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 2px; background: rgba(255, 255, 255, .9); border-radius: 8px; }
.vx-foto-legenda { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); color: #fff; font-size: 0.75rem; }

/* ── Lista de OS do mecânico ── */
.vx-os-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.vx-os-card {
    background: var(--lk-surface);
    border: 1px solid var(--lk-border-color);
    border-radius: var(--lk-border-radius-lg);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.vx-os-card:hover { border-color: var(--lk-primary); }
.vx-os-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vx-os-card-num { font-weight: 800; font-size: 1.05rem; }
.vx-os-card-carro { font-weight: 600; }
.vx-os-card-meta { font-size: 0.82rem; color: var(--lk-text-muted); display: flex; justify-content: space-between; gap: 8px; }

/* ── Definições (rótulo/valor) ── */
.vx-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 0.9rem; margin: 0; }
.vx-dl dt { color: var(--lk-text-muted); }
.vx-dl dd { margin: 0; font-weight: 500; }

.vx-totais { display: flex; flex-direction: column; gap: 4px; font-size: 0.92rem; margin-top: 12px; }
.vx-totais div { display: flex; justify-content: space-between; gap: 12px; }
.vx-totais div > span:last-child { white-space: nowrap; }
.vx-totais .total { font-size: 1.15rem; font-weight: 800; border-top: 1px solid var(--lk-border-color); padding-top: 6px; margin-top: 4px; }

.vx-vazio { text-align: center; color: var(--lk-text-muted); padding: 32px 12px; }
.vx-vazio .mud-icon-root { font-size: 2.4rem; opacity: .4; margin-bottom: 8px; }

/* Barras simples para gráficos */
.vx-barras { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 8px; }
.vx-barra { flex: 1; background: var(--lk-primary); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; position: relative; }
.vx-barra:hover { opacity: 1; }
.vx-barras-legenda { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--lk-text-muted); margin-top: 6px; }
.vx-hbar { display: grid; grid-template-columns: minmax(120px, 1.2fr) 3fr auto; gap: 10px; align-items: center; font-size: 0.86rem; padding: 4px 0; }
.vx-hbar-track { height: 10px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.vx-hbar-track > span { display: block; height: 100%; background: #1F2A37; border-radius: 99px; }

.vx-aviso {
    border-radius: var(--lk-border-radius);
    padding: 10px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 0.88rem;
}
.vx-aviso--info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* ── Página pública de acompanhamento ── */
.vx-publico { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; display: flex; flex-direction: column; gap: 14px; }
.vx-publico-status { text-align: center; padding: 26px 18px; border-radius: 18px; background: #1F2A37; color: #fff; }
.vx-publico-status.pronta { background: linear-gradient(135deg, #15803d, #16a34a); }
.vx-publico-status h1 { margin: 6px 0 4px; font-size: 1.5rem; }
.vx-publico-status p { margin: 0; color: rgba(255, 255, 255, .8); }
.vx-ao-vivo { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .8); }
.vx-ao-vivo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: vx-pulso 1.6s infinite; }
@keyframes vx-pulso { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 100% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } }

h1:focus, h1:focus-visible { outline: none; }

/* Etapas no celular: botões embaixo do nome, que fica com a largura toda. */
@media (max-width: 600px) {
    .vx-etapa { grid-template-columns: 34px 1fr; }
    .vx-etapa-acoes { grid-column: 2; justify-content: flex-start; }
}
