﻿/* ===================================================================
   ARQUIVO CSS COMUM - TEMA "CORPORATE CLEAN" (VERSÃO FINAL E COMPLETA)
   =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* --- Reset Básico --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

/* --- PALETA DE CORES --- */
:root {
    --bg-page: #f1f5f9;
    --bg-card: #ffffff;
    --bg-panel: #f8fafc;
    --border: #e2e8f0;
    --border-soft: #cbd5e1;
    --text: #0f172a;
    --text-soft: #475569;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
}

/* --- ESTILOS GERAIS --- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-page);
    color: var(--text);
}

.container {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px 40px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.07);
}

h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    text-align: left;
}

h3 {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-soft);
    margin: 0 0 24px 0;
    text-align: left;
}

label {
    font-weight: 600;
    display: block;
    margin: 20px 0 8px;
    color: var(--text-soft);
    font-size: 14px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* === LAYOUT ADMIN (SIDEBAR FIXA) === */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: #0f172a;
    border-right: 1px solid var(--border);
    padding: 20px 16px;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 32px 40px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    padding: 10px 8px;
    margin-bottom: 24px;
}

    .sidebar-logo i {
        color: var(--success);
    }

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    margin-bottom: 8px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .sidebar-nav a:hover {
        background-color: #1e293b;
        color: #fff;
    }

    .sidebar-nav a.active {
        background-color: var(--primary);
        color: #fff;
        font-weight: 600;
    }

    .sidebar-nav a i {
        width: 20px;
        text-align: center;
        font-size: 18px;
    }

.sidebar-user-info {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

    .sidebar-user-info .user-details {
        display: flex;
        flex-direction: column;
        line-height: 1.4;
        color: #9ca3af;
        overflow: hidden;
        min-width: 0;
    }

        .sidebar-user-info .user-details strong {
            color: #e5e7eb;
            font-weight: 600;
            white-space: normal;
            word-break: break-all;
        }

    .sidebar-user-info .logoff-link {
        color: #9ca3af;
        font-size: 20px;
        padding: 8px;
        border-radius: 8px;
        text-decoration: none;
        transition: all 0.2s ease;
    }

        .sidebar-user-info .logoff-link:hover {
            color: #fff;
            background-color: var(--danger);
        }

/* === FORMULÁRIOS === */
.form-control, input, select, textarea {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg-page);
    color: var(--text);
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: all .2s ease-in-out;
}

select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' 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 15px center;
}

    .form-control:focus, input:focus, select:focus, textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

.campo-travado {
    background-color: var(--bg-page) !important;
    opacity: 0.7;
    cursor: not-allowed;
}

/* === BOTÕES === */
.btn-padrao {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease;
}

    .btn-padrao:hover {
        background-color: var(--primary-hover);
    }

.btn-secondary, .btn-secundario {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-soft);
    padding: 10px 18px;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
}

    .btn-secondary:hover, .btn-secundario:hover {
        background-color: var(--bg-panel);
        color: var(--text);
        border-color: var(--border-soft);
    }

