/* ===================================================
   EFICÁCIA — MÓDULO MONOPOSTES / OUTDOOR (F1)
   Estilos do módulo de gestão de locais, estruturas
   e faces publicitárias.
   Reutiliza os design tokens de style.css (:root):
   --primary-*, --neutral-*, --success/warning/error/info-*,
   --radius-*, --shadow-*, --transition-*, --text-*, --font-family.
   TODAS as classes usam o prefixo 'mp-' (anti-colisão).
   Breakpoints (iguais a style.css): 1024px, 768px, 480px.
   ================================================= */

/* ---------- Wrapper / layout do módulo ---------- */
.mp-module {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mp-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.mp-page-header .mp-header-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.mp-page-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--neutral-900);
    line-height: 1.1;
}

.mp-page-subtitle {
    font-size: var(--text-sm);
    color: var(--neutral-500);
    font-weight: 500;
}

.mp-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.mp-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mp-section-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--neutral-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-section-title svg {
    width: 18px;
    height: 18px;
    color: var(--neutral-400);
}

/* ===================================================
   1. KPI CARDS (dashboard do módulo)
   ================================================= */
.mp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.mp-kpi-card {
    background: var(--neutral-0);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
}

.mp-kpi-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* faixa de cor à esquerda (acento) */
.mp-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-500);
    opacity: 0.85;
}
.mp-kpi-card.mp-kpi-card--blue::before { background: var(--info-500); }
.mp-kpi-card.mp-kpi-card--green::before { background: var(--success-500); }
.mp-kpi-card.mp-kpi-card--orange::before { background: var(--warning-500); }
.mp-kpi-card.mp-kpi-card--purple::before { background: #8b5cf6; }
.mp-kpi-card.mp-kpi-card--red::before { background: var(--error-500); }

.mp-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: var(--primary-50);
    color: var(--primary-500);
}
.mp-kpi-icon svg {
    width: 22px;
    height: 22px;
}
.mp-kpi-icon.mp-kpi-icon--blue { background: var(--info-50); color: var(--info-500); }
.mp-kpi-icon.mp-kpi-icon--green { background: var(--success-50); color: var(--success-500); }
.mp-kpi-icon.mp-kpi-icon--orange { background: var(--warning-50); color: var(--warning-500); }
.mp-kpi-icon.mp-kpi-icon--purple { background: #f3e8ff; color: #8b5cf6; }
.mp-kpi-icon.mp-kpi-icon--red { background: var(--error-50); color: var(--error-500); }

.mp-kpi-value {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--neutral-900);
    letter-spacing: -0.025em;
    line-height: 1;
}

.mp-kpi-value small {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--neutral-400);
    margin-left: 2px;
}

.mp-kpi-label {
    font-size: var(--text-sm);
    color: var(--neutral-500);
    margin-top: 6px;
    font-weight: 500;
}

.mp-kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    font-weight: 600;
    margin-top: 10px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--neutral-100);
    color: var(--neutral-500);
}
.mp-kpi-trend svg { width: 14px; height: 14px; }
.mp-kpi-trend.mp-kpi-trend--up { background: var(--success-50); color: var(--success-600); }
.mp-kpi-trend.mp-kpi-trend--down { background: var(--error-50); color: var(--error-600); }

/* ===================================================
   2. BARRA DE FILTROS
   ================================================= */
.mp-filters {
    background: var(--neutral-0);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mp-filters-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.mp-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 160px;
    min-width: 0;
}

.mp-filter-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mp-input,
.mp-select {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: var(--font-family);
    color: var(--neutral-700);
    background: var(--neutral-0);
    outline: none;
    transition: var(--transition-fast);
}
.mp-input:focus,
.mp-select:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(218, 10, 13, 0.10);
}
.mp-input::placeholder { color: var(--neutral-400); }
.mp-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
    cursor: pointer;
}

/* Campo de pesquisa com ícone */
.mp-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 2 1 220px;
    min-width: 0;
}
.mp-search svg {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--neutral-400);
    pointer-events: none;
}
.mp-search .mp-input {
    padding-left: 38px;
}

