:root {
    /* ==========================================
       DESIGN SYSTEM — SIGAAE
       Identidade Visual Profissional
       ========================================== */
    
    /* Cores Base — Paleta "Educação Inclusiva" */
    --bg: #f4f6fb;
    --bg-deep: #e8ecf5;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --surface-raised: #ffffff;
    --surface-overlay: rgba(255, 255, 255, 0.95);
    --surface-muted: #f0f4ff;
    --surface-subtle: #f8f9fd;
    
    /* Bordas */
 --border: #94a3b8;
 --border-subtle: #b0bec5;
 --border-strong: #64748b;
    
    /* Cor Primária — Indigo Educacional */
    --primary: #5b6abf;
    --primary-rgb: 91, 106, 191;
    --primary-light: #8b97d4;
    --primary-dark: #4351a0;
    --primary-subtle: #f0f2ff;
    --primary-muted: #e4e7fc;
    --primary-grad: linear-gradient(135deg, #7c89d4 0%, #5b6abf 60%, #4a58a8 100%);
    --primary-grad-hover: linear-gradient(135deg, #8b97d4 0%, #6573c8 60%, #5460b5 100%);
    
    /* Cores de Estado */
    --success: #1a9d6f;
    --success-light: #e6f7f0;
    --success-dark: #12835a;
    --danger: #e24c5e;
    --danger-light: #fef2f3;
    --danger-dark: #c43a4b;
    --warning: #d4930d;
    --warning-light: #fef9ed;
    --warning-dark: #b07b0a;
    --info: #4a8fd4;
    --info-light: #edf5fd;
    --info-dark: #3a78b8;
    
    /* Texto */
    --text: #1a2138;
    --text-secondary: #4b5568;
    --text-tertiary: #7a849a;
    --text-inverse: #ffffff;
    --text-link: #5b6abf;
    
    /* Acentos */
    --accent: #6c8fd4;
    --accent-rgb: 108, 143, 212;
    
    /* Tipografia */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    
    /* Espaçamento */
    --space-2xs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Bordas */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Sombras — Sistema de Elevação */
    --shadow-xs: 0 1px 2px rgba(26, 33, 56, 0.04);
    --shadow-sm: 0 1px 4px rgba(26, 33, 56, 0.06), 0 1px 2px rgba(26, 33, 56, 0.04);
    --shadow-md: 0 4px 12px rgba(26, 33, 56, 0.07), 0 2px 4px rgba(26, 33, 56, 0.05);
    --shadow-lg: 0 8px 24px rgba(26, 33, 56, 0.09), 0 4px 8px rgba(26, 33, 56, 0.06);
    --shadow-xl: 0 16px 40px rgba(26, 33, 56, 0.11), 0 6px 12px rgba(26, 33, 56, 0.07);
    --shadow-2xl: 0 24px 60px rgba(26, 33, 56, 0.14), 0 10px 20px rgba(26, 33, 56, 0.09);
    --shadow-inner: inset 0 2px 4px rgba(26, 33, 56, 0.05);
    --shadow-focus: 0 0 0 3px rgba(91, 106, 191, 0.15);
    --shadow-focus-strong: 0 0 0 4px rgba(91, 106, 191, 0.25);
    --shadow-primary: 0 4px 14px rgba(91, 106, 191, 0.25);
    --shadow-success: 0 4px 14px rgba(26, 157, 111, 0.25);
    --shadow-danger: 0 4px 14px rgba(226, 76, 94, 0.25);
    --shadow-warning: 0 4px 14px rgba(212, 147, 13, 0.25);
    --shadow-info: 0 4px 14px rgba(74, 143, 212, 0.25);
    
    --white: #ffffff;
    --surface-light: #f0f4ff;
    
    /* Transições */
    --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition: var(--transition-base);
    
    /* Z-Index Escala */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-popover: 500;
    --z-toast: 600;
    --z-loading: 9999;
}

html {
height: 100%;
overflow-y: auto !important;
overflow-x: hidden !important;
}

body {
font-family: var(--font-main);
background: var(--bg);
color: var(--text);
line-height: 1.65;
margin: 0;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
min-height: 100%;
height: auto;
overflow-y: auto !important;
overflow-x: hidden !important;
    /* Padrão de fundo sutil para dar profundidade */
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(91, 106, 191, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(108, 143, 212, 0.02) 0%, transparent 50%);
}

/* Fundo com padrão geométrico sutil (opcional, descomente para usar) */
/*
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%235b6abf' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}
*/

#sondagem-tabs .nav-link {
    border: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin-right: 2px;
    transition: var(--transition-base);
    color: var(--text-secondary);
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
}

#sondagem-tabs .nav-link.active {
    background: var(--primary-grad);
    color: var(--text-inverse);
    box-shadow: var(--shadow-primary);
}

#sondagem-tabs .nav-link:hover:not(.active) {
    background: var(--primary-muted);
    color: var(--primary);
}

.tab-content {
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

/* Cards das categorias na sondagem */
#sondagem_tab_content .card {
    transition: var(--transition-base);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

#sondagem_tab_content .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#sondagem_tab_content .table th {
    border-top: none;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.75rem 0.6rem;
    background: var(--bg-deep);
    color: var(--text);
    border-color: var(--border);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#sondagem_tab_content .table td {
    padding: 0.7rem 0.6rem;
    vertical-align: middle;
    color: var(--text);
    border-color: var(--border);
}

/* ==========================================
   SIDEBAR — Navegação Premium
   ========================================== */
.sidebar {
width: 230px;
height: 100vh;
background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
position: fixed;
padding: 0.8rem 0.5rem;
border-right: 1px solid var(--border-subtle);
z-index: var(--z-sticky);
box-shadow: var(--shadow-sm);
display: flex;
flex-direction: column;
}

.brand-logo {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 6px;
}

.brand-logo i {
    font-size: 1.25rem;
    -webkit-text-fill-color: var(--primary);
    filter: drop-shadow(0 2px 4px rgba(91, 106, 191, 0.3));
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--surface-subtle);
    padding: 5px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    margin-top: 6px;
}

.nav-item {
display: flex;
align-items: center;
gap: 10px;
color: var(--text-secondary);
text-decoration: none;
padding: 0.65rem 0.75rem;
border-radius: var(--radius-sm);
cursor: pointer;
border: none;
background: transparent;
width: 100%;
font-size: 0.85rem;
font-weight: 500;
transition: var(--transition-base);
text-align: left;
position: relative;
overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    background: var(--primary);
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
    transition: transform var(--transition-base);
}

.nav-item i {
font-size: 1.15rem;
width: 22px;
text-align: center;
transition: var(--transition-base);
flex-shrink: 0;
}

.nav-item:hover {
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    color: var(--primary);
}

.nav-item:hover::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item.active {
    background: var(--primary-grad);
    color: var(--text-inverse);
    box-shadow: var(--shadow-primary);
    font-weight: 600;
}

.nav-item.active::before {
    background: var(--text-inverse);
    transform: translateY(-50%) scaleY(1);
}

.nav-item.active i {
    color: var(--text-inverse);
}