/* === TABELA INOVADORA (LINHAS FLUTUANTES) - AGORA PARA TODAS AS TABELAS === */
.rep-table, .defect-table {
    border-collapse: separate;
    border-spacing: 0 8px; /* Espaço vertical entre as "linhas-card" */
    margin-top: 16px;
    width: 100%;
}

    .rep-table thead, .defect-table thead {
        display: table-header-group;
    }

    .rep-table th, .defect-table th {
        background: none;
        text-transform: uppercase;
        font-size: 12px;
        color: var(--text-soft);
        text-align: left;
        padding: 10px 20px;
        border-bottom: 2px solid var(--border);
    }

    .rep-table tbody, .defect-table tbody {
        background-color: transparent;
    }

        .rep-table tbody tr, .defect-table tbody tr {
            background-color: var(--bg-card);
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            border: 1px solid var(--border);
            border-radius: 10px;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

            .rep-table tbody tr:hover, .defect-table tbody tr:hover {
                transform: translateY(-2px);
                box-shadow: 0 7px 14px 0 rgba(0, 0, 0, 0.05);
            }

    .rep-table td, .defect-table td {
        color: var(--text);
        text-align: left;
        padding: 16px 20px;
        border: none;
        vertical-align: middle;
    }

        .rep-table td:first-child, .defect-table td:first-child {
            border-top-left-radius: 10px;
            border-bottom-left-radius: 10px;
        }

        .rep-table td:last-child, .defect-table td:last-child {
            border-top-right-radius: 10px;
            border-bottom-right-radius: 10px;
        }

        .rep-table td.actions-cell, .defect-table td.actions-cell {
            text-align: right;
            width: auto;
            white-space: nowrap;
        }

.actions-group {
    display: inline-flex;
    gap: 8px;
}

.btn-action {
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-action i {
        font-size: 14px;
    }

.btn-edit:hover {
    background-color: var(--primary);
    color: #fff;
}

.btn-del:hover {
    background-color: var(--danger);
    color: #fff;
}

.btn-cnpj:hover {
    background-color: var(--success);
    color: #fff;
}

.status-ativo {
    color: var(--success);
    font-weight: 600;
}

.status-inativo {
    color: var(--danger);
    font-weight: 600;
}

/* --- RESPONSIVIDADE PARA TABELAS (NOVO BLOCO UNIFICADO) --- */
@media (max-width: 768px) {
    .rep-table thead, .defect-table thead {
        display: none;
    }

    .rep-table tr, .defect-table tr {
        display: block;
        margin-bottom: 20px;
    }

    .rep-table td, .defect-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 10px 15px;
        border-bottom: 1px solid var(--border);
    }

        .rep-table td:before, .defect-table td:before {
            content: attr(data-label);
            font-weight: bold;
            color: var(--text-soft);
            text-align: left;
            margin-right: 15px;
        }

        .rep-table td.actions-cell, .defect-table td.actions-cell {
            display: block;
            text-align: center;
            padding: 15px;
        }

            .rep-table td.actions-cell:before, .defect-table td.actions-cell:before {
                display: none;
            }
}



/* ==========================================================
   CSS COMUM - ESTILO DA PAGINAÇÃO
   ========================================================== */

.pager {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Permite quebrar linha em telas pequenas */
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

    .pager a, .pager span {
        text-decoration: none;
        padding: 8px 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--text-soft);
        font-weight: 500;
        transition: all 0.2s ease;
    }

        .pager a:hover {
            background-color: var(--bg-panel);
            border-color: var(--border-soft);
            color: var(--text);
        }

    .pager .current {
        background-color: var(--primary);
        border-color: var(--primary);
        color: #fff;
        font-weight: 600;
        pointer-events: none;
    }

    .pager .aspNetDisabled {
        opacity: 0.5;
        pointer-events: none;
    }

    .pager .goto {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
    }

    .pager .goto-input {
        width: 60px;
        padding: 8px;
        text-align: center;
    }

    .pager .goto-btn {
        padding: 8px 12px;
    }


.sidebar-user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
}

    .sidebar-user-info .user-details {
        flex-grow: 1;
        color: #fff;
        font-size: 14px;
    }

    .sidebar-user-info a {
        margin-left: 10px;
        color: #ccc;
        font-size: 18px;
        transition: color 0.3s;
    }

        .sidebar-user-info a:hover {
            color: #fff;
        }

/* Botão "Trocar de Time" */
.switch-team-link i {
    color: #6c757d; /* cinza neutro */
}

.switch-team-link:hover i {
    color: #0dcaf0; /* azul clarinho no hover */
}






.sidebar-user-info {
    display: flex;
    flex-direction: column; /* 🔥 força empilhar */
    gap: 6px;
    padding: 10px;
    border-top: 1px solid #334155;
}

    .sidebar-user-info .user-top {
        display: block; /* deixa o texto ocupar toda a linha */
        font-size: 13px;
        color: #9ca3af;
        white-space: normal; /* 🔥 permite quebra automática */
        word-wrap: break-word; /* 🔥 quebra o e-mail quando for muito longo */
        overflow: hidden;
        text-overflow: ellipsis; /* 🔥 adiciona "..." se ainda estourar */
    }

        .sidebar-user-info .user-top span {
            font-size: 12px;
            font-weight: 400;
            color: #9ca3af;
        }

        .sidebar-user-info .user-top strong {
            display: block;
            font-size: 11px; /* 🔥 fonte bem menor */
            font-weight: 400; /* 🔥 deixa mais fina */
            color: #e5e7eb;
            white-space: nowrap; /* 🔥 impede quebra de linha */
            overflow: hidden;
            text-overflow: ellipsis; /* 🔥 corta com "..." se ainda ultrapassar */
        }

    .sidebar-user-info .user-actions {
        display: flex;
        justify-content: flex-end; /* 🔥 ícones no canto direito */
        gap: 12px;
    }

        .sidebar-user-info .user-actions a {
            color: #9ca3af;
            font-size: 18px;
            padding: 6px;
            border-radius: 6px;
            transition: all 0.2s ease;
        }