/* Ações da barra de filtros (botões) */
.mp-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Chips de filtro rápido (por tipo/estado) */
.mp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--neutral-200);
    background: var(--neutral-0);
    color: var(--neutral-600);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-fast);
    user-select: none;
}
.mp-chip:hover {
    border-color: var(--neutral-300);
    background: var(--neutral-50);
}
.mp-chip.active {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: var(--neutral-0);
}
.mp-chip .mp-chip-count {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: var(--radius-full);
    background: var(--neutral-100);
    color: var(--neutral-500);
}
.mp-chip.active .mp-chip-count {
    background: rgba(255, 255, 255, 0.22);
    color: var(--neutral-0);
}

/* ===================================================
   3. TOOLBAR DE RESULTADOS + TOGGLE DE VISTA
   ================================================= */
.mp-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.mp-results-count {
    font-size: var(--text-sm);
    color: var(--neutral-500);
    font-weight: 500;
}
.mp-results-count strong {
    color: var(--neutral-800);
    font-weight: 700;
}

.mp-view-toggle {
    display: inline-flex;
    padding: 3px;
    background: var(--neutral-100);
    border-radius: var(--radius-md);
    gap: 2px;
}
.mp-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--neutral-500);
    cursor: pointer;
    border: none;
    background: transparent;
    transition: var(--transition-fast);
}
.mp-view-btn svg { width: 16px; height: 16px; }
.mp-view-btn:hover { color: var(--neutral-700); }
.mp-view-btn.active {
    background: var(--neutral-0);
    color: var(--primary-600);
    box-shadow: var(--shadow-xs);
}

/* ===================================================
   4. TABELA DE FACES
   ================================================= */
.mp-table-wrap {
    background: var(--neutral-0);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mp-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
}

.mp-table thead th {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 12px 16px;
    text-align: left;
    background: var(--neutral-50);
    border-bottom: 1px solid var(--neutral-200);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.mp-table thead th.mp-th-num { text-align: right; }
.mp-table thead th.mp-th-center { text-align: center; }

.mp-table tbody tr {
    transition: var(--transition-fast);
    cursor: pointer;
}
.mp-table tbody tr:hover {
    background: var(--neutral-50);
}
.mp-table tbody tr:last-child td {
    border-bottom: none;
}

.mp-table tbody td {
    padding: 13px 16px;
    font-size: var(--text-sm);
    color: var(--neutral-700);
    border-bottom: 1px solid var(--neutral-100);
    white-space: nowrap;
    vertical-align: middle;
}
.mp-table td.mp-td-num { text-align: right; font-variant-numeric: tabular-nums; }
.mp-table td.mp-td-center { text-align: center; }

/* Célula de referência (código da face) — monoespaçada, destaque */
.mp-table-ref,
.mp-face-ref {
    font-family: 'SFMono-Regular', ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-weight: 700;
    color: var(--neutral-900);
    font-size: var(--text-sm);
    letter-spacing: -0.01em;
}

.mp-table-primary {
    font-weight: 600;
    color: var(--neutral-900);
}
.mp-table-muted {
    color: var(--neutral-400);
    font-size: var(--text-xs);
}

/* Ações de linha */
.mp-row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    opacity: 0;
    transition: var(--transition-fast);
}
.mp-table tbody tr:hover .mp-row-actions { opacity: 1; }

.mp-action-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--neutral-400);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}
.mp-action-btn svg { width: 16px; height: 16px; }
.mp-action-btn:hover {
    background: var(--neutral-100);
    color: var(--neutral-700);
}
.mp-action-btn.mp-action-btn--danger:hover {
    background: var(--error-50);
    color: var(--error-600);
}

/* ===================================================
   5. CARDS DE FACES (vista em grelha)
   ================================================= */
.mp-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.mp-face-card {
    background: var(--neutral-0);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: var(--transition-base);
}
.mp-face-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--neutral-300);
}

.mp-face-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 16px 12px;
}
.mp-face-card-header .mp-face-ref {
    font-size: var(--text-base);
}

/* Miniatura proporcional da face (largura x altura) */
.mp-face-ratio {
    width: 52px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--neutral-100), var(--neutral-200));
    border: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-400);
}
.mp-face-ratio svg { width: 18px; height: 18px; }

