/* Variaveis e Design System - Cores Senaivest (Navy e Dourado) */
:root {
    --primary-color: #0b2341;      
    --primary-light: #1c3b63;
    --secondary-color: #b49454;
    --accent-color: #4895EF;       
    --success-color: #2a9d8f;      
    --warning-color: #f4a261;
    --danger-color: #e63946;
    --coord-color: #b49454; /* Cor para aba de coordenação (Dourado) */
    --bg-main: #F8F9FA;            
    --bg-surface: #FFFFFF;
    --text-primary: #1d2d3d;
    --text-secondary: #6c7a89;
    --border-color: #EDF2F4;
    --shadow-sm: 0 2px 8px rgba(11, 35, 65, 0.06);
    --shadow-md: 0 8px 24px rgba(11, 35, 65, 0.12);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Gamificação e Retalhos */
.bancada-card { background: white; border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; transition: var(--transition); cursor: pointer; text-align: center; aspect-ratio: 1 / 1; display: flex; flex-direction: column; justify-content: center; }
.bancada-card:hover { border-color: var(--primary-color); transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.bancada-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: rgba(67, 97, 238, 0.1); color: var(--primary-color); }
.bancada-icon .material-icons-outlined { font-size: 28px; }
.ranking-bar-bg { width: 100%; height: 8px; background: var(--border-color); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.ranking-bar-fill { height: 100%; background: linear-gradient(90deg, var(--success-color), var(--primary-light)); border-radius: 4px; }
.retalho-badge { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; background: rgba(248, 150, 30, 0.1); color: var(--warning-color); border-radius: 20px; font-size: 12px; font-weight: 700; border: 1px solid rgba(248, 150, 30, 0.3); }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
}

/* Login Screen Redesign (Claro/Vivo, estrutura baseada na imagem) */
.login-container {
    display: none;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    background: linear-gradient(135deg, #F4F7FE 0%, #E2E8F0 100%);
    align-items: stretch;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden;
}
.login-container.active {
    display: flex;
}

.login-box {
    background: var(--bg-surface);
    width: 100%;
    max-width: 100%;
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
}

.login-image-side {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    min-height: 100vh;
    position: sticky;
    top: 0;
}

.login-form-side {
    flex: 1;
    padding: clamp(32px, 5vh, 56px) clamp(24px, 8vw, 12%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-content: safe center;
    background: var(--bg-surface);
    min-height: 100vh;
}

@media (max-width: 768px) {
    .login-container {
        padding: 20px 0;
        align-items: flex-start;
    }
    .login-box {
        flex-direction: column;
        max-width: 520px;
        margin: 0 auto;
        min-height: auto;
        border-radius: 16px;
        overflow: visible;
        box-shadow: var(--shadow-md);
    }
    .login-image-side {
        position: static;
        min-height: auto;
        height: auto;
        padding: 32px 24px;
        border-radius: 16px 16px 0 0;
    }
    .login-form-side {
        min-height: auto;
        padding: 32px 24px;
        border-radius: 0 0 16px 16px;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}
.login-header h2 {
    font-size: 32px;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: 1px;
}
.login-header p {
    color: var(--text-secondary);
    margin-top: 8px;
    font-size: 15px;
}

.login-profile-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.profile-card {
    background: white;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background-color: #F8F9FA;
}
.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}
.profile-card .prof-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    transition: var(--transition);
}
.profile-card h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition);
}

.profile-card.prof.active {
    border-color: var(--primary-color);
    background: rgba(67, 97, 238, 0.05);
}
.profile-card.prof.active .prof-icon {
    background: var(--primary-color) !important;
    color: white !important;
}
.profile-card.prof.active h3 { color: var(--primary-color); }

.profile-card.coord.active {
    border-color: var(--coord-color);
    background: rgba(114, 9, 183, 0.05);
}
.profile-card.coord.active .prof-icon {
    background: var(--coord-color) !important;
    color: white !important;
}
.profile-card.coord.active h3 { color: var(--coord-color); }

.profile-card.aluno.active {
    border-color: var(--accent-color);
    background: rgba(247, 37, 133, 0.05);
}
.profile-card.aluno.active .prof-icon {
    background: var(--accent-color) !important;
    color: white !important;
}
.profile-card.aluno.active h3 { color: var(--accent-color); }

.login-form-group {
    margin-bottom: 20px;
}
.login-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.input-with-icon {
    position: relative;
}
.login-input {
    width: 100%;
    padding: 16px;
    background: #F8F9FA;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: var(--transition);
    color: var(--text-primary);
}
.login-input:focus {
    border-color: var(--primary-color);
    background: var(--bg-surface);
}
.input-icon-right {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    cursor: pointer;
}

.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: -8px;
    margin-bottom: 24px;
}
.login-links a {
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}
.login-links a:hover {
    color: var(--primary-color);
}

.login-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}
.login-footer a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

/* Layout Geral */
.app-container {
    display: none;
    min-height: 100vh;
    width: 100%;
}
.app-container.active {
    display: flex;
}