/* Botão Adapta — destaque sutil quando ativo */
.nav-item[data-section="Adapta"].active {
    background: linear-gradient(135deg, #1b7f6e 0%, #0b3b5f 100%);
    color: var(--text-inverse);
    box-shadow: 0 4px 12px rgba(27, 127, 110, 0.3);
}

/* Indicador de itens não lidos/não salvos */
.nav-item .unsaved-indicator {
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
    50% { opacity: 0.6; transform: translateY(-50%) scale(1.2); }
}

/* Main Content Area */
.main-content {
margin-left: 230px;
padding: 1.5rem 2rem;
width: calc(100% - 230px);
max-width: 1440px;
min-height: 100vh;
overflow-y: auto !important;
overflow-x: hidden !important;
display: block !important;
}

/* Top Bar Styling */
.top-bar {
    background: var(--surface);
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    border: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
}

.aluno-selector-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

#aluno_tag {
    font-weight: 600;
    border-radius: var(--radius-md);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.75rem;
    animation: fadeIn 0.5s ease;
    background: var(--primary-grad);
    color: var(--text-inverse);
    box-shadow: var(--shadow-primary);
    padding: 0.4rem 0.85rem;
}

/* ==========================================
   CARDS — Sistema de Elevação
   ========================================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-top: 3px solid transparent;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-base);
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

/* Níveis de elevação para cards */
.card-elevated-sm { box-shadow: var(--shadow-sm); }
.card-elevated-md { box-shadow: var(--shadow-md); }
.card-elevated-lg { box-shadow: var(--shadow-lg); }

/* Cards com destaque de cor no topo */
.card.stat-card.primary { border-top-color: var(--primary); }
.card.stat-card.success { border-top-color: var(--success); }
.card.stat-card.warning { border-top-color: var(--warning); }
.card.stat-card.info { border-top-color: var(--info); }

/* ==========================================
   FORMULÁRIOS — Design Consistente
   ========================================== */
body .form-control,
body .form-select {
    background: var(--surface);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 400;
    transition: var(--transition-base);
    line-height: 1.5;
}

.form-check-input {
  width: 1.2rem;
  height: 1.2rem;
  min-width: 44px;
  min-height: 44px;
  margin-top: 0;
  cursor: pointer;
  border: 1.5px solid var(--border-strong);
  transition: var(--transition-base);
}

.form-control::placeholder {
    color: var(--text-tertiary);
    opacity: 0.8;
}

body .form-control:focus,
body .form-select:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

body .form-control:read-only {
    background: var(--surface-subtle);
    color: var(--text-secondary);
    cursor: default;
}

body.light-theme .form-control:read-only {
    background: var(--surface-subtle);
}

/* Labels de formulário */
.form-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

/* Container de Foco Pedagógico (Aba Presença) */
.foco-pedagogico-container {
    background-color: var(--surface-subtle);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
}

#p_atividades_semanais_preview {
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ==========================================
   TOGGLES (SWITCHES)
   ========================================== */
.form-switch .form-check-input {
  cursor: pointer;
  width: 2.5em;
  height: 1.25em;
  min-width: 44px;
  min-height: 44px;
  transition: var(--transition-base);
  border: 1.5px solid var(--border-strong);
}

.form-switch .form-check-input:checked {
    background-color: var(--success);
    border-color: var(--success);
}

body .form-switch .form-check-input:checked {
    background-color: var(--success);
    border-color: var(--success);
}

.form-switch .form-check-input:focus {
    box-shadow: var(--shadow-focus) !important;
}

/* Cards com tabelas, formulários ou listas não devem flutuar no hover */
.card-no-lift:hover,
.card:has(table):hover,
.card:has(.table):hover {
    transform: none;
}

.card h6 {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.card h2 {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    color: var(--text);
}

/* Dashboard Stats Graphics */
.stat-card.primary h2 { color: var(--primary); }
.stat-card.success h2 { color: var(--success); }
.stat-card.warning h2 { color: var(--warning); }
.stat-card.info h2 { color: var(--info); }

/* Animação de Brilho Suave */
@keyframes focus-glow {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
    50% { box-shadow: 0 0 15px 2px rgba(99, 102, 241, 0.2); border-color: var(--primary) !important; }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.glow-active {
    animation: focus-glow 1.2s ease-in-out;
}

.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

/* ==========================================
   BOTÕES — Sistema de Design
   ========================================== */
.btn {
    border-radius: var(--radius-md);
    padding: 0.55rem 1.15rem;
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1.5px solid transparent;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

/* Efeito ripple sutil nos botões */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
    border-radius: inherit;
}

.btn:active::after {
    transform: scale(2);
    opacity: 1;
    transition: 0s;
}

.btn-primary {
    background: var(--primary-grad);
    border: none;
    color: var(--text-inverse);
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
    background: var(--primary-grad-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
    color: var(--text-inverse);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

.btn-success {
    box-shadow: var(--shadow-xs);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-success);
}

.btn-danger {
    box-shadow: var(--shadow-xs);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-danger);
}

.btn-warning {
    box-shadow: var(--shadow-xs);
    color: var(--text-inverse);
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-warning);
    color: var(--text-inverse);
}

.btn-outline-danger {
    border-color: var(--border);
    color: var(--danger);
    background: var(--surface);
}

.btn-outline-danger:hover {
    background-color: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface);
}

.btn-outline-primary:hover {
    background: var(--primary-grad);
    border-color: transparent;
    color: var(--text-inverse);
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
}

.btn-outline-success {
    border-color: var(--success);
    color: var(--success);
    background: var(--surface);
}

.btn-outline-success:hover {
    background: var(--success);
    border-color: transparent;
    color: var(--text-inverse);
    transform: translateY(-1px);
    box-shadow: var(--shadow-success);
}

.btn-outline-info {
    border-color: var(--info);
    color: var(--info);
    background: var(--surface);
}

.btn-outline-info:hover {
    background: var(--info);
    border-color: transparent;
    color: var(--text-inverse);
    transform: translateY(-1px);
    box-shadow: var(--shadow-info);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

/* Tags de Seleção Rápida */
.tag-selecao {
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.7rem;
}
.tag-selecao:hover {
    transform: translateY(-1px);
    filter: brightness(0.9);
}

/* ==========================================
   TABELAS — Design Limpo e Legível
   ========================================== */
.table {
color: var(--text);
margin-top: 16px;
min-width: 100%;
}

/* ============================================
BARRA DE ROLAGEM HORIZONTAL - GERAL
============================================ */
.table-responsive {
overflow-x: auto !important;
-webkit-overflow-scrolling: touch;
display: block !important;
width: 100%;
}

.table-responsive .table {
margin-bottom: 0;
}

/* Scrollbar customizada - Webkit */
.table-responsive::-webkit-scrollbar {
height: 10px;
width: 10px;
}

.table-responsive::-webkit-scrollbar-track {
background: var(--surface-subtle);
border-radius: var(--radius-md);
}

.table-responsive::-webkit-scrollbar-thumb {
background: linear-gradient(135deg, var(--primary), var(--primary-dark));
border-radius: var(--radius-md);
border: 2px solid var(--surface-subtle);
}

.table-responsive::-webkit-scrollbar-thumb:hover {
background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

/* Scrollbar Firefox */
.table-responsive {
scrollbar-width: thin;
scrollbar-color: var(--primary) var(--surface-subtle);
}

/* ============================================
REGISTRO DE ESTUDANTES - ESPECÍFICO
============================================ */
#aba_registro .table-responsive .table {
min-width: 1000px;
}

/* ============================================
RELATÓRIOS - ESPECÍFICO
============================================ */
#aba_relatorios .table-responsive .table {
min-width: 900px;
}

/* ============================================
PRESENÇA - ESPECÍFICO
============================================ */
#aba_presenca .table-responsive .table {
min-width: 950px;
}

/* ============================================
SONDAGEM - ESPECÍFICO
============================================ */
#aba_sondagem .table-responsive .table {
min-width: 1000px;
}

/* ============================================
HORÁRIOS - ESPECÍFICO
============================================ */
#aba_horarios .table-responsive .table {
min-width: 900px;
}

