/* ============================================================
 * Padrões Visuais 2.0 — Estilos principais
 * ============================================================ */

:root {
    --pv-color-primary:    #a7348b;
    --pv-color-primary-dk: #7e2469;
    --pv-color-primary-lt: #823e9f;
    --pv-color-text:       #2c2c2c;
    --pv-color-text-th:    #ffffff;
    --pv-color-text-soft:  #666;
    --pv-color-text-soft-th:  #0dff00;
    --pv-color-text-muted: #999;
    --pv-color-border:     #d8d8d8;
    --pv-color-border-lt:  #ececec;
    --pv-color-bg-soft:    #fafafa;
    --pv-color-bg-row:     #fff;
    --pv-color-bg-row-alt: #fbfbfd;

    --pv-radius:           6px;
    --pv-shadow-soft:      0 1px 3px rgba(0,0,0,.06);
    --pv-shadow-modal:     0 12px 32px rgba(0,0,0,.18);

    /* Tiers de coloração da LINHA (verde p/ presença, vermelho p/ ausência) */
    --pv-presenca-1: #e8f5e9;
    --pv-presenca-2: #c8e6c9;
    --pv-presenca-3: #a5d6a7;
    --pv-falha-1:    #ffebee;
    --pv-falha-2:    #ffcdd2;
    --pv-falha-3:    #ef9a9a;
    --pv-indeciso:   #fff8c4;

    /* Cores dos GRUPOS de coluna */
    --pv-group-momento-bg:      #9c4dcc;
    --pv-group-apontamentos-bg: #d97706;  /* laranja terroso */
    --pv-group-presenca-bg:     #6aab6d;
    --pv-group-ausencia-bg:     #c66161;
    --pv-group-duplas-bg:       #7a8cc6;  /* azul cinza */
    --pv-group-indices-bg:      #4d8fcc;
}

/* Globais do PV escopados para os containers das tabs (não vazam p/ a página). */
.pv-padroes-root *, .pv-superduplas-root * { box-sizing: border-box; }
.pv-padroes-root, .pv-superduplas-root {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--pv-color-text);
    line-height: 1.45;
}

.pv-container {
    max-width: 1650px;
    margin: 0 auto;
    padding: 20px 16px 60px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #d9d9d9;
}

.pv-titulo {
    color: var(--pv-color-primary);
    font-size: 1.5rem;
    margin: 0 0 18px;
}

.pv-section { margin-top: 28px; }
.pv-section-titulo {
    font-size: 1.1rem;
    color: var(--pv-color-text);
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--pv-color-border-lt);
}

/* ============================================================
 * Botões
 * ============================================================ */