.sidebar {
    width: 260px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    box-shadow: var(--shadow-sm);
    z-index: 10;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 32px;
    color: var(--primary-color);
}
.logo-icon { font-size: 32px; }
.logo-text { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }

.nav-links {
    list-style: none;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    margin: 4px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}
.nav-item .material-icons-outlined { margin-right: 16px; font-size: 22px; }
.nav-item:hover { background-color: rgba(67, 97, 238, 0.05); color: var(--primary-color); }
.nav-item.active { background-color: var(--primary-color); color: white; box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3); }

.badge { background-color: var(--accent-color); color: white; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 20px; position: absolute; right: 24px; }

.sidebar-footer { padding: 0 24px; margin-top: auto; }
.user-info { display: flex; align-items: center; gap: 12px; padding: 12px; background-color: var(--bg-main); border-radius: var(--border-radius); }
.avatar { width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary-color), var(--primary-light)); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.user-details { display: flex; flex-direction: column; }
.user-name { font-size: 14px; font-weight: 600; }
.user-role { font-size: 12px; color: var(--text-secondary); }

.profile-avatar-large { width: 80px; height: 80px; background: linear-gradient(135deg, var(--primary-color), var(--primary-light)); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700; box-shadow: var(--shadow-sm); }
.profile-info-large h3 { font-size: 24px; color: var(--text-primary); margin-bottom: 4px; }
.profile-info-large p { color: var(--text-secondary); font-size: 15px; }

/* Cards Temáticos do Boletim */
.theme-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px;}
.theme-card { padding: 12px 16px; border: 2px solid var(--border-color); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-secondary); transition: var(--transition); flex: 1; text-align: center; min-width: 120px; background: white;}
.theme-card:hover { border-color: var(--primary-light); color: var(--primary-color); }
.theme-card.active { border-color: var(--primary-color); background: rgba(67, 97, 238, 0.05); color: var(--primary-color); }

/* Monitoramento e Planos (Design Refinado & Moderno) */
.monitoramento-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}
.mon-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 4px 16px rgba(11, 35, 65, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}
.mon-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(11, 35, 65, 0.08);
    border-color: #cbd5e1;
}
.mon-stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
}
.mon-stat-card.card-ocupados::before { background: #ef4444; }
.mon-stat-card.card-disponiveis::before { background: #10b981; }
.mon-stat-card.card-agendadas::before { background: #f59e0b; }

.mon-dash-item { flex: 1; padding: 16px; border-radius: 12px; background: white; display: flex; align-items: center; gap: 16px; font-weight: 700; font-size: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); border: 1px solid #f4f4f4;}
.mon-dash-icon { padding: 16px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }

.monitoramento-card { background: white; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); padding: 24px; display: flex; flex-direction: column; position: relative; border-left: 6px solid #ccc; }
.mon-icon-box {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.mon-icon-box .material-icons-outlined {
    font-size: 26px;
}
.mon-stat-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}
.mon-stat-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.3px;
    line-height: 1.25;
}
.mon-stat-num {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
    margin-top: 2px;
}
.mon-stat-sub {
    font-size: 11.5px;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.mon-status-text { font-weight: 700; font-size: 14px; margin-top: 20px; margin-bottom: 12px; }

/* Abas de Navegação Integrada do Boletim */
.boletim-nav-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}
.boletim-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.boletim-tab-btn:hover {
    background: rgba(11, 35, 65, 0.05);
    color: var(--primary-color);
}
.boletim-tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(11, 35, 65, 0.15);
}
.btn-filtro-boletim.active {
    background: var(--primary-color);
    color: white !important;
    border-color: var(--primary-color);
}

.plan-card { background: white; border-radius: 16px; padding: 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); border: 1px solid #f4f4f4; position: relative; }
.plan-status-pill { position: absolute; top: 24px; right: 24px; background: #e0f2fe; color: #0284c7; padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.plan-time-box { background: #eef2ff; color: #4361ee; padding: 12px; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; margin-top: 16px; margin-bottom: 16px; font-size: 16px; }

/* Assistente IA Senaivest (Desativado conforme solicitação) */
.ai-fab, #ai-assistant-btn, .ai-chat-window, #ai-chat-window {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.main-content { flex: 1; display: flex; flex-direction: column; background-color: #F4F7FE; min-height: 100vh; }

.top-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 40px; background-color: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 5; }
.search-bar { display: flex; align-items: center; background-color: var(--bg-surface); padding: 12px 20px; border-radius: 30px; width: 400px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }
.search-bar input { border: none; outline: none; background: transparent; margin-left: 10px; width: 100%; font-size: 14px; color: var(--text-primary); }
.header-actions { display: flex; gap: 16px; }
.icon-btn { background: var(--bg-surface); border: 1px solid var(--border-color); width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); transition: var(--transition); box-shadow: var(--shadow-sm); }
.icon-btn:hover { color: var(--primary-color); border-color: var(--primary-light); transform: translateY(-2px); }