.mp-face-card-body {
    padding: 0 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* Grelha de metadados (chave/valor) dentro do card */
.mp-face-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 14px;
}
.mp-face-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.mp-face-meta-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--neutral-400);
}
.mp-face-meta-value {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--neutral-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dimensões grandes em destaque */
.mp-face-dims {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-weight: 700;
    color: var(--neutral-900);
}
.mp-face-dims .mp-face-dims-unit {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--neutral-400);
}
.mp-face-area {
    font-size: var(--text-xs);
    color: var(--neutral-500);
    font-weight: 600;
}

.mp-face-card-footer {
    margin-top: auto;
    padding: 12px 16px;
    border-top: 1px solid var(--neutral-100);
    background: var(--neutral-50);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* ===================================================
   6. BADGES DE TIPO (estrutura)
   Monoposte / Monoface / Empena / Digital / Outdoor
   ================================================= */
.mp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid transparent;
    letter-spacing: 0.1px;
}
.mp-badge svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.mp-badge.mp-badge--monoposte {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #c7d2fe;
}
.mp-badge.mp-badge--monoface {
    background: #ccfbf1;
    color: #115e59;
    border-color: #99f6e4;
}
.mp-badge.mp-badge--empena {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fed7aa;
}
.mp-badge.mp-badge--digital {
    background: #f3e8ff;
    color: #6b21a8;
    border-color: #e9d5ff;
}
.mp-badge.mp-badge--outdoor {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}
/* fallback tipo desconhecido */
.mp-badge.mp-badge--outro {
    background: var(--neutral-100);
    color: var(--neutral-600);
    border-color: var(--neutral-200);
}

/* ===================================================
   7. BADGES DE ESTADO (com ponto indicador)
   Estruturas: Operacional / Manutenção / Avariada / Desativada
   Faces: Ativa / Livre / Ocupada / Reservada / Inativa
   ================================================= */
.mp-estado {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
    background: var(--neutral-100);
    color: var(--neutral-600);
}
.mp-estado::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--neutral-400);
}

/* verdes — operacional / ativa */
.mp-estado.mp-estado--operacional,
.mp-estado.mp-estado--ativa {
    background: var(--success-50);
    color: var(--success-700);
    border-color: var(--success-200);
}
.mp-estado.mp-estado--operacional::before,
.mp-estado.mp-estado--ativa::before { background: var(--success-500); }

/* azul — livre / disponível */
.mp-estado.mp-estado--livre {
    background: var(--info-50);
    color: #1e40af;
    border-color: #bfdbfe;
}
.mp-estado.mp-estado--livre::before { background: var(--info-500); }

/* âmbar — ocupada / manutenção */
.mp-estado.mp-estado--ocupada,
.mp-estado.mp-estado--manutencao {
    background: var(--warning-50);
    color: var(--warning-600);
    border-color: #fde68a;
}
.mp-estado.mp-estado--ocupada::before,
.mp-estado.mp-estado--manutencao::before { background: var(--warning-500); }

/* violeta — reservada */
.mp-estado.mp-estado--reservada {
    background: #f3e8ff;
    color: #6b21a8;
    border-color: #e9d5ff;
}
.mp-estado.mp-estado--reservada::before { background: #8b5cf6; }

/* vermelho — avariada */
.mp-estado.mp-estado--avariada {
    background: var(--error-50);
    color: var(--error-700);
    border-color: var(--error-200);
}
.mp-estado.mp-estado--avariada::before { background: var(--error-500); }

/* cinza — desativada / inativa */
.mp-estado.mp-estado--desativada,
.mp-estado.mp-estado--inativa {
    background: var(--neutral-100);
    color: var(--neutral-500);
    border-color: var(--neutral-200);
}
.mp-estado.mp-estado--desativada::before,
.mp-estado.mp-estado--inativa::before { background: var(--neutral-400); }

/* Flags pequenas (iluminação / energia) */
.mp-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: var(--neutral-100);
    color: var(--neutral-500);
    border: 1px solid var(--neutral-200);
}
.mp-flag svg { width: 12px; height: 12px; }
.mp-flag.mp-flag--on {
    background: var(--warning-50);
    color: var(--warning-600);
    border-color: #fde68a;
}
.mp-flag.mp-flag--energia {
    background: var(--info-50);
    color: var(--info-500);
    border-color: #bfdbfe;
}

/* ===================================================
   8. MODAL DE DETALHE + TABS
   (assenta sobre .modal-overlay/.modal-content de style.css)
   ================================================= */