/* ==========================================================
   🌐 RESPONSIVIDADE GERAL - ADMIN & CHAMADOS
   ========================================================== */

/* === Telas Médias (tablets e notebooks pequenos) === */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 220px;
        width: calc(100% - 220px);
        padding: 24px;
    }

    .sidebar {
        width: 220px;
        padding: 16px;
    }

    .filters {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 10px;
    }

    .kanban {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 16px;
    }

    .card-defeito {
        font-size: 13px;
    }

    .info-grid,
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* === Telas Pequenas (≤ 768px) === */
@media (max-width: 768px) {
    /* Sidebar recolhível */
    .sidebar {
        position: fixed;
        left: -260px;
        width: 260px;
        height: 100%;
        background-color: #0f172a;
        transition: left 0.3s ease;
        z-index: 1001;
    }

        .sidebar.active {
            left: 0;
        }

    /* === BOTÃO DE MENU FLUTUANTE (MODO MOBILE) === */
    .sidebar-toggle {
        position: fixed;
        top: 20px;
        left: 20px;
        background-color: #2563eb; /* Azul principal do tema */
        color: #fff;
        border: none;
        border-radius: 12px;
        width: 46px;
        height: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        z-index: 1100;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
        cursor: pointer;
        transition: all 0.25s ease;
    }

        /* Hover suave e consistente com os botões do sistema */
        .sidebar-toggle:hover {
            background-color: #1d4ed8; /* Azul mais escuro */
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(0,0,0,0.2);
        }

        /* 🔹 Ícone dentro do botão */
        .sidebar-toggle i {
            color: #fff;
            font-size: 22px;
        }

    /* 🔹 Ajuste para telas muito pequenas */
    @media (max-width: 480px) {
        .sidebar-toggle {
            top: 14px;
            left: 14px;
            width: 42px;
            height: 42px;
            font-size: 20px;
        }
    }


    /* Conteúdo principal ocupa 100% */
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

    .container {
        padding: 20px;
    }

    /* Filtros empilhados */
    .filters {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    /* Kanban vira colunas verticais */
    .kanban {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .column-body {
        max-height: none;
        height: auto;
    }

    /* Tabelas empilhadas */
    .rep-table thead, .defect-table thead {
        display: none;
    }

    .rep-table tr, .defect-table tr {
        display: block;
        margin-bottom: 14px;
    }

    .rep-table td, .defect-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 12px;
        border-bottom: 1px solid var(--border);
        font-size: 13px;
    }

        .rep-table td:before, .defect-table td:before {
            content: attr(data-label);
            font-weight: 600;
            color: var(--text-soft);
        }

    /* Cards */
    .card-defeito {
        font-size: 13px;
    }

    .card-body {
        font-size: 13px;
    }

    /* Painel de Detalhes */
    #painelDetalhes .back-btn {
        position: static;
        margin-top: 10px;
    }

    #painelDetalhes h2 {
        text-align: center;
        font-size: 18px;
        padding-right: 0;
    }

    .info-grid, .product-grid {
        grid-template-columns: 1fr;
    }

    /* Galeria de fotos */
    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .photo-item img {
        height: 130px;
    }

    .photo-item span {
        font-size: 13px;
    }
}