.views-container { padding: 0 40px 40px; flex: 1; }
.view { animation: fadeIn 0.4s ease forwards; display: none; }
.view.active { display: block; }
.view-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.view-header h2 { font-size: 28px; font-weight: 700; color: var(--text-primary); }

.primary-btn { background: linear-gradient(135deg, var(--primary-color), var(--primary-light)); color: white; border: none; padding: 12px 24px; border-radius: 30px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: var(--transition); box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3); }
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4); }
.secondary-btn { background: white; color: var(--text-primary); border: 1px solid var(--border-color); padding: 10px 20px; border-radius: 20px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: var(--transition); }
.secondary-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* Salas Virtuais (Grid) Premium Redesign */
.salas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-bottom: 32px; }
.sala-card { 
    background: var(--bg-surface); 
    border-radius: 20px; 
    padding: 24px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); 
    border: 1px solid var(--border-color); 
    cursor: pointer; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}
.sala-card-bg {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05) 0%, rgba(67, 97, 238, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}
.sala-card:hover { 
    transform: translateY(-6px); 
    border-color: rgba(67, 97, 238, 0.3); 
    box-shadow: 0 12px 30px rgba(67, 97, 238, 0.12); 
}
.sala-card:hover .sala-card-bg {
    opacity: 1;
}
.sala-content-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}
.sala-icon { 
    width: 56px; 
    height: 56px; 
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color)); 
    color: white; 
    border-radius: 16px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}
.sala-icon .material-icons-outlined {
    font-size: 28px;
}
.sala-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: -0.2px;
    transition: var(--transition);
}
.sala-badge.com-itens {
    background: #eef2ff;
    color: #1e3a8a;
    border: 1px solid #c7d2fe;
}
.sala-badge.sem-itens {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}
.sala-title { 
    font-size: 20px; 
    font-weight: 800; 
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    margin-bottom: auto;
    letter-spacing: -0.5px;
}
.sala-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}
.sala-card:hover .sala-footer {
    color: var(--primary-color);
}
.sala-footer .material-icons-outlined {
    font-size: 18px;
    transition: transform 0.3s ease;
}
.sala-card:hover .sala-footer .material-icons-outlined {
    transform: translateX(4px);
}

