/* ===== RESET E VARIÁVEIS ===== */
:root {
    /* Paleta Premium - Slate & Indigo */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --light: #f8fafc;
    --white: #ffffff;

    /* Grays específicos para UI moderna */
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Sombras e Efeitos */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);

    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-lg: 24px;

    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--gray-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.logo {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.loading-screen h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    margin: 20px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {

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

    50% {
        transform: translateY(-20px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== ONBOARDING ===== */
.onboarding-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.onboarding-header h1 {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 18px;
    color: var(--gray-600);
    margin-bottom: 60px;
}

.onboarding-steps {
    display: grid;
    gap: 24px;
    margin-bottom: 60px;
}

.step {
    background: white;
    padding: 32px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.step-icon {
    font-size: 56px;
    margin-bottom: 24px;
    display: block;
}

.step h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--dark);
}

.step p {
    color: var(--gray-600);
    font-size: 16px;
}

/* ===== APP CONTAINER ===== */
.app-container {
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom);
}

.app-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.modal-header h3 {
    font-size: 18px;
    color: var(--dark);
    font-weight: 600;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px dashed var(--primary-light);
    transition: var(--transition);
}

.avatar-placeholder:hover {
    background: var(--white);
    border-color: var(--primary);
    transform: scale(1.05);
}

.app-header h1 {
    font-size: 20px;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.header-logo {
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.btn-icon {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--gray-200);
}

/* ===== SCREENS ===== */
.screen {
    display: none;
    animation: slideIn 0.3s ease-out;
}

.screen.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

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

/* ===== STATS ROW ===== */
.turmas-header {
    padding: 20px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    background: white;
    padding: 24px 16px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== SEARCH BOX ===== */
.search-box {
    padding: 0 20px 20px;
}

.search-box input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* ===== TURMAS LIST ===== */
.turmas-list {
    padding: 0 20px 100px;
}

.turma-card {
    background: white;
    padding: 24px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.turma-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.turma-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.turma-card:active {
    transform: scale(0.98);
}

.turma-card h3 {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 8px;
}

.turma-card p {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.turma-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--gray-500);
}

.turma-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    min-height: 36px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
    min-height: 56px;
}

.btn-block {
    width: 100%;
    margin-bottom: 12px;
}

.btn-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 20px;
    /* Squircle moderno */
    background: var(--primary);
    color: white;
    font-size: 28px;
    border: none;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    transition: var(--transition);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-fab:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.btn-fab:active {
    transform: scale(0.95);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 72px;
    margin-bottom: 24px;
    display: block;
    filter: grayscale(1) opacity(0.3);
}

.empty-state h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--gray-500);
    font-size: 16px;
    max-width: 300px;
    margin: 0 auto 32px;
}

/* ===== TURMA DETALHE ===== */
.turma-info-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 30px 20px;
    margin-bottom: 20px;
}

.turma-info-card h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.turma-info-card p {
    opacity: 0.9;
    margin-bottom: 16px;
}

.turma-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    margin-bottom: 20px;
}

.turma-stats strong {
    font-size: 18px;
}

.turma-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 72px;
    z-index: 90;
}

.tab-btn {
    flex: 1;
    padding: 16px;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

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

/* ===== SECTION HEADER ===== */
.section-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h3 {
    font-size: 18px;
    color: var(--dark);
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== ALUNOS LIST ===== */
.alunos-list {
    padding: 0 20px 100px;
}

.aluno-card {
    background: white;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.aluno-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.aluno-info {
    flex: 1;
}

.aluno-info h4 {
    font-size: 16px;
    color: var(--dark);
    margin-bottom: 4px;
}

.aluno-info p {
    font-size: 13px;
    color: var(--gray-600);
}

.aluno-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-sm {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-200);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.btn-icon-sm:hover {
    background: var(--gray-300);
}

/* ===== HISTÓRICO LIST ===== */
.historico-list {
    padding: 0 20px 100px;
}

.historico-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.historico-card:active {
    transform: scale(0.98);
}

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

.historico-header h4 {
    font-size: 16px;
    color: var(--dark);
}

.historico-badge {
    background: var(--success);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.historico-meta {
    font-size: 13px;
    color: var(--gray-600);
}

/* ===== SCANNER ===== */
.scanner-info {
    padding: 20px;
}

.chamada-info-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.chamada-info-card h3 {
    font-size: 20px;
    color: var(--dark);
    margin-bottom: 8px;
}

.chamada-info-card p {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 16px;
}

.presencas-counter {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
}

.counter-value {
    font-size: 32px;
    font-weight: 700;
}

.qr-reader {
    width: calc(100% - 40px);
    max-width: 500px;
    margin: 20px auto;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.feedback {
    text-align: center;
    padding: 16px 20px;
    margin: 0 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 16px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideIn 0.3s ease-out;
    position: relative;
    z-index: 10;
}

/* Scanner Pulse Animation */
@keyframes pulseGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
        border-color: var(--success);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(16, 185, 129, 0);
        border-color: var(--success);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        border-color: transparent;
    }
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 83, 80, 0.7);
        border-color: var(--danger);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(239, 83, 80, 0);
        border-color: var(--danger);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 83, 80, 0);
        border-color: transparent;
    }
}

