/* Sistema de Avaliação de Fit Cultural - Estilos Personalizados */

/* === VARIÁVEIS CSS === */
:root {
    --primary-color: #27D07D;
    --primary-light: #3DD98E;
    --primary-dark: #20b56a;
    --secondary-color: #27D07D;
    --sidebar-hover-bg: #2ACD7F;
    --sidebar-hover-text: #ffffff;
    --accent-color: #27D07D;
    --gradient-primary: linear-gradient(135deg, #27D07D 0%, #20b56a 100%);
    --gradient-secondary: linear-gradient(135deg, #27D07D 0%, #20b56a 100%);
    --gradient-accent: linear-gradient(135deg, #27D07D 0%, #20b56a 100%);
    --accent-color: #f97316;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #facc15;
    --info-color: #38bdf8;
    --light-color: #f8fafc;
    --dark-color: #0f172a;
    --neutral-50: #f9fbff;
    --neutral-100: #edf1ff;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5f9;
    --surface-color: #ffffff;
    --surface-alt-color: rgba(255, 255, 255, 0.85);
    --surface-muted: #f5f7fb;
    --sidebar-overlay: rgba(15, 23, 42, 0.9);
    --sidebar-border: rgba(148, 163, 184, 0.2);
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --border-radius: 18px;
    --border-radius-sm: 12px;
    --box-shadow: 0 20px 45px rgba(99, 102, 241, 0.12);
    --box-shadow-lg: 0 35px 65px rgba(15, 23, 42, 0.18);
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
    --gradient-primary: var(--custom-primary-color, #2c3e50);
    --gradient-success: var(--success-color);
    --gradient-warning: var(--warning-color);
    --gradient-surface: var(--surface-alt-color);
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}


/* === ESTILOS GLOBAIS === */
html {
    overflow-x: hidden;
}

/* === CAMPOS OBRIGATÓRIOS === */
.required::after {
    content: " *";
    color: var(--danger-color);
    font-weight: bold;
}

.form-label.required::after {
    content: " *";
    color: var(--danger-color);
    font-weight: bold;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--surface-muted);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: auto;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.08);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: var(--custom-primary-color, var(--primary-color));
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--custom-primary-color, var(--primary-color));
    opacity: 0.8;
}

/* === SIDEBAR NAVIGATION === */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    padding: 1rem 0;
    background: var(--custom-primary-color, var(--primary-color));
    color: #e2e8f0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.2s ease;
}

.sidebar>* {
    position: relative;
    z-index: 1;
}

.sidebar-header {
    padding: 1.25rem 1.75rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.5px;
}

.sidebar-logo {
    height: 56px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(14, 165, 233, 0.3));
    transition: var(--transition);
}

.sidebar-logo:hover {
    transform: translateY(-2px) scale(1.02);
}

.sidebar-toggle {
    color: #e2e8f0 !important;
    border: none;
    padding: 0.5rem;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: rgba(148, 163, 184, 0.25);
    transform: scale(1.05);
}

.sidebar-user {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.user-avatar i {
    font-size: 1.6rem;
    color: #f8fafc;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 0.2rem;
}

.user-role {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.75);
    letter-spacing: 0.4px;
}

.sidebar-nav {
    flex: 1;
    padding: 1.25rem 0.75rem 1.5rem;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 1.25rem;
}

.nav-section-title {
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.55);
    letter-spacing: 1.2px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1.15rem;
    color: rgba(226, 232, 240, 0.85);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    position: relative;
    margin: 0.2rem 0.35rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    background: transparent;
    border: 1px solid transparent;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.sidebar-nav .nav-link:hover {
    color: var(--sidebar-hover-text);
    background: var(--sidebar-hover-bg);
    border-color: transparent;
    transform: none;
    box-shadow: none;
}

.sidebar-nav .nav-link:hover i {
    transform: none;
    color: inherit;
}

.sidebar-nav .nav-link.active {
    color: var(--sidebar-hover-text);
    background: var(--sidebar-hover-bg);
    border-color: transparent;
    box-shadow: none;
}

.sidebar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 28px;
    border-radius: 6px;
    background: var(--secondary-color);
}

/* === SUBMENU STYLES === */
.nav-item-dropdown {
    margin: 0;
    padding: 0;
}

.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1.15rem;
    color: rgba(226, 232, 240, 0.85);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    position: relative;
    z-index: 1 !important;
    margin: 0.2rem 0.35rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    background: transparent;
    border: 1px solid transparent;
}