/* ============================================
DASHBOARD - ESPECÍFICO
============================================ */
#dashboard .table-responsive .table {
min-width: 800px;
}

/* Forçar largura mínima em tabelas */
.table-responsive > .table {
min-width: 800px;
}

/* Scrollbar customizada para Registro de Estudantes */
#aba_registro .table-responsive::-webkit-scrollbar {
height: 10px;
width: 10px;
}

#aba_registro .table-responsive::-webkit-scrollbar-track {
background: var(--surface-subtle);
border-radius: var(--radius-md);
border: 1px solid var(--border-subtle);
}

#aba_registro .table-responsive::-webkit-scrollbar-thumb {
background: linear-gradient(135deg, var(--primary), var(--primary-dark));
border-radius: var(--radius-md);
border: 2px solid var(--surface-subtle);
}

#aba_registro .table-responsive::-webkit-scrollbar-thumb:hover {
background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

/* Garantir scroll horizontal em tabelas - Geral */
.table-responsive {
overflow-x: auto !important;
-webkit-overflow-scrolling: touch;
min-width: 100%;
display: block !important;
}

/* Forçar largura mínima em tabelas dentro de table-responsive */
.table-responsive > .table {
min-width: 800px;
}

/* Forçar aparecimento da barra de rolagem */
.table-responsive::-webkit-scrollbar {
height: 8px;
width: 8px;
}

.table-responsive::-webkit-scrollbar-track {
background: var(--bg-deep);
border-radius: var(--radius-full);
}

.table-responsive::-webkit-scrollbar-thumb {
background: var(--primary-light);
border-radius: var(--radius-full);
}

.table-responsive::-webkit-scrollbar-thumb:hover {
background: var(--primary);
}

/* Forçar largura mínima em tabelas dentro de table-responsive */
.table-responsive > .table {
min-width: 800px;
}

/* Forçar aparecimento da barra de rolagem */
.table-responsive::-webkit-scrollbar {
height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
background: var(--bg-deep);
border-radius: var(--radius-full);
}

.table-responsive::-webkit-scrollbar-thumb {
background: var(--primary-light);
border-radius: var(--radius-full);
}

.table-responsive::-webkit-scrollbar-thumb:hover {
background: var(--primary);
}

.table thead th {
background: var(--surface-subtle);
border-bottom: 2px solid var(--border);
color: var(--text-secondary);
font-weight: 700;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
padding: 12px 16px;
white-space: nowrap;
}

.table tbody td {
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 16px;
    vertical-align: middle;
    color: var(--text);
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--surface-muted);
}