.pv-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--pv-color-border);
    background: #fff;
    color: var(--pv-color-text);
    padding: 6px 12px;
    border-radius: var(--pv-radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.pv-btn:hover { background: var(--pv-color-bg-soft); }
.pv-btn:focus-visible {
    outline: 2px solid var(--pv-color-primary);
    outline-offset: 2px;
}
.pv-btn-primary {
    background: var(--pv-color-primary);
    color: #fff;
    border-color: var(--pv-color-primary);
}
.pv-btn-primary:hover { background: var(--pv-color-primary-dk); }

.pv-btn-preset {
    background: var(--pv-color-primary-lt);
    border-color: transparent;
    font-weight: 500;
    color: var(--pv-color-text-th);
}
.pv-btn-preset:hover { background: #a91de5; }
.pv-btn-preset-active {
    background: var(--pv-color-primary-dk);
    box-shadow: 0 0 0 2px rgba(167, 52, 139, .3);
}

.pv-btn-icon {
    padding: 6px 10px;
    min-width: 36px;
    justify-content: center;
}

.pv-btn-danger {
    color: #c62828;
    border-color: #ffcdd2;
}
.pv-btn-danger:hover { background: #ffebee; }

/* ============================================================
 * Controles superiores
 * ============================================================ */
.pv-controls {
    background: var(--pv-color-bg-soft);
    border: 1px solid var(--pv-color-border-lt);
    border-radius: var(--pv-radius);
    padding: 12px 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    justify-content: space-between;
}
.pv-controls-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-items: baseline;
    gap: 10px;
    width: 100%;
}
.pv-controls-label { font-weight: 600; color: var(--pv-color-text-soft); }
.pv-controls-input {
    width: 110px;
    padding: 6px 8px;
    border: 1px solid var(--pv-color-border);
    border-radius: var(--pv-radius);
    font-size: 0.95rem;
}
.pv-controls-select {
    padding: 6px 8px;
    border: 1px solid var(--pv-color-border);
    border-radius: var(--pv-radius);
    font-size: 0.95rem;
    background: #fff;
    cursor: pointer;
}
.pv-controls-sep { color: var(--pv-color-text-soft); }
.pv-controls-info {
    color: var(--pv-color-text-soft);
    font-size: 0.9rem;
    margin-left: auto;
    margin-right: 8px;
}

/* ============================================================
 * Combobox de concursos
 * ============================================================ */
.pv-combobox {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--pv-color-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(165, 81, 188, .12), 0 1px 2px rgba(0, 0, 0, .08);
    transition: border-color .15s, box-shadow .15s;
}
.pv-combobox:focus-within,
.pv-combobox.pv-combobox-open {
    border-color: var(--pv-color-primary);
    box-shadow: 0 0 0 3px rgba(167, 52, 139, .18), 0 2px 4px rgba(165, 81, 188, .18);
}
.pv-combobox-input {
    appearance: textfield;
    -moz-appearance: textfield;
    border: none !important;
    background: transparent;
    padding: 7px 12px !important;
    width: 96px !important;
    font-size: 1rem;
    font-weight: 600;
    color: var(--pv-color-text);
    outline: none;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.pv-combobox-input::-webkit-outer-spin-button,
.pv-combobox-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.pv-combobox-toggle {
    border: none;
    border-left: 1px solid var(--pv-color-border-lt);
    background: transparent;
    color: var(--pv-color-text-soft);
    width: 32px;
    cursor: pointer;
    transition: background .15s, color .15s;
    font-size: 0.95rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pv-combobox-toggle:hover {
    background: var(--pv-color-primary-lt);
    color: var(--pv-color-primary);
}
.pv-combobox.pv-combobox-open .pv-combobox-toggle {
    color: var(--pv-color-primary);
    transform: rotate(180deg);
}
.pv-combobox-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 140px;
    width: max-content;
    max-width: 240px;
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--pv-color-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18), 0 2px 6px rgba(165, 81, 188, .15);
    z-index: 1000;
    font-size: 0.95rem;
}
.pv-combobox-panel[hidden] { display: none !important; }
.pv-combobox-item {
    padding: 10px 16px;
    cursor: pointer;
    color: var(--pv-color-text);
    font-variant-numeric: tabular-nums;
    text-align: center;
    border-bottom: 1px solid var(--pv-color-border-lt);
    transition: background .15s, color .15s;
    font-weight: 500;
}
.pv-combobox-item:last-child { border-bottom: none; }
.pv-combobox-item:hover,
.pv-combobox-item-active { background: #ececec; }
.pv-combobox-item-current {
    background: var(--pv-color-primary);
    color: #fff;
    font-weight: 700;
}
.pv-combobox-item-current.pv-combobox-item-active,
.pv-combobox-item-current:hover { background: var(--pv-color-primary-dk); color: #fff; }
.pv-combobox-empty {
    padding: 14px;
    color: var(--pv-color-text-muted);
    font-size: 0.88rem;
    text-align: center;
}
.pv-combobox-panel.pv-combobox-panel-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(360px, 92vw);
    max-width: 92vw;
    max-height: 80vh;
    z-index: 2000;
}
.pv-combobox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1999;
}
.pv-combobox-backdrop[hidden] { display: none; }
.pv-combobox-modal-header {
    position: sticky;
    top: 0;
    background: var(--pv-color-primary-lt);
    color: #fff;
    padding: 10px 14px;
    border-bottom: 1px solid var(--pv-color-border-lt);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
}
.pv-combobox-modal-close {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 2px 8px;
}

/* ============================================================
 * Tabela Principal
 * ============================================================ */
.pv-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--pv-color-border-lt);
    border-radius: var(--pv-radius);
    background: #fff;
    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
}
.pv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.pv-table thead th {
    color: var(--pv-color-text-th);
    text-align: center;
    padding: 8px 6px;
    border: 1px solid #e5d4ea;
    font-weight: 600;
    white-space: normal;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--pv-color-primary-lt);
}

/* Cores por grupo (cabeçalho linha 1) */
.pv-th-group-momento      { background: var(--pv-group-momento-bg) !important;      }
.pv-th-group-apontamentos { background: var(--pv-group-apontamentos-bg) !important; }
.pv-th-group-presenca     { background: var(--pv-group-presenca-bg) !important;     }
.pv-th-group-ausencia     { background: var(--pv-group-ausencia-bg) !important;     }
.pv-th-group-duplas       { background: var(--pv-group-duplas-bg) !important;       }
.pv-th-group-indices      { background: var(--pv-group-indices-bg) !important;      }

