/* Variáveis com a paleta de cores do sistema */
:root {
    --primary-blue: #004A8D;
    --primary-orange: #F7941D;
    --light-orange: #FDC180;
    --white: #ffffff;
    --bg-color: #f4f7f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: #333;
}

/* Estilo do Cabeçalho */
.header {
    background-color: var(--primary-blue);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--primary-orange);
}

/* Estilo da Navegação */
.nav-menu {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    align-items: center;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--light-orange);
}

.btn-login {
    background-color: var(--primary-orange);
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-login:hover {
    background-color: var(--light-orange);
    color: var(--primary-blue);
}

/* Estilo do Conteúdo Principal */
.main-content {
    text-align: center;
    padding: 2rem 1rem;
}

.main-content h1 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.main-content p {
    color: #555;
    font-size: 1.2rem;
}

.cta-start {
    margin-top: 3rem;
}

.cta-start i {
    font-size: 3rem;
    color: var(--primary-orange);
    margin-bottom: 10px;
}

.cta-start p {
    font-weight: bold;
    color: var(--primary-blue);
}

/* ========================================= */
/* ESTILOS DE FORMULÁRIOS (LOGIN E CADASTRO) */
/* ========================================= */
.form-container {
    background-color: var(--white);
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: left;
}

.form-container h2 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 5px rgba(247, 148, 29, 0.3);
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

/* ========================================= */
/* BREAKPOINTS DE RESPONSIVIDADE             */
/* ========================================= */

/* Small (sm) - 576px and up */
@media (min-width: 576px) {
    .main-content h1 {
        font-size: 2rem;
    }
}

/* Medium (md) - 768px and up */
@media (min-width: 768px) {
    .header {
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem 2rem;
    }
    .nav-menu {
        margin-top: 0;
        gap: 1.5rem;
    }
    .main-content {
        padding: 2rem 2rem;
    }
    .main-content h1 {
        font-size: 2.2rem;
    }
}

/* Large (lg) - 992px and up */
@media (min-width: 992px) {
    .header {
        padding: 1rem 3rem;
    }
    .main-content {
        padding: 2rem 3rem;
    }
    .main-content h1 {
        font-size: 2.5rem;
    }
}

/* Extra Large (xl) - 1200px and up */
@media (min-width: 1200px) {
    .main-content {
        padding: 2rem 3rem;
    }
    .main-content h1 {
        font-size: 3rem;
    }
}

/* ========================================= */
/* ESTILOS DE TABELAS E ALERTAS (CRUD)       */
/* ========================================= */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: var(--primary-blue);
    color: var(--white);
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    margin-right: 5px;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-edit { background-color: var(--primary-orange); }
.btn-delete { background-color: #dc3545; }

.alert { padding: 15px; border-radius: 4px; margin-bottom: 20px; font-weight: 500; }
.alert-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ========================================= */
/* EFEITOS DE ANIMAÇÃO / HOVER               */
/* ========================================= */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
a:hover > .hover-card, .hover-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15) !important;
}