/* Custom Table for Calendar/Frequency */
.table-calendar {
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.table-calendar th {
    background: var(--surface-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.table-calendar td {
    border: 1px solid var(--border-subtle);
    transition: var(--transition-fast);
}

.table-calendar .day-p { background: var(--success-light); color: var(--success-dark); font-weight: 700; }
.table-calendar .day-f { background: var(--danger-light); color: var(--danger-dark); font-weight: 700; }
.table-calendar .day-block { background: var(--warning-light); color: var(--warning-dark); }

/* ==========================================
   TÍTULOS DE SEÇÃO
   ========================================== */
.section-title {
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.section-title::before {
    content: '';
    width: 5px;
    height: 28px;
    background: var(--primary-grad);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

/* ==========================================
   EMOÇÃO GRID — Seleção Visual
   ========================================== */
.emocao-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 10px;
}

.emocao-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 2px solid var(--border);
    padding: 14px 10px;
    border-radius: var(--radius-md);
    font-size: 2rem;
    transition: var(--transition-base);
    cursor: pointer;
    gap: 6px;
    min-height: 95px;
    min-width: 85px;
    box-shadow: var(--shadow-xs);
}

.emocao-btn span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

.emocao-btn:hover {
    background: var(--surface-muted);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.emocao-btn.active {
    background: var(--primary-grad);
    border-color: var(--primary);
    box-shadow: var(--shadow-primary);
    transform: translateY(-2px);
}

.emocao-btn.active span {
color: var(--text-inverse);
}

.toggle-select-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 8px;
}

.toggle-select-item {
position: relative;
}

.toggle-select-label {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
padding: 10px 8px;
min-height: 72px;
background: var(--surface);
border: 2px solid var(--border);
border-radius: var(--radius-md);
font-size: 0.75rem;
font-weight: 600;
color: var(--text-secondary);
cursor: pointer;
transition: var(--transition-base);
text-align: center;
box-shadow: var(--shadow-xs);
}

.toggle-select-label i {
font-size: 1.4rem;
}

.toggle-select-label:hover {
background: var(--surface-muted);
border-color: var(--primary-light);
transform: translateY(-1px);
box-shadow: var(--shadow-sm);
}

.btn-check:checked + .toggle-select-label {
background: var(--primary-grad);
border-color: var(--primary);
color: var(--text-inverse);
box-shadow: var(--shadow-primary);
transform: translateY(-1px);
}

.btn-check:checked + .toggle-select-label i {
color: var(--text-inverse);
}

.btn-check:disabled + .toggle-select-label {
opacity: 0.5;
pointer-events: none;
}

.diario-section-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 16px;
margin-bottom: 16px;
box-shadow: var(--shadow-xs);
}

.diario-section-card h6 {
color: var(--primary);
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.06em;
margin-bottom: 12px;
padding-bottom: 8px;
border-bottom: 2px solid var(--primary-light);
}

.diario-section-card fieldset legend {
font-size: 0.8rem;
font-weight: 600;
color: var(--text);
margin-bottom: 8px;
}

.form-switch .form-check-label.small {
font-size: 0.78rem;
font-weight: 500;
color: var(--text);
}

/* ==========================================
CUSTOM SCROLLBARS
========================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-deep);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================
   ANIMAÇÕES — Micro-interações
   ========================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.content-section {
display: none;
}

.content-section.section-animate {
animation: fadeIn 0.35s ease-out backwards;
}

/* Permitir exibição via style inline */
.content-section.active,
.content-section[style*="display: block"],
.sub-relatorio[style*="display: block"] {
display: block !important;
overflow-y: visible !important;
overflow-x: visible !important;
}

.content-section.section-animate {
    animation: fadeIn 0.35s ease-out backwards;
}

/* Responsive Grid for Schedules */
.schedule-grid {
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.grid-cell:hover {
    background: var(--surface-muted);
}

/* ==========================================
   DOCUMENT PREVIEW — Documentos MEC
   ========================================== */
.preview-container {
    background: var(--bg-deep);
    padding: 32px;
    border-radius: var(--radius-xl);
    margin-top: 20px;
}

.paee-doc, .pei-doc, .caso-doc {
    background: white;
    color: #1a202c !important;
    padding: 56px 48px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    line-height: 1.65;
    max-width: 21cm;
    margin: 0 auto;
    font-family: 'Times New Roman', Times, serif !important;
    font-size: 12pt !important;
}

/* ==========================================
   TABS & MODAIS
   ========================================== */
.nav-tabs {
    border: none;
    gap: 8px;
}

.nav-tabs .nav-link {
    border: none;
    background: var(--surface-subtle);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition-base);
}

.nav-tabs .nav-link:hover {
    background: var(--surface-muted);
    color: var(--primary);
}

.nav-tabs .nav-link.active {
    background: var(--primary-grad);
    color: var(--text-inverse);
    box-shadow: var(--shadow-primary);
}

/* ==========================================
   UTILITÁRIOS
   ========================================== */
.bg-surface { background-color: var(--surface) !important; }
.bg-surface-light { background-color: var(--surface-subtle) !important; }
.bg-surface-muted { background-color: var(--surface-muted) !important; }

.avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background: var(--primary-grad);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.btn-white {
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.btn-white:hover {
    background-color: var(--surface-muted);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Cores de texto utilitárias */
.text-indigo { color: var(--primary) !important; }
.text-indigo-light { color: var(--primary-light) !important; }
.text-indigo-dark { color: var(--primary-dark) !important; }
.text-dim { color: var(--text-secondary) !important; }
.text-dark { color: var(--text) !important; }
.text-muted-custom { color: var(--text-tertiary) !important; }

/* Bordas utilitárias */
.border-indigo { border-color: var(--primary) !important; }

/* Scroll Container adjustment */
.scroll-container {
    background: var(--surface-solid);
    color: var(--text);
}

.scroll-container::-webkit-scrollbar {
    width: 6px;
}

/* ==============================================
   PRINT: Todo o conteúdo impresso deve ser legível
   ============================================== */
@media print {
    /* === RESET SELETIVO (EVITAR PÁGINA EM BRANCO) === */
    body {
        background: white !important;
        color: #000 !important;
        font-size: 11pt !important;
        line-height: 1.5 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        height: auto !important;
        width: 100% !important;
    }

    /* === ESCONDER APENAS NAVEGAÇÃO E CONTROLES === */
    .no-print,
    .sidebar,
    .top-bar,
    .sidebar-overlay,
    .loading-screen,
    .aluno-floating-bar,
    #toast-container,
    .btn,
    button:not(.print-btn),
    select,
    input[type="file"],
    input[type="button"],
    input[type="range"],
    input[type="checkbox"],
    input[type="radio"],
    .btn-group,
    .btn-group-sm,
    .form-switch,
    .form-check-input,
    .emocao-grid,
.toggle-select-grid,
    .skip-link,
    .breadcrumb-container {
        display: none !important;
    }

    /* === CONTESDO OCUPA A PÁGINA TODA === */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1.5cm !important;
        max-width: none !important;
    }

    /* === SEÇÃO ATIVA VISÍVEL === */
    .content-section[style*="display: block"],
    .sub-relatorio[style*="display: block"] {
        display: block !important;
    }

    /* === FORçar LAYOUT EM BLOCO (EVITAR SOBREPOSIÇÃO) === */
    .row {
        display: block !important;
        margin: 0 !important;
    }

    .col, [class*="col-"], [class^="col-"] {
        width: 100% !important;
        float: none !important;
        display: block !important;
        margin-bottom: 8pt !important;
        padding: 0 !important;
        position: static !important;
    }

    /* Flexbox â†’ Block (evitar sobreposição) */
    .d-flex,
    [style*="display: flex"] {
        display: block !important;
    }

    [style*="display: flex"] > *,
    .d-flex > * {
        display: block !important;
        margin-bottom: 6pt !important;
        width: 100% !important;
        position: static !important;
    }

    /* Grid â†’ Block */
    [style*="display: grid"],
    .grid {
        display: block !important;
    }

    /* Elementos com position â†’ static */
    [style*="position: absolute"],
    [style*="position: fixed"] {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        z-index: auto !important;
    }

    /* === CARDS FICAM PLANOS === */
    .card {
        border: 1px solid #999 !important;
        border-top: 3px solid #333 !important;
        box-shadow: none !important;
        background: white !important;
        color: #000 !important;
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 12pt !important;
        padding: 12pt !important;
        border-radius: 0 !important;
        overflow: visible !important;
        position: static !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }

    .card-header {
        background: #eee !important;
        border-bottom: 1px solid #666 !important;
        padding: 6pt 10pt !important;
        break-after: avoid;
        page-break-after: avoid;
        margin: -12pt -12pt 8pt -12pt !important;
        position: static !important;
    }

    .card-body {
        padding: 10pt 0 !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
    }

    /* === TABELAS === */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: auto !important;
        font-size: 9pt !important;
        margin-bottom: 12pt !important;
        overflow: visible !important;
    }

    thead {
        display: table-header-group !important;
    }

    tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    th, td {
        border: 1px solid #333 !important;
        padding: 4pt 6pt !important;
        text-align: left !important;
        vertical-align: top !important;
        overflow: visible !important;
    }

    th {
        background: #ddd !important;
        font-weight: bold !important;
    }

    /* === TÍTULOS E SEÇÕES === */
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        break-after: avoid;
        page-break-after: avoid;
        margin-top: 12pt !important;
        margin-bottom: 6pt !important;
    }

    h1 { font-size: 18pt !important; }
    h2 { font-size: 15pt !important; }
    h3 { font-size: 13pt !important; }
    h4 { font-size: 12pt !important; }
    h5 { font-size: 11pt !important; }
    h6 { font-size: 10pt !important; }

    .section-title {
        color: #000 !important;
        border-bottom: 2px solid #000 !important;
        padding-bottom: 6pt !important;
        margin-top: 16pt !important;
        font-size: 16pt !important;
    }

    .section-title::before {
        display: none !important;
    }

    /* === BADGES E TAGS === */
    .badge {
        border: 1px solid #666 !important;
        background: #f5f5f5 !important;
        color: #000 !important;
        font-size: 8pt !important;
        padding: 2pt 5pt !important;
        display: inline-block !important;
        margin: 2pt !important;
    }

    /* === FORMULÁRIOS === */
    input[type="text"],
    input[type="date"],
    input[type="number"],
    input[type="time"],
    textarea {
        border: 1px solid #999 !important;
        background: white !important;
        color: #000 !important;
        font-size: 10pt !important;
        padding: 4pt 6pt !important;
        border-radius: 0 !important;
        display: block !important;
        width: 100% !important;
        margin-bottom: 4pt !important;
        position: static !important;
    }

    textarea {
        min-height: 30pt !important;
        resize: none !important;
    }

    select {
        display: none !important;
    }

    /* === FOTO DO ALUNO === */
    .student-photo-container,
    .student-photo-xs,
    .student-photo-sm,
    .student-photo-md {
        border: 1px solid #999 !important;
        overflow: hidden !important;
        display: inline-block !important;
        position: static !important;
    }

    .student-photo-container .photo-overlay {
        display: none !important;
    }

    .student-photo-container::after {
        display: none !important;
    }

    .avatar-fallback {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ccc !important;
        color: #333 !important;
    }

    /* === TEXTOS E CORES === */
    .text-dim, .text-muted, small {
        color: #444 !important;
    }

    .text-primary, .text-success, .text-warning, .text-danger, .text-info {
        color: #000 !important;
        font-weight: bold !important;
    }

    .fw-bold, .fw-bolder {
        font-weight: bold !important;
    }

    /* === ALERTAS E AVISOS === */
    .alert {
        border: 1px solid #666 !important;
        background: #f5f5f5 !important;
        padding: 8pt 10pt !important;
        margin-bottom: 10pt !important;
        border-radius: 0 !important;
        position: static !important;
    }

    /* === PROGRESS BARS === */
    .progress {
        border: 1px solid #666 !important;
        background: #eee !important;
        height: 14pt !important;
        position: static !important;
    }

    .progress-bar {
        background: #999 !important;
        color: #000 !important;
        position: static !important;
    }

    /* === RELATÃ“RIOS ESPECÍFICOS === */
    .paee-doc, .pei-doc, .caso-doc {
        box-shadow: none !important;
        padding: 0 !important;
        max-width: none !important;
        font-size: 11pt !important;
    }

    /* === QUEBRA DE PÁGINA === */
@page {
  size: A4;
  margin: 3cm 3cm 2cm 2cm;
}

    .page-break, .break-page {
        page-break-before: always;
        break-before: always;
    }

    .no-page-break {
        page-break-before: avoid;
        break-before: avoid;
    }

    /* === FOOTER PARA IMPRESSÃO === */
    .print-footer {
        display: block !important;
        text-align: center !important;
        font-size: 8pt !important;
        color: #666 !important;
        margin-top: 20pt !important;
        border-top: 1px solid #999 !important;
        padding-top: 8pt !important;
    }

    /* === GARANTIR QUE CONTESDO NÃO SEJA CORTADO === */
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }

    /* === LINKS === */
    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    a[href]::after {
        content: none !important;
    }
}