.pv-th-fixed-dez {
    background: var(--pv-color-primary) !important;
    min-width: 25px;
}
.pv-th-group-sub {
    font-weight: 400;
    color: var(--pv-color-text-soft-th);
    font-size: 0.85em;
    display: block;
    margin-top: 2px;
}
.pv-th-col { cursor: pointer; user-select: none; }
.pv-th-col:hover { filter: brightness(1.1); }
.pv-th-sorted { box-shadow: inset 0 -3px 0 #fff; }
.pv-th-sort-arrow { font-size: 0.8em; opacity: 0.85; margin-left: 2px; }
.pv-th-label-short { display: none; }

.pv-table tbody td {
    padding: 6px 4px;
    text-align: center;
    border: 1px solid #e6e6e6;
    background: var(--pv-color-bg-row);
    line-height: 1.2;
}
.pv-table tbody tr:nth-child(even) td { background: var(--pv-color-bg-row-alt); }
.pv-table tbody tr:hover { outline: 2px solid #ddd; }

.pv-td-dezena {
    font-weight: 700;
    color: var(--pv-color-primary);
    background: #fafafa !important;
    min-width: 15px;
    font-variant-numeric: tabular-nums;
}

.pv-td-score {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.pv-td-score-geral { font-size: 1.05em; }
.pv-score-geral-positivo { color: #1b5e20; }
.pv-score-geral-negativo { color: #b71c1c; }

/* Emojis em células */
.pv-emoji {
    display: inline-block;
    font-size: 1.05em;
    line-height: 1;
    vertical-align: middle;
}
.pv-emoji-presente  { /* ✅ verde nativo */ }
.pv-emoji-ausente   { /* ❌ vermelho nativo */ }
.pv-emoji-indeciso  { /* ⚠️ amarelo nativo */ }
.pv-emoji-neutro    { color: var(--pv-color-text-muted); }
.pv-pat-no          { opacity: 0.45; }
.pv-pat-detect      { font-size: 1.1em; }

/* Coluna Atual — emoji + badge de sequência consecutiva */
.pv-atual-wrap {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1;
}
.pv-seq-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    padding: 1px 5px;
    border-radius: 999px;
    border: 1px solid transparent;
    line-height: 1.2;
}
.pv-seq-badge-pres {
    color: #1b5e20;
    background: #e8f5e9;
    border-color: #a5d6a7;
}
.pv-seq-badge-aus {
    color: #b71c1c;
    background: #ffebee;
    border-color: #ef9a9a;
}

/* Nível de confiança */
.pv-conf {
    white-space: nowrap;
}

@media (max-width: 480px) {
    .pv-seq-badge { font-size: 0.62rem; padding: 1px 3px; }
    .pv-atual-wrap { gap: 2px; }
}

/* Nível de confiança */
.pv-conf {
    display: inline-block;
    font-size: 0.95em;
    letter-spacing: 1px;
    white-space: nowrap;
}
.pv-conf-presenca { /* verde nativo do ✔️ */ }
.pv-conf-ausencia { filter: hue-rotate(257deg); }
.pv-conf-neutro {
    color: var(--pv-color-text-muted);
    font-size: 1.2em;
    line-height: 1;
}

/* ============================================================
 * Coloração de linhas pela projeção
 * ============================================================ */
.pv-row-presenca-tier-1 td { background: var(--pv-presenca-1) !important; }
.pv-row-presenca-tier-2 td { background: var(--pv-presenca-2) !important; }
.pv-row-presenca-tier-3 td { background: var(--pv-presenca-3) !important; }
.pv-row-ausencia-tier-1 td { background: var(--pv-falha-1) !important; }
.pv-row-ausencia-tier-2 td { background: var(--pv-falha-2) !important; }
.pv-row-ausencia-tier-3 td { background: var(--pv-falha-3) !important; }
.pv-row-indeciso td        { background: var(--pv-indeciso) !important; }

/* A célula "Dez" sempre mantém o destaque magenta */
.pv-row-presenca-tier-1 .pv-td-dezena,
.pv-row-presenca-tier-2 .pv-td-dezena,
.pv-row-presenca-tier-3 .pv-td-dezena,
.pv-row-ausencia-tier-1 .pv-td-dezena,
.pv-row-ausencia-tier-2 .pv-td-dezena,
.pv-row-ausencia-tier-3 .pv-td-dezena,
.pv-row-indeciso        .pv-td-dezena { background: #fafafa !important; }

/* ============================================================
 * Tabela de Duplas (secundária)
 * ============================================================ */
.pv-section-duplas { margin-top: 28px; }
.pv-duplas-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.pv-duplas-toggle {
    background: #fff;
    border: 1px solid var(--pv-color-border);
    color: var(--pv-color-text);
    padding: 6px 14px;
    border-radius: var(--pv-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .15s, border-color .15s, color .15s;
}
.pv-duplas-toggle:hover { background: var(--pv-color-bg-soft); }
.pv-duplas-toggle-active {
    background: var(--pv-color-primary);
    border-color: var(--pv-color-primary);
    color: #fff;
}
.pv-duplas-toggle-active:hover { background: var(--pv-color-primary-dk); }

.pv-duplas-wrapper {
    overflow-x: auto;
    border: 1px solid var(--pv-color-border-lt);
    border-radius: var(--pv-radius);
    background: #fff;
    box-shadow: var(--pv-shadow-soft);
}

.pv-table-duplas thead th {
    background: var(--pv-color-primary-lt);
    color: #fff;
    padding: 7px 6px;
    text-align: center;
    border: 1px solid #e5d4ea;
    font-weight: 600;
}
.pv-table-duplas tbody td {
    padding: 5px 8px;
    border: 1px solid #e6e6e6;
    text-align: center;
}
.pv-duplas-rank {
    font-weight: 700;
    color: var(--pv-color-primary);
    width: 40px;
}
.pv-duplas-pair { font-weight: 600; }
.pv-duplas-dezena {
    display: inline-block;
    padding: 2px 6px;
    background: #f3eaf7;
    border-radius: 4px;
    color: var(--pv-color-primary-dk);
}
.pv-duplas-sep { color: var(--pv-color-text-muted); }
.pv-duplas-num,
.pv-duplas-met { font-variant-numeric: tabular-nums; }
.pv-duplas-met { font-weight: 600; }

.pv-duplas-row-desenc td { background: rgba(255, 248, 196, 0.35); }
.pv-duplas-row-pres   td { background: rgba(200, 230, 201, 0.4); }
.pv-duplas-row-aus    td { background: rgba(255, 205, 210, 0.4); }
.pv-duplas-vazio {
    text-align: center;
    color: var(--pv-color-text-muted);
    padding: 14px;
}
.pv-duplas-legenda {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--pv-color-text-soft);
    font-style: italic;
}

/* ============================================================
 * Volante (5x5)
 * ============================================================ */
.pv-section-volante[hidden] { display: none; }
.pv-volante-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    background: #ebebeb;
    border: 1px solid #cbcbcb;
    border-radius: var(--pv-radius);
    padding: 12px;
    max-width: 320px;
    margin: 0 auto;
    box-shadow: rgb(167 52 139) 0px 1px 3px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}
.pv-volante-cell {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--pv-radius);
    border: 1px solid var(--pv-color-border-lt);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .12s, box-shadow .12s;
}
.pv-volante-cell:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
}
.pv-volante-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pv-color-text);
    font-variant-numeric: tabular-nums;
}
.pv-volante-val {
    position: absolute;
    bottom: 1px;
    right: 3px;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--pv-color-text-soft);
    font-variant-numeric: tabular-nums;
}
.pv-volante-emoji {
    position: absolute;
    top: 1px;
    left: 3px;
    font-size: 0.75rem;
}