.nav-dropdown-toggle i:first-child {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.nav-dropdown-toggle:hover {
    color: var(--sidebar-hover-text);
    background: var(--sidebar-hover-bg);
    border-color: transparent;
    transform: none;
    box-shadow: none;
}

.nav-dropdown-toggle:hover i:first-child {
    transform: none;
    color: inherit;
}

.submenu-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.submenu-arrow.rotate {
    transform: rotate(180deg);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    padding: 0;
    margin: 0;
    height: 0;
    visibility: hidden;
}

.nav-submenu.show {
    max-height: 500px;
    opacity: 1;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    height: auto;
    visibility: visible;
}

.nav-sublink {
    padding: 0.6rem 1rem !important;
    margin: 0.15rem 0.35rem !important;
    font-size: 0.9rem;
    background: transparent !important;
    position: relative !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
    display: block !important;
    cursor: pointer !important;
}

.nav-sublink * {
    pointer-events: none !important;
    cursor: pointer !important;
}

.nav-sublink:hover {
    transform: none !important;
    background: var(--sidebar-hover-bg) !important;
    color: var(--sidebar-hover-text) !important;
}

.nav-sublink.active {
    background: var(--sidebar-hover-bg) !important;
    color: var(--sidebar-hover-text) !important;
    font-weight: 600 !important;
    border-left: 3px solid rgba(255, 255, 255, 0.7) !important;
    padding-left: calc(1rem - 3px) !important;
}

/* Dropdown expandido manualmente (quando clica para abrir) */
.nav-item-dropdown.expanded>.nav-dropdown-toggle {
    color: var(--sidebar-hover-text);
    background: var(--sidebar-hover-bg);
    border-color: transparent;
}

/* Dropdown que contém a página ativa (mas NÃO está expandido) */
.nav-item-dropdown.active:not(.expanded)>.nav-dropdown-toggle {
    color: var(--sidebar-hover-text);
    background: var(--sidebar-hover-bg);
    border-color: transparent;
}

/* Dropdown que está TANTO ativo quanto expandido */
.nav-item-dropdown.active.expanded>.nav-dropdown-toggle {
    color: var(--sidebar-hover-text);
    background: var(--sidebar-hover-bg);
    border-color: transparent;
}

/* CORREÇÍO DEFINITIVA para espaçamento do menu */
.nav-item-dropdown {
    margin-bottom: 0.2rem;
}

/* FORÇAR submenus fechados a não ocupar espaço NENHUM */
.nav-item-dropdown:not(.expanded) .nav-submenu {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    display: none !important;
    line-height: 0 !important;
}

/* Submenus abertos - APENAS quando expandido manualmente */
.nav-item-dropdown.expanded .nav-submenu {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    line-height: normal !important;
}

/* Seções do menu sem espaços extras */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-section {
    flex-shrink: 0;
    margin-bottom: 0.8rem;
}

.nav-section:last-child {
    margin-bottom: 0;
}

/* Links do menu com espaçamento mínimo */
.nav-section .nav-link,
.nav-section .nav-dropdown-toggle {
    margin-bottom: 0.15rem;
}

.nav-section .nav-link:last-child,
.nav-section .nav-item-dropdown:last-child {
    margin-bottom: 0;
}

/* ELIMINAR qualquer espaço residual dos dropdowns */
.nav-item-dropdown:not(.expanded):not(.active) {
    height: auto;
    min-height: auto;
}

.nav-item-dropdown:not(.expanded):not(.active)::after {
    display: none;
}

/* Garantir que elementos não expandam */
.nav-item-dropdown * {
    box-sizing: border-box;
}

/* Forçar altura zero para submenus fechados */
.nav-submenu:not(.show) {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    display: none !important;
}

.logout-link {
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    margin-top: 2rem;
    padding-top: 1.2rem !important;
    color: rgba(248, 113, 113, 0.95) !important;
}

.logout-link:hover {
    background: rgba(248, 113, 113, 0.12) !important;
    color: #fca5a5 !important;
    transform: translateX(8px);
}

/* === TOP BAR === */
.topbar {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    padding: 0 2.25rem;
    display: flex;
    align-items: center;
    z-index: 1040;
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 40px -30px rgba(15, 23, 42, 0.35);
    transition: var(--transition);
}

.topbar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0.3px;
    margin-right: 3rem; /* Espaçamento maior entre título e data */
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    padding-left: 2rem; /* Espaçamento adicional à esquerda */
}

.topbar .btn {
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    font-size: 0.9rem;
}

/* === MAIN CONTENT === */
.main-content {
    margin-left: 280px;
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    padding: 2rem 2.5rem;
}