.qr-reader {
    transition: box-shadow 0.3s, border-color 0.3s;
    border: 4px solid transparent;
}

.pulse-success {
    animation: pulseGreen 1s ease-out;
}

.pulse-error {
    animation: pulseRed 1s ease-out;
}

.feedback.success {
    background: rgba(102, 187, 106, 0.1);
    color: var(--success);
    border: 2px solid var(--success);
}

.feedback.warning {
    background: rgba(255, 167, 38, 0.1);
    color: var(--warning);
    border: 2px solid var(--warning);
}

.feedback.error {
    background: rgba(239, 83, 80, 0.1);
    color: var(--danger);
    border: 2px solid var(--danger);
}

.scanner-controls {
    display: flex;
    gap: 12px;
    padding: 20px;
    justify-content: center;
}

.presencas-live-list {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.presencas-live-list h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--dark);
}

.presenca-item {
    background: white;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

.presenca-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.presenca-item-info h5 {
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 2px;
}

.presenca-item-info small {
    font-size: 12px;
    color: var(--gray-600);
}

.camera-status {
    text-align: center;
    padding: 12px;
    font-size: 13px;
    color: var(--gray-600);
    background: var(--gray-200);
    margin: 20px;
    border-radius: var(--border-radius-sm);
}

/* ===== RESUMO ===== */
.resumo-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--success) 0%, #4CAF50 100%);
    color: white;
}

.resumo-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
}

.resumo-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.resumo-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px;
}

.stat-large {
    background: white;
    padding: 24px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-large .stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.resumo-lista {
    padding: 20px;
}

.resumo-lista h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--dark);
}

.resumo-lista-item {
    background: white;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.resumo-actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== CONFIGURAÇÕES ===== */
.config-section {
    background: white;
    margin: 20px;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.config-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--dark);
}

.config-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.config-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
}

.config-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.config-item select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    margin-top: 8px;
}

.text-muted {
    color: var(--gray-500);
    font-size: 14px;
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    /* Slate profundo semi-transparente */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    color: var(--dark);
}

.btn-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 28px;
    color: var(--gray-600);
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-close:hover {
    background: var(--gray-200);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* ===== MODAL MENU ===== */
.modal-menu-content {
    position: fixed;
    right: 20px;
    top: 70px;
    max-width: 300px;
    animation: slideDown 0.3s ease-out;
}

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

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

.menu-item {
    width: 100%;
    padding: 16px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    border-radius: var(--border-radius-sm);
}

.menu-item:hover {
    background: var(--gray-100);
}

.menu-icon {
    font-size: 24px;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: var(--dark);
    color: white;
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    animation: toastIn 0.3s ease-out;
    pointer-events: auto;
    max-width: 400px;
    font-size: 15px;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.warning {
    background: var(--warning);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .stats-row {
        gap: 8px;
    }

    .stat-value {
        font-size: 24px;
    }

    .action-buttons {
        width: 100%;
    }

    .action-buttons .btn {
        flex: 1;
    }

    .modal-content {
        margin: 0;
        border-radius: var(--border-radius);
    }
}

@media (max-width: 480px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

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

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}


/* ===== MULTI-ESCOLA STYLES ===== */

/* Badge de Escola nos Cards de Turma */
.escola-badge {
    display: inline-block;
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Badge "Padrão" no gerenciamento */
.badge-default {
    display: inline-block;
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* Filtro de Escola */
.filter-container {
    padding: 16px 20px;
    background: white;
    border-radius: var(--border-radius);
    margin: 0 20px 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.filter-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

.filter-container select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    background: white;
    color: var(--gray-800);
    cursor: pointer;
    transition: var(--transition);
}

.filter-container select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* Lista de Escolas (Modal Gerenciar) */
.escolas-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 350px;
    overflow-y: auto;
}

.escola-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.escola-item:hover {
    background: white;
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.escola-item-info {
    flex: 1;
    font-size: 15px;
}

.escola-item-info strong {
    color: var(--dark);
}

.escola-item-meta {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.count-badge {
    font-size: 11px;
    background: var(--gray-200);
    color: var(--gray-600);
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 500;
}

.count-badge.empty {
    opacity: 0.6;
}

.escola-item-info .text-muted {
    font-size: 13px;
    color: var(--gray-600);
}

.escola-item-actions {
    display: flex;
    gap: 6px;
}

.escola-item-actions .btn-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.escola-item-actions .btn-icon:hover {
    background: var(--gray-200);
    transform: scale(1.05);
}