/* ============================================
   CT-BRUX PRO - FROST ENGINEERING
   Identidade visual: técnica, clara, alto contraste
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@600;700;800&display=swap');

:root {
    --primary: #0066FF;
    --primary-dark: #0047B3;
    --primary-light: #4D94FF;
    --accent: #00B8D9;
    --navy: #0A2A4E;
    --success: #12915C;
    --warning: #B5690A;
    --danger: #C4293A;

    --bg-page: #EEF3F9;
    --bg-card: #FFFFFF;
    --bg-soft: #F3F7FC;
    --border: #D7E6F7;
    --border-strong: #B9D2EE;

    --text-primary: #0A2A4E;
    --text-body: #33465C;
    --text-muted: #6B7C90;
    --text-on-primary: #FFFFFF;

    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-card: 0 1px 3px rgba(10, 42, 78, 0.06), 0 8px 24px rgba(10, 42, 78, 0.06);
    --shadow-card-hover: 0 4px 10px rgba(10, 42, 78, 0.08), 0 16px 32px rgba(10, 42, 78, 0.10);
}

/* ============================================
   TEMA ESCURO ("Dark Grid") — ativado via classe
   no <body>, controlada pelo botão de tema.
   Como todo o CSS abaixo usa var(--...), basta
   redeclarar as variáveis aqui: nada mais precisa
   ser duplicado.
   ============================================ */
body.ct-max-theme-dark {
    --primary: #7B5CFF;
    --primary-dark: #6344E0;
    --primary-light: #9C85FF;
    --accent: #00E6A0;
    --navy: #12141A;
    --success: #00E6A0;
    --warning: #FFB020;
    --danger: #FF5C7A;

    --bg-page: #0F1115;
    --bg-card: #171A21;
    --bg-soft: #1B1F29;
    --border: #262B36;
    --border-strong: #333A48;

    --text-primary: #FFFFFF;
    --text-body: #C7CDD9;
    --text-muted: #8890A0;
    --text-on-primary: #FFFFFF;

    --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.35);
    --shadow-card-hover: 0 4px 10px rgba(0,0,0,0.35), 0 16px 32px rgba(0,0,0,0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ====================
   FUNDO DA PÁGINA
   ==================== */
body.ct-max-active {
    background: var(--bg-page);
}

.gelo-caindo { display: none; }

/* Container principal */
.ct-max-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-body);
}

/* ====================
   TÍTULOS
   ==================== */
