/* ============================================
   SISTEMA RESPONSIVO - SBACEM
   Mobile-First Approach
   ============================================ */

/* === TIPOGRAFIA FLUIDA === */
html {
    font-size: 14px;
}

@media (min-width: 576px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 992px) {
    html {
        font-size: 16px;
    }
}

/* === UTILITIES RESPONSIVAS === */

/* Esconder em mobile (até 767px) */
.hide-mobile {
    display: none !important;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: initial !important;
    }
}

/* Esconder em desktop (768px+) */
.hide-desktop {
    display: initial !important;
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Texto truncado em mobile */
.text-truncate-mobile {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .text-truncate-mobile {
        max-width: none;
        white-space: normal;
    }
}

/* Botão full-width em mobile */
.btn-block-mobile {
    width: 100%;
}

@media (min-width: 576px) {
    .btn-block-mobile {
        width: auto;
    }
}

/* Stack em mobile (botões lado a lado → empilhados) */
.stack-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 576px) {
    .stack-mobile {
        flex-direction: row;
    }
}

/* Flex responsivo (column em mobile, row em desktop) */
.flex-responsive {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .flex-responsive {
        flex-direction: row;
        align-items: center;
    }
}

/* === ESPAÇAMENTOS RESPONSIVOS === */
.p-responsive {
    padding: 1rem;
}

@media (min-width: 768px) {
    .p-responsive {
        padding: 1.5rem;
    }
}

@media (min-width: 992px) {
    .p-responsive {
        padding: 2rem;
    }
}

.mb-responsive {
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .mb-responsive {
        margin-bottom: 1.5rem;
    }
}

/* === TABELAS RESPONSIVAS COM DATA-LABEL === */
@media (max-width: 767.98px) {
    .table-cards thead {
        display: none;
    }

    .table-cards tbody {
        display: block;
    }

    .table-cards tbody tr {
        display: block;
        background: white;
        border-radius: 10px;
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        border-left: 4px solid var(--cor-primaria);
    }

    .table-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .table-cards tbody td:last-child {
        border-bottom: none;
        padding-top: 1rem;
        justify-content: flex-end;
        gap: 0.5rem;
    }

    .table-cards tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--cor-primaria);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        flex-shrink: 0;
        margin-right: 1rem;
    }

    .table-cards tbody td.td-actions::before {
        display: none;
    }
}

/* === MODAIS MOBILE FULL-SCREEN === */
@media (max-width: 575.98px) {
    .modal-dialog-responsive {
        margin: 0;
        max-width: 100%;
        min-height: 100vh;
    }

    .modal-dialog-responsive .modal-content {
        border-radius: 0;
        min-height: 100vh;
    }

    .modal-dialog-responsive .modal-footer {
        position: sticky;
        bottom: 0;
        background: white;
    }

    .modal-dialog-responsive .modal-footer .btn {
        flex: 1;
    }
}

/* === TOUCH TARGETS MÍNIMOS (44px) === */
.btn,
button,
.nav-link,
a.btn {
    min-height: 44px;
    touch-action: manipulation;
}

.btn-sm {
    min-height: 36px;
}

/* === INPUTS MOBILE (previne zoom no iOS) === */
@media (max-width: 767.98px) {

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Cores Institucionais SBACEM */
:root {
    /* === PALETA SBACEM - IMUTÁVEL === */
    --cor-primaria: #22164C;
    --sbacem-roxo: #22164C;
    --cor-secundaria: #EF234D;
    --sbacem-vermelho: #EF234D;
    --cor-complementar: #E1C8B0;
    --sbacem-bege: #E1C8B0;
    --sbacem-roxo-claro: #3D2E6B;
    --sbacem-cinza: #4A4A4A;

    /* Variações de cor */
    --cor-primaria-clara: rgba(34, 22, 76, 0.1);
    --cor-secundaria-clara: rgba(239, 35, 77, 0.1);
    --cor-complementar-clara: rgba(225, 200, 176, 0.2);

    /* === CORES DE ESTADO === */
    --cor-sucesso: #28a745;
    --cor-erro: #dc3545;
    --cor-aviso: #ffc107;
    --cor-info: #17a2b8;

    /* === SIDEBAR USUÁRIO === */
    --sidebar-bg: #2d2d3a;
    --sidebar-hover: #3d3d4a;
    --sidebar-active: var(--sbacem-vermelho);
    --sidebar-width: 260px;

    /* Tipografia */
    --font-principal: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secundaria: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Espaçamentos */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Bordas */
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-full: 50px;

    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-card: 0 2px 12px rgba(34, 22, 76, 0.08);

    /* Breakpoints (referência, usados em media queries) */
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
}

/* Google Fonts - Outfit e Inter */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: var(--font-principal);
    background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-secundaria) 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    font-weight: 400;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-secundaria) 100%);
    color: white;
    padding: 40px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.logo-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.logo-text {
    font-size: 2.2em;
    font-weight: 800;
    letter-spacing: 3px;
    color: white;
    line-height: 1;
    text-transform: uppercase;
    font-family: var(--font-principal);
}

.logo-tagline {
    font-size: 0.65em;
    font-weight: 400;
    letter-spacing: 2px;
    color: white;
    opacity: 0.95;
    text-transform: uppercase;
    margin-top: 2px;
}

.header-text {
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.95;
}

main {
    padding: 40px;
    box-sizing: border-box;
    overflow-x: hidden;
    width: 100%;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
    box-sizing: border-box;
}

.info-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--cor-primaria);
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    color: var(--cor-primaria);
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

.info-card p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
}

.info-card ul {
    list-style: none;
    padding-left: 0;
}

.info-card ul li {
    color: #555;
    line-height: 1.8;
    padding-left: 20px;
    position: relative;
}