/* === Telas muito pequenas (≤ 480px) === */
@media (max-width: 480px) {
    h2 {
        font-size: 20px;
    }

    .sidebar {
        width: 230px;
    }

    .filters input, .filters select {
        font-size: 12px;
        padding: 8px;
    }

    .export-btn {
        width: 100%;
        justify-content: center;
    }

    .card-defeito {
        font-size: 12px;
    }

    .chip {
        font-size: 10px;
        padding: 3px 8px;
    }

    .action-btn {
        flex-direction: row;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
    }

        .action-btn .icon-circle {
            width: 45px;
            height: 45px;
            font-size: 18px;
        }

    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* === Microtelas (≤ 360px) === */
@media (max-width: 360px) {
    .card-body {
        font-size: 11px;
    }

    .action-btn {
        font-size: 12px;
    }

    .photo-item img {
        height: 100px;
    }

    .photo-item span {
        font-size: 11px;
    }
}


/* ==========================================================
   ✅ CORREÇÃO: SIDEBAR COM SCROLL INTERNO (sem cortar rodapé)
   ========================================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    overflow: hidden; /* evita scroll duplo da página */
}

.sidebar-nav {
    flex: 1; /* ocupa o espaço disponível */
    overflow-y: auto; /* permite rolagem apenas no menu */
    margin-bottom: 10px;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #334155 #0f172a;
}

    /* Estilo dos scrollbars no Chrome */
    .sidebar-nav::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar-nav::-webkit-scrollbar-thumb {
        background-color: #334155;
        border-radius: 4px;
    }

    .sidebar-nav::-webkit-scrollbar-track {
        background: #0f172a;
    }

/* Garante que o bloco inferior (usuário) fique sempre visível */
.sidebar-user-info {
    flex-shrink: 0; /* impede que desapareça ao dar scroll */
    background-color: #0f172a;
    border-top: 1px solid #334155;
    padding: 12px 10px;
}



/* === Overlay + Lock scroll quando a sidebar estiver aberta === */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,.55); /* fundo escuro */
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 1000; /* abaixo da sidebar, acima da página */
}

.sidebar.active + .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Sidebar acima do overlay e do conteúdo */
.sidebar {
    z-index: 1001;
}

/* Congela o body quando o menu estiver aberto (inclusive iOS) */
body.menu-open {
    position: fixed;
    width: 100%;
    overflow: hidden; /* bloqueia scroll do conteúdo */
}

/* Evita "borrachão" e vazamentos de scroll */
.sidebar {
    overscroll-behavior: contain;
}

html, body {
    height: 100%;
}

/* Esconde a barrinha de scroll dentro do menu no mobile */
@media (max-width:768px) {
    .sidebar-nav {
        overflow-y: auto;
        -ms-overflow-style: none; /* IE/Edge antigo */
        scrollbar-width: none; /* Firefox */
    }

        .sidebar-nav::-webkit-scrollbar {
            display: none;
        }
    /* Chrome/Safari */

    /* animação e posicionamento mobile */
    .sidebar {
        left: -260px;
        transition: left .25s ease;
    }

        .sidebar.active {
            left: 0;
        }
}



/* ===============================
   NOTA DA CENTRAL NA SIDEBAR
   =============================== */
.sidebar-rating-box {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 15px;
    text-align: center;
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
}

    .sidebar-rating-box .rating-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        color: #f6b400;
        font-weight: 600;
        font-size: 14px;
        margin-bottom: 6px;
    }

        .sidebar-rating-box .rating-header i {
            color: #f6b400;
            font-size: 18px;
        }

    .sidebar-rating-box .rating-value {
        font-size: 22px;
        font-weight: 700;
        color: #fff;
    }

        .sidebar-rating-box .rating-value span {
            font-size: 14px;
            font-weight: 400;
            color: #ccc;
            margin-left: 3px;
        }

    .sidebar-rating-box .rating-subtext {
        display: block;
        font-size: 11px;
        color: #ccc;
        margin-top: 2px;
    }

.rating-info-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    margin-left: 6px;
    font-size: 15px;
    transition: color 0.2s;
}

    .rating-info-btn:hover {
        color: #f6b400; /* amarelo estrela */
    }




/* ==============================
   SWEETALERT - AJUSTE MOBILE
   ============================== */