.ct-max-title {
    font-family: 'Manrope', sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.ct-max-subtitle {
    text-align: center;
    color: var(--text-muted) !important;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
    letter-spacing: 0.4px;
}

/* ====================
   WIZARD (PASSOS)
   ==================== */
.ct-max-wizard {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: var(--bg-card);
    padding: 0.6rem;
    border-radius: 60px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

.ct-max-step {
    background: transparent;
    border-radius: 40px;
    padding: 0.75rem 1.4rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    border: 1px solid transparent;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex: 1;
    justify-content: center;
    color: var(--text-muted);
}

.ct-max-step:hover {
    background: var(--bg-soft);
    color: var(--text-primary);
}

.ct-max-step.active {
    background: var(--primary);
    color: var(--text-on-primary);
}

.ct-max-step.completed {
    color: var(--success);
}

.ct-max-step .step-number {
    width: 24px;
    height: 24px;
    background: var(--bg-soft);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
}

.ct-max-step.active .step-number {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.ct-max-step.completed .step-number {
    background: rgba(18, 145, 92, 0.12);
    color: var(--success);
}

/* ====================
   CARDS
   ==================== */
.ct-max-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease;
}

.ct-max-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.ct-max-card h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    color: var(--text-primary) !important;
}

.ct-max-card .card-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* ====================
   TABELAS (ETAPAS DO WIZARD)
   ==================== */
.ct-max-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.ct-max-table thead th {
    background: var(--bg-soft);
    padding: 12px 14px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    font-size: 0.78rem;
    color: var(--text-primary);
    text-align: center;
    border: none;
    letter-spacing: 0.3px;
}

.ct-max-table thead th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); text-align: left; }
.ct-max-table thead th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.ct-max-table tbody tr {
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.ct-max-table tbody tr:hover {
    background: var(--bg-soft);
}

.ct-max-table tbody td {
    padding: 12px;
    text-align: center;
    font-size: 0.88rem;
    border: none;
    color: var(--text-body);
}

.ct-max-table tbody td:first-child { text-align: left; font-weight: 600; color: var(--text-primary); }

/* ====================
   INPUTS / SELECTS
   ==================== */
.ct-max-input,
.ct-max-select {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 100%;
    max-width: 200px;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.ct-max-input:focus,
.ct-max-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
}

.ct-max-input:disabled,
.ct-max-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ====================
   RADIO BUTTONS (ESCOLHAS)
   ==================== */
.ct-max-radio-group {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin: 1rem 0;
    justify-content: center !important;
}

.ct-max-radio {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    border-radius: 40px;
    transition: all 0.2s ease;
    border: 1px solid var(--border-strong);
}

.ct-max-radio input { display: none; }
.ct-max-radio span { font-size: 0.88rem; font-weight: 600; color: var(--text-body); }

.ct-max-radio:hover {
    border-color: var(--primary);
    background: var(--bg-soft);
}

.ct-max-radio.active {
    background: var(--primary);
    border-color: var(--primary);
}

.ct-max-radio.active span {
    color: #fff;
}

/* ====================
   MAPA INTERATIVO
   ==================== */
.ct-max-mapa-container {
    text-align: center;
    margin: 2rem 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    border: 1px solid var(--border);
}

.ct-max-mapa-title {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.ct-max-mapa-svg {
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

.ct-max-mapa-svg path {
    transition: all 0.2s ease;
    stroke: var(--border-strong);
    stroke-width: 1.2;
    fill: var(--bg-soft);
}

.ct-max-mapa-svg path:hover {
    stroke: var(--primary);
    stroke-width: 2;
    fill: rgba(0, 102, 255, 0.08);
}

.ct-max-mapa-svg path.selected {
    stroke: var(--primary);
    stroke-width: 2.4;
    fill: rgba(0, 102, 255, 0.16);
}

.ct-max-mapa-aviso {
    transition: all 0.2s ease;
}

.ct-max-fator-display {
    background: var(--primary);
    border-radius: 40px;
    padding: 0.7rem 1.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 700;
    margin-top: 1.4rem;
    color: #fff;
}

.ct-max-fator-display span:first-child { font-size: 0.85rem; letter-spacing: 0.3px; }
.ct-max-fator-display span:last-child {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'Manrope', sans-serif;
}

/* ====================
   RESULTADO FINAL
   ==================== */
.ct-max-result-card,
.ct-max-result-card-container {
    background: var(--primary);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    text-align: center;
    margin: 1.5rem 0;
    color: #fff;
}

.ct-max-result-btu {
    font-family: 'Manrope', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: #fff;
}

.ct-max-result-btu span:first-child {
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
}

.ct-max-result-btu span:last-child {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
}

.ct-max-result-label {
    font-size: 0.95rem;
    margin-top: 0.6rem;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    font-weight: 600;
}

.ct-max-result-sub {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1.2rem;
    font-size: 0.88rem;
    flex-wrap: wrap;
}

.ct-max-result-sub span {
    background: rgba(255, 255, 255, 0.16);
    padding: 0.45rem 1.1rem;
    border-radius: 40px;
    font-weight: 600;
    color: #fff;
}

/* ====================
   TABELA DE RESULTADOS
   ==================== */
.ct-max-result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 1.5rem;
    background: transparent;
}

.ct-max-result-table thead th {
    background: var(--navy);
    color: #fff;
    padding: 12px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    font-size: 0.78rem;
    text-align: center;
}

.ct-max-result-table thead th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); text-align: left; }
.ct-max-result-table thead th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.ct-max-result-table tbody tr {
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.ct-max-result-table tbody tr:hover {
    background: var(--bg-soft);
}

.ct-max-result-table tbody td {
    padding: 11px 12px;
    font-size: 0.88rem;
    text-align: center;
    color: var(--text-body);
}

.ct-max-result-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
}