.info-card ul li:before {
    content: "•";
    color: var(--cor-secundaria);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.info-note {
    background: white;
    padding: 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    color: var(--cor-primaria);
    border: 1px solid var(--cor-complementar);
    margin-top: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: pre-wrap;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
    width: 100%;
}

.btn-template {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 24px;
    background: var(--cor-primaria);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-template:hover {
    background: #1a0f3a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 22, 76, 0.4);
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed var(--cor-primaria);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--cor-primaria-clara);
}

.upload-area:hover {
    border-color: var(--cor-secundaria);
    background: var(--cor-secundaria-clara);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: var(--cor-secundaria);
    background: var(--cor-secundaria-clara);
    transform: scale(1.02);
}

.upload-content svg {
    color: var(--cor-primaria);
    margin-bottom: 20px;
}

.upload-content h2 {
    color: var(--cor-primaria);
    margin-bottom: 10px;
    font-size: 1.5em;
}

.upload-content p {
    color: #666;
    font-size: 1.1em;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--cor-complementar-clara);
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid var(--cor-secundaria);
}

.file-info span {
    color: var(--cor-primaria);
    font-weight: 500;
    flex: 1;
}

.btn-remove {
    background: var(--cor-secundaria);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.btn-remove:hover {
    background: #d01e42;
}

/* Actions Section */
.actions-section {
    text-align: center;
    margin-bottom: 30px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-secundaria) 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 22, 76, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 22, 76, 0.6);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Progress Section */
.progress-section {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cor-primaria) 0%, var(--cor-secundaria) 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 15px;
}

.progress-text {
    text-align: center;
    color: #666;
    font-weight: 500;
}

/* Results Section */
.results-section {
    margin-top: 40px;
}

.results-header {
    margin-bottom: 30px;
}

.results-header h2 {
    color: var(--cor-primaria);
    font-size: 2em;
    margin-bottom: 10px;
}

.results-description {
    color: #666;
    font-size: 1em;
    margin-top: 5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--cor-primaria-clara);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border-left: 4px solid var(--cor-primaria);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.success {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4caf50;
}

.stat-card.error {
    background: var(--cor-secundaria-clara);
    border-left-color: var(--cor-secundaria);
}

.stat-card.warning {
    background: rgba(255, 152, 0, 0.1);
    border-left-color: #ff9800;
}

.stat-value {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--cor-primaria);
    margin-bottom: 10px;
}

.stat-card.success .stat-value {
    color: #4caf50;
}

.stat-card.error .stat-value {
    color: var(--cor-secundaria);
}

.stat-card.warning .stat-value {
    color: #ff9800;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Errors Section */
.errors-section {
    margin-top: 30px;
}

.errors-section h3 {
    color: var(--cor-secundaria);
    margin-bottom: 10px;
    font-size: 1.5em;
}

.errors-description {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 20px;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: var(--cor-primaria);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--cor-primaria);
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

tbody tr:hover {
    background: var(--cor-complementar-clara);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Download Section */
.download-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.btn-download {
    background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-secundaria) 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 22, 76, 0.4);
    margin-bottom: 15px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 22, 76, 0.6);
}