/* Store Cards (Design Organizado Senaivest) */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; padding: 8px 0; }
.store-card { background: var(--bg-surface); border-radius: 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; border: 1px solid var(--border-color); }
.store-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(11, 35, 65, 0.2); }
.store-card-image { height: 190px; background: #f8f9fa; display: flex; align-items: center; justify-content: center; position: relative; border-bottom: 1px solid var(--border-color); overflow: hidden; }
.store-badge-top { position: absolute; top: 12px; left: 12px; background: #10b981; color: white; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.store-card-content { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.store-card-sku { font-size: 12px; color: #8d99ae; margin-bottom: 8px; }
.store-card-title { font-size: 17px; font-weight: 800; color: var(--text-primary); margin-bottom: 8px; line-height: 1.3; text-transform: uppercase; }
.store-card-rating { display: flex; align-items: center; gap: 4px; color: #f59e0b; font-size: 12px; margin-bottom: 16px; }
.store-card-rating span { color: #8d99ae; }
.store-card-price { font-size: 20px; font-weight: 800; color: var(--secondary-color); margin-top: auto; }
.store-card-installments { font-size: 12px; color: #10b981; font-weight: 500; margin-top: 4px; margin-bottom: 12px;}
.store-card-btn { background: var(--primary-color); color: white; border: none; padding: 16px; font-size: 15px; font-weight: 700; cursor: pointer; transition: 0.2s; text-align: center; width: 100%; }
.store-card-btn:hover { background: var(--primary-light); }
.product-origin-badge { margin-top: 10px; margin-bottom: 10px; background: rgba(248, 150, 30, 0.1); color: var(--warning-color); padding: 8px 10px; border-radius: 8px; font-size: 11px; font-weight: 700; display: flex; gap: 4px; align-items: center; border: 1px solid rgba(248, 150, 30, 0.3); }

/* Tabela Genérica */
.content-section { background: var(--bg-surface); border-radius: var(--border-radius); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 24px;}
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 16px; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 14px;}
.data-table th { font-weight: 600; color: var(--text-secondary); }
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background-color: #F8F9FA; }
.status { padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status.atrasado { background-color: rgba(230, 57, 70, 0.1); color: var(--danger-color); }
.status.ok { background-color: rgba(76, 201, 240, 0.1); color: var(--success-color); }

/* Fichas e Cronometro */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.plan-card { background: var(--bg-surface); border-radius: var(--border-radius); padding: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); position: relative; }
.plan-status { position: absolute; top: 24px; right: 24px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 12px; background-color: rgba(76, 201, 240, 0.1); color: #0096C7; }
.plan-meta span { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); margin-bottom: 4px;}
.plan-desc-box { background: var(--bg-main); padding: 12px; border-radius: 8px; font-size: 13px; margin-top: 12px;}
.timer-box { background: rgba(67, 97, 238, 0.1); color: var(--primary-color); padding: 8px 12px; border-radius: 8px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 18px; margin-top: 12px; }

/* Notificações */
.notification-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border-color); align-items: center;}
.notif-icon { width: 48px; height: 48px; background-color: rgba(67, 97, 238, 0.05); color: var(--primary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.notif-content { flex: 1; }
.notif-content h4 { font-size: 15px; margin-bottom: 4px; font-weight: 600;}
.notif-content p { font-size: 14px; color: var(--text-secondary); }
.mark-read-btn { background: none; border: none; color: var(--success-color); cursor: pointer; padding: 8px; border-radius: 50%; transition: 0.2s;}
.mark-read-btn:hover { background: rgba(76, 201, 240, 0.1); }

/* Modals */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); z-index: 100; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { background: var(--bg-surface); width: 600px; border-radius: var(--border-radius); padding: 32px; box-shadow: var(--shadow-md); max-height: 90vh; overflow-y: auto; }
.modal-large { width: 800px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.close-btn { cursor: pointer; color: var(--text-secondary); }
.close-btn:hover { color: var(--accent-color); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase;}
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; outline: none; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

.action-btn { flex: 1; padding: 10px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; border: none; background-color: rgba(67, 97, 238, 0.1); color: var(--primary-color); }
.action-btn.outline { background-color: transparent; border: 1px solid var(--border-color); color: var(--text-primary); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Categorias de Boletins */
.boletins-categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; margin-top: 24px;}
.boletim-cat-card { background: var(--bg-surface); border-radius: var(--border-radius); padding: 24px; text-align: center; cursor: pointer; border: 2px solid transparent; box-shadow: var(--shadow-sm); transition: var(--transition); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.boletim-cat-card:hover { transform: translateY(-4px); border-color: var(--primary-color); box-shadow: var(--shadow-md); }
.boletim-cat-icon { width: 64px; height: 64px; border-radius: 50%; background: rgba(67, 97, 238, 0.1); color: var(--primary-color); display: flex; align-items: center; justify-content: center; }
.boletim-cat-icon .material-icons-outlined { font-size: 32px; }
.boletim-cat-card h3 { font-size: 16px; color: var(--text-primary); font-weight: 700; }
.boletim-cat-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    box-shadow: 0 -4px 24px rgba(11, 35, 65, 0.1);
    z-index: 9999;
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid var(--border-color);
}
.cookie-banner.show {
    bottom: 0;
}
.cookie-content {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 70%;
}
.cookie-icon {
    font-size: 32px;
    color: var(--secondary-color);
    background: rgba(180, 148, 84, 0.1);
    padding: 12px;
    border-radius: 50%;
}
.cookie-content h3 {
    margin-bottom: 4px;
    font-size: 16px;
    color: var(--text-primary);
}
.cookie-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.cookie-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.cookie-actions {
    display: flex;
    gap: 12px;
}
@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    .cookie-content {
        max-width: 100%;
    }
    .cookie-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Toggle Switch para Diário de Classe */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--primary-color);
}
input:checked + .slider:before {
  -webkit-transform: translateX(22px);
  -ms-transform: translateX(22px);
  transform: translateX(22px);
}
.aluno-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.aluno-info h4 { margin: 0 0 4px 0; }
.aluno-info p { margin: 0; color: var(--text-secondary); font-size: 13px; }

/* Indicador de Status Firebase */
.firebase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
  background: rgba(11, 35, 65, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.firebase-badge.connected {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
}
.firebase-badge.syncing {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.3);
}
.firebase-badge.error {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.3);
}
.firebase-badge.offline {
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.25);
}
.firebase-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #94a3b8;
}
.firebase-badge.connected .status-dot {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}
.firebase-badge.syncing .status-dot {
  background: #f59e0b;
  animation: pulse 1.5s infinite;
}
.firebase-badge.error .status-dot {
  background: #ef4444;
}
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Ocultar visualmente o status do Firebase conforme solicitado */
.firebase-badge {
  display: none !important;
}

/* Galeria de Fotos - Nossa História */
.historia-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.historia-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.historia-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.historia-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.historia-card:hover .historia-img {
  transform: scale(1.03);
}
.historia-caption {
  padding: 16px;
  background: var(--bg-surface);
  flex: 1;
}
.historia-caption h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.historia-caption p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Autocomplete e Campos do Boletim */
.autocomplete-container {
  position: relative;
  width: 100%;
}
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  max-height: 220px;
  overflow-y: auto;
  z-index: 50;
  margin-top: 4px;
  display: none;
}
.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
}
.autocomplete-item:hover {
  background: rgba(67, 97, 238, 0.08);
}
.autocomplete-item:last-child {
  border-bottom: none;
}