/* Footer para impressão (invisível na tela) */
.print-footer {
    display: none;
}

/* Sub-relatórios */
.sub-relatorio {
    animation: fadeIn 0.3s ease-out;
}

/* Wizard Sondagem */
.sondagem-wizard-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    padding: 0 1rem;
}
.sondagem-wizard-header::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 2px;
    background: var(--border);
    z-index: 1;
}
.wizard-step {
    width: 35px; height: 35px;
    border-radius: 50%; /* Mantém o formato de bolinha */
    background: var(--surface-muted); /* Fundo sutil para abas não ativas */
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
    font-weight: bold;
    transition: var(--transition);
    cursor: pointer;
}
.wizard-step.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.2);
}
.wizard-step.completed {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

/* Personalização Cromática por Etapa da Sondagem */
.sondagem-step-div {
    animation: slideStep 0.4s ease-out;
}

@keyframes slideStep {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step 1 - Cognitivo (Azul) */
#sstep_1 .card { background: #f0f9ff !important; border-left: 6px solid #0ea5e9 !important; }
#sstep_1 .text-primary { color: #0369a1 !important; }
#sstep_1 .form-control, #sstep_1 .form-select { border: 1px solid #0ea5e9 !important; }
#sstep_1 .form-control:focus, #sstep_1 .form-select:focus { box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15) !important; }

/* Step 2 - Barreiras (Rose/Vermelho) */
#sstep_2 .card { background: #fff1f2 !important; border-left: 6px solid #f43f5e !important; }
#sstep_2 .text-danger { color: #be123c !important; }
#sstep_2 .form-control, #sstep_2 .form-select { border: 1px solid #f43f5e !important; }
#sstep_2 .form-control:focus, #sstep_2 .form-select:focus { box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.15) !important; }

/* Step 3 - Perfil (Verde) */
#sstep_3 .card { background: #f0fdf4 !important; border-left: 6px solid #10b981 !important; }
#sstep_3 .text-success { color: #15803d !important; }
#sstep_3 .form-control, #sstep_3 .form-select { border: 1px solid #10b981 !important; }
#sstep_3 .form-control:focus, #sstep_3 .form-select:focus { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15) !important; }

/* Step 4 - PAEE (Indigo) */
#sstep_4 .card { background: #f5f3ff !important; border-left: 6px solid #6366f1 !important; }
#sstep_4 .form-control, #sstep_4 .form-select, #sstep_4 .textarea-paee, #sstep_4 .form-control-custom { border: 1px solid #6366f1 !important; }
#sstep_4 .form-control:focus, #sstep_4 .form-select:focus, #sstep_4 .textarea-paee:focus, #sstep_4 .form-control-custom:focus { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important; }

/* Menu de relatórios */
#relatorios_menu .list-group-item {
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: transparent;
    color: var(--text-dim);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 5px;
}

#relatorios_menu .list-group-item:hover {
    background: var(--surface-light);
    color: var(--primary);
}

#relatorios_menu .list-group-item.active {
    background: var(--primary-grad);
    color: white;
    font-weight: 600;
}

/* Input group consistency */
.input-group-text {
    background: var(--surface-light);
    border-color: var(--border);
    color: var(--text-dim);
}

/* Text utilities */
.text-dim {
    color: var(--text-dim) !important;
}

.text-dark {
    color: var(--text) !important;
}

/* Card hover effect refinement */
.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* LOADING SCREEN */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
z-index: var(--z-loading);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hide {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: var(--text);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--surface-light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* BREADCRUMB */
.breadcrumb-container {
    padding: 12px 16px;
    background: var(--surface-light);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    color: var(--text-dim);
    font-size: 0.875rem;
}

.breadcrumb-item.active {
    color: var(--primary);
    font-weight: 600;
}

/* SIDEBAR FOOTER */
.sidebar-footer {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: auto;
padding-top: 16px;
border-top: 1px solid var(--border-subtle);
}

.sidebar-status {
text-align: center;
padding: 8px;
border-radius: 8px;
}

/* Garantir que o botão de configurações sempre apareça */
.sidebar .mt-auto {
margin-top: auto !important;
}

.sidebar .border-top {
border-top: 1px solid var(--border-subtle) !important;
}

/* Destaque para o botão de configurações */
.nav-item[data-section="Configurações"] {
background: linear-gradient(135deg, #e0e7ff 0%, #f0f4ff 100%) !important;
border: 1px solid rgba(91, 106, 191, 0.2) !important;
box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15) !important;
font-weight: 600 !important;
}

.nav-item[data-section="Configurações"]:hover {
background: linear-gradient(135deg, #dbe2ff 0%, #e8f0ff 100%) !important;
transform: translateY(-1px) !important;
box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25) !important;
}

/* Destaque para o botão SIG IA */
.nav-item[onclick*="SIGIA"] {
background: linear-gradient(135deg, #fef3c7 0%, #fef9e3 100%) !important;
border: 1px solid rgba(245, 158, 11, 0.3) !important;
box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2) !important;
font-weight: 600 !important;
}

.nav-item[onclick*="SIGIA"]:hover {
background: linear-gradient(135deg, #fde68a 0%, #fef3c7 100%) !important;
transform: translateY(-1px) !important;
box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}

@media (max-width: 991px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .card {
        padding: 16px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .emocao-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
.sidebar {
  width: 280px;
  height: 100vh;
  position: fixed;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: var(--z-modal);
  }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 16px 12px;
    }

    .top-bar {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
        border-radius: 12px;
        margin-bottom: 24px;
        box-shadow: var(--shadow-sm);
    }

    .breadcrumb-container {
        display: none; /* Esconder breadcrumb em mobile para economizar espaço */
    }

    .brand-logo {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .nav-item {
        padding: 14px 18px;
        font-size: 0.95rem;
        justify-content: flex-start;
    }

    .nav-item i {
        font-size: 1.3rem;
        width: 24px;
    }

    .card {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
        gap: 10px;
    }

    .section-title::before {
        width: 4px;
        height: 28px;
    }

/* OVERLAY PARA MOBILE */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-modal) - 1);
  display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

/* Tabelas horizontais em telas pequenas */
@media (max-width: 576px) {
    .main-content {
        padding: 12px;
    }

    .sidebar {
        width: 220px;
        padding: 20px 12px;
    }

    .brand-logo {
        font-size: 1.1rem;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-item {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .btn {
        padding: 9px 16px;
        font-size: 0.85rem;
        min-height: 44px; /* WCAG 2.5.5 - Área de toque mínima */
    }

    .form-control, .form-select {
        padding: 9px 12px;
        font-size: 0.9rem;
    }

    .table thead th, .table tbody td {
        padding: 8px;
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.2rem;
        gap: 10px;
    }

    .section-title::before {
        width: 4px;
        height: 24px;
    }

    .card {
        padding: 14px;
        border-radius: 10px;
    }

    /* Texto das tabelas menor para caber */
    .table { font-size: 0.8rem; }

    /* Badges compactos */
    .badge { font-size: 0.7rem; padding: 0.3em 0.5em; }

    /* Formulário de sondagem: selects ocupam largura total */
    #sondagem_tabela_container .form-select {
        font-size: 0.75rem;
        padding: 6px 8px;
    }

    /* Seção de relatórios: menu lateral vira accordion em mobile */
    #relatorios_menu {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 8px !important;
    }

    #relatorios_menu .list-group-item {
        flex: 1 1 45%;
        text-align: center;
        border-radius: 10px !important;
        font-size: 0.75rem;
        padding: 8px 4px !important;
    }

/* Emojis de emoção em 4 colunas */
.emocao-grid,
.toggle-select-grid {
grid-template-columns: repeat(4, 1fr);
}

    /* Esconder texto das nav-items em mobile para economizar espaço */
    .sidebar .nav-item span {
        font-size: 0.85rem;
    }
}

/* ====================================================
   Acessibilidade: Focus styles
   ==================================================== */
.nav-item:focus,
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Estilização do Modal de Ajuda */
.help-modal-content {
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
}

.help-modal-content .card h6 {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.skip-link:focus {
    top: 6px;
}

/* ====================================================
   ACESSIBILIDADE: respeita preferência por menos animação
   ==================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ====================================================
   UTILITÁRIOS EXTRAS — Responsividade e Toque
   ==================================================== */

/* Botões de ação em tabelas: área de toque mínima de 44px (WCAG 2.5.5) */
.btn-sm {
    min-height: 44px; /* WCAG 2.5.5 - Área de toque mínima */
}

/* ====================================================
   LIGHT THEME: variáveis faltando / overrides
   ==================================================== */
body.light-theme {
    --indigo-500: #4f46e5;
}

/* Garanta que cards no light theme ficarão legíveis */

/* Novas classes para remover estilos inline */
.glass-bg {
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.textarea-glass {
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: white;
}

.textarea-paee {
    background: var(--surface) !important; /* Fundo claro */
    border: 1px solid var(--border) !important; /* Borda padrão */
    color: var(--text) !important; /* Texto escuro */
}

.textarea-transparent {
    background: transparent;
    color: #e2e8f0;
}

.min-height-50vh {
    min-height: 50vh;
    font-family: 'Times New Roman', serif;
}

.btn-indigo-custom {
    background: var(--indigo-500);
    color: white;
}

.nav-item-indigo {
    color: var(--indigo-500);
}

body.light-theme .card {
    color: var(--text);
}

/* Tabela de frequência no light theme */
body.light-theme .table-calendar td,
body.light-theme .table-calendar th {
    color: #1e293b;
    background-color: #ffffff;
}

/* ====================================================
   MELHORIAS DE PERFORMANCE: will-change só onde necessário
   ==================================================== */
.loading-spinner {
    will-change: transform;
}

.nav-item,
.emocao-btn,
.btn {
    will-change: auto; /* Remover will-change de elementos estáticos */
}

/* === ESTILOS PARA ACORDEÃO DA SONDAGEM === */

/* Botões do Acordeão */
#sondagem-accordion .accordion-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#sondagem-accordion .accordion-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3) !important;
}

#sondagem-accordion .accordion-button:not(.collapsed) {
    background: var(--surface-emphasis) !important; /* Fundo mais claro para texto escuro */
    color: var(--text) !important; /* Texto escuro para legibilidade */
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.15); /* Sombra mais suave */
}

