﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NS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GZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* ========================================
   RELATÓRIO DE ASSOCIADOS - SEM ROLAGEM HORIZONTAL
   ======================================== */

/* Tabela Desktop - LARGURAS OTIMIZADAS */
.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Mantém as proporções */
}

    .data-table thead {
        background-color: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
    }

    .data-table th {
        padding: 0.75rem 0.4rem;
        text-align: left;
        font-weight: 600;
        color: #495057;
        font-size: 0.813rem; 
        white-space: nowrap;
    }

    .data-table tbody tr {
        border-bottom: 1px solid #dee2e6;
        transition: background-color 0.2s;
    }

        .data-table tbody tr:hover {
            background-color: #f9fafb;
        }

    .data-table td {
        padding: 0.75rem 0.4rem;
        vertical-align: middle;
        white-space: nowrap;
        font-size: 0.875rem;
    }

        .data-table td:nth-child(2) {
            white-space: normal;
            word-wrap: break-word;
        }

        
        .data-table th:nth-child(1), .data-table td:nth-child(1) {
            width: 7%;
            text-align: center;
        }

        .data-table th:nth-child(2), .data-table td:nth-child(2) {
            width: 22%;
        }

        .data-table th:nth-child(3), .data-table td:nth-child(3) {
            width: 12%;
        }

        .data-table th:nth-child(4), .data-table td:nth-child(4) {
            width: 9%;
            text-align: center;
        }

        .data-table th:nth-child(5), .data-table td:nth-child(5) {
            width: 10%;
            text-align: center;
        }

        .data-table th:nth-child(6), .data-table td:nth-child(6) {
            width: 14%;
            text-align: center;
        }

        .data-table th:nth-child(7), .data-table td:nth-child(7) {
            width: 11%;
            text-align: right;
        }

        .data-table th:nth-child(8), .data-table td:nth-child(8) {
            width: 15%;
            text-align: center;
        }

    /* Badges não quebram */
    .data-table .badge {
        white-space: nowrap;
        display: inline-block;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    /* Textos pequenos mais compactos */
    .data-table small {
        font-size: 0.8125rem;
    }

/* Botões dos filtros não quebram */
.filters-container .btn {
    white-space: nowrap;
}

.filters-container .col-md-4 {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

/* ========================================
   MOBILE - CARDS RESPONSIVOS
   ======================================== */

@media (max-width: 768px) {
    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr {
        display: block;
        width: 100%;
    }

        .data-table tr {
            margin-bottom: 1rem;
            border: 1px solid #dee2e6;
            border-radius: 0.5rem;
            padding: 1rem;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            background: white;
        }

        .data-table td {
            display: grid !important;
            grid-template-columns: 140px 1fr !important;
            gap: 0.75rem !important;
            align-items: center !important;
            padding: 0.6rem 0 !important;
            border: none !important;
            text-align: left !important;
            width: 100% !important;
            white-space: normal !important;
        }

            .data-table td::before {
                content: attr(data-label);
                font-weight: 600;
                color: #495057;
                text-align: left !important;
                white-space: nowrap !important;
                grid-column: 1;
            }

            .data-table td > * {
                grid-column: 2;
                text-align: right !important;
                white-space: nowrap !important;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .data-table td .badge {
                display: inline-block !important;
                white-space: nowrap !important;
                font-size: 0.75rem;
                padding: 0.25rem 0.5rem;
            }

            .data-table td strong {
                white-space: nowrap !important;
                display: inline-block;
            }

            .data-table td small {
                white-space: nowrap !important;
                display: inline-block;
            }

            /* Nome em destaque */
            .data-table td:nth-child(2) {
                display: block !important;
                font-size: 1.1rem;
                font-weight: 600;
                border-bottom: 1px solid #dee2e6;
                padding-bottom: 0.75rem !important;
                margin-bottom: 0.5rem;
                text-align: left !important;
            }

                .data-table td:nth-child(2)::before {
                    display: none !important;
                }

                .data-table td:nth-child(2) > * {
                    text-align: left !important;
                    white-space: normal !important;
                    word-wrap: break-word;
                }

    .filters-container .col-md-4 {
        flex-wrap: wrap;
    }
}

/* Tablet - ajustes intermediários */
@media (max-width: 1200px) and (min-width: 769px) {
    .data-table {
        font-size: 0.85rem;
    }

        .data-table th {
            font-size: 0.75rem;
            padding: 0.65rem 0.35rem;
        }

        .data-table td {
            padding: 0.65rem 0.35rem;
            font-size: 0.813rem;
        }

        .data-table .badge {
            font-size: 0.7rem;
            padding: 0.2rem 0.4rem;
        }
}


/* 
   RELATÓRIO DE ASSOCIADOS - RESPONSIVO (SEM IMPRESSÃO)
    */

/* Tabela Desktop */
.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

    .data-table thead {
        background-color: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
    }

    .data-table th {
        padding: 0.75rem 0.5rem;
        text-align: left;
        font-weight: 600;
        color: #495057;
        font-size: 0.813rem;
        white-space: nowrap;
    }

    .data-table tbody tr {
        border-bottom: 1px solid #dee2e6;
        transition: background-color 0.2s;
    }

        .data-table tbody tr:hover {
            background-color: #f9fafb;
        }

    .data-table td {
        padding: 0.75rem 0.4rem;
        vertical-align: middle;
        white-space: nowrap;
        font-size: 0.875rem;
    }

        /* Nome pode quebrar */
        .data-table td:nth-child(2) {
            white-space: normal;
            word-wrap: break-word;
        }

        /* Larguras das colunas - Desktop */
        .data-table th:nth-child(1), .data-table td:nth-child(1) {
            width: 7%;
            text-align: center;
        }

        .data-table th:nth-child(2), .data-table td:nth-child(2) {
            width: 22%;
        }

        .data-table th:nth-child(3), .data-table td:nth-child(3) {
            width: 12%;
        }

        .data-table th:nth-child(4), .data-table td:nth-child(4) {
            width: 9%;
            text-align: center;
        }

        .data-table th:nth-child(5), .data-table td:nth-child(5) {
            width: 10%;
            text-align: center;
        }

        .data-table th:nth-child(6), .data-table td:nth-child(6) {
            width: 14%;
            text-align: center;
        }

        .data-table th:nth-child(7), .data-table td:nth-child(7) {
            width: 11%;
            text-align: right;
        }

        .data-table th:nth-child(8), .data-table td:nth-child(8) {
            width: 15%;
            text-align: center;
        }

    /* Badges não quebram */
    .data-table .badge {
        white-space: nowrap;
        display: inline-block;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    /* Textos pequenos mais compactos */
    .data-table small {
        font-size: 0.8125rem;
    }

/* Botões dos filtros não quebram */
.filters-container .btn {
    white-space: nowrap;
}

.filters-container .col-md-4 {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

/* Mobile - Tabela vira cards */
@media (max-width: 768px) {
    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr {
        display: block;
        width: 100%;
    }

        .data-table tr {
            margin-bottom: 1rem;
            border: 1px solid #dee2e6;
            border-radius: 0.5rem;
            padding: 1rem;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            background: white;
        }

        .data-table td {
            display: grid !important;
            grid-template-columns: 140px 1fr !important;
            gap: 0.75rem !important;
            align-items: center !important;
            padding: 0.6rem 0 !important;
            border: none !important;
            text-align: left !important;
            width: 100% !important;
            white-space: normal !important;
        }

            .data-table td::before {
                content: attr(data-label);
                font-weight: 600;
                color: #495057;
                text-align: left !important;
                white-space: nowrap !important;
                grid-column: 1;
            }

            .data-table td > * {
                grid-column: 2;
                text-align: right !important;
                white-space: nowrap !important;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .data-table td .badge {
                display: inline-block !important;
                white-space: nowrap !important;
                font-size: 0.75rem;
                padding: 0.25rem 0.5rem;
            }

            .data-table td strong {
                white-space: nowrap !important;
                display: inline-block;
            }

            .data-table td small {
                white-space: nowrap !important;
                display: inline-block;
            }

            /* Nome em destaque */
            .data-table td:nth-child(2) {
                display: block !important;
                font-size: 1.1rem;
                font-weight: 600;
                border-bottom: 1px solid #dee2e6;
                padding-bottom: 0.75rem !important;
                margin-bottom: 0.5rem;
                text-align: left !important;
            }

                .data-table td:nth-child(2)::before {
                    display: none !important;
                }

                .data-table td:nth-child(2) > * {
                    text-align: left !important;
                    white-space: normal !important;
                    word-wrap: break-word;
                }

    .filters-container .col-md-4 {
        flex-wrap: wrap;
    }
}

/* 
   CORREÇÃO - REMOVER ROLAGEM HORIZONTAL DESNECESSÁRIA
    */

/* Garantir que body e html não ultrapassem a viewport */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* Container principal sem overflow */
.user-management-container {
    max-width: 100% !important;
    overflow-x: hidden !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.user-management-card {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Ajustar rows do Bootstrap */
.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
}

    .row > * {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

/* Garantir que filtros não ultrapassem */
.filters-container {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

    .filters-container .row {
        width: 100% !important;
    }

/* Garantir que tabela seja responsiva */
.table-responsive {
    overflow-x: auto !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
}

.data-table {
    min-width: 100% !important;
    width: 100% !important;
}

/* Ajustar cards de estatísticas */
div[style*="grid-template-columns"] {
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Ajustar paginação */
.pagination-container {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.pagination {
    flex-wrap: wrap !important;
    justify-content: center !important;
}

/* Garantir que botões não forcem largura extra */
.btn {
    max-width: 100% !important;
}

/* Ajuste específico para div com d-flex */
.d-flex {
    flex-wrap: wrap !important;
}

/* Container de formulários */
.form-control,
.form-select {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Prevenir overflow de texto longo */
* {
    box-sizing: border-box !important;
}

/* Ajuste mobile */
@media (max-width: 768px) {
    .user-management-container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .filters-container .col-md-3,
    .filters-container .col-md-2,
    .filters-container .col-md-4 {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    .d-flex.gap-2 {
        gap: 0.5rem !important;
    }

    .btn {
        font-size: 0.875rem !important;
        padding: 0.5rem 0.75rem !important;
    }
}