.public-content {
    margin: 0;
    min-height: 100vh;
    padding: 3rem 1.5rem;
}

/* === SIDEBAR OVERLAY (MOBILE) === */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    z-index: 1049;
    display: none;
    cursor: pointer;
}

/* Garantir que elementos de controle do sidebar tenham prioridade */
[data-action="toggle-sidebar"],
[data-action="close-sidebar"],
.sidebar-toggle {
    pointer-events: auto !important;
    z-index: 1052 !important;
    position: relative !important;
}

/* === RESPONSIVE === */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .topbar {
        left: 0;
        padding: 0 1.5rem;
    }

    .main-content {
        margin-left: 0;
        padding: 1.75rem 1.5rem;
    }

    /* Garantir que o botão de toggle funcione */
    .sidebar-toggle {
        cursor: pointer !important;
        z-index: 1051 !important;
        position: relative !important;
        pointer-events: auto !important;
    }

    .sidebar-toggle:hover {
        opacity: 0.8;
    }

}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
    }

    .topbar {
        height: 64px;
        padding: 0 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .topbar-title {
        font-size: 1.3rem;
        font-weight: 700;
        margin: 0;
        text-align: left;
        flex: 1;
        padding: 0;
        order: 0;
    }

    .topbar .sidebar-toggle {
        order: 1;
        margin: 0;
        padding: 0;
        font-size: 1.5rem;
        color: #ffffff !important;
        flex-shrink: 0;
        min-width: 60px !important;
        width: 60px !important;
        height: 40px !important;
        max-width: 60px !important;
        line-height: 1;
        background: var(--custom-primary-color, #6366f1) !important;
        border: none !important;
        border-radius: 0.5rem;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .topbar .sidebar-toggle:hover {
        background: var(--custom-primary-color-dark, #4f46e5) !important;
        transform: none;
        opacity: 0.9;
    }

    .topbar .sidebar-toggle i {
        margin: 0;
        padding: 0;
        display: block;
        font-size: 1.5rem;
        line-height: 1;
        color: #ffffff !important;
    }

    .topbar-actions {
        display: none !important;
    }

    .main-content {
        margin-top: 64px;
        padding: 1.5rem 1.25rem;
    }

}

/* === CONTEÚDO ADICIONAL === */
.public-content {
    min-height: 100vh;
    display: block;
    padding: 0;
}

/* === CARDS === */
.card {
    border: 1px solid rgba(99, 102, 241, 0.08);
    border-radius: var(--border-radius);
    background: var(--surface-alt-color);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(12px);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.02);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
    pointer-events: none; /* Não interceptar cliques */
}

.card-header {
    background: transparent;
    border: none;
    padding: 1.5rem 1.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.card-header h6,
.card-header .card-title {
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
}

.card-title {
    font-size: 1.15rem;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card-body {
    padding: 1.75rem;
    position: relative;
    z-index: 1;
}

.card-footer {
    background: rgba(255, 255, 255, 0.65);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

/* Classe não mais necessária - hover removido */

/* === BOTÕES === */
.btn {
    font-weight: 600;
    border-radius: 999px;
    padding: 0.55rem 1.4rem;
    transition: var(--transition);
    border: none;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn i {
    font-size: 1rem;
}

.btn-primary {
    background: var(--custom-primary-color, var(--primary-color)) !important;
    border-color: var(--custom-primary-color, var(--primary-color)) !important;
    color: #ffffff !important;
    box-shadow: 0 16px 30px -16px rgba(99, 102, 241, 0.8);
}

.btn-primary:hover {
    background: var(--custom-primary-color, var(--primary-color)) !important;
    border-color: var(--custom-primary-color, var(--primary-color)) !important;
    box-shadow: 0 20px 40px -18px rgba(79, 70, 229, 0.65);
    transform: translateY(-3px);
}

.bg-primary {
    background: var(--custom-primary-color, var(--primary-color)) !important;
}

.border-primary {
    border-color: var(--custom-primary-color, var(--primary-color)) !important;
}

.text-primary {
    color: var(--custom-primary-color, var(--primary-color)) !important;
}

.btn-secondary {
    background: rgba(17, 24, 39, 0.82);
    color: #f8fafc;
}

.btn-success {
    background: var(--success-color);
    color: #ffffff;
}

.btn-warning {
    background: var(--warning-color);
    color: #1f2937;
}

.btn-outline-primary {
    background: transparent !important;
    border: 1px solid var(--custom-primary-color, var(--primary-color)) !important;
    color: var(--custom-primary-color, var(--primary-color)) !important;
}

.btn-outline-primary:hover {
    background: var(--custom-primary-color, var(--primary-color)) !important;
    border-color: var(--custom-primary-color, var(--primary-color)) !important;
    color: #ffffff !important;
}

.btn-light {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-color);
}

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

/* Correção para botões em grupos - hover mais sutil */
.btn-group .btn:hover {
    transform: translateY(-1px);
}

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

/* Estilos minimalistas para botões de ação em tabelas */
.table .btn-group .btn {
    transition: all 0.2s ease;
    border-radius: 4px !important;
    border: none !important;
    position: relative;
    margin: 0 1px;
    background-color: transparent !important;
    box-shadow: none !important;
}

.table .btn-group .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    position: relative;
    background-color: #f8f9fa !important;
}

/* Efeitos de hover modernos para todos os botões */

/* Melhorar contraste dos botões outline */
.btn-outline-success:hover {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

.btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.btn-outline-info:hover {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: #000;
}

/* Design minimalista - apenas ícones coloridos sem bordas */
.btn-group .btn-outline-primary {
    background-color: transparent !important;
    border: none !important;
    color: var(--custom-primary-color, var(--primary-color)) !important;
}

.btn-group .btn-outline-primary:hover {
    background-color: #f8f9fa !important;
    border: none !important;
    color: var(--custom-primary-color, var(--primary-color)) !important;
}

.btn-group .btn-outline-success {
    background-color: transparent !important;
    border: none !important;
    color: #198754 !important;
}

.btn-group .btn-outline-success:hover {
    background-color: #f8f9fa !important;
    border: none !important;
    color: #198754 !important;
}

.btn-group .btn-outline-warning {
    background-color: transparent !important;
    border: none !important;
    color: #ffc107 !important;
}

.btn-group .btn-outline-warning:hover {
    background-color: #f8f9fa !important;
    border: none !important;
    color: #ffc107 !important;
}

.btn-group .btn-outline-info {
    background-color: transparent !important;
    border: none !important;
    color: #0dcaf0 !important;
}

.btn-group .btn-outline-info:hover {
    background-color: #f8f9fa !important;
    border: none !important;
    color: #0dcaf0 !important;
}

.btn-group .btn-outline-danger {
    background-color: transparent !important;
    border: none !important;
    color: #dc3545 !important;
}

.btn-group .btn-outline-danger:hover {
    background-color: #f8f9fa !important;
    border: none !important;
    color: #dc3545 !important;
}

/* Espaçamento minimalista entre botões */
.btn-group .btn {
    margin: 0 1px;
    border-radius: 4px !important;
}

.btn-group .btn:first-child {
    margin-left: 0;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Garantir que não haja bordas conflitantes */
.table .btn-group .btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    border-color: transparent !important;
}

/* Garantir que o hover da linha não afete os botões */
.table tbody tr:hover .btn-group .btn {
    background-color: transparent;
}

.table tbody tr:hover .btn-group .btn:hover {
    background-color: inherit;
}

.btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.18);
}

.btn-group-sm .btn {
    border-radius: var(--border-radius-sm);
    padding: 0.35rem 0.85rem;
}

/* === FORMULÁRIOS === */
.form-control,
.form-select,
textarea.form-control {
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.75);
    transition: var(--transition);
    padding: 0.75rem 1rem;
    color: var(--text-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.form-control::placeholder,
.form-select::placeholder {
    color: rgba(107, 114, 128, 0.65);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 0.35rem rgba(99, 102, 241, 0.18);
    background: rgba(255, 255, 255, 0.95);
}

.form-label {
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.2px;
}

.input-group-text {
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
    padding: 0.75rem 1rem;
}

.is-invalid {
    border-color: var(--danger-color) !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* === ALERTAS === */
.alert {
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 14px 30px -25px rgba(15, 23, 42, 0.35);
}

.alert i {
    font-size: 1.1rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
    border-color: rgba(34, 197, 94, 0.25);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.25);
}

.alert-warning {
    background: rgba(250, 204, 21, 0.16);
    color: #92400e;
    border-color: rgba(250, 204, 21, 0.25);
}

.alert-info {
    background: rgba(56, 189, 248, 0.15);
    color: #0f4c75;
    border-color: rgba(56, 189, 248, 0.25);
}

/* === TABELAS === */
.table {
    margin-bottom: 0;
    color: var(--text-color);
}

.table thead th {
    background: rgba(236, 240, 255, 0.65);
    border: none;
    font-weight: 600;
    color: var(--text-muted);
    padding: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.table tbody tr {
    background: rgba(255, 255, 255, 0.85);
    transition: var(--transition);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: rgba(148, 163, 184, 0.2);
}

/* Removido hover da linha da tabela para evitar conflitos com botões */
.table-hover tbody tr:hover {
    background-color: transparent;
    transform: none;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* === BADGES === */
.badge {
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    letter-spacing: 0.2px;
}

.badge-soft {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-dark);
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #166534;
}

/* === PROGRESS BARS === */
.progress {
    height: 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
}

.progress-bar {
    border-radius: 999px;
    transition: width 0.6s ease;
    background: var(--custom-primary-color, var(--primary-color));
}

/* === LOADING OVERLAY === */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-overlay.active,
#loadingOverlay[style*='display: block'] {
    display: flex !important;
    opacity: 1;
}

.loading-spinner {
    text-align: center;
    color: #f8fafc;
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* === ESTATÍSTICAS DASHBOARD === */
.stat-card {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    background: var(--gradient-surface);
    box-shadow: var(--shadow-soft);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.02);
    mix-blend-mode: screen;
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
}

/* === GRÁFICOS === */
.chart-container {
    position: relative;
    height: 320px;
    width: 100%;
}

/* === ASSESSMENT (AVALIAÇÍO) === */
.question-card {
    border-left: 4px solid transparent;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.option-card {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
}

.option-card.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.25);
}

.progress-assessment {
    height: 20px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.2);
}

.progress-assessment .progress-bar {
    background: var(--custom-primary-color, var(--primary-color));
}

/* === RESULTADOS === */
.result-card {
    background: rgba(236, 240, 255, 0.9);
    border-left: 4px solid var(--success-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin: 0 auto;
    background: var(--custom-primary-color, var(--primary-color));
    box-shadow: 0 20px 35px -20px rgba(99, 102, 241, 0.6);
}

.attribute-bar {
    background-color: rgba(148, 163, 184, 0.2);
    height: 24px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.attribute-fill {
    height: 100%;
    border-radius: 14px;
    transition: width 1s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--custom-primary-color, var(--primary-color));
}

/* === RADAR CHART === */
.radar-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* === FOOTER === */
footer {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.82);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    clear: both;
    width: 100%;
    flex-shrink: 0;
}

/* Garantir que o footer nunca seja sobreposto */
footer.bg-light {
    position: relative !important;
    clear: both !important;
}


/* === UTILITIES === */
.text-gradient {
    color: var(--custom-primary-color, var(--primary-color));
}

.bg-gradient-primary {
    background: var(--custom-primary-color, var(--primary-color));
}

.bg-gradient-success {
    background: var(--success-color);
}

.shadow-soft {
    box-shadow: var(--shadow-soft);
}

.glass-card {
    background: var(--surface-alt-color);
    border-radius: var(--border-radius);
    border: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-soft);
}

.gradient-border {
    position: relative;
    border-radius: var(--border-radius);
    padding: 1px;
    background: var(--custom-primary-color, var(--primary-color));
}

.gradient-border>* {
    border-radius: inherit;
    background: var(--surface-color);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-dark);
    font-weight: 500;
    font-size: 0.85rem;
}