#sondagem-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Botões de Ação */
#sondagem-accordion + .row .btn:first-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6) !important;
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
}

#sondagem-accordion + .row .btn:last-child:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: #1d4ed8 !important;
    color: #1d4ed8 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3) !important;
}

/* Inputs e Formulários */
#sondagem-accordion .form-control,
#sondagem-accordion .form-select {
    background: var(--white) !important;
    color: var(--text) !important;
    border: 1px solid #0ea5e9 !important;
    transition: var(--transition);
}

#sondagem-accordion .form-control:focus,
#sondagem-accordion .form-select:focus {
    border-color: #0ea5e9 !important;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15) !important;
}

#sondagem-accordion .form-control::placeholder {
    color: var(--text-dim) !important;
}

/* Labels */
#sondagem-accordion .form-label {
    color: var(--text) !important;
    font-weight: 600 !important;
}

/* Accordion Body */
#sondagem-accordion .accordion-body {
    border-radius: 0 0 16px 16px !important;
    margin-top: -1px;
}

/* Responsividade */
@media (max-width: 768px) {
    #sondagem-accordion .accordion-button {
        padding: 1rem !important;
    }

    #sondagem-accordion .accordion-button .fs-5 {
        font-size: 1.1rem !important;
    }

    #sondagem-accordion .accordion-button small {
        display: none;
    }
}

/* Custom Classes for Inline Styles */
.accordion-body-custom {
    background: rgba(20, 30, 50, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-custom {
    background: rgba(59, 130, 246, 0.1);
    color: #e2e8f0;
}

.badge-a {
    background: #dcfce7;
    color: #166534;
}

.badge-p {
    background: #fef3c7;
    color: #92400e;
}

.badge-d {
    background: #fee2e2;
    color: #991b1b;
}

.badge-na {
    background: #f1f5f9;
    color: #64748b;
}

/* ============================================
   SONDAGEM - ETAPA 1: HABILIDADES COGNITIVAS
   Estilo padronizado com Etapas 2 e 3
   ============================================ */
.avaliacao-barreira-card {
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}
.avaliacao-barreira-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px);
}
.avaliacao-barreira-card.sond-nao-respondida {
    border: 2px solid #dc3545 !important;
    background: #fef2f2 !important;
    animation: pulseError 1.2s ease-in-out;
}
@keyframes pulseError {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
    50% { box-shadow: 0 0 0 6px rgba(220, 53, 69, 0.25); }
}
.likert-btn-nivel {
    transition: all 0.15s ease;
    border-radius: 4px;
    line-height: 1;
}
.likert-btn-nivel:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    filter: brightness(0.95);
}
.likert-btn-nivel.selecionado {
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.likert-barreira {
    flex-shrink: 0;
}

.form-control-custom {
    background: var(--white) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
}

.form-label-danger {
    color: var(--danger); /* Usar a cor danger do tema */
}

.form-label-success {
    color: var(--success); /* Usar a cor success do tema */
}

.form-label-primary {
    color: var(--primary-dark); /* Usar a cor primary-dark do tema */
}

.form-label-light {
    color: var(--text); /* Usar a cor de texto padrão */
}

.card-custom {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(129, 140, 248, 0.1) 100%);
}

.overflow-auto-custom {
    max-height: 350px;
}

.overflow-y-auto-custom {
    max-height: 200px;
    overflow-y: auto;
}

.display-none {
    display: none;
}

.btn-outline-info-custom {
    cursor: pointer;
}

.input-file {
    display: none;
}

.accordion-button-custom {
    background: rgba(20, 30, 50, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #e2e8f0;
}

.card-custom-bg {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(129, 140, 248, 0.1) 100%);
}

.nav-item-accent {
    color: var(--accent) !important;
}

.form-label-success-custom {
    color: #34d399;
}

.overflow-y-auto-60vh {
    max-height: 60vh;
    overflow-y: auto;
}

.overflow-y-auto-60vh.is-expanded {
    max-height: none !important;
}