/* ========================================= */
/* STATUS BADGES PARA REPORTES               */
/* ========================================= */
.status-badge { padding: 4px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: bold; }
.status-pendente { background-color: #fff3cd; color: #856404; }
.status-resolvido { background-color: #d4edda; color: #155724; }

/* ========================================= */
/* CLASSES UTILITÁRIAS E GERAIS              */
/* ========================================= */
.mt-4 { margin-top: 4rem; }
.mb-2 { margin-bottom: 2rem; }

.pt-3 { padding-top: 3rem !important; }
.alert-sm { font-size: 0.9rem; padding: 10px; }
.form-subtitle { text-align: center; margin-bottom: 20px; font-size: 0.95rem; color: #555; }

/* Classes de Layout, Grid e Tipografia */
.container-xl { max-width: 1400px; margin: 0 auto; }
.form-container-wide { max-width: 100%; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
@media (min-width: 768px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
}
.form-full-row { grid-column: 1 / -1; }

.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-muted { color: #666 !important; }
.text-sm { font-size: 0.9rem; }
.text-xs { font-size: 0.8rem; }
.nowrap { white-space: nowrap; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 5px !important; }
.mt-1 { margin-top: 5px !important; }

.btn-sm { font-size: 0.8rem; padding: 4px 10px; border-radius: 4px; border: none; cursor: pointer; text-decoration: none; color: white; display: inline-block; transition: opacity 0.2s; }
.btn-sm:hover { opacity: 0.85; }

.bg-blue { background-color: var(--primary-blue) !important; }
.bg-orange { background-color: var(--primary-orange) !important; }
.bg-teal { background-color: #17a2b8 !important; }
.bg-gray { background-color: #6c757d !important; }
.bg-green { background-color: #28a745 !important; color: #fff !important; transition: background-color 0.3s ease, opacity 0.3s ease; }
.bg-green:hover { background-color: #218838 !important; opacity: 0.95; }

.checkbox-list-box { padding: 0.8rem; border: 1px solid #ccc; border-radius: 4px; background-color: #fff; }
.checkbox-list-box label { display: block; margin-bottom: 5px; font-weight: normal; cursor: pointer; }
.checkbox-list-box.inline-labels label { display: inline-block; margin-right: 15px; margin-bottom: 0; }
.checkbox-list-box.scrollable { max-height: 150px; overflow-y: auto; }
.input-readonly { background-color: #e9ecef !important; cursor: not-allowed !important; font-weight: bold !important; color: var(--primary-blue) !important; }

.text-danger { color: #dc3545 !important; }
.text-success { color: #28a745 !important; }
.text-warning { color: #ffc107 !important; }

.border-red { border-left-color: #dc3545 !important; }
.border-teal { border-left-color: #17a2b8 !important; }
.link-bold { color: var(--primary-blue); font-weight: bold; }

.forgot-password { text-align: right; margin-bottom: 1rem; margin-top: -0.5rem; }
.forgot-password a { font-size: 0.85rem; color: var(--primary-blue); text-decoration: none; }
.forgot-password a:hover { text-decoration: underline; }

/* Utilitários de Formulário (Ícone de Senha e Botões) */
.input-icon-wrapper { position: relative; }
.input-with-icon { padding-right: 40px; }
.password-toggle-icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); cursor: pointer; color: #666; }

.password-strength-container { height: 5px; background: #e9ecef; border-radius: 3px; margin-top: 5px; overflow: hidden; display: none; }
.password-strength-bar { height: 100%; width: 0%; transition: width 0.3s, background-color 0.3s; }
.password-strength-text { font-size: 0.8rem; font-weight: bold; margin-top: 3px; display: block; }

.btn-group { display: flex; gap: 10px; margin-top: 1rem; }
.btn-group.mt-2 { margin-top: 1.5rem; }
.btn-flex { color: #fff; border: none; cursor: pointer; margin: 0; flex: 1; }
.btn-cancel { background-color: #dc3545; color: #fff; text-decoration: none; text-align: center; margin: 0; flex: 1; display: flex; align-items: center; justify-content: center; }
.btn-cancel:hover { background-color: #c82333; }

/* ========================================= */
/* ESTILOS DO DASHBOARD                      */
/* ========================================= */
.dashboard-backup-panel { background: #fff; padding: 15px 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); margin-top: 2rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; border-left: 4px solid; }
.dashboard-backup-title { margin: 0; color: var(--primary-blue); font-size: 1.1rem; }
.dashboard-backup-status { margin: 5px 0 0 0; font-size: 0.95rem; }
.dashboard-backup-warning { display: block; font-size: 0.85rem; margin-top: 5px; }
.btn-auto-width { display: inline-block; color: white; border: none; cursor: pointer; text-decoration: none; padding: 10px 20px; width: auto; margin: 0; }

.dashboard-category { margin-top: 3rem; }
.dashboard-category-title { color: var(--primary-blue); border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 1.5rem; text-align: left; }
.dashboard-category-title.toggleable { cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.dashboard-empty-msg { text-align: left; color: #666; font-size: 1.1rem; }

.dashboard-cards-container { display: flex; gap: 20px; flex-wrap: wrap; }
.dashboard-card-link { text-decoration: none; color: inherit; width: 100%; max-width: 260px; }
.dashboard-card-content { text-align: center; margin: 0; height: 100%; }
.dashboard-card-icon { font-size: 2.5rem; margin-bottom: 15px; }
.dashboard-card-desc { font-size: 0.95rem; margin-top: 10px; }

.icon-blue { color: var(--primary-blue); }
.icon-orange { color: var(--primary-orange); }
.icon-teal { color: #17a2b8; }
.icon-red { color: #dc3545; }
.icon-green { color: #28a745; }
.icon-gray { color: #6c757d; }

.dashboard-list-container { display: flex; flex-direction: column; gap: 20px; }
.turma-card { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); text-align: left; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; border-left: 4px solid; }
.turma-andamento { border-left-color: #ffc107; }
.turma-nao-iniciada { border-left-color: #dc3545; }
.turma-finalizada { border-left-color: #28a745; opacity: 0.85; }

.turma-info { flex: 1; min-width: 250px; }
.turma-title { color: var(--primary-blue); margin-bottom: 10px; font-size: 1.2rem; }
.turma-title.strike { text-decoration: line-through; }
.turma-details { margin-bottom: 10px; font-size: 0.95rem; color: #555; }
.turma-progress-text { font-size: 0.9rem; color: #666; }

.turma-progress-circle-container { display: flex; flex-direction: column; align-items: center; }
.turma-progress-circle { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.turma-progress-circle.bg-gray { background: #e9ecef; }
.turma-progress-circle.bg-red { background: #dc3545; }
.turma-progress-circle.bg-green { background: #28a745; }
.turma-progress-value { width: 60px; height: 60px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.1rem; }
.turma-progress-value.text-blue { color: var(--primary-blue); }
.turma-progress-value.text-gray { color: #666; font-size: 1.5rem; }
.turma-progress-value.text-red { color: #dc3545; font-size: 1.5rem; }
.turma-progress-value.text-green { color: #28a745; font-size: 1.5rem; }
.turma-progress-label { font-size: 0.8rem; color: #666; margin-top: 8px; }

/* ========================================= */
/* ESTILOS DO DIÁRIO DE CLASSE (AULAS)       */
/* ========================================= */
.cancel-reason-container { background-color: #f8d7da; padding: 15px; border-radius: 5px; border-left: 4px solid #dc3545; }
.bases-section-title { color: var(--primary-blue); font-size: 1.1rem; margin-bottom: 10px; border-top: 1px solid #eee; padding-top: 15px; }

/* Accordion Bases Pedagógicas */
.bases-category-card { background: #fff; border-radius: 5px; border: 1px solid #e0e0e0; transition: all 0.3s; overflow: hidden; margin-bottom: 10px; padding: 0; }
.accordion-header { padding: 12px 15px; background-color: #f9f9f9; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background-color 0.2s; }
.accordion-header:hover { background-color: #e9ecef; }
.bases-category-title { color: var(--primary-orange); margin-bottom: 0; font-size: 1.05rem; }
.accordion-body { padding: 15px; border-top: 1px solid #e0e0e0; background: #fff; }
.summary-box { background-color: #fff3cd; color: #856404; padding: 12px; border-radius: 5px; border: 1px solid #ffeeba; margin-bottom: 15px; font-size: 0.95rem; line-height: 1.5; }

.bases-category-card.completed { border-color: #c3e6cb; }
.bases-category-card.completed .accordion-header { background-color: #d4edda; }
.bases-category-card.completed h4 { color: #155724; }

.base-item-label { display: flex; align-items: flex-start; gap: 12px; font-weight: normal; font-size: 1.1rem; padding: 12px 10px; border-bottom: 1px solid #e0e0e0; cursor: pointer; transition: background 0.2s; }
.base-item-checkbox { margin-top: 4px; width: 22px; height: 22px; cursor: pointer; }
.base-item-label.item-used-once { background-color: #fff3cd; color: #856404; }
.base-item-label.item-used-multi { background-color: #d4edda; color: #155724; }

.progress-card { background: #fff; padding: 10px 15px; border-radius: 5px; border-left: 4px solid var(--primary-orange); box-shadow: 0 2px 5px rgba(0,0,0,0.05); font-size: 0.9rem; flex: 1; min-width: 250px; }
.progress-bar-container { width: 100%; background-color: #e9ecef; border-radius: 4px; height: 8px; margin: 8px 0; overflow: hidden; }
.resumo-cell { background-color: #f8f9fa; padding: 15px 20px; border-left: 4px solid var(--primary-blue); box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }

/* ========================================= */
/* PAGINAÇÃO DE TABELAS                      */
/* ========================================= */
.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 20px; padding-bottom: 20px; }
.pagination .page-link { padding: 8px 12px; background-color: #fff; color: var(--primary-blue); border: 1px solid #dee2e6; border-radius: 4px; text-decoration: none; font-weight: 500; transition: all 0.2s; }
.pagination .page-link:hover { background-color: #e9ecef; }
.pagination .page-link.active { background-color: var(--primary-blue); color: #fff; border-color: var(--primary-blue); pointer-events: none; }

/* ========================================= */
/* TOAST NOTIFICATION (CÓPIA)                */
/* ========================================= */
.toast-notification {
    visibility: hidden;
    min-width: 250px;
    background-color: #28a745;
    color: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    position: fixed;
    z-index: 1050;
    right: 30px;
    bottom: 20px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s ease, bottom 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}
.toast-notification.show {
    visibility: visible;
    opacity: 1;
    bottom: 40px;
}