/* Modal Detalhes do Boletim */
.boletim-detail-section {
  background: rgba(248, 249, 250, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.boletim-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.boletim-detail-item label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}
.boletim-detail-item span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Chat Institucional */
.chat-window-modal {
  width: 900px !important;
  max-width: 95vw !important;
  height: 600px !important;
  max-height: 90vh !important;
  padding: 0 !important;
  display: flex;
  overflow: hidden;
  border-radius: 16px;
}
.chat-layout {
  display: flex;
  width: 100%;
  height: 100%;
}
.chat-sidebar {
  width: 300px;
  border-right: 1px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
}
.chat-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-contacts-list {
  flex: 1;
  overflow-y: auto;
}
.chat-contact-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.03);
  transition: background 0.15s;
}
.chat-contact-item:hover, .chat-contact-item.active {
  background: rgba(11, 35, 65, 0.05);
}
.chat-contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(11, 35, 65, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.chat-contact-info {
  flex: 1;
  min-width: 0;
}
.chat-contact-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-contact-role {
  font-size: 11px;
  color: var(--text-secondary);
}
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}
.chat-main-header {
  padding: 14px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-boletim-ref-bar {
  background: rgba(245, 158, 11, 0.1);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  padding: 8px 16px;
  font-size: 12px;
  color: #b45309;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
}
.chat-msg.mine {
  align-self: flex-end;
  background: var(--primary-color);
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-msg.theirs {
  align-self: flex-start;
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}
.chat-msg-time {
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.7;
  text-align: right;
}
.chat-msg-audio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.chat-input-bar {
  padding: 14px 20px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-input-bar input[type="text"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  outline: none;
  font-size: 13.5px;
}
.chat-action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.chat-action-btn:hover {
  background: rgba(11, 35, 65, 0.08);
  color: var(--primary-color);
}
.chat-send-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s;
}
.chat-send-btn:hover {
  opacity: 0.9;
}


/* ==================================================== */
/* SISTEMA DE ALERTAS DE ATRASO & DEVOLUÇÃO COM FOTO */
/* ==================================================== */

.atraso-alert-section {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-left: 5px solid #ef4444;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.08);
  animation: fadeIn 0.4s ease-in-out;
}

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

.atraso-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #b91c1c;
}

.atraso-title .pulse-icon {
  animation: pulseWarning 1.5s infinite;
  color: #ef4444;
}

@keyframes pulseWarning {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.atrasos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.atraso-card {
  background: var(--bg-surface);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.atraso-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.12);
}

.atraso-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.live-timer-badge {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  font-family: monospace, monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
}

.live-timer-dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulseDot 1s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}

.atraso-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.atraso-info-row strong {
  color: var(--text-primary);
}

.atraso-rastreio-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0;
  font-size: 12.5px;
  line-height: 1.5;
}

/* Banner de Alerta do Professor */
.banner-atraso-professor {
  background: linear-gradient(135deg, #0b1e36 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 16px 22px;
  border-radius: 14px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(225, 29, 72, 0.35);
  animation: slideDown 0.4s ease-out;
  position: relative;
  overflow: hidden;
}

.banner-atraso-professor::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #f43f5e, #e11d48);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.banner-atraso-professor button {
  background: #ffffff;
  color: #0f172a;
  border: none;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.banner-atraso-professor button:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Modal de Devolução com Câmera */
.camera-box-container {
  width: 100%;
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.camera-video-feed {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.foto-preview-img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
}

.carimbo-devolucao-badge {
  background: rgba(11, 35, 65, 0.9);
  color: #38bdf8;
  font-family: monospace;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
  border-left: 3px solid #38bdf8;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =========================================================================
   CHECK-IN DE BANCADAS - VISAO DO PROFESSOR & MURAL DE AVISOS DAS TURMAS
   ========================================================================= */
.checkin-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.checkin-stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.checkin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.checkin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.checkin-stat-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}
.checkin-stat-lbl {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 2px;
}

.checkin-bancadas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.checkin-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
}
.checkin-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}
.checkin-card.status-confirmado {
    border-left: 5px solid #10b981;
}
.checkin-card.status-divergencia {
    border-left: 5px solid #f59e0b;
    background: linear-gradient(180deg, #fffdfa 0%, #ffffff 40%);
}
.checkin-card.status-pendente {
    border-left: 5px solid #94a3b8;
}

.checkin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.checkin-bancada-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 6px;
}
.checkin-machine-type {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 2px;
}

.checkin-aluno-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    border: 1px solid #e2e8f0;
}
.checkin-aluno-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(11, 35, 65, 0.1);
    color: var(--primary-color);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.checkin-aluno-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.checkin-aluno-info p {
    margin: 2px 0 0;
    font-size: 11.5px;
    color: var(--text-secondary);
}

.checkin-materiais-box {
    font-size: 12.5px;
    color: var(--text-primary);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    line-height: 1.4;
}
.checkin-divergencia-alerta {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
}

.checkin-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}
.checkin-action-btn {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}
.checkin-action-btn.btn-notify {
    background: rgba(11, 35, 65, 0.08);
    color: var(--primary-color);
}
.checkin-action-btn.btn-notify:hover {
    background: var(--primary-color);
    color: white;
}
.checkin-action-btn.btn-validar {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.checkin-action-btn.btn-validar:hover {
    background: #10b981;
    color: white;
}
.checkin-action-btn.btn-delete {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.checkin-action-btn.btn-delete:hover {
    background: #ef4444;
    color: white;
}
.checkin-action-btn.btn-resolver {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}
.checkin-action-btn.btn-resolver:hover {
    background: #d97706;
    color: white;
}

.aviso-turma-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}
.aviso-turma-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}
.aviso-tag-turma {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    background: rgba(11, 35, 65, 0.08);
    color: var(--primary-color);
}
.aviso-tag-bancada {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    background: rgba(67, 97, 238, 0.1);
    color: var(--accent-color);
}