.ct-max-result-table .total-row,
.total-row {
    background: var(--bg-soft) !important;
}

.total-row td {
    color: var(--text-primary) !important;
    font-weight: 800;
    text-shadow: none;
}

.ct-max-result-table .total-row-final,
.total-row-final {
    background: var(--primary) !important;
}

.total-row-final td {
    color: #fff !important;
    font-weight: 800;
    text-shadow: none;
}

/* Campos de totais individuais (número em destaque no resultado final) */
#fator_geografico_valor,
#rf_subtotal_kcal,
#rf_subtotal_btu,
#rf_subtotal_tr,
#rf_total_kcal,
#rf_total_btu,
#rf_total_tr {
    color: var(--text-primary);
    text-shadow: none;
    font-weight: 800;
}

#fator_geografico_valor {
    color: var(--warning);
    font-size: 1.05rem;
}

.fator-nao-selecionado {
    color: var(--warning) !important;
    text-shadow: none;
}

.fator-selecionado {
    color: var(--success) !important;
    text-shadow: none;
}

.total-rito {
    background: var(--bg-soft);
    border: 1px solid var(--border);
}

.total-rito span {
    color: var(--primary);
    font-weight: 700;
}

.delete-cell {
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
    color: var(--text-muted);
}

.delete-cell:hover {
    color: var(--danger);
}

/* ====================
   BOTÕES
   ==================== */
.ct-max-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 40px;
    padding: 13px 28px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    letter-spacing: 0.2px;
}

.ct-max-btn:hover {
    border-color: var(--primary);
    background: var(--bg-soft);
}

.ct-max-btn-primary,
#btn-baixar-pdf-max,
#btn-abrir-form-pdf {
    background: var(--primary);
    border: none;
    color: #fff;
}

.ct-max-btn-primary:hover,
#btn-baixar-pdf-max:hover,
#btn-abrir-form-pdf:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.ct-max-btn-primary:active,
#btn-baixar-pdf-max:active,
#btn-abrir-form-pdf:active {
    transform: scale(0.97);
}

#btn-baixar-pdf-max {
    padding: 15px 36px;
    font-size: 1rem;
    font-weight: 800;
}

/* ====================
   FORMULÁRIO DE RELATÓRIO
   ==================== */
.ct-max-pdf-form {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    margin-top: 2rem;
    border: 1px solid var(--border);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.ct-max-pdf-form h3 {
    color: var(--text-primary) !important;
    text-shadow: none;
}

.ct-max-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
}

.ct-max-form-group {
    margin-bottom: 1rem;
}

.ct-max-form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.ct-max-form-group input,
.ct-max-form-group select,
.ct-max-form-group textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

.ct-max-form-group input:focus,
.ct-max-form-group select:focus,
.ct-max-form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
}

.ct-max-form-group textarea {
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    min-height: 110px;
}

/* ====================
   LOADING
   ==================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.ct-max-loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

/* ====================
   AUTOCOMPLETE DE CIDADES
   ==================== */
.ct-max-cidades-list {
    position: absolute;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
    margin-top: 5px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card-hover);
}

.ct-max-cidades-list div {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.15s;
    color: var(--text-body);
    font-size: 0.88rem;
}

.ct-max-cidades-list div:hover {
    background: var(--bg-soft);
}

.ct-max-nav-buttons {
    justify-content: center !important;
    gap: 1rem;
    display: flex;
}

/* ====================
   RESPONSIVIDADE
   ==================== */