.bg-custom {
    background: rgba(20, 30, 50, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid #3b82f6;
    color: #3b82f6;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
  background: #3b82f6;
  color: white;
}

.btn-purple {
  background: #7c3aed;
  color: white;
  border: 1px solid #7c3aed;
}
.btn-purple:hover {
  background: #6d28d9;
  border-color: #6d28d9;
  color: white;
}
.btn-outline-purple {
  background: transparent;
  border: 2px solid #7c3aed;
  color: #7c3aed;
}
.btn-outline-purple:hover {
  background: #7c3aed;
  color: white;
}
.text-purple {
  color: #7c3aed !important;
}

.sidebar-custom {
    min-height: 75vh;
    background: rgba(var(--primary-rgb), 0.03);
}

.main-content-custom {
    max-height: 85vh;
    overflow-y: auto;
}

.select-min-width {
    min-width: 250px;
}

/* ====================================================
   GRADE DE HORÁRIOS NO DASHBOARD
   ==================================================== */
/* Remoção de tons azuis em favor de neutros */

/* Tabela de grade de horários */
#tabelaGradeHorarios {
    border-collapse: collapse;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

#tabelaGradeHorarios thead th {
    background: var(--primary-grad) !important;
    color: var(--white) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255,255,255,0.1) !important;
    padding: 1rem !important;
}

/* Células da grade */
#gradeHorariosBody td {
    background: rgba(99, 102, 241, 0.02) !important;
    border-color: var(--border) !important;
    padding: 0.75rem !important;
    min-height: 120px;
}

#gradeHorariosBody td:nth-child(even) {
    background: rgba(99, 102, 241, 0.05) !important; /* Alternância sutil de cor nas colunas */
}
/* Destaque para a coluna do dia atual */
#gradeHorariosBody td.col-dia-atual {
    background: rgba(99, 102, 241, 0.08) !important;
}

/* Célula de horário dentro da tabela */
.horario-cell {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%) !important;
    border: 1px solid var(--border) !important;
    border-left: 4px solid var(--primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 10px !important;
    margin-bottom: 8px !important;
    cursor: pointer !important;
    box-shadow: var(--shadow-sm) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.horario-cell:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
    border-color: var(--primary) !important;
}

/* Horário atual destaca em laranja */
.horario-cell.horario-atual {
    background: #fff7ed !important;
    border: 4px solid #f97316 !important; /* Borda laranja mais grossa */
    color: #000000 !important;
    cursor: pointer !important;
    animation: pulse-orange 2s infinite ease-in-out;
    position: relative;
    z-index: 1;
}

/* Forçar cor preta nos textos internos do horário atual */
.horario-cell.horario-atual .horario-time,
.horario-cell.horario-atual .horario-cell-aluno {
    color: #000000 !important;
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
        transform: scale(1);
        border-color: #f97316 !important;
    }
    70% {
        box-shadow: 0 0 0 10px rgba(249, 115, 22, 0);
        transform: scale(1.02);
        border-color: #ea580c !important; /* Tom de laranja mais profundo no pico */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
        transform: scale(1);
        border-color: #f97316 !important;
    }
}

/* Horário bloqueado destacado em amarelo */
.horario-cell.bloqueado {
    background: #fefce8 !important;
    border-left-color: #eab308 !important;
    border-color: #fef08a !important;
}

/* Tooltip do nome do aluno */
.horario-cell-aluno {
    font-weight: 600;
    color: var(--text);
    font-size: 0.875rem;
}

/* Horário da aula */
.horario-time {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 2px;
}

/* Célula vazia */
.horario-cell.vazio {
    background: transparent !important;
    background: rgba(0, 0, 0, 0.02) !important;
    border: 2px dashed var(--border) !important;
    border-left: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-dim) !important;
    font-size: 0.75rem !important;
    opacity: 0.5 !important;
}

/* Célula vazia no dia atual */
.horario-cell.vazio.dia-atual {
    background: rgba(99, 102, 241, 0.12) !important;
    border-style: solid !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    opacity: 1 !important;
}

body.light-theme .horario-cell.horario-atual:hover {
    background: rgba(217, 119, 6, 0.25) !important;
}

/* Card header customizado */
.card-header {
    font-weight: 700 !important;
}

/* New style for the dashboard schedule card container */
.dashboard-schedule-card {
    background: rgba(var(--primary-rgb), 0.15) !important; /* Darker blue/gray */
    border-color: rgba(var(--primary-rgb), 0.3) !important;
}

.dashboard-schedule-card .card-header {
    background: rgba(var(--primary-rgb), 0.25) !important; /* Slightly darker header */
    color: var(--text) !important;
}

.dashboard-schedule-card .card-footer {
background: rgba(var(--primary-rgb), 0.1) !important; /* Slightly lighter footer */
color: var(--text-dim) !important;
}

.bg-light-blue {
background-color: rgba(var(--primary-rgb), 0.08) !important;
}

/* Visual feedback for fields with saved data */
.has-saved-data {
    border-color: var(--success) !important;
    box-shadow: 0 0 0 1px rgba(5, 150, 105, 0.25) !important;
}



/* Footer da tabela */
.card-footer {
    font-size: 0.85rem !important;
}

/* Responsividade da tabela */
@media (max-width: 1024px) {
    #tabelaGradeHorarios thead th {
        font-size: 0.85rem !important;
        padding: 12px 6px !important;
    }
    
    #gradeHorariosBody td {
        height: 80px !important;
        padding: 8px 4px !important;
    }
    
    .horario-cell {
        font-size: 0.7rem !important;
        padding: 6px 4px !important;
    }
}

@media (max-width: 768px) {
    #tabelaGradeHorarios {
        font-size: 0.8rem !important;
    }
    
    #tabelaGradeHorarios thead th {
        padding: 10px 4px !important;
        font-size: 0.8rem !important;
    }
    
    #gradeHorariosBody td {
        height: 70px !important;
        padding: 6px 3px !important;
    }
    
    .horario-cell {
        font-size: 0.65rem !important;
        padding: 5px 3px !important;
        margin: 2px 1px !important;
    }
}

/* Animação de entrada para seções */
@keyframes sectionFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-animate {
    animation: sectionFadeIn 0.3s ease forwards;
}

/* ==============================================
   SLIDER DE ENGAJAMENTO
   ============================================== */
.engajamento-slider-container {
    padding: 16px 20px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: var(--radius-md);
    border: 2px solid #818cf8;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.engajamento-slider-container .form-range {
    margin-bottom: 12px;
    cursor: pointer;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #ef4444 0%, #f59e0b 25%, #eab308 40%, #84cc16 55%, #22c55e 70%, #10b981 85%, #059669 100%);
}

.engajamento-slider-container .form-range::-webkit-slider-thumb {
    background: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    border: 3px solid #ffffff;
    width: 24px;
    height: 24px;
}

.engajamento-slider-container .form-range::-moz-range-thumb {
    background: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    border: 3px solid #ffffff;
    width: 24px;
    height: 24px;
}

.engajamento-slider-container .form-range::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
}

.engajamento-display {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.engajamento-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #4338ca;
}

.engajamento-texto {
    font-size: 0.95rem;
    font-weight: 700;
    color: #6366f1;
}

#p_engajamento_valor {
    min-width: 40px;
    font-size: 1.3rem;
    font-weight: 800;
    padding: 4px 12px;
}

/* Estrelas (mantido para compatibilidade com código legado) */
.star-rating {
    display: flex;
    gap: 8px;
    cursor: pointer;
}

.star-rating .star {
    font-size: 1.8rem;
    color: #cbd5e1;
    transition: all 0.2s ease;
    cursor: pointer;
}

.star-rating .star.selected {
    color: #fbbf24;
}

.star-rating .star.hover-active {
    color: #fbbf24;
}

.star-rating .star:hover {
    transform: scale(1.15);
}