.download-note {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

/* Footer */
footer {
    background: var(--cor-primaria);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
}

.footer-org {
    font-size: 0.95em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.footer-version {
    font-size: 0.85em;
    opacity: 0.7;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 30px 20px;
    }

    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
    }

    .logo-text {
        font-size: 1.5em;
    }

    header h1 {
        font-size: 2em;
    }

    main {
        padding: 20px;
    }

    .info-section {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .upload-area {
        padding: 40px 15px;
    }
}

/* Navegação */
.main-nav {
    background: var(--cor-primaria);
    padding: 15px 40px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    transition: background 0.3s;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Correção para ABAS (Tabs) dentro de cards brancos */
.nav-tabs .nav-link {
    color: var(--cor-primaria) !important;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link:hover {
    background: rgba(var(--cor-primaria-rgb), 0.05);
    border-color: transparent;
    color: var(--cor-secundaria) !important;
}

.nav-tabs .nav-link.active {
    color: var(--cor-secundaria) !important;
    background: transparent;
    border-bottom: 2px solid var(--cor-secundaria);
    font-weight: 700;
}

/* Listagem */
.list-section {
    padding: 40px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.list-header h2 {
    color: var(--cor-primaria);
    font-size: 2em;
}

.list-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-secondary {
    background: var(--cor-complementar);
    color: var(--cor-primaria);
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover:not(:disabled) {
    background: #d4b89a;
    transform: translateY(-2px);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-danger {
    background: var(--cor-secundaria);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover:not(:disabled) {
    background: #d01e42;
    transform: translateY(-2px);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Filtros */
.filters-section {
    background: var(--cor-complementar-clara);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px solid var(--cor-primaria);
    border-radius: 8px;
    font-size: 1em;
}

.filter-select {
    padding: 12px;
    border: 2px solid var(--cor-primaria);
    border-radius: 8px;
    font-size: 1em;
    background: white;
}

.btn-filter {
    background: var(--cor-primaria);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-filter:hover {
    background: #1a0f3a;
}

.btn-filter-secondary {
    background: transparent;
    color: var(--cor-primaria);
    border: 2px solid var(--cor-primaria);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-filter-secondary:hover {
    background: var(--cor-primaria-clara);
}

/* Tabela Grande */
.table-container-large {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

#fonogramasTable {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

#fonogramasTable th {
    background: var(--cor-primaria);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

#fonogramasTable td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

#fonogramasTable tbody tr:hover {
    background: var(--cor-complementar-clara);
}

#fonogramasTable tbody tr:last-child td {
    border-bottom: none;
}

.loading,
.empty,
.error {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    color: var(--cor-secundaria);
}

/* Badges */
.badge {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-ativo {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.badge-pendente {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.badge-em_disputa {
    background: var(--cor-secundaria-clara);
    color: var(--cor-secundaria);
}

.badge-inativo {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

/* Botões de Ação */
.actions-cell {
    white-space: nowrap;
}

.btn-action {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    transition: all 0.2s;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.btn-action:hover {
    transform: translateY(-1px);
}

.btn-action svg {
    display: block;
}

.btn-view {
    color: #2196F3;
}

.btn-view:hover {
    background: rgba(33, 150, 243, 0.1);
    color: #1976D2;
}

.btn-edit {
    color: var(--cor-primaria);
}

.btn-edit:hover {
    background: var(--cor-primaria-clara);
    color: #1a0f3a;
}

.btn-delete {
    color: var(--cor-secundaria);
}

.btn-delete:hover {
    background: var(--cor-secundaria-clara);
    color: #d01e42;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
}

.btn-pagination {
    padding: 8px 12px;
    border: 2px solid var(--cor-primaria);
    background: white;
    color: var(--cor-primaria);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-pagination:hover {
    background: var(--cor-primaria-clara);
}

.btn-pagination.active {
    background: var(--cor-primaria);
    color: white;
}

.pagination-info {
    color: #666;
    font-size: 0.9em;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.modal-header h3 {
    color: var(--cor-primaria);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--cor-secundaria);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 2px solid #e0e0e0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--cor-primaria);
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--cor-primaria);
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--cor-secundaria);
}

/* Edição */
.edit-section {
    padding: 40px;
}

.edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.edit-header h2 {
    color: var(--cor-primaria);
    font-size: 2em;
}

.edit-actions {
    display: flex;
    gap: 10px;
}

.form-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 4px solid var(--cor-primaria);
}

.section-title {
    background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-secundaria) 100%);
    color: white;
    padding: 15px 20px;
    margin: -25px -25px 20px -25px;
    border-radius: 12px 12px 0 0;
    font-size: 1.3em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Detalhe visual - barra bege à esquerda */
.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 20px;
    background: var(--cor-complementar);
    border-radius: 2px;
    opacity: 0.9;
}

/* Classes de seção - todas herdam o gradiente padrão do .section-title */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.btn-add {
    background: var(--cor-primaria);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
}

.btn-add:hover {
    background: #1a0f3a;
}

.item-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.item-row input,
.item-row select {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95em;
}

.item-row input:focus,
.item-row select:focus {
    outline: none;
    border-color: var(--cor-primaria);
}

.btn-remove-item {
    background: var(--cor-secundaria);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-remove-item:hover {
    background: #d01e42;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Página de Estatísticas */
.stats-page {
    padding: 40px;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.stats-header h2 {
    color: var(--cor-primaria);
    font-size: 2em;
    margin: 0;
}

.btn-refresh {
    background: var(--cor-primaria);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s;
}

.btn-refresh:hover {
    background: #1a0f3a;
    transform: translateY(-2px);
}

.stats-section {
    margin-bottom: 40px;
}

.stats-section h3 {
    color: var(--cor-primaria);
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--cor-complementar);
}

.section-title-health {
    color: #2F855A !important;
    border-bottom-color: rgba(47, 133, 90, 0.3) !important;
}

.section-title-stats {
    color: #2B6CB0 !important;
    border-bottom-color: rgba(43, 108, 176, 0.3) !important;
}

.section-title-situacao {
    color: #805AD5 !important;
    border-bottom-color: rgba(128, 90, 213, 0.3) !important;
}

.section-title-genero {
    color: #C05621 !important;
    border-bottom-color: rgba(192, 86, 33, 0.3) !important;
}

/* Health Card */
.health-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.health-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--cor-complementar-clara);
    border-radius: 8px;
}

.health-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--cor-primaria);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    flex-shrink: 0;
}

.health-icon.status-ok {
    background: #4caf50;
}

.health-info {
    flex: 1;
}

.health-label {
    font-size: 0.85em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.health-value {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--cor-primaria);
}

/* Stats Grid Large */
.stats-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.stat-card-large {
    background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-secundaria) 100%);
    color: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(34, 22, 76, 0.3);
    transition: transform 0.3s;
}

.stat-card-large:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.stat-value-large {
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label-large {
    font-size: 1.1em;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Situação Grid */
.situacao-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.situacao-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--cor-primaria);
    transition: transform 0.3s;
}

.situacao-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.situacao-card.situacao-ativo {
    border-left-color: #4caf50;
}

.situacao-card.situacao-pendente {
    border-left-color: #ff9800;
}

.situacao-card.situacao-em_disputa {
    border-left-color: var(--cor-secundaria);
}

.situacao-card.situacao-inativo {
    border-left-color: #9e9e9e;
}

.situacao-name {
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.situacao-value {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--cor-primaria);
    margin-bottom: 5px;
}

.situacao-porcentagem {
    font-size: 1em;
    color: #999;
}

/* Gênero List */
.genero-list {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.genero-item {
    display: grid;
    grid-template-columns: 50px 1fr 200px 120px;
    gap: 15px;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.genero-item:last-child {
    border-bottom: none;
}

.genero-item:hover {
    background: var(--cor-complementar-clara);
}

.genero-rank {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--cor-primaria);
    text-align: center;
}

.genero-name {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--cor-primaria);
}

.genero-bar-container {
    height: 25px;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.genero-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cor-primaria) 0%, var(--cor-secundaria) 100%);
    border-radius: 12px;
    transition: width 0.5s ease;
}

.genero-value {
    text-align: right;
    font-weight: 600;
    color: #666;
}

.loading,
.error,
.empty {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1em;
}

.error {
    color: var(--cor-secundaria);
}

.empty {
    color: #999;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-page {
        padding: 20px;
    }

    .health-card {
        grid-template-columns: 1fr;
    }

    .stats-grid-large {
        grid-template-columns: 1fr;
    }

    .situacao-grid {
        grid-template-columns: 1fr;
    }

    .genero-item {
        grid-template-columns: 40px 1fr;
        gap: 10px;
    }

    .genero-bar-container,
    .genero-value {
        grid-column: 1 / -1;
    }

    .genero-value {
        text-align: left;
    }
}

/* ========================================
   PÁGINA ECAD - Gerenciamento de Envios
   ======================================== */

.ecad-section {
    padding: 30px;
}

.ecad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.ecad-header h2 {
    color: var(--cor-primaria);
    font-weight: 700;
}

/* Cards de Estatísticas ECAD */
.ecad-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--cor-primaria);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cor-primaria-clara);
    color: var(--cor-primaria);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--cor-primaria);
    line-height: 1;
}