@media (max-width: 768px) {
    .ct-max-wrapper { padding: 1.2rem 1rem 3rem; }
    .ct-max-title { font-size: 1.7rem; }

    .ct-max-wizard {
        flex-direction: column;
        border-radius: var(--radius-lg);
        gap: 0.4rem;
    }

    .ct-max-step {
        justify-content: center;
        padding: 0.65rem 1rem;
        font-size: 0.75rem;
    }

    .ct-max-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .ct-max-result-btu,
    .ct-max-result-btu span:first-child {
        font-size: 2.2rem;
    }

    .ct-max-input,
    .ct-max-select {
        max-width: 100%;
        min-width: 100px;
    }

    .ct-max-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ct-max-nav-buttons {
        flex-direction: column;
    }

    .ct-max-nav-buttons button {
        width: 100%;
    }

    .ct-max-fator-display span:last-child {
        font-size: 1.3rem;
    }

    .orientacao-select option {
        font-size: 0.7rem;
    }
}

/* ============================================
   CT-BRUX PRO - BUSCA DE CÁLCULOS
   ============================================ */
.ct-max-busca-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ---- Dashboard (topo da página de busca) ---- */
.ct-max-dashboard {
    margin-bottom: 1.6rem;
}

.ct-max-dash-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.ct-max-dash-tile {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ct-max-dash-tile:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.ct-max-dash-tile-icone {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.ct-max-dash-tile-numero {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--primary);
    line-height: 1;
}

.ct-max-dash-tile-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ct-max-dash-colunas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.ct-max-dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.2rem 1.4rem;
}

.ct-max-dash-card h4 {
    margin: 0 0 0.9rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.ct-max-dash-vazio {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.ct-max-dash-barra-linha {
    display: grid;
    grid-template-columns: 110px 1fr 28px;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
    font-size: 0.8rem;
}

.ct-max-dash-barra-label {
    color: var(--text-body);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ct-max-dash-barra-trilho {
    background: var(--bg-soft);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.ct-max-dash-barra-preenchida {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    height: 100%;
    border-radius: 999px;
}

.ct-max-dash-barra-valor {
    color: var(--text-muted);
    text-align: right;
}

.ct-max-dash-recentes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.ct-max-dash-recentes li {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-primary);
}

.ct-max-dash-recentes li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ct-max-dash-recente-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ct-max-busca-filtros {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    margin-bottom: 1.6rem;
    box-shadow: var(--shadow-card);
}

.filtros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
}

.filtros-grid input, .filtros-grid select {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 11px 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.filtros-grid input:focus, .filtros-grid select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
}

.filtros-acoes {
    margin-top: 1.4rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.ct-max-busca-tabela-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

#tabela-busca-body tr:hover { background: var(--bg-soft); }

#tabela-busca td, #tabela-busca th {
    padding: 11px;
    font-size: 0.86rem;
}

#tabela-busca th {
    background: var(--navy);
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-ver, .btn-pdf, .btn-deletar {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 30px;
    padding: 5px 13px;
    margin: 0 2px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-body);
    font-size: 0.82rem;
}

.btn-ver:hover, .btn-pdf:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-deletar:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* Paginação */
.ct-max-paginacao {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
}

.ct-max-paginacao button.btn-pagina {
    background: var(--primary);
    border: none;
    border-radius: 40px;
    padding: 8px 20px;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    color: white;
    cursor: pointer;
    margin: 0 6px;
    transition: background 0.2s ease;
}

.ct-max-paginacao button.btn-pagina:hover {
    background: var(--primary-dark);
}

.ct-max-paginacao button.btn-pagina:active {
    transform: scale(0.96);
}

.ct-max-paginacao span {
    color: var(--text-body);
    background: var(--bg-soft);
    padding: 6px 15px;
    border-radius: 30px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.82rem;
}

/* ====================
   BOTÃO DE TEMA (CLARO/ESCURO)
   ==================== */
.ct-max-theme-switch {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 0 auto 1.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 4px;
    width: fit-content;
    box-shadow: var(--shadow-card);
}

.ct-max-theme-btn {
    border: none;
    background: transparent;
    border-radius: 30px;
    padding: 8px 16px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.ct-max-theme-btn:hover {
    color: var(--text-primary);
}

.ct-max-theme-btn.active {
    background: var(--primary);
    color: #fff;
}

@media (max-width: 480px) {
    .ct-max-theme-btn { padding: 8px 12px; font-size: 0.72rem; }
}