/* Filtros Dinamicos de Categoria (Sem Icones / Emojis) */
.cat-filter-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: capitalize;
    letter-spacing: 0.2px;
}
.cat-filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(11, 35, 65, 0.04);
}
.cat-filter-btn.active {
    border-color: var(--primary-color) !important;
    background: var(--primary-color) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(11, 35, 65, 0.22);
}

/* =========================================================================
   BANCADAS 2.0 - ALOCAÇÃO DE ALUNOS, CHECKLIST E TRANSFERÊNCIA DE INSUMOS
   ========================================================================= */
.aluno-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 8px;
}
.aluno-select-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.aluno-select-card:hover {
    border-color: var(--primary-color);
    background: rgba(67, 97, 238, 0.04);
}
.aluno-select-card.selected {
    border-color: var(--primary-color);
    background: rgba(67, 97, 238, 0.08);
    font-weight: 600;
}
.preset-kit-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: 0.2s;
}
.preset-kit-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.bancada-compartilhada-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(114, 9, 183, 0.1);
    color: #7209b7;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}
.aluno-bancada-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12.5px;
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(67, 97, 238, 0.25);
}
.reposicao-alerta-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.checkin-card.status-finalizado {
    border-left: 5px solid #059669;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 40%);
}
.checkin-action-btn.btn-edit {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}
.checkin-action-btn.btn-edit:hover {
    background: var(--primary-color);
    color: white;
}
.checkin-action-btn.btn-atender {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
    font-weight: 800;
    border: 1px solid #fcd34d;
}
.checkin-action-btn.btn-atender:hover {
    background: #f59e0b;
    color: white;
}
.checkin-action-btn.btn-excluir {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}
.checkin-action-btn.btn-excluir:hover {
    background: #ef4444;
    color: white;
}
.checkin-multi-alunos {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

/* Catálogo de Retalhos (Estoque Circular Sustentável) */
.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(16, 185, 129, 0.4);
}