/* ==========================================
   BARRA FLUTUANTE DO ALUNO SELECIONADO
   ========================================== */
.aluno-floating-bar {
    position: fixed;
    top: 10px;
    right: 20px;
z-index: var(--z-toast);
  background: white;
    border-radius: 30px;
    padding: 8px 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.aluno-floating-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 9.5pt;
    color: #1e293b;
}

.aluno-floating-content i {
    font-size: 12pt;
}

.aluno-floating-content #aluno_floating_name {
    font-weight: 600;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aluno-floating-cid {
    background: #f0f9ff;
    color: #0369a1;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 7.5pt;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

.aluno-floating-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 11pt;
  cursor: pointer;
  padding: 5px;
  margin-left: 8px;
  border-radius: 50%;
  transition: all 0.2s;
  min-width: 44px;
  min-height: 44px;
  display: flex;
    align-items: center;
    justify-content: center;
}

.aluno-floating-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

@media (max-width: 768px) {
    .aluno-floating-bar {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .aluno-floating-content #aluno_floating_name {
        max-width: 150px;
    }
}

/* ==========================================
   STUDENT PHOTO — Upload & Thumbnails
   ========================================== */

.student-photo-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: var(--surface-subtle);
    transition: var(--transition-base);
    margin: 0 auto;
}

.student-photo-container:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.student-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.student-photo-container .photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-base);
}

.student-photo-container:hover .photo-overlay {
    opacity: 1;
}

.student-photo-container .photo-overlay i {
    color: white;
    font-size: 1.5rem;
}

/* Student photo with no image - show icon */
.student-photo-container img[src=""], .student-photo-container img:not([src]) {
    display: none;
}

.student-photo-container::after {
    content: '\f030'; /* camera icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-tertiary);
    font-size: 1.5rem;
    z-index: 0;
}

.student-photo-container img:not([src=""]) {
    z-index: 1;
    position: relative;
}

/* Thumbnail sizes for different contexts */
.student-photo-xs {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-subtle);
    overflow: hidden;
    flex-shrink: 0;
}

.student-photo-sm {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
}

.student-photo-md {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.student-photo-xs img,
.student-photo-sm img,
.student-photo-md img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Avatar fallback (initials) */
.avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-grad);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 50%;
    width: 100%;
    height: 100%;
}

.student-photo-xs .avatar-fallback { font-size: 0.7rem; }
.student-photo-sm .avatar-fallback { font-size: 0.85rem; }
.student-photo-md .avatar-fallback { font-size: 1rem; }

/* NOVOS COMPONENTES — SONDAGEM & IDENTIFICAÇÃO */
.student-info-header {
    background: var(--surface) !important;
    transition: var(--transition-base);
    animation: slideDownFade 0.5s ease-out;
}

.student-info-header:hover {
    box-shadow: var(--shadow-md) !important;
    border-color: rgba(var(--primary-rgb), 0.3) !important;
    transform: translateY(-2px);
}

.student-avatar-mini img {
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
    transition: var(--transition-fast);
}

.student-avatar-mini:hover img {
    transform: scale(1.05);
}

.has-saved-data {
    border-color: rgba(var(--success-rgb), 0.4) !important;
    background-color: var(--success-light) !important;
}

@keyframes slideDownFade {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
 
 
 

.cursor-pointer { cursor: pointer; }
#bloqueios_chevron { transition: transform 0.3s ease; }

/* ====================================================
ACESSIBILIDADE: :focus-visible (WCAG 2.4.7 / 2.4.13)
Distingue foco por teclado de foco por mouse
==================================================== */
:focus-visible {
    outline: 3px solid var(--primary, #4361ee);
    outline-offset: 2px;
}

.nav-item:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 3px solid var(--primary, #4361ee);
    outline-offset: 2px;
    box-shadow: var(--shadow-focus) !important;
}

/* Skip-link (WCAG 2.4.1) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 6px;
    background: var(--primary, #4361ee);
    color: #fff;
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
z-index: var(--z-loading);
  font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* ====================================================
ACESSIBILIDADE: Alto contraste (WCAG 1.4.11, 1.4.12)
==================================================== */
@media (prefers-contrast: more) {
    :root {
        --text-primary: #000;
        --text-secondary: #333;
        --bg-primary: #fff;
        --border-color: #000;
    }
    .card, .modal-content, .form-control, .form-select {
        border-color: #000 !important;
    }
    .btn {
        border-width: 2px !important;
    }
}

@media (forced-colors: active) {
.btn, .nav-item, .form-control, .form-select, .badge {
forced-color-adjust: none;
border: 1px solid ButtonText;
}
.btn-primary {
background-color: Highlight;
color: HighlightText;
}
}

/* ==========================================
ROLLAGEM DE TELA - CORREÇÃO GERAL
Garantir que todas as abas rolem corretamente
========================================== */
html {
height: 100% !important;
overflow-y: scroll !important;
overflow-x: hidden !important;
scroll-behavior: smooth;
}

body {
height: 100% !important;
min-height: 100% !important;
overflow-y: scroll !important;
overflow-x: hidden !important;
}

.main-content {
overflow-y: auto !important;
overflow-x: hidden !important;
max-height: 100vh !important;
display: block !important;
height: auto !important;
min-height: 100vh !important;
}

.content-section {
overflow-y: visible !important;
overflow-x: visible !important;
}

.content-section.active,
.content-section[style*="display: block"] {
overflow-y: visible !important;
overflow-x: visible !important;
display: block !important;
}

/* Garantir que tabelas e cards não estourem */
.table-responsive {
overflow-x: auto !important;
}

.card {
overflow: visible !important;
}

/* ==========================================
SELETOR RÁPIDO DE ALUNO (Fixo - Canto Inferior Direito)
========================================== */
.quick-aluno-selector {
position: fixed;
bottom: 20px;
right: 20px;
width: 280px;
background: #fff;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
z-index: 9999;
border: 2px solid #5b6abf;
transition: all 0.3s ease;
}

.quick-aluno-selector:hover {
box-shadow: 0 6px 25px rgba(91, 106, 191, 0.25);
transform: translateY(-2px);
}

.quick-aluno-header {
padding: 12px 16px;
background: linear-gradient(135deg, #5b6abf, #4351a0);
color: #fff;
border-radius: 10px 10px 0 0;
cursor: pointer;
display: flex;
align-items: center;
gap: 10px;
font-weight: 600;
font-size: 0.9rem;
}

.quick-aluno-header i {
font-size: 1.1rem;
}

.quick-aluno-header #quick_aluno_arrow {
margin-left: auto;
font-size: 0.8rem;
transition: transform 0.3s ease;
}

.quick-aluno-content {
padding: 12px;
background: #f8f9fd;
border-radius: 0 0 10px 10px;
}

.quick-aluno-content .form-select {
margin-bottom: 10px;
border: 1px solid #d1d5db;
border-radius: 8px;
}

.quick-aluno-actions {
display: flex;
gap: 8px;
}

.quick-aluno-actions .btn {
flex: 1;
font-size: 0.75rem;
padding: 6px 8px;
border-radius: 6px;
font-weight: 500;
}

.quick-aluno-actions .btn-primary {
background: linear-gradient(135deg, #10b981, #059669);
border: none;
}

.quick-aluno-actions .btn-success {
background: linear-gradient(135deg, #5b6abf, #4351a0);
border: none;
}

/* Responsivo */
@media (max-width: 768px) {
.quick-aluno-selector {
bottom: 10px;
right: 10px;
width: 240px;
}

.quick-aluno-actions {
flex-direction: column;
}
}