.stat-label {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
}

.stat-enviados {
    border-left-color: #2196F3;
}

.stat-enviados .stat-icon {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.stat-enviados .stat-value {
    color: #2196F3;
}

.stat-aceitos {
    border-left-color: #4CAF50;
}

.stat-aceitos .stat-icon {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.stat-aceitos .stat-value {
    color: #4CAF50;
}

.stat-recusados {
    border-left-color: var(--cor-secundaria);
}

.stat-recusados .stat-icon {
    background: var(--cor-secundaria-clara);
    color: var(--cor-secundaria);
}

.stat-recusados .stat-value {
    color: var(--cor-secundaria);
}

.stat-pendentes {
    border-left-color: #FF9800;
}

.stat-pendentes .stat-icon {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.stat-pendentes .stat-value {
    color: #FF9800;
}

/* Tabs */
.ecad-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 25px;
    gap: 5px;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 1em;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-family: var(--font-principal);
}

.tab-btn:hover {
    color: var(--cor-primaria);
}

.tab-btn.active {
    color: var(--cor-primaria);
    border-bottom-color: var(--cor-secundaria);
}

/* .tab-content {
    display: none;
}

.tab-content.active {
    display: block;
} */

/* Seleção de Fonogramas */
.selecao-section {
    background: white;
    border-radius: var(--border-radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.selecao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.selecao-header h3 {
    color: var(--cor-primaria);
    font-weight: 600;
}

.selecao-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.selecao-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--cor-primaria-clara);
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
}

.selecao-info span {
    font-weight: 600;
    color: var(--cor-primaria);
}

/* Upload Area */
.retorno-section {
    background: white;
    border-radius: var(--border-radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: var(--border-radius-md);
    padding: 50px;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--cor-primaria);
    background: var(--cor-primaria-clara);
}

.upload-area svg {
    color: var(--cor-primaria);
    opacity: 0.7;
}

.upload-area h3 {
    color: var(--cor-primaria);
    margin: 0;
}

.upload-area p {
    color: #666;
    margin: 0;
}

.upload-formats {
    font-size: 0.85em;
    color: #999 !important;
}

/* Resultado do Retorno */
.retorno-result {
    text-align: center;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.result-stat {
    padding: 20px 30px;
    border-radius: var(--border-radius-md);
    background: #f5f5f5;
}

.result-value {
    font-size: 2.5em;
    font-weight: 700;
    display: block;
}

.result-label {
    color: #666;
    font-size: 0.9em;
}

.result-aceitos .result-value {
    color: #4CAF50;
}

.result-recusados .result-value {
    color: var(--cor-secundaria);
}

/* Badges de Status ECAD */
.badge-nao_enviado {
    background: rgba(158, 158, 158, 0.2);
    color: #757575;
}

.badge-selecionado {
    background: rgba(33, 150, 243, 0.2);
    color: #1976D2;
}

.badge-enviado {
    background: rgba(255, 152, 0, 0.2);
    color: #F57C00;
}

.badge-aceito {
    background: rgba(76, 175, 80, 0.2);
    color: #388E3C;
}

.badge-recusado {
    background: rgba(239, 35, 77, 0.2);
    color: #D32F2F;
}

.badge-ajustado {
    background: rgba(156, 39, 176, 0.2);
    color: #7B1FA2;
}

.badge-reenviado {
    background: rgba(0, 150, 136, 0.2);
    color: #00796B;
}

.badge-pendente,
.badge-processando {
    background: rgba(255, 193, 7, 0.2);
    color: #FFA000;
}

.badge-concluido {
    background: rgba(76, 175, 80, 0.2);
    color: #388E3C;
}

/* Modal */
.modal-lg {
    max-width: 800px;
}

.detalhes-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: var(--border-radius-sm);
}

.detalhes-info p {
    margin: 0;
}

/* Utilidades */
.text-success {
    color: #4CAF50;
    font-weight: 600;
}

.text-danger {
    color: var(--cor-secundaria);
    font-weight: 600;
}

.text-warning {
    color: #FF9800;
    font-weight: 600;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--cor-primaria);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ========================================
   SISTEMA DE ERROS AGRUPADOS
   ======================================== */

.errors-section {
    margin-top: 25px;
}

.errors-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.errors-header h3 {
    margin: 0;
    color: var(--cor-secundaria);
}

.errors-controls {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-principal);
}

.btn-small:hover {
    background: #eee;
    border-color: #ccc;
}

.errors-grouped {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: var(--border-radius-md);
}

.error-line-group {
    border-bottom: 1px solid #eee;
}

.error-line-group:last-child {
    border-bottom: none;
}

.error-line-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #fafafa;
    cursor: pointer;
    transition: background 0.2s;
}

.error-line-header:hover {
    background: #f0f0f0;
}

.error-line-toggle {
    width: 16px;
    text-align: center;
    color: #666;
    font-size: 0.8em;
}

.error-line-number {
    font-weight: 600;
    color: var(--cor-primaria);
    min-width: 80px;
}

.error-line-count {
    background: var(--cor-secundaria);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: 500;
}

.error-line-content {
    padding: 0;
    background: white;
}

.error-item {
    display: grid;
    grid-template-columns: 120px 150px 1fr;
    gap: 10px;
    padding: 10px 15px 10px 40px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9em;
}

.error-item:first-child {
    border-top: none;
}