.mp-detail-head {
    padding: 20px 24px 0;
    border-bottom: 1px solid var(--neutral-200);
}
.mp-detail-head-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
}
.mp-detail-titles {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.mp-detail-code {
    font-family: 'SFMono-Regular', ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--primary-600);
    letter-spacing: 0.5px;
}
.mp-detail-title {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--neutral-900);
    letter-spacing: -0.015em;
    line-height: 1.2;
}
.mp-detail-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--neutral-500);
}
.mp-detail-subtitle svg { width: 15px; height: 15px; color: var(--neutral-400); }

.mp-detail-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 16px;
}

/* Tabs do modal (estilo underline, como .tabs em style.css) */
.mp-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mp-tabs::-webkit-scrollbar { display: none; }

.mp-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 16px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--neutral-500);
    cursor: pointer;
    border: none;
    background: transparent;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    transition: var(--transition-fast);
}
.mp-tab svg { width: 16px; height: 16px; }
.mp-tab:hover { color: var(--neutral-700); }
.mp-tab.active {
    color: var(--primary-600);
    border-bottom-color: var(--primary-600);
}
.mp-tab-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: var(--radius-full);
    background: var(--neutral-100);
    color: var(--neutral-500);
}
.mp-tab.active .mp-tab-badge {
    background: var(--primary-50);
    color: var(--primary-600);
}

/* Painéis das tabs */
.mp-tab-panel { display: none; }
.mp-tab-panel.active {
    display: block;
    animation: mpFadeIn var(--transition-base);
}
@keyframes mpFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Blocos de secção dentro do detalhe */
.mp-detail-section {
    margin-bottom: 24px;
}
.mp-detail-section:last-child { margin-bottom: 0; }
.mp-detail-section-title {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--neutral-400);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.mp-detail-section-title svg { width: 15px; height: 15px; }

/* Grelha chave/valor */
.mp-field-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
}
.mp-field-grid.mp-field-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}
.mp-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.mp-field-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--neutral-400);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.mp-field-value {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--neutral-800);
    word-break: break-word;
}
.mp-field-value.mp-field-value--empty {
    color: var(--neutral-300);
    font-weight: 500;
    font-style: italic;
}

/* Mini-métricas destacadas no modal */
.mp-detail-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}
.mp-detail-metric {
    background: var(--neutral-50);
    border: 1px solid var(--neutral-100);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    text-align: center;
}
.mp-detail-metric-value {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--neutral-900);
    line-height: 1;
    letter-spacing: -0.02em;
}
.mp-detail-metric-label {
    font-size: var(--text-xs);
    color: var(--neutral-500);
    margin-top: 5px;
    font-weight: 500;
}

/* Bloco de GPS / localização */
.mp-gps {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--neutral-700);
}
.mp-gps svg { width: 18px; height: 18px; color: var(--primary-500); flex-shrink: 0; }
.mp-gps-coords {
    font-family: 'SFMono-Regular', ui-monospace, Consolas, monospace;
    font-weight: 600;
    color: var(--neutral-800);
}
.mp-gps-link {
    margin-left: auto;
    font-weight: 600;
    color: var(--primary-600);
    white-space: nowrap;
}
.mp-gps-link:hover { text-decoration: underline; }

/* ===================================================
   9. ESTADOS VAZIOS
   ================================================= */
.mp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 20px;
    text-align: center;
}
.mp-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--neutral-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.mp-empty-icon svg {
    width: 30px;
    height: 30px;
    color: var(--neutral-400);
}
.mp-empty-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--neutral-700);
    margin-bottom: 6px;
}
.mp-empty-text {
    font-size: var(--text-sm);
    color: var(--neutral-400);
    max-width: 340px;
    line-height: 1.5;
    margin-bottom: 18px;
}
.mp-empty-text:last-child { margin-bottom: 0; }

/* ===================================================
   10. SKELETON / LOADING (leve)
   ================================================= */
.mp-skeleton {
    background: linear-gradient(90deg, var(--neutral-100) 25%, var(--neutral-200) 37%, var(--neutral-100) 63%);
    background-size: 400% 100%;
    border-radius: var(--radius-sm);
    animation: mpShimmer 1.4s ease infinite;
}
@keyframes mpShimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}
.mp-skeleton-row {
    height: 48px;
    margin-bottom: 8px;
    border-radius: var(--radius-md);
}