/* =========================================================================
   SISTEMA DE NOTIFICAÇÕES TOAST (FLOATING CARDS)
   ========================================================================= */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.toast-card {
    pointer-events: auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(110%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-card.toast-hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast-card.toast-success { border-left: 5px solid #10b981; }
.toast-card.toast-error { border-left: 5px solid #ef4444; }
.toast-card.toast-warning { border-left: 5px solid #f59e0b; }
.toast-card.toast-info { border-left: 5px solid #3b82f6; }

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-success .toast-icon { background: #ecfdf5; color: #10b981; }
.toast-error .toast-icon { background: #fef2f2; color: #ef4444; }
.toast-warning .toast-icon { background: #fffbeb; color: #f59e0b; }
.toast-info .toast-icon { background: #eff6ff; color: #3b82f6; }

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2px;
}

.toast-desc {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.4;
}

.toast-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px;
    margin-left: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toast-close-btn:hover {
    color: #1e293b;
}

/* Badge de Mensagens do Chat */
.chat-badge-counter {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    border-radius: 10px;
    padding: 1px 6px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.chat-contact-badge {
    background: #ef4444;
    color: white;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 12px;
    margin-left: auto;
}

/* ==============================================================
   1. CARDS DO ALMOXARIFADO (DESIGN OFICIAL SENAIVEST 2.0 - IMAGEM 3)
   ============================================================== */
.material-hub-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(11, 35, 65, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.material-hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(11, 35, 65, 0.1);
    border-color: #cbd5e1;
}

/* Header com Imagem */
.mat-card-image-wrap {
    position: relative;
    width: 100%;
    height: 190px;
    background: #f1f5f9;
    overflow: hidden;
}
.mat-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.material-hub-card:hover .mat-card-img {
    transform: scale(1.03);
}

/* Badges sobre a Imagem */
.mat-badge-borrowed {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 2;
}
.mat-badge-type {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ffffff;
    color: #0b2341;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    z-index: 2;
}
.mat-camera-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    color: #0b2341;
    border: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.18);
    transition: transform 0.2s, background 0.2s;
    z-index: 2;
}
.mat-camera-btn:hover {
    transform: scale(1.1);
    background: #f8fafc;
}

/* Corpo do Card */
.mat-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.mat-card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.mat-card-title {
    font-size: 17.5px;
    font-weight: 800;
    color: #0b2341;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 0;
    line-height: 1.3;
}
.mat-card-sku {
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* Caixa de Detalhes 2x2 */
.mat-card-grid-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 10px;
    column-gap: 12px;
    margin-bottom: 12px;
}
.mat-grid-item {
    display: flex;
    flex-direction: column;
}
.mat-grid-label {
    font-size: 10.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.mat-grid-val {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.mat-grid-val.highlight {
    font-size: 15px;
    font-weight: 800;
    color: #0b2341;
}

/* Linha de Metadados: Entrada & Responsável */
.mat-card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.mat-card-meta-row strong {
    color: #0f172a;
}

/* Banner de Origem */
.mat-card-origin-notice {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 9px 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #9a3412;
    line-height: 1.35;
}

/* Dica de Sustentabilidade */
.mat-card-sustainability {
    background: #f0fdf4;
    border: 1px dashed #86efac;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
}
.sustainability-title {
    font-size: 12px;
    font-weight: 800;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
}
.sustainability-desc {
    margin: 0;
    font-size: 11.5px;
    color: #15803d;
    line-height: 1.4;
}

/* Botões de Ação na Base */
.mat-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: auto;
}
.mat-btn {
    padding: 9px 6px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    text-align: center;
    border: 1px solid transparent;
}
.mat-btn.outline {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}
.mat-btn.outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.mat-btn.navy {
    background: #0b2341;
    color: #ffffff;
    border-color: #0b2341;
}
.mat-btn.navy:hover {
    background: #1e3a8a;
    border-color: #1e3a8a;
}
.mat-btn.danger {
    background: #fff1f2;
    color: #e11d48;
    border-color: #fecdd3;
}
.mat-btn.danger:hover {
    background: #ffe4e6;
    border-color: #fda4af;
    color: #be123c;
}

/* Botões de Filtro de Categoria no Almoxarifado */
.cat-filter-btn {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.cat-filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.cat-filter-btn.active {
    background: #0b2341;
    color: #ffffff;
    border-color: #0b2341;
    font-weight: 700;
}

/* ==============================================================
   2. FICHA DE PLANO DE AULA: CATÁLOGO DE MATERIAIS & QUANTIDADES
   ============================================================== */
.plano-mat-catalog-box {
    max-height: 290px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #ffffff;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.plano-mat-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}
.plano-mat-item:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}
.plano-mat-item.selected {
    background: rgba(67, 97, 238, 0.04);
    border-color: #4361ee;
    box-shadow: 0 0 0 1px #4361ee;
}
.plano-mat-item.disabled {
    opacity: 0.65;
    background: #fff1f2;
    border-color: #fecdd3;
    cursor: not-allowed;
}
.plano-mat-item-info {
    flex: 1;
    min-width: 0;
}
.plano-mat-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.plano-mat-sku {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    background: #e2e8f0;
    padding: 1px 6px;
    border-radius: 4px;
}
.plano-mat-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}
.plano-mat-type {
    font-size: 11px;
    color: var(--text-secondary);
}
.plano-mat-status-tag {
    font-size: 11.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}
.plano-mat-status-tag.disponivel {
    color: #15803d;
}
.plano-mat-status-tag.indisponivel {
    color: #b91c1c;
    font-weight: 700;
}
.plano-mat-status-tag.transf {
    color: #b45309;
    background: #fef3c7;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    margin-top: 3px;
    font-size: 11px;
}

/* Controle de Quantidade na Ficha */
.plano-mat-qty-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 6px;
}
.plano-mat-qty-wrap button {
    background: #f1f5f9;
    border: none;
    color: #0b2341;
    font-weight: 800;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}
.plano-mat-qty-wrap button:hover {
    background: #e2e8f0;
}
.plano-mat-qty-input {
    width: 44px;
    text-align: center;
    border: none;
    font-weight: 700;
    color: #0f172a;
    font-size: 13px;
    outline: none;
    background: transparent;
}
.plano-mat-chip {
    background: #ffffff;
    border: 1px solid #4361ee;
    color: #0b2341;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.plano-mat-chip-remove {
    cursor: pointer;
    color: #ef4444;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
}

/* ==============================================================
   3. PAINEL DO PROFESSOR: AÇÕES RÁPIDAS & CONSULTA DE ESTOQUE
   ============================================================== */
.prof-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.prof-quick-card {
    background: var(--bg-surface);
    padding: 22px 18px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.prof-quick-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}
.prof-quick-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.prof-quick-title {
    font-weight: 700;
    font-size: 14.5px;
    color: var(--text-primary);
}
.prof-quick-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.35;
    margin: 0;
}

/* Widget de Consulta Rápida de Estoque do Professor */
.prof-stock-widget {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.prof-stock-rooms-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.prof-stock-tab {
    padding: 7px 15px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}
.prof-stock-tab:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.prof-stock-tab.active {
    background: #0b2341;
    color: #ffffff;
    border-color: #0b2341;
}
.prof-stock-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    max-height: 290px;
    overflow-y: auto;
    padding-top: 6px;
}
.prof-stock-mini-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s;
    gap: 8px;
}
.prof-stock-mini-card:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* ==============================================================
   4. DETALHES DO PLANO DE AULA (LAYOUT PREMIUM SENAI)
   ============================================================== */
.plano-modal-wrap {
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
}
.plano-modal-hero {
    background: linear-gradient(135deg, #0b2341 0%, #17375e 100%);
    color: #ffffff;
    padding: 22px 24px;
    position: relative;
    border-bottom: 3px solid #b49454;
}
.plano-modal-hero-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.plano-modal-badge {
    background: rgba(180, 148, 84, 0.25);
    color: #ffd166;
    border: 1px solid rgba(180, 148, 84, 0.5);
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.3px;
}
.plano-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.plano-detail-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}
.plano-detail-item:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}
.plano-detail-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(11, 35, 65, 0.08);
    color: #0b2341;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.plano-detail-item-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.plano-detail-item-val {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 1px;
}
.plano-detail-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.plano-detail-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}
.plano-detail-box-title {
    font-size: 13px;
    font-weight: 800;
    color: #0b2341;
    display: flex;
    align-items: center;
    gap: 6px;
}
.plano-mat-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.plano-mat-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    gap: 12px;
}
.plano-mat-chip-name {
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.plano-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

/* ==============================================================
   5. ACOMPANHAMENTO DE PROFESSORES EM TEMPO REAL
   ============================================================== */
.prof-monitor-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(11, 35, 65, 0.05);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.prof-monitor-card:hover {
    box-shadow: 0 8px 20px rgba(11, 35, 65, 0.09);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}
.prof-monitor-card.em-aula {
    border-left: 4px solid #10b981;
}
.prof-monitor-card.fora-aula {
    border-left: 4px solid #94a3b8;
    background: #fafbfc;
}
.prof-monitor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.prof-monitor-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.prof-monitor-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: #ffffff;
    flex-shrink: 0;
}
.prof-monitor-avatar.active-class {
    background: linear-gradient(135deg, #0b2341 0%, #1e3a8a 100%);
    box-shadow: 0 4px 10px rgba(11, 35, 65, 0.2);
}
.prof-monitor-avatar.idle {
    background: #64748b;
}
.prof-monitor-name {
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
}
.prof-monitor-subject {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}
.prof-live-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
}
.pulse-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseDot 1.6s infinite ease-out;
}
@keyframes pulseDot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.prof-idle-badge {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.prof-timer-box {
    background: #0b2341;
    color: #ffffff;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.prof-timer-label {
    font-size: 11.5px;
    color: #94a3b8;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}
.prof-timer-digits {
    font-family: monospace, 'Courier New', Courier;
    font-size: 17px;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 1px;
}
.prof-timer-progress {
    height: 5px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}
.prof-timer-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #38bdf8);
    border-radius: 3px;
    transition: width 1s linear;
}
.prof-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.prof-chip {
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    background: #f1f5f9;
    padding: 4px 9px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.prof-monitor-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

/* ==============================================================
   6. CHAT INSTITUCIONAL APERFEIÇOADO
   ============================================================== */
.chat-contact-unread-badge {
    background: #e11d48;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    margin-left: auto;
}
.chat-last-snippet {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
    margin-top: 2px;
}

/* ==============================================================
   7. MÓDULO AVISOS & ALERTAS AUTOMÁTICOS DE ESTOQUE
   ============================================================== */
.avisos-tabs-nav {
    display: flex;
    gap: 12px;
}
.avisos-tab-btn {
    background: transparent;
    border: none;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.avisos-tab-btn:hover {
    background: rgba(11, 35, 65, 0.05);
    color: #0b2341;
}
.avisos-tab-btn.active {
    background: #0b2341;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(11, 35, 65, 0.18);
}
.avisos-alert-badge {
    background: #e11d48;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 4px;
}
.avisos-tab-btn.active .avisos-alert-badge {
    background: #ffffff;
    color: #e11d48;
}

.alerta-estoque-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.alerta-estoque-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.alerta-estoque-card.critico {
    border-left: 5px solid #e11d48;
    background: linear-gradient(90deg, #fff5f5 0%, #ffffff 15%);
}
.alerta-estoque-card.atencao {
    border-left: 5px solid #f59e0b;
    background: linear-gradient(90deg, #fffbeb 0%, #ffffff 15%);
}
.alerta-estoque-card.atraso {
    border-left: 5px solid #dc2626;
    background: linear-gradient(90deg, #fef2f2 0%, #ffffff 15%);
}

/* ==============================================================
   8. CRONOGRAMA DE AULAS AGENDADAS (MONITORAMENTO)
   ============================================================== */
.agendada-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    border-top: 4px solid #f59e0b;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.agendada-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.agendada-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.agendada-badge {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.agendada-time {
    font-size: 12px;
    font-weight: 700;
    color: #0b2341;
    display: flex;
    align-items: center;
    gap: 4px;
}
.agendada-title {
    font-size: 15px;
    font-weight: 800;
    color: #0b2341;
    margin: 4px 0 2px;
}
.agendada-room {
    font-size: 12.5px;
    color: #475569;
    font-weight: 600;
}
.agendada-prof {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}
.agendada-materials {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11.5px;
    color: #334155;
    line-height: 1.4;
}