.error-campo {
    font-weight: 500;
    color: var(--cor-primaria);
}

.error-valor {
    color: #666;
    font-family: monospace;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.error-msg {
    color: var(--cor-secundaria);
}

.errors-more {
    margin-top: 15px;
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: var(--border-radius-sm);
}

.errors-more span {
    margin-left: 10px;
    color: #666;
    font-size: 0.9em;
}

/* Responsivo */
@media (max-width: 768px) {
    .error-item {
        grid-template-columns: 1fr;
        gap: 5px;
        padding-left: 25px;
    }

    .errors-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================================
   DASHBOARD STYLES - User Dashboard Layout
   ========================================================== */

/* Reset body for dashboard pages */
.container-fluid {
    padding: 0;
    background: #f4f6f9;
    min-height: 100vh;
}

/* Override default body styles for dashboard context */
body:has(.container-fluid) {
    padding: 0;
    background: #f4f6f9;
}

/* Dashboard Sidebar */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--cor-primaria) 0%, #1a0f3a 100%) !important;
    padding-top: 0 !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    position: fixed !important;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 250px;
    overflow-y: auto;
}

.sidebar .position-sticky {
    padding-top: 0 !important;
}

.sidebar h5 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
}

/* Sidebar Navigation Links */
.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.85rem 1.25rem;
    margin: 0.15rem 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: white !important;
    transform: translateX(3px);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--cor-secundaria) 0%, #d01e42 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(239, 35, 77, 0.4);
    font-weight: 600;
}

.sidebar .nav-link i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
}

.sidebar .text-warning {
    color: #ffc107 !important;
}

.sidebar .text-danger {
    color: var(--cor-secundaria) !important;
}

.sidebar hr {
    margin: 1.5rem 0.75rem;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Main Content Area */
.col-md-9.ms-sm-auto,
.col-lg-10.ms-sm-auto {
    margin-left: 250px !important;
    width: calc(100% - 250px) !important;
    min-height: 100vh;
    background: #f4f6f9;
    padding: 0 2rem 2rem 2rem !important;
}

/* Page Header */
.col-md-9 .border-bottom,
.col-lg-10 .border-bottom {
    background: white;
    margin: 0 -2rem 2rem -2rem;
    padding: 1.5rem 2rem !important;
    border-bottom: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.col-md-9 .h2,
.col-lg-10 .h2 {
    color: var(--cor-primaria);
    font-weight: 700;
    font-size: 1.75rem;
}

/* Dashboard Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card.bg-primary {
    background: linear-gradient(135deg, var(--cor-primaria) 0%, #2d1c5e 100%) !important;
}

.card.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.card.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
}

.card.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%) !important;
}

.card.bg-danger {
    background: linear-gradient(135deg, var(--cor-secundaria) 0%, #d01e42 100%) !important;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.card-text {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Dashboard Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table thead {
    background: var(--cor-primaria);
}

.table thead th {
    border: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
    background: var(--cor-primaria-clara);
}

/* Buttons in dashboard context */
.btn-primary {
    background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-secundaria) 100%) !important;
    border: none !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(34, 22, 76, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 22, 76, 0.45);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border: none !important;
    font-weight: 600;
    border-radius: 8px;
}

.btn-outline-primary {
    color: var(--cor-primaria);
    border-color: var(--cor-primaria);
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--cor-primaria);
    border-color: var(--cor-primaria);
}

/* Alert Styling */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: rgba(239, 35, 77, 0.15);
    color: #721c24;
    border-left: 4px solid var(--cor-secundaria);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* Upload Section in Dashboard */
.upload-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.info-section {
    margin-bottom: 2rem;
}

.info-section .info-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--cor-primaria);
    height: 100%;
}

/* Results Section in Dashboard */
.results-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
}

/* Responsive Dashboard */
@media (max-width: 992px) {
    .sidebar {
        position: relative !important;
        width: 100% !important;
        min-height: auto;
    }

    .col-md-9.ms-sm-auto,
    .col-lg-10.ms-sm-auto {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Form Inputs in Dashboard */
.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(34, 22, 76, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--cor-primaria);
    margin-bottom: 0.5rem;
}

/* Badge refinements */
.badge {
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
    color: #000 !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, var(--cor-secundaria) 0%, #d01e42 100%) !important;
}

/* Quick Actions Button */
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 10px;
}

/* Statistics Row Styling */
.row.g-4 .card {
    height: 100%;
}

.row.g-4 .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}

/* ============================================
   NOVOS COMPONENTES UI/UX - SBACEM v2.0
   ============================================ */

/* ============ SIDEBAR USUÁRIO ============ */
.sidebar {
    background: linear-gradient(180deg, var(--sbacem-roxo) 0%, var(--sidebar-bg) 100%);
    min-height: 100vh;
    padding: 0;
    transition: all 0.3s ease;
    width: var(--sidebar-width);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.875rem 1.25rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--sbacem-bege);
}

.sidebar .nav-link.active {
    color: white;
    background: rgba(239, 35, 77, 0.15);
    border-left-color: var(--sbacem-vermelho);
    font-weight: 600;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, transparent 100%);
}

.sidebar-brand {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    transition: transform 0.2s ease;
}

.sidebar-brand:hover {
    transform: translateX(3px);
    color: white;
}

/* Logo Icon Container */
.sidebar-logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--sbacem-vermelho) 0%, #ff6b8a 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(239, 35, 77, 0.35);
    flex-shrink: 0;
}

.sidebar-logo-icon i {
    font-size: 1.4rem;
    color: white;
}

/* Logo Text Container */
.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.2;
}

.sidebar-logo-name {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: white;
    font-family: var(--font-principal);
}

.sidebar-logo-tagline {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    margin-top: 2px;
}

/* Mobile: Sidebar como offcanvas */
@media (max-width: 767px) {
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        z-index: 1050;
        transition: left 0.3s ease;
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .sidebar-toggle {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1030;
        background: var(--sbacem-roxo);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 0.5rem 0.75rem;
    }
}