.pv-volante-cell-neutro          { background: #fff; }
.pv-volante-cell-pres-tier-1     { background: var(--pv-presenca-1); border-color: #c8e6c9; }
.pv-volante-cell-pres-tier-2     { background: var(--pv-presenca-2); border-color: #a5d6a7; }
.pv-volante-cell-pres-tier-3     { background: var(--pv-presenca-3); border-color: #81c784; }
.pv-volante-cell-aus-tier-1      { background: var(--pv-falha-1);    border-color: #ffcdd2; }
.pv-volante-cell-aus-tier-2      { background: var(--pv-falha-2);    border-color: #ef9a9a; }
.pv-volante-cell-aus-tier-3      { background: var(--pv-falha-3);    border-color: #e57373; }
.pv-volante-cell-indeciso        { background: var(--pv-indeciso);   border-color: #f0db7d; }

.pv-volante-legenda {
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--pv-color-text-soft);
    text-align: center;
    line-height: 1.5;
}

/* ============================================================
 * Bloco de Informações (vídeo, descrição da tabela)
 * ============================================================ */
.pv-details {
    background: #fff;
    border: 1px solid var(--pv-color-border-lt);
    border-radius: var(--pv-radius);
    padding: 10px 14px;
    margin-bottom: 12px;
}
.pv-details-summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--pv-color-primary);
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pv-details-badge {
    background: var(--pv-color-primary-lt);
    color: #fff;
    font-size: 0.75em;
    padding: 1px 8px;
    border-radius: 999px;
    font-weight: 500;
    margin-left: auto;
}
.pv-details-body { padding-top: 10px; color: var(--pv-color-text); }
.pv-details-body p { margin: 0 0 10px; }
.pv-dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 14px;
    margin: 0;
}
.pv-dl dt { font-weight: 600; color: var(--pv-color-primary-dk); }
.pv-dl dd { margin: 0; }

.pv-video-bloco {
    border: 1px solid var(--pv-color-border-lt);
    border-radius: var(--pv-radius);
    padding: 10px 12px;
    margin-bottom: 14px;
    background: var(--pv-color-bg-soft);
}
.pv-video-titulo {
    margin: 0 0 8px;
    color: var(--pv-color-primary-dk);
    font-size: 1.05rem;
}
.pv-video-container {
    position: relative;
    width: 100%;
    margin: 8px auto;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.pv-video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
.pv-video-descricao {
    margin: 8px 0;
    color: var(--pv-color-text);
    line-height: 1.5;
}
.pv-video-link {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--pv-color-text-soft);
}
.pv-video-link a {
    color: var(--pv-color-primary);
    font-weight: 600;
    text-decoration: none;
}
.pv-video-link a:hover { text-decoration: underline; }

/* ============================================================
 * Modal de configurações
 * ============================================================ */
.pv-modal {
    padding: 0;
    border: none;
    border-radius: var(--pv-radius);
    background: transparent;
    max-width: min(720px, 96vw);
    width: 96vw;
}
.pv-modal::backdrop { background: rgba(0, 0, 0, .45); }

.pv-modal-content {
    background: #fff;
    border-radius: var(--pv-radius);
    box-shadow: var(--pv-shadow-modal);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.pv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--pv-color-border-lt);
}
.pv-modal-titulo {
    margin: 0;
    color: var(--pv-color-primary);
    font-size: 1.1rem;
}
.pv-modal-body {
    padding: 14px 18px;
    overflow-y: auto;
    flex: 1;
}
.pv-modal-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--pv-color-border-lt);
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.pv-modal-section { margin-bottom: 18px; }
.pv-modal-section-titulo {
    font-size: 0.95rem;
    color: var(--pv-color-text-soft);
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.pv-modal-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}


/* Texto de ajuda dentro de modais — parágrafo simples (sem flex column,
   que estava quebrando cada palavra em uma linha em telas pequenas). */
.pv-modal-help {
    margin: 0 0 10px;
    color: var(--pv-color-text-soft);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Lista de colunas — visibilidade + drag-and-drop */
.pv-modal-cols-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--pv-color-border-lt);
    border-radius: var(--pv-radius);
    background: var(--pv-color-bg-soft);
    padding: 6px;
}
.pv-modal-col-item {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid var(--pv-color-border-lt);
    border-radius: var(--pv-radius);
    cursor: grab;
    transition: background .15s, transform .12s, box-shadow .15s;
}
.pv-modal-col-item:hover { background: #fafafa; }
.pv-modal-col-item.pv-dragging {
    opacity: 0.5;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
}
.pv-modal-col-item.pv-drop-target {
    box-shadow: 0 0 0 2px var(--pv-color-primary);
    background: #fafafa;
}
.pv-modal-col-handle {
    color: var(--pv-color-text-muted);
    cursor: grab;
    user-select: none;
}
.pv-modal-col-chk { margin: 0; cursor: pointer; }
.pv-modal-col-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    flex: 1;
}
.pv-modal-col-group-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.pv-group-badge-momento  { background: var(--pv-group-momento-bg); }
.pv-group-badge-presenca { background: var(--pv-group-presenca-bg); }
.pv-group-badge-ausencia { background: var(--pv-group-ausencia-bg); }
.pv-group-badge-indices  { background: var(--pv-group-indices-bg); }
.pv-modal-col-name { font-size: 0.9rem; }
.pv-modal-col-arrows {
    display: flex;
    gap: 2px;
}
.pv-modal-col-arrow {
    background: transparent;
    border: 1px solid var(--pv-color-border-lt);
    color: var(--pv-color-text-soft);
    border-radius: var(--pv-radius);
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s;
}
.pv-modal-col-arrow:hover {
    background: var(--pv-color-primary-lt);
    color: #fff;
    border-color: var(--pv-color-primary-lt);
}

.pv-modal-actions-row { margin-top: 10px; }
.pv-modal-custom-presets {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.pv-modal-custom-preset {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pv-modal-empty {
    color: var(--pv-color-text-muted);
    font-size: 0.88rem;
    margin: 0;
}
.pv-modal-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

/* ============================================================
 * Cabeçalho — Linha do ícone 👁️ (ajuda) + nº de concurso
 * ============================================================ */
.pv-th-help {
    padding: 2px 4px !important;
    background: rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.pv-help-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 4px;
    line-height: 1;
    border-radius: 4px;
    transition: background .15s, transform .12s;
    opacity: 0.75;
}
.pv-help-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
    transform: scale(1.15);
}

.pv-th-concurso {
    display: block;
    margin-top: 2px;
    font-weight: 600;
    font-size: 0.78em;
    background: rgba(0, 0, 0, 0.18);
    color: #fff;
    padding: 1px 4px;
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* ============================================================
 * Colunas auxiliares de índice (apontamentos)
 * ============================================================ */
.pv-td-idx {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 0.88em;
}
.pv-idx-tier-0 { color: var(--pv-color-text-muted); }
.pv-idx-tier-1 { color: #7e6209; }
.pv-idx-tier-2 { color: #ad6a02; font-weight: 700; }
.pv-idx-tier-3 { color: #d97706; font-weight: 700; }

.pv-group-apontamentos { background: rgba(217, 119, 6, 0.06); }
.pv-group-duplas       { background: rgba(122, 140, 198, 0.06); }

/* ============================================================
 * Tabela de Duplas — D1/D2 separadas e coloração
 * ============================================================ */
.pv-duplas-cell-dezena {
    display: table-cell;
    padding: 4px 6px !important;
    text-align: center;
    border: 1px solid #e6e6e6;
    font-weight: 600;

}
.pv-duplas-dezena-num {
    display: inline-block;

    padding: 2px 5px;
    background: rgba(255,255,255,0.7);
    border-radius: 4px;
    margin-right: 4px;
    font-variant-numeric: tabular-nums;
}
.pv-duplas-dezena-state {
    font-size: 0.88em;
}
/* Coloração da célula de dezena conforme projeção individual */
.pv-proj-presence  { background: var(--pv-presenca-2) !important; color: #1b5e20; }
.pv-proj-absence   { background: var(--pv-falha-2)    !important; color: #b71c1c; }
.pv-proj-undecided { background: var(--pv-indeciso)   !important; color: #7d6800; }
.pv-proj-neutral   { background: #fff !important; color: var(--pv-color-text); }

.pv-duplas-conf { font-weight: 600; }
.pv-duplas-met  { font-variant-numeric: tabular-nums; font-weight: 600; }
.pv-duplas-rank { color: var(--pv-color-primary); font-weight: 700; }
.pv-duplas-num  { font-variant-numeric: tabular-nums; }

/* Tier de fundo da LINHA de duplas conforme intensidade da métrica.
   Mapeamento (alinhado com a tabela de dezenas):
     - desencontradas → AMARELO (indecisão/desencontro)
     - presenca / sincronizadas_pres → VERDE
     - ausencia  / sincronizadas_aus → VERMELHO */
.pv-duplas-row-desenc-tier-1 td { background: #fff8e1 !important; }   /* amarelo claro  */
.pv-duplas-row-desenc-tier-2 td { background: #ffe082 !important; }   /* amarelo médio  */
.pv-duplas-row-desenc-tier-3 td { background: #ffd54f !important; }   /* amarelo forte  */
.pv-duplas-row-pres-tier-1   td { background: var(--pv-presenca-1) !important; }
.pv-duplas-row-pres-tier-2   td { background: var(--pv-presenca-2) !important; }
.pv-duplas-row-pres-tier-3   td { background: var(--pv-presenca-3) !important; }
.pv-duplas-row-aus-tier-1    td { background: var(--pv-falha-1) !important; }
.pv-duplas-row-aus-tier-2    td { background: var(--pv-falha-2) !important; }
.pv-duplas-row-aus-tier-3    td { background: var(--pv-falha-3) !important; }

/* As células com cor de projeção D1/D2 mantêm prioridade visual */
.pv-duplas-row-desenc-tier-1 .pv-proj-presence,
.pv-duplas-row-desenc-tier-2 .pv-proj-presence,
.pv-duplas-row-desenc-tier-3 .pv-proj-presence { background: var(--pv-presenca-2) !important; }
.pv-duplas-row-desenc-tier-1 .pv-proj-absence,
.pv-duplas-row-desenc-tier-2 .pv-proj-absence,
.pv-duplas-row-desenc-tier-3 .pv-proj-absence  { background: var(--pv-falha-2)    !important; }

/* ============================================================
 * Controles de Duplas (intervalo independente)
 * ============================================================ */
.pv-duplas-controles {
    background: var(--pv-color-bg-soft);
    border: 1px solid var(--pv-color-border-lt);
    border-radius: var(--pv-radius);
    padding: 12px 14px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}
.pv-duplas-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    justify-content: center;
}
.pv-duplas-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}
.pv-controls-secao {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1;
}

/* ============================================================
 * Paginação (rodapé de duplas)
 * ============================================================ */
.pv-duplas-rodape {
    margin-top: 8px;
}
.pv-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--pv-color-bg-soft);
    border: 1px solid var(--pv-color-border-lt);
    border-radius: var(--pv-radius);
}
.pv-pagination-resumo {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    color: var(--pv-color-text-soft);
    font-size: 0.88rem;
}
.pv-pagination-size-label { display: flex; align-items: center; gap: 6px; }
.pv-pagination-size {
    padding: 4px 6px;
    border: 1px solid var(--pv-color-border);
    border-radius: var(--pv-radius);
    background: #fff;
    font-size: 0.88rem;
    cursor: pointer;
}
.pv-pagination-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.pv-pagination-btn {
    background: #fff;
    border: 1px solid var(--pv-color-border);
    color: var(--pv-color-text);
    padding: 4px 10px;
    border-radius: var(--pv-radius);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    min-width: 30px;
}
.pv-pagination-btn:hover:not(:disabled):not(.pv-pagination-btn-active) {
    background: var(--pv-color-bg-soft);
}
.pv-pagination-btn-active {
    background: var(--pv-color-primary);
    color: #fff;
    border-color: var(--pv-color-primary);
}
.pv-pagination-btn:disabled {
    color: var(--pv-color-text-muted);
    cursor: not-allowed;
    background: var(--pv-color-bg-soft);
}
.pv-pagination-ellipsis {
    color: var(--pv-color-text-muted);
    padding: 0 4px;
}

/* ============================================================
 * Modal de Help (👁️)
 * ============================================================ */
.pv-modal-help .pv-modal-content { max-width: 520px; }
.pv-modal-help-tit-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.pv-modal-help-subtitulo {
    margin: 0;
    color: var(--pv-color-text-soft);
    font-size: 0.85rem;
    font-weight: 500;
    font-style: italic;
    line-height: 1.3;
}
.pv-modal-help-subtitulo[hidden] { display: none; }
.pv-modal-help-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    font-size: 0.78em;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.pv-modal-help-desc {
    line-height: 1.55;
    color: var(--pv-color-text);
    margin: 0;
}

/* Cores adicionais para badges no modal de help */
.pv-group-badge-apontamentos          { background: var(--pv-group-apontamentos-bg); }
.pv-group-badge-duplas                { background: var(--pv-group-duplas-bg); }
.pv-group-badge-duplas_identificacao  { background: var(--pv-color-primary); }
.pv-group-badge-duplas_atual          { background: var(--pv-group-momento-bg); }
.pv-group-badge-duplas_tipo           { background: var(--pv-group-apontamentos-bg); }
.pv-group-badge-duplas_projecao       { background: var(--pv-group-presenca-bg); }
.pv-group-badge-duplas_estatisticas   { background: var(--pv-color-primary-lt); }

/* ============================================================
 * <dialog> nativo — centralização garantida.
 *
 * O browser já centraliza dialogs abertos via showModal(), mas alguns
 * temas WordPress acabam interferindo. Forçamos posicionamento via
 * margin: auto + inset, que funciona com a especificação atual e não
 * gruda o modal no topo em mobile.
 * ============================================================ */
dialog.pv-modal {
    position: fixed;
    inset: 0;
    margin: auto;
    border: none;
    background: transparent;
}
dialog.pv-modal[open] {
    display: flex;
    flex-direction: column;
    align-items: center;
}
dialog.pv-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
}
/* Fallback para browsers sem suporte ao <dialog> */
dialog.pv-modal:not([open]) { display: none; }

/* ============================================================
 * Toolbars das duplas — abas e ações em linha única quando cabe
 * ============================================================ */
.pv-duplas-toolbar-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.pv-duplas-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
.pv-duplas-toolbar-acoes {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.pv-duplas-toggle {
    background: #fff;
    border: 1px solid var(--pv-color-border);
    color: var(--pv-color-text);
    padding: 5px 10px;
    border-radius: var(--pv-radius);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.pv-duplas-toggle:hover { background: var(--pv-color-bg-soft); }
.pv-duplas-toggle-active {
    background: var(--pv-color-primary);
    border-color: var(--pv-color-primary);
    color: #fff;
}
.pv-duplas-toggle-active:hover { background: var(--pv-color-primary-dk); }
.pv-duplas-toggle-label-short { display: none; }

.pv-btn-toolbar {
    background: #fff;
    border: 1px solid var(--pv-color-border);
    color: var(--pv-color-text);
    padding: 5px 10px;
    border-radius: var(--pv-radius);
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.pv-btn-toolbar:hover { background: var(--pv-color-bg-soft); border-color: var(--pv-color-primary-lt); }
.pv-btn-toolbar-badge {
    display: inline-block;
    background: var(--pv-color-primary-lt);
    color: #fff;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ============================================================
 * Tabela de Duplas — REDESIGN 2.0
 * Cabeçalho com SEÇÕES (Atual / Tipo / Projeção / Estatísticas)
 * ============================================================ */

/* --- Seções (linha 1 do cabeçalho) --- */
.pv-duplas-th-secao {
    text-align: center;
    color: #fff;
    font-weight: 700;
    padding: 6px 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    line-height: 1.1;
}
.pv-duplas-secao-titulo {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}
.pv-duplas-secao-sub {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.74em;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.22);
    color: #fff;
    padding: 1px 8px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* Cores por seção — APENAS no cabeçalho (TH).
   Não aplicar a TDs do corpo: as células de dados ganham cor pela
   classe da LINHA (pv-duplas-row-*) ou pela classe da CÉLULA
   (pv-duplas-proj-fundo-*). */
.pv-table-duplas thead .pv-duplas-secao-identificacao { background: var(--pv-color-primary)         !important; }
.pv-table-duplas thead .pv-duplas-secao-atual         { background: var(--pv-group-momento-bg)      !important; }
.pv-table-duplas thead .pv-duplas-secao-tipo          { background: var(--pv-group-apontamentos-bg) !important; }
.pv-table-duplas thead .pv-duplas-secao-projecao      { background: var(--pv-group-presenca-bg)     !important; }
.pv-table-duplas thead .pv-duplas-secao-estatisticas  { background: var(--pv-color-primary-lt)      !important; }

/* Cor da fonte das células TD da seção "Atual" — sobrescreve a herança
   do cabeçalho (que era roxo) e o fundo vem da classe da linha. */
.pv-duplas-td.pv-duplas-secao-atual,
.pv-duplas-td.pv-duplas-secao-tipo,
.pv-duplas-td.pv-duplas-secao-estatisticas,
.pv-duplas-td.pv-duplas-secao-identificacao { color: var(--pv-color-text); }

/* Rótulo "N" no cabeçalho — centralizado e legível em qualquer rowSpan */
.pv-duplas-th-label-n {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1;
}
.pv-table-duplas thead .pv-duplas-secao-identificacao {
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
}
.pv-table-duplas thead .pv-duplas-secao-identificacao:hover { filter: brightness(1.08); }

/* --- Subcolunas (linha 2 do cabeçalho) --- */
.pv-duplas-th {
    cursor: pointer;
    user-select: none;
    position: relative;
    font-weight: 600;
    padding: 6px 4px !important;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
}
.pv-duplas-th:hover { filter: brightness(1.08); }
.pv-duplas-th-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.pv-duplas-th-label {
    display: inline-block;
}

/* Linha de ÍCONES no cabeçalho (separada da linha clicável de ordenação).
   Reproduz o padrão da tabela de dezenas: célula própria, sem cursor de
   ordenar — evita o usuário clicar no ícone sem querer. */
.pv-duplas-th-icones {
    padding: 2px 4px !important;
    background: rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    text-align: center;
    line-height: 1;
}
.pv-duplas-col-help-btn,
.pv-duplas-col-filtro-btn {
    background: #ffffff;
    border: none;
    color: #000000;
    cursor: pointer;
    padding: 4px 4px;
    margin: 5px 2px;
    line-height: 1;
    font-size: 1rem;
    border-radius: 4px;
    transition: background .15s, transform .12s;
    opacity: 0.85;
}
.pv-duplas-col-help-btn { font-size: 1rem; }
.pv-duplas-col-filtro-btn { font-size: 0.85em; color: #000000; }
.pv-duplas-col-help-btn:hover,
.pv-duplas-col-filtro-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
    transform: scale(1.15);
}
.pv-duplas-col-filtro-btn-ativo {
    background: #ffd54f !important;
    color: #5d4037 !important;
    box-shadow: 0 0 0 2px rgba(255, 213, 79, 0.4);
    opacity: 1;
}

/* --- Células do corpo --- */
.pv-duplas-td-rank        { font-weight: 700; color: var(--pv-color-primary); width: 40px; }
.pv-duplas-td-pres_juntas { font-variant-numeric: tabular-nums; }
.pv-duplas-td-aus_juntas  { font-variant-numeric: tabular-nums; }
.pv-duplas-td-taxa_pres,
.pv-duplas-td-taxa_aus,
.pv-duplas-td-taxa_sync,
.pv-duplas-td-taxa_desenc { font-variant-numeric: tabular-nums; font-weight: 600; }
.pv-duplas-met-vazio      { color: var(--pv-color-text-muted); font-weight: 400; }

/* Coluna Atual (D1/D2) — dezena + emoji + badge de sequência */
.pv-duplas-cell-atual {
    text-align: center;
    padding: 4px 6px !important;

}
.pv-duplas-cell-atual .pv-duplas-dezena-num {
    display: inline-block;
    min-width: 25px;
    padding: 2px 5px;
    background: #fff;
    border: 1px solid var(--pv-color-border-lt);
    border-radius: 4px;
    margin-right: 5px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--pv-color-primary-dk);
}
.pv-duplas-cell-atual .pv-atual-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    line-height: 1;
}

/* Coluna Tipo (projeção combinada) */
.pv-duplas-td-tipo_dupla {
    text-align: center;
    font-size: 1.25em;
    vertical-align: middle;
    padding: 4px 6px !important;
    min-width: 52px;
}
.pv-duplas-tipo-emoji { line-height: 1; }
.pv-duplas-tipo-presenca    { background: var(--pv-presenca-1) !important; }
.pv-duplas-tipo-ausencia    { background: var(--pv-falha-1)    !important; }
.pv-duplas-tipo-desencontro { background: var(--pv-indeciso)   !important; }
.pv-duplas-tipo-neutro      { background: #f7f7f7 !important; opacity: 0.85; }

/* Coluna Projeção (D1/D2) — dezena + emoji + cor de fundo (categoria) */
.pv-duplas-cell-proj {
    text-align: center;
    padding: 4px 6px !important;
    min-width: 60px;
    border: 1px solid #e6e6e6;
    font-weight: 600;
}
.pv-duplas-cell-proj .pv-duplas-dezena-num {
    display: inline-block;
    min-width: 28px;
    padding: 2px 5px;
    background: rgba(255,255,255,0.85);
    border-radius: 4px;
    margin-right: 4px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

/* Coloração de fundo da PROJEÇÃO (segue o TIPO da DUPLA) */
.pv-duplas-proj-fundo-presenca    { background: var(--pv-presenca-2) !important; color: #1b5e20; }
.pv-duplas-proj-fundo-ausencia    { background: var(--pv-falha-2)    !important; color: #b71c1c; }
.pv-duplas-proj-fundo-desencontro { background: var(--pv-indeciso)   !important; color: #7d6800; }
.pv-duplas-proj-fundo-neutro      { background: #fff !important; }

/* Quando a linha tem coloração de tier, as células das seções "Tipo" e
 * "Projeção" mantêm prioridade visual */
tr[class*="pv-duplas-row-"] .pv-duplas-tipo-presenca,
tr[class*="pv-duplas-row-"] .pv-duplas-proj-fundo-presenca   { background: var(--pv-presenca-2) !important; }
tr[class*="pv-duplas-row-"] .pv-duplas-tipo-ausencia,
tr[class*="pv-duplas-row-"] .pv-duplas-proj-fundo-ausencia   { background: var(--pv-falha-2)    !important; }
tr[class*="pv-duplas-row-"] .pv-duplas-tipo-desencontro,
tr[class*="pv-duplas-row-"] .pv-duplas-proj-fundo-desencontro{ background: var(--pv-indeciso)   !important; }

/* Aviso de intervalo curto / auto-relaxação */
.pv-duplas-aviso {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #6d4c41;
    padding: 8px 12px;
    border-radius: var(--pv-radius);
    margin-bottom: 8px;
    font-size: 0.88rem;
    line-height: 1.4;
}
.pv-duplas-aviso[hidden] { display: none; }
.pv-duplas-aviso .fa-exclamation-triangle { color: #f57f17; margin-right: 6px; }

/* Botão Limpar Análise (danger leve na toolbar) */
.pv-btn-toolbar-danger {
    border-color: #ffcdd2 !important;
    color: #c62828 !important;
}
.pv-btn-toolbar-danger:hover {
    background: #ffebee !important;
    border-color: #ef9a9a !important;
}

/* Badge da auto-relaxação ativa */
.pv-btn-toolbar-badge-auto {
    background: #ff8f00 !important;
    color: #fff !important;
}

/* Slider customizado do filtro */
.pv-filtro-presets { margin-bottom: 12px; }
.pv-filtro-slider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.pv-filtro-slider input[type="range"] {
    flex: 1;
    accent-color: var(--pv-color-primary);
}
.pv-filtro-slider-val {
    min-width: 50px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--pv-color-primary-dk);
    text-align: right;
}

/* ============================================================
 * Modal de filtro POR COLUNA (DuplasColFilter)
 * ============================================================ */
.pv-modal-col-filter .pv-modal-content { max-width: 520px; }
.pv-modal-col-filter .pv-modal-footer {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.pv-modal-col-filter-acoes-esq {
    flex: 1 1 100%;
    min-width: 0;
}
.pv-modal-col-filter-acoes-dir {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
}
.pv-modal-switch-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--pv-color-text-soft);
    cursor: pointer;
}
.pv-modal-switch-inline[hidden] { display: none; }
.pv-modal-switch-inline > span { line-height: 1.3; }
@media (max-width: 480px) {
    .pv-modal-col-filter-acoes-dir .pv-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

.pv-cf-emoji-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}
@media (max-width: 480px) {
    .pv-cf-emoji-grid { grid-template-columns: 1fr; }
}
.pv-cf-emoji-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--pv-color-bg-soft);
    border: 1px solid var(--pv-color-border-lt);
    border-radius: var(--pv-radius);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.pv-cf-emoji-item:hover {
    background: #f3eaf7;
    border-color: var(--pv-color-primary-lt);
}
.pv-cf-emoji-item input[type="checkbox"] { margin: 0; cursor: pointer; }
.pv-cf-emoji-em {
    font-size: 1.4rem;
    line-height: 1;
}
.pv-cf-emoji-label {
    font-size: 0.92rem;
    color: var(--pv-color-text);
    font-weight: 500;
}

.pv-cf-range-wrap { margin-top: 8px; }
.pv-cf-range-linha { margin-bottom: 12px; }
.pv-cf-range-lbl {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--pv-color-text);
    font-weight: 500;
}
.pv-cf-range-lbl input[type="range"] {
    flex: 1;
    accent-color: var(--pv-color-primary);
}
.pv-cf-atalhos { margin-top: 4px; }

/* Modal de colunas — radio de escopo */
.pv-modal-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 4px 0;
}
.pv-modal-radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Switches verticais (modal config avançada) */
.pv-modal-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 0;
    font-size: 0.92rem;
    color: var(--pv-color-text);
}
.pv-modal-switch input[type="checkbox"] {
    accent-color: var(--pv-color-primary);  
}