.rounded-xl {
    border-radius: 24px !important;
}

/* === ANIMAÇÕES === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* === RESPONSIVIDADE MOBILE APRIMORADA === */

/* Ajustes para tablets pequenos e mobile landscape (até 991px) */
@media (max-width: 991.98px) {
    /* Reduzir padding do main content */
    .main-content {
        padding: 1.5rem;
    }

    /* Cards com padding reduzido */
    .card-body {
        padding: 1.25rem;
    }

    /* Ajustar font size dos títulos */
    .card-title {
        font-size: 1.05rem;
    }
}

/* Ajustes para mobile portrait e landscape (até 768px) */
@media (max-width: 768px) {
    /* === RESET DE ESPAÇAMENTOS === */
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .main-content {
        padding: 1.25rem 1rem;
    }

    /* === NAVEGAÇÃO === */
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }

    /* === CARDS === */
    .card {
        margin-bottom: 1rem;
        border-radius: 14px; /* Reduzir border-radius em mobile */
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 1rem 1.25rem 0.75rem;
    }

    /* === TABELAS === */
    .table-responsive {
        font-size: 0.85rem;
        border-radius: 12px;
        -webkit-overflow-scrolling: touch; /* Scroll suave no iOS */
    }

    .table {
        min-width: 700px; /* Força scroll horizontal quando necessário */
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap; /* Evita quebra de texto em células */
    }

    /* Ajustar primeira coluna das tabelas */
    .table th:first-child,
    .table td:first-child {
        position: sticky;
        left: 0;
        background: inherit;
        z-index: 10;
    }

    /* === ESTATÍSTICAS === */
    .stat-number {
        font-size: 1.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        font-size: 1.25rem;
    }

    /* === HERO SECTION === */
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-content .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.75rem;
        margin-right: 0 !important;
    }

    /* === ESPAÇAMENTOS === */
    .row.mt-5 {
        margin-top: 2rem !important;
    }

    .row.g-3 {
        --bs-gutter-y: 0.75rem;
    }

    /* === TIPOGRAFIA === */
    h1, .h1 {
        font-size: 1.75rem;
    }

    h2, .h2 {
        font-size: 1.5rem;
    }

    h3, .h3 {
        font-size: 1.25rem;
    }

    /* === IMAGENS RESPONSIVAS === */
    img {
        max-width: 100%;
        height: auto;
    }

    /* === GRÁFICOS === */
    .chart-container {
        height: 250px;
    }

    .radar-container {
        max-width: 100%;
    }
}