/* ============ STATS CARDS MODERNOS ============ */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: width 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(34, 22, 76, 0.12);
}

.stats-card:hover::before {
    width: 6px;
}

/* Variantes por tipo */
.stats-card--total::before {
    background: var(--sbacem-roxo);
}

.stats-card--pendente::before {
    background: var(--cor-aviso);
}

.stats-card--aceito::before {
    background: var(--cor-sucesso);
}

.stats-card--recusado::before {
    background: var(--cor-erro);
}

.stats-card--enviado::before {
    background: var(--cor-info);
}

.stats-card__value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--sbacem-roxo);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-card__label {
    font-size: 0.875rem;
    color: var(--sbacem-cinza);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-card__icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.15;
    color: var(--sbacem-roxo);
}

/* Grid responsivo para stats */
.stats-grid-modern {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .stats-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .stats-grid-modern {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============ TABELA RESPONSIVA MODERNA ============ */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.table-modern thead th {
    background: var(--sbacem-roxo);
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-modern thead th:first-child {
    border-radius: 12px 0 0 0;
}

.table-modern thead th:last-child {
    border-radius: 0 12px 0 0;
}

.table-modern tbody tr {
    transition: all 0.2s ease;
}

.table-modern tbody tr:hover {
    background: rgba(34, 22, 76, 0.03);
}

.table-modern tbody td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

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

    .table-modern tbody tr {
        display: block;
        background: white;
        border-radius: 10px;
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .table-modern tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .table-modern tbody td:last-child {
        border-bottom: none;
        padding-top: 1rem;
        justify-content: flex-end;
        gap: 0.5rem;
    }

    .table-modern tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--sbacem-roxo);
        font-size: 0.75rem;
        text-transform: uppercase;
    }
}

/* ============ BADGES DE STATUS ============ */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-status--aceito {
    background: rgba(40, 167, 69, 0.15);
    color: #1e7e34;
}

.badge-status--pendente {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.badge-status--recusado {
    background: rgba(220, 53, 69, 0.15);
    color: #bd2130;
}

.badge-status--enviado {
    background: rgba(23, 162, 184, 0.15);
    color: #117a8b;
}

.badge-status--rascunho {
    background: rgba(108, 117, 125, 0.15);
    color: #495057;
}

.badge-status--nao_enviado {
    background: rgba(108, 117, 125, 0.15);
    color: #495057;
}

.badge-status i {
    font-size: 0.625rem;
}

/* ============ BOTÕES SBACEM PADRONIZADOS ============ */
.btn-sbacem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

/* Primário - Vermelho */
.btn-sbacem--primary {
    background: var(--sbacem-vermelho);
    color: white;
    border-color: var(--sbacem-vermelho);
}

.btn-sbacem--primary:hover {
    background: #d41e44;
    border-color: #d41e44;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 35, 77, 0.3);
}

/* Secundário - Outline Roxo */
.btn-sbacem--secondary {
    background: transparent;
    color: var(--sbacem-roxo);
    border-color: var(--sbacem-roxo);
}

.btn-sbacem--secondary:hover {
    background: var(--sbacem-roxo);
    color: white;
}

/* Sucesso */
.btn-sbacem--success {
    background: var(--cor-sucesso);
    color: white;
    border-color: var(--cor-sucesso);
}

.btn-sbacem--success:hover {
    background: #218838;
    border-color: #218838;
    color: white;
}

/* Perigo */
.btn-sbacem--danger {
    background: var(--cor-erro);
    color: white;
    border-color: var(--cor-erro);
}

.btn-sbacem--danger:hover {
    background: #c82333;
    border-color: #c82333;
    color: white;
}

/* Ghost */
.btn-sbacem--ghost {
    background: transparent;
    color: var(--sbacem-cinza);
    border-color: transparent;
}

.btn-sbacem--ghost:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Tamanhos */
.btn-sbacem--sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-sbacem--lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* Full width mobile */
@media (max-width: 576px) {
    .btn-sbacem--block-mobile {
        width: 100%;
    }
}

/* ============ FORM SECTIONS ============ */
.form-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
}

.form-section__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sbacem-roxo);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--sbacem-bege);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section__title i {
    color: var(--sbacem-vermelho);
}

/* Inputs modernos */
.form-control-modern {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fafafa;
}

.form-control-modern:focus {
    border-color: var(--sbacem-roxo);
    background: white;
    box-shadow: 0 0 0 3px rgba(34, 22, 76, 0.1);
    outline: none;
}

.form-control-modern:hover:not(:focus) {
    border-color: #ccc;
}

/* Labels */
.form-label-modern {
    font-weight: 500;
    color: var(--sbacem-cinza);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-label-modern .required {
    color: var(--sbacem-vermelho);
}

/* Grid de formulário */
.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

/* ============ UPLOAD ZONE MODERNA ============ */
.upload-zone {
    border: 2px dashed var(--sbacem-bege);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--sbacem-roxo);
    background: linear-gradient(135deg, #f0f0ff 0%, #e8e8f8 100%);
    transform: scale(1.01);
}

.upload-zone__icon {
    font-size: 4rem;
    color: var(--sbacem-roxo);
    opacity: 0.7;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.upload-zone:hover .upload-zone__icon {
    opacity: 1;
    transform: translateY(-5px);
}

.upload-zone__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--sbacem-roxo);
    margin-bottom: 0.5rem;
}

.upload-zone__subtitle {
    color: var(--sbacem-cinza);
    font-size: 0.875rem;
}