/* ===================================================
   11. RESPONSIVO — TABLET (≤1024px)
   ================================================= */
@media (max-width: 1024px) {
    .mp-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .mp-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .mp-field-grid.mp-field-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .mp-detail-head-top {
        flex-wrap: wrap;
    }
}

/* ===================================================
   12. RESPONSIVO — MOBILE (≤768px)
   ================================================= */
@media (max-width: 768px) {
    .mp-module { gap: 18px; }

    .mp-page-header {
        align-items: flex-start;
    }
    .mp-page-title { font-size: var(--text-xl); }
    .mp-header-actions {
        width: 100%;
    }
    .mp-header-actions .btn,
    .mp-header-actions .mp-btn {
        flex: 1;
        justify-content: center;
    }

    /* KPIs: 2 colunas, mais compactos */
    .mp-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .mp-kpi-card { padding: 16px; }
    .mp-kpi-icon {
        width: 38px;
        height: 38px;
        margin-bottom: 12px;
    }
    .mp-kpi-icon svg { width: 19px; height: 19px; }
    .mp-kpi-value { font-size: var(--text-2xl); }

    /* Filtros empilham em largura total */
    .mp-filters-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .mp-filter-group,
    .mp-search {
        flex: 1 1 auto;
        width: 100%;
    }
    .mp-filter-actions {
        width: 100%;
    }
    .mp-filter-actions > * {
        flex: 1;
        justify-content: center;
    }
    .mp-chips {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }
    .mp-chips::-webkit-scrollbar { display: none; }

    /* Cards de faces: 1 coluna */
    .mp-cards-grid {
        grid-template-columns: 1fr;
    }

    /* A tabela mantém scroll horizontal por defeito.
       Alternativa: usar .mp-table--stack para virar cartões. */
    .mp-table { min-width: 620px; }

    /* --- Variante opcional: tabela → cartões empilhados ---
       requer que cada <td> tenha atributo data-label="..." --- */
    .mp-table--stack { min-width: 0; }
    .mp-table--stack thead { display: none; }
    .mp-table--stack tbody tr {
        display: block;
        padding: 12px 14px;
        margin: 0 10px 10px;
        border: 1px solid var(--neutral-200);
        border-radius: var(--radius-md);
        background: var(--neutral-0);
    }
    .mp-table--stack tbody tr:first-child { margin-top: 10px; }
    .mp-table--stack tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 7px 0;
        border-bottom: 1px dashed var(--neutral-100);
        white-space: normal;
        text-align: right;
    }
    .mp-table--stack tbody td:last-child { border-bottom: none; }
    .mp-table--stack tbody td::before {
        content: attr(data-label);
        font-size: var(--text-xs);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: var(--neutral-400);
        text-align: left;
        flex-shrink: 0;
    }
    .mp-table--stack .mp-row-actions {
        opacity: 1;
        justify-content: flex-end;
    }

    /* Modal de detalhe: quase ecrã inteiro */
    .mp-detail-head { padding: 16px 18px 0; }
    .mp-detail-title { font-size: var(--text-lg); }
    .mp-detail-head-top {
        flex-direction: column;
        gap: 12px;
    }
    .mp-tab { padding: 10px 12px; font-size: var(--text-xs); }
    .mp-field-grid,
    .mp-field-grid.mp-field-grid--3 {
        grid-template-columns: 1fr;
        gap: 12px 16px;
    }
    .mp-detail-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    .mp-gps {
        flex-wrap: wrap;
    }
    .mp-gps-link { margin-left: 0; }
}

/* ===================================================
   13. RESPONSIVO — MOBILE PEQUENO (≤480px)
   ================================================= */
@media (max-width: 480px) {
    .mp-kpi-value { font-size: var(--text-xl); }
    .mp-kpi-label { font-size: var(--text-xs); }
    .mp-face-meta {
        grid-template-columns: 1fr 1fr;
    }
    .mp-detail-metrics {
        grid-template-columns: 1fr;
    }
    .mp-empty { padding: 40px 16px; }
    .mp-empty-icon { width: 54px; height: 54px; }
}

/* ===================================================
   14. DESKTOP LARGO (≥1440px) — mais colunas de KPI
   ================================================= */
@media (min-width: 1440px) {
    .mp-kpi-grid {
        gap: 22px;
    }
    .mp-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}