/* Ajustes para mobile pequeno (até 576px) */
@media (max-width: 576px) {
    /* === ESPAÇAMENTOS MÍNIMOS === */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .main-content {
        padding: 1rem 0.75rem;
    }

    /* === CARDS === */
    .card {
        border-radius: 12px;
    }

    .card-body {
        padding: 0.875rem;
    }

    .card-header {
        padding: 0.875rem 1rem 0.625rem;
    }

    /* === FORMULÁRIOS OTIMIZADOS PARA TOQUE === */
    .form-control,
    .form-select {
        min-height: 44px; /* Tamanho mínimo recomendado para toque */
        font-size: 16px; /* Evita zoom automático no iOS */
        padding: 0.625rem 0.875rem;
    }

    .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
    }

    /* === BOTÕES OTIMIZADOS PARA TOQUE === */
    .btn {
        min-height: 44px; /* Tamanho mínimo para área de toque */
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }

    .btn-sm {
        min-height: 38px;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .btn-group-sm .btn {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
        min-height: 36px;
    }

    /* Botões em tabelas - manter tamanho adequado */
    .table .btn-group .btn {
        min-height: 36px;
        min-width: 36px;
        padding: 0.375rem 0.5rem;
    }

    /* === TABELAS === */
    .table {
        font-size: 0.8125rem;
    }

    .table th,
    .table td {
        padding: 0.625rem 0.375rem;
    }

    /* === BADGES === */
    .badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.65rem;
    }

    /* === TIPOGRAFIA === */
    h1, .h1 {
        font-size: 1.5rem;
    }

    h2, .h2 {
        font-size: 1.25rem;
    }

    h3, .h3 {
        font-size: 1.125rem;
    }

    h4, .h4 {
        font-size: 1rem;
    }

    /* === ESTATÍSTICAS === */
    .stat-number {
        font-size: 1.5rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* === TOPBAR === */
    .topbar-title {
        font-size: 1.3rem;
        font-weight: 700;
        margin-right: 0;
        margin: 0;
    }

    /* === SIDEBAR === */
    .sidebar-title {
        font-size: 1.25rem;
    }

    .sidebar-logo {
        height: 48px;
    }

    /* === MODALS === */
    .modal-content {
        border-radius: 16px;
    }

    .modal-header,
    .modal-footer {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    /* === INPUTS DE BUSCA === */
    .input-group {
        flex-wrap: wrap;
    }

    .input-group .form-control {
        min-width: 0;
        flex: 1 1 100%;
    }

    .input-group .btn {
        flex: 1 1 100%;
        margin-top: 0.5rem;
    }

    /* === ALERTAS === */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    /* === PROGRESS BARS === */
    .progress {
        height: 10px;
    }

    /* === GRÁFICOS === */
    .chart-container {
        height: 220px;
    }

    /* === AVATARES E ÍCONES === */
    .avatar-circle {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }

    .user-avatar {
        width: 44px;
        height: 44px;
    }

    /* === LISTAS E MENU === */
    .list-group-item {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    /* === DROPDOWN === */
    .dropdown-menu {
        font-size: 0.875rem;
    }

    .dropdown-item {
        padding: 0.5rem 1rem;
    }

    /* === TOOLTIPS === */
    .tooltip {
        font-size: 0.8125rem;
    }

    /* === FILTROS E FORMS EM GRID === */
    .row.g-3 .col-md-4,
    .row.g-3 .col-md-3,
    .row.g-3 .col-md-2 {
        margin-bottom: 0.75rem;
    }

    /* === AJUSTES DE LAYOUT === */
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.75rem;
    }

    .d-flex.align-items-center:not(.card-body > .d-flex) {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* === AJUSTES MOBILE MUITO PEQUENO (até 400px) === */
@media (max-width: 400px) {
    /* Reduzir ainda mais espaçamentos em telas muito pequenas */
    .main-content {
        padding: 0.75rem 0.5rem;
    }

    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    /* Ajustar font sizes */
    body {
        font-size: 0.875rem;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    h1, .h1 {
        font-size: 1.375rem;
    }

    /* Botões full-width em telas muito pequenas */
    .btn:not(.btn-sm):not(.btn-lg) {
        width: 100%;
        justify-content: center;
    }

    /* Tabelas com scroll mais evidente */
    .table-responsive::after {
        content: '← Deslize para ver mais →';
        display: block;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.75rem;
        color: var(--text-muted);
        background: rgba(99, 102, 241, 0.05);
    }
}

/* === AJUSTES LANDSCAPE MOBILE === */
@media (max-width: 900px) and (orientation: landscape) {
    /* Reduzir altura de elementos em landscape */
    .topbar {
        height: 56px;
    }

    .main-content {
        margin-top: 56px;
        min-height: calc(100vh - 56px);
    }

    .sidebar {
        width: 240px;
    }

    /* Reduzir padding vertical em landscape */
    .main-content {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .card-body {
        padding-top: 0.875rem;
        padding-bottom: 0.875rem;
    }
}

/* === MELHORIAS DE ACESSIBILIDADE MOBILE === */
@media (max-width: 768px) {
    /* Aumentar área de clique de links */
    a:not(.btn) {
        padding: 0.25rem 0;
        display: inline-block;
    }

    /* Links dentro de nav-links já têm padding adequado */
    .nav-link a {
        padding: 0;
    }

    /* Focus visível para navegação por teclado */
    *:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }

    /* Scroll suave em toda a página */
    html {
        scroll-behavior: smooth;
    }

    /* Evitar texto selecionável em elementos de interface */
    .btn,
    .nav-link,
    .sidebar-toggle,
    .badge {
        -webkit-user-select: none;
        user-select: none;
    }

    /* Melhorar contraste de texto em mobile */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* === OVERRIDE FINAL PARA GARANTIR COR PERSONALIZADA === */
/* Máxima especificidade para garantir que os botões usem a cor personalizada */
.btn.btn-primary,
button.btn-primary,
a.btn-primary,
input[type="submit"].btn-primary {
    background-color: var(--custom-primary-color, #030768) !important;
    border-color: var(--custom-primary-color, #030768) !important;
    color: #ffffff !important;
}

.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active,
button.btn-primary:hover,
button.btn-primary:focus,
button.btn-primary:active,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:active {
    background-color: var(--custom-primary-color, #030768) !important;
    border-color: var(--custom-primary-color, #030768) !important;
    color: #ffffff !important;
}

.btn.btn-outline-primary,
button.btn-outline-primary,
a.btn-outline-primary {
    background-color: transparent !important;
    border-color: var(--custom-primary-color, #030768) !important;
    color: var(--custom-primary-color, #030768) !important;
}

.btn.btn-outline-primary:hover,
.btn.btn-outline-primary:focus,
.btn.btn-outline-primary:active,
button.btn-outline-primary:hover,
button.btn-outline-primary:focus,
button.btn-outline-primary:active,
a.btn-outline-primary:hover,
a.btn-outline-primary:focus,
a.btn-outline-primary:active {
    background-color: var(--custom-primary-color, #030768) !important;
    border-color: var(--custom-primary-color, #030768) !important;
    color: #ffffff !important;
}

/* === DARK MODE (FUTURO) === */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #f8f9fa;
        --light-color: #343a40;
    }

    body {
        background-color: #1a1a1a;
        color: var(--dark-color);
    }

    .card {
        background-color: #2d3748;
        color: var(--dark-color);
    }

    .table {
        color: var(--dark-color);
    }

    .form-control,
    .form-select {
        background-color: #2d3748;
        border-color: #4a5568;
        color: var(--dark-color);
    }
}

/* === AJUSTES ESPECÍFICOS PARA PÁGINAS === */

/* Página de Login Responsiva */
@media (max-width: 991.98px) {
    .login-page .left-panel {
        display: none; /* Esconder branding em tablets */
    }

    .login-page .right-panel {
        padding: 2rem 1.5rem;
    }

    .login-form-container {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .login-page {
        padding: 1rem;
    }

    .login-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .login-subtitle {
        font-size: 0.875rem;
    }

    .brand-text-large {
        font-size: 2rem;
    }

    .brand-tagline-large {
        font-size: 0.875rem;
    }

    .features-preview .feature-item {
        padding: 0.75rem;
    }

    .feature-icon-small {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .login-title {
        font-size: 1.375rem;
    }

    .login-form .form-control {
        font-size: 16px; /* Evita zoom no iOS */
        min-height: 44px;
    }

    .login-form .btn {
        width: 100%;
        min-height: 48px;
        font-size: 1rem;
    }
}

/* Páginas de Relatórios e Analytics */
@media (max-width: 768px) {
    .analytics-card,
    .report-card {
        margin-bottom: 1rem;
    }

    .analytics-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
    }

    .filter-section {
        width: 100%;
    }

    .filter-section .row {
        margin: 0;
    }
}

/* Formulários de Cadastro/Edição */
@media (max-width: 768px) {
    .form-section {
        margin-bottom: 1.5rem;
    }

    .form-section-title {
        font-size: 1.125rem;
        margin-bottom: 0.875rem;
    }

    /* Grupos de campos lado a lado viram verticais */
    .row.g-3 .col-md-6,
    .row.g-3 .col-md-4,
    .row.g-3 .col-md-3 {
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 576px) {
    /* Botões de ação em formulários */
    .form-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Campos de upload de arquivo */
    .file-upload-wrapper {
        padding: 1rem;
    }

    .file-upload-text {
        font-size: 0.875rem;
    }
}

/* Páginas de Detalhes/Visualização */
@media (max-width: 768px) {
    .detail-section {
        margin-bottom: 1.25rem;
    }

    .detail-label {
        font-weight: 600;
        font-size: 0.8125rem;
        margin-bottom: 0.25rem;
    }

    .detail-value {
        font-size: 0.9375rem;
    }

    /* Timeline */
    .timeline-item {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: 0.25rem;
    }
}

/* Página de Dashboard */
@media (max-width: 768px) {
    .dashboard-header {
        margin-bottom: 1.25rem;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .dashboard-stats {
        margin-bottom: 1rem;
    }

    .quick-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.75rem;
    }

    .quick-action-btn {
        min-height: 80px;
        font-size: 0.875rem;
    }
}

/* Componentes Específicos */
@media (max-width: 768px) {
    /* Paginação */
    .pagination {
        font-size: 0.875rem;
    }

    .pagination .page-link {
        padding: 0.375rem 0.625rem;
        min-width: 36px;
        min-height: 36px;
    }

    /* Breadcrumbs */
    .breadcrumb {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }

    /* Tabs */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-tabs .nav-link {
        white-space: nowrap;
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
    }

    /* Accordions */
    .accordion-button {
        font-size: 0.9375rem;
        padding: 0.875rem 1rem;
    }

    .accordion-body {
        padding: 1rem;
        font-size: 0.875rem;
    }
}

/* === IMPRESSÍO === */
@media print {

    .navbar,
    .btn,
    .card-header,
    footer {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: white;
        color: black;
    }
}

/* === FIX GLOBAL PARA CHECKBOXES E RADIOS === */
/* Corrige visualização de checkboxes em todo o sistema */
.form-check-input {
    width: 1.25em !important;
    height: 1.25em !important;
    margin-top: 0.125em !important;
    vertical-align: top !important;
    background-color: #fff !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    border: 1px solid rgba(0,0,0,.25) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    print-color-adjust: exact !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.form-check-input[type="checkbox"] {
    border-radius: 0.25em !important;
}

.form-check-input[type="radio"] {
    border-radius: 50% !important;
}

.form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.form-check-input:checked[type="checkbox"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
}

.form-check-input:checked[type="radio"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e") !important;
}

.form-check-input:focus {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25) !important;
}

.form-check-input:hover:not(:disabled):not(:checked) {
    border-color: #0d6efd !important;
}

.form-check {
    display: block !important;
    min-height: 1.5rem !important;
    padding-left: 1.75em !important;
    margin-bottom: 0.5rem !important;
}

.form-check .form-check-input {
    float: left !important;
    margin-left: -1.75em !important;
}

.form-check-label {
    cursor: pointer !important;
    user-select: none !important;
}