/* ============ PAGINAÇÃO MODERNA ============ */
.pagination-modern {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.pagination-modern__item {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: white;
    color: var(--sbacem-cinza);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-modern__item:hover {
    border-color: var(--sbacem-roxo);
    color: var(--sbacem-roxo);
}

.pagination-modern__item--active {
    background: var(--sbacem-roxo);
    border-color: var(--sbacem-roxo);
    color: white;
}

.pagination-modern__item--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============ DETAIL CARDS ============ */
.detail-status-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(34, 22, 76, 0.1);
}

.detail-status-card__icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.detail-status-card__icon--success {
    color: var(--cor-sucesso);
}

.detail-status-card__icon--warning {
    color: var(--cor-aviso);
}

.detail-status-card__icon--error {
    color: var(--cor-erro);
}

.detail-status-card__icon--info {
    color: var(--cor-info);
}

.detail-status-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--sbacem-roxo);
    margin-bottom: 0.5rem;
}

.detail-status-card__isrc {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--sbacem-cinza);
    background: #f5f5f5;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

/* Info Grid */
.detail-info-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.detail-info-item {
    padding: 1rem;
    background: #fafafa;
    border-radius: 8px;
    border-left: 3px solid var(--sbacem-bege);
}

.detail-info-item__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--sbacem-cinza);
    margin-bottom: 0.25rem;
}

.detail-info-item__value {
    font-weight: 600;
    color: var(--sbacem-roxo);
}

/* ============ RESULT STATS (UPLOAD RESULTADO) ============ */
.result-stats {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 2rem;
}

@media (max-width: 576px) {
    .result-stats {
        grid-template-columns: 1fr;
    }
}

.result-stat {
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    color: white;
}

.result-stat--success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.result-stat--error {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
}

.result-stat--neutral {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.result-stat__value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.result-stat__label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* ========================================
   PAINEL ADMIN - Estilos Específicos
   Diferenciado do painel de usuário
   ======================================== */

/* === VARIÁVEIS ADMIN === */
:root {
    --admin-sidebar-bg: linear-gradient(180deg, #1a1025 0%, #22164C 100%);
    --admin-accent: #EF234D;
    --admin-sidebar-width: 260px;
}

/* === LAYOUT ADMIN === */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-main {
    flex: 1;
    margin-left: var(--admin-sidebar-width);
    background: #f4f6f9;
    min-height: 100vh;
}

.admin-header {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sbacem-roxo);
    margin: 0;
}

.admin-content {
    padding: 2rem;
}

.admin-alerts {
    padding: 0 2rem;
    margin-top: 1rem;
}

/* === SIDEBAR ADMIN === */
.sidebar-admin {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--admin-sidebar-width);
    background: var(--admin-sidebar-bg);
    border-right: 3px solid var(--admin-accent);
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-admin__header {
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-admin__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--admin-accent);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 1px;
}

.sidebar-admin__section {
    padding: 1rem 1.25rem 0.5rem;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.sidebar-admin .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    text-decoration: none;
}

.sidebar-admin .nav-link:hover {
    color: white;
    background: rgba(239, 35, 77, 0.1);
    border-left-color: var(--admin-accent);
}

.sidebar-admin .nav-link.active {
    color: white;
    background: rgba(239, 35, 77, 0.2);
    border-left-color: var(--admin-accent);
    font-weight: 600;
}

.sidebar-admin .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-admin__divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 1rem 1.25rem;
}

.sidebar-admin .nav-link--warning {
    color: var(--cor-aviso);
}

.sidebar-admin .nav-link--warning:hover {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: var(--cor-aviso);
}

.sidebar-admin .nav-link--danger {
    color: var(--cor-erro);
}

.sidebar-admin .nav-link--danger:hover {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: var(--cor-erro);
}

/* === OVERLAY MOBILE === */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

.sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 998;
    background: var(--sbacem-roxo);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    font-size: 1.25rem;
    cursor: pointer;
}

/* === STATS CARDS ADMIN === */
.admin-stats-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .admin-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.admin-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.admin-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.admin-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(34, 22, 76, 0.12);
}

.admin-stat-card--primary::before {
    background: var(--sbacem-roxo);
}

.admin-stat-card--warning::before {
    background: var(--cor-aviso);
}

.admin-stat-card--info::before {
    background: var(--cor-info);
}

.admin-stat-card--success::before {
    background: var(--cor-sucesso);
}

.admin-stat-card--danger::before {
    background: var(--cor-erro);
}

.admin-stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.admin-stat-card--primary .admin-stat-card__icon {
    background: rgba(34, 22, 76, 0.1);
    color: var(--sbacem-roxo);
}

.admin-stat-card--warning .admin-stat-card__icon {
    background: rgba(255, 193, 7, 0.15);
    color: #d39e00;
}

.admin-stat-card--info .admin-stat-card__icon {
    background: rgba(23, 162, 184, 0.15);
    color: var(--cor-info);
}

.admin-stat-card--success .admin-stat-card__icon {
    background: rgba(40, 167, 69, 0.15);
    color: var(--cor-sucesso);
}

.admin-stat-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sbacem-roxo);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.admin-stat-card__label {
    font-size: 0.75rem;
    color: var(--sbacem-cinza);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === QUICK ACTIONS === */
.quick-actions-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    color: var(--sbacem-roxo);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    border-color: var(--sbacem-roxo);
    background: rgba(34, 22, 76, 0.03);
    transform: translateX(4px);
    color: var(--sbacem-roxo);
}

.quick-action-btn i {
    font-size: 1.5rem;
    width: 32px;
    text-align: center;
    color: var(--admin-accent);
}

/* === ADMIN CARDS === */
.admin-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.admin-card__header {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sbacem-roxo);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-card__title i {
    color: var(--admin-accent);
}

.admin-card__body {
    padding: 1.5rem;
}

.admin-card__body--flush {
    padding: 0;
}

/* === ADMIN TABLES === */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table thead th {
    background: var(--sbacem-roxo);
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-table thead th:first-child {
    border-radius: 8px 0 0 0;
}

.admin-table thead th:last-child {
    border-radius: 0 8px 0 0;
}

.admin-table tbody tr {
    transition: background 0.15s ease;
}

.admin-table tbody tr:hover {
    background: rgba(34, 22, 76, 0.03);
}

.admin-table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    font-size: 0.875rem;
}