@media (max-width: 480px) {
    .swal2-container {
        position: fixed !important;
        inset: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .swal2-popup {
        width: 90% !important;
        max-width: 320px !important;
        text-align: center !important;
        border-radius: 14px !important;
        padding: 24px 20px !important;
        box-sizing: border-box !important;
        margin: auto !important;
        transform: none !important; /* remove o translate(-50%, -50%) */
        top: auto !important;
        left: auto !important;
    }

    .swal2-title {
        font-size: 1.1rem !important;
        text-align: center !important;
    }

    .swal2-html-container {
        font-size: 0.95rem !important;
        text-align: center !important;
        margin-top: 6px !important;
    }

    .swal2-confirm {
        width: 100% !important;
        max-width: 160px;
        margin: 12px auto 0 auto !important;
        display: block !important;
    }
}


/* ===============================
   Estilo específico para o modal de FOTOS
   =============================== */
.swal-fotos {
    width: 90% !important;
    max-width: 900px !important;
    padding: 25px !important;
    background: #fff !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    display: flex !important;
    flex-direction: column;
    align-items: center;
}

    /* Título centralizado */
    .swal-fotos #swal2-title {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 20px;
        color: #10182B;
    }

    /* Área de imagens */
    .swal-fotos #swal2-html-container {
        max-height: 70vh;
        overflow-y: auto;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
        justify-content: center;
        padding-right: 10px; /* espaço pro scrollbar sem quebrar o layout */
        box-sizing: border-box;
    }

    /* Cada card de foto */
    .swal-fotos .foto-card {
        background: #f9f9f9;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        overflow: hidden;
        text-align: center;
        transition: transform 0.25s ease;
    }

        .swal-fotos .foto-card:hover {
            transform: scale(1.03);
        }

        /* Imagem */
        .swal-fotos .foto-card img {
            width: 100%;
            height: auto;
            display: block;
        }

        /* Legenda */
        .swal-fotos .foto-card span {
            display: block;
            padding: 8px 0;
            font-weight: 600;
            color: #222;
        }

    /* Botão fechar */
    .swal-fotos .swal2-confirm {
        margin-top: 20px;
        background: #1E3A8A !important;
        color: #fff !important;
        border-radius: 8px !important;
        padding: 8px 20px !important;
        font-weight: 600;
        transition: transform 0.2s ease;
    }

        .swal-fotos .swal2-confirm:hover {
            transform: scale(1.05);
        }



/* ===============================
   SWEETALERT - Corrige rolagem dupla no popup de fotos
   =============================== */

/* Remove a barra de fora */
body.swal2-shown {
    overflow: hidden !important; /* impede rolagem da página */
}

/* Container principal do SweetAlert */
.swal2-container {
    overflow: hidden !important; /* impede rolagem externa */
}

/* Popup interno */
.swal2-popup.swal-fotos {
    overflow: hidden !important; /* impede rolagem dupla */
    max-height: 90vh !important; /* limita a altura do popup */
}

/* Área de conteúdo dentro do popup */
.swal-fotos #swal2-html-container {
    overflow-y: auto !important; /* mantém rolagem só dentro */
    overflow-x: hidden !important;
    max-height: 70vh !important; /* controla a área rolável */
    margin-right: 0 !important;
    padding-right: 10px !important; /* espaço pro scroll interno */
}

/* Ajusta layout do grid de fotos */
.swal-fotos .photo-gallery,
.swal-fotos .photo-gallery-scroll {
    overflow-y: visible !important;
}

/* Opcional: remove micro-scroll do SweetAlert2 no fundo */
html.swal2-shown,
body.swal2-shown {
    position: fixed !important;
    width: 100% !important;
}


/* ===============================
   CORRIGE ALTURA DO .photo-gallery NO MOBILE
   =============================== */

/* Garante que a galeria sempre cresça conforme as fotos */
.swal-fotos .photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    align-content: start;
    height: auto !important; /* 🔧 força altura automática */
    min-height: fit-content !important; /* 🔧 garante que o grid abrace todo o conteúdo */
}

/* Corrige o container SweetAlert para acompanhar a altura total */
.swal-fotos #swal2-html-container {
    overflow-y: auto;
    max-height: 70vh;
    width: 100%;
    display: block !important; /* impede comportamento flex travado */
    height: auto !important; /* 🔧 acompanha a altura da galeria */
}

/* 🔧 No mobile, o grid vira coluna única e expande corretamente */
@media (max-width: 480px) {
    .swal-fotos .photo-gallery {
        grid-template-columns: 1fr !important;