.admin-table__link {
    color: var(--sbacem-roxo);
    font-weight: 600;
    text-decoration: none;
}

.admin-table__link:hover {
    color: var(--admin-accent);
    text-decoration: underline;
}

/* === UPLOAD ZONE ADMIN === */
.admin-upload-zone {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
}

.admin-upload-zone:hover,
.admin-upload-zone.dragover {
    border-color: var(--admin-accent);
    background: rgba(239, 35, 77, 0.03);
}

.admin-upload-zone__icon {
    font-size: 3rem;
    color: var(--cor-info);
    margin-bottom: 1rem;
}

.admin-upload-zone__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--sbacem-roxo);
    margin-bottom: 0.5rem;
}

.admin-upload-zone__subtitle {
    color: var(--sbacem-cinza);
    font-size: 0.875rem;
}

/* === BADGES DE STATUS (Consistente) === */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-status--aguardando {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.badge-status--processado {
    background: rgba(40, 167, 69, 0.15);
    color: #1e7e34;
}

.badge-status--pendente {
    background: rgba(108, 117, 125, 0.15);
    color: #495057;
}

.badge-status--enviado {
    background: rgba(23, 162, 184, 0.15);
    color: #117a8b;
}

.badge-status--aceito {
    background: rgba(40, 167, 69, 0.15);
    color: #1e7e34;
}

.badge-status--recusado {
    background: rgba(220, 53, 69, 0.15);
    color: #bd2130;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--sbacem-cinza);
}

.empty-state__icon {
    font-size: 3rem;
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-state__title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* === RESPONSIVE ADMIN === */
@media (max-width: 767.98px) {
    .sidebar-admin {
        position: fixed;
        left: -280px;
        width: 280px;
        transition: left 0.3s ease;
        z-index: 1050;
    }

    .sidebar-admin.show {
        left: 0;
    }

    .admin-main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .admin-header {
        padding: 1rem;
        padding-left: 4rem;
    }

    .admin-content {
        padding: 1rem;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr;
    }

    /* Botão toggle visível */
    .sidebar-toggle {
        display: flex !important;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1030;
        width: 44px;
        height: 44px;
        border-radius: 8px;
        background: var(--sbacem-roxo);
        color: white;
        border: none;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        cursor: pointer;
    }

    /* Overlay visível quando sidebar aberta */
    .sidebar-overlay.show {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Body sem scroll quando sidebar aberta */
    body:has(.sidebar-admin.show) {
        overflow: hidden;
    }

    /* Tables to cards on mobile */
    .admin-table-responsive thead {
        display: none;
    }

    .admin-table-responsive tbody tr {
        display: block;
        background: white;
        border-radius: 10px;
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: var(--shadow-sm);
        border-left: 4px solid var(--sbacem-roxo);
    }

    .admin-table-responsive tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .admin-table-responsive tbody td:last-child {
        border-bottom: none;
        padding-top: 1rem;
        justify-content: flex-end;
        gap: 0.5rem;
    }

    .admin-table-responsive tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--sbacem-roxo);
        font-size: 0.75rem;
        text-transform: uppercase;
    }
}

/* Desktop: sidebar visível e toggle escondido */
@media (min-width: 768px) {
    .sidebar-toggle {
        display: none !important;
    }

    .sidebar-overlay {
        display: none !important;
    }
}

/* ============================================
   LAYOUT FULL-WIDTH PARA PAINEL USUÁRIO
   ============================================ */

/* Quando a sidebar de usuário está presente, expandir container */
.container:has(.sidebar) {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
}

/* Body sem padding quando painel de usuário ativo */
body:has(.sidebar) {
    padding: 0;
}

/* Esconder header e footer do base.html no painel de usuário */
body:has(.sidebar)>.container>header,
body:has(.sidebar)>.container>footer {
    display: none;
}

/* Main sem padding extra no painel de usuário */
body:has(.sidebar)>.container>main {
    padding: 0;
}

/* Sidebar fixa na lateral com altura total */
.sidebar {
    position: fixed !important;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    z-index: 1000;
}

/* Conteúdo principal ocupa espaço restante */
.col-md-9.ms-sm-auto.col-lg-10 {
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width)) !important;
    max-width: none !important;
    min-height: 100vh;
    padding: 1.5rem 2rem !important;
    background: #f8f9fa;
}

/* Container-fluid deve ocupar tela toda */
.container-fluid:has(.sidebar) {
    padding: 0;
    max-width: 100%;
}

/* Row dentro do container-fluid */
.container-fluid>.row:has(.sidebar) {
    margin: 0;
    width: 100%;
}

/* Footer do painel de usuário */
body:has(.sidebar) footer {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

/* ============ RESPONSIVO MOBILE ============ */
@media (max-width: 767px) {

    /* Sidebar offcanvas em mobile */
    .sidebar {
        position: fixed !important;
        left: -280px;
        width: 280px;
        z-index: 1050;
        transition: left 0.3s ease;
    }

    .sidebar.show {
        left: 0;
    }

    /* Conteúdo ocupa tela toda em mobile */
    .col-md-9.ms-sm-auto.col-lg-10 {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1rem !important;
    }

    /* Footer em mobile */
    body:has(.sidebar) footer {
        margin-left: 0;
        width: 100%;
    }

    /* Body padding zero em mobile */
    body:has(.sidebar) {
        padding: 0 !important;
    }
}

/* ============ TABLET ============ */
@media (min-width: 768px) and (max-width: 991px) {
    :root {
        --sidebar-width: 220px;
    }

    .col-md-9.ms-sm-auto.col-lg-10 {
        margin-left: var(--sidebar-width) !important;
        width: calc(100% - var(--sidebar-width)) !important;
        padding: 1rem 1.5rem !important;
    }
}