/* ==========================================================================
   ESTILO GERAL
   ========================================================================== */

   body {
    margin: 0;
    background-color: #efeafa;
    display: flex;
    flex-direction: column;
    font-family: 'Lato', sans-serif;
}

/* --- NAVBAR --- */
.navbar {
    background-color: #faf9fd;
    padding: 15px 30px; 
    border-bottom: 1px solid #57437a;
    position: relative; 
    z-index: 1000;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-left {
    display: flex;
    align-items: center; 
    gap: 15px; 
    margin-right: 20px; 
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: rgb(58, 27, 132);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 5px 0;
    transition: color 0.3s ease;
    
    display: flex;
    align-items: center;
    white-space: nowrap; 
}

/* SETA MENU (NAVBAR) */
.seta-menu {
    width: 0; 
    height: 0; 
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgb(58, 27, 132); 
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.menu:hover .seta-menu {
    transform: rotate(180deg);
}

.nav-links > li:not(.submenu, .contato) > a {
    position: relative;
}

.nav-links > li:not(.submenu, .contato) > a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: -4px;
    background: #3c0693;
    transition: width 0.3s ease;
}

.nav-links span,
.nav-links button {
    color: rgb(58, 27, 132);
    background: none;
    border: none;
    font-weight: 400;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
}

.nav-links > li > button::after,
.nav-links > li > span::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: -4px;
    background: #3c0693;
    transition: width 0.3s ease;
}

.nav-links > li > button:hover::after {
    width: 100%;
}

.nav-links > li > button,
.nav-links > li > span {
    position: relative;
}

.navbar .nav-links  > li:not(.submenu, .contato) > a:hover::after, .navbar .nav-links > li:not(.submenu, .contato) > a.active::after {
    width: 100%;
}

.logout-form {
    display: inline;
}

.logout-form button.nav-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.logo {
    margin-right: 0; 
    height: 55px;               
    width: 55px;               
    border-radius: 50%; 
    border: 2px solid  #4a3863; 
    object-fit: cover;
}

/* --- MARCA (INVERTIDO) --- */
.marca-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 5px; 
    line-height: 1.1;
}

.marca-superior {
    font-size: 20px;
    font-weight: 700;
    color: #4a3863;
    margin-bottom: 2px;     
    white-space: nowrap;
}

.marca-inferior {
    font-size: 14px;
    font-weight: 400;
    color: #4a3863;
    white-space: nowrap;
    opacity: 0.9;
}

@media (max-width: 480px) {
    .marca-superior { font-size: 16px; }
    .marca-inferior { font-size: 12px; }
}


.menu {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    background-color: #5850ab;
    padding: 10px;
    border-radius: 6px;
    min-width: 180px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
}

.menu:hover .submenu,
.submenu:hover {
    display: block;
}

.submenu li {
    list-style: none;
}

.submenu a {
    color: white;
    padding: 8px 10px;
    display: block;
    text-decoration: none;
    font-size: 15px;
}

.submenu a:hover {
    background-color:  #847be6a8;
    border-radius: 4px;
}

.submenu::before {
    content: "";
    position: absolute;
    top: -10px; 
    left: 0;
    width: 100%;
    height: 10px; 
    background-color: transparent;
}

main {
    padding: 40px;
    flex: 1; 
}

html, body {
    height: 100%;
    margin: 0;
}

/* --- FOOTER --- */
.footer {
    background-color: #eae6f8;
    padding: 0 0 40px 0;
    color: rgb(46, 28, 62);
    font-family: Arial, sans-serif;
}

.footer-borda-sup {
    width: 100%;
    height: 15px;
    background: linear-gradient(to bottom,  #dfd9f5, transparent);
    margin-bottom: 40px;
}

.footer-container {
    max-width: 1300px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 50px;
    padding: 0 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
}

.footer-logo img {
    margin-right: 10px;
    height: 70px;               
    width: 70px;               
    border-radius: 50%; 
    border: 2px solid  #4a3863; 
    object-fit: cover;
}

.footer-logo h4 {
    font-size: 27px;
    font-weight: 800;
    color: #4a3863;
    margin: 0;
    line-height: 1.1;
    font-family: 'Lato', sans-serif;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid #6a64c3;
    padding-bottom: 5px;
    display: inline-block;
}

.footer-column a,
.footer-column p {
    display: block;
    color: #0d0321d4;
    font-size: 14px;
    margin-bottom: 10px;
    text-decoration: none;
    font-family: 'Lato', sans-serif;
}

footer a {
    display: inline-block;
    padding: 0;
    position: relative;
}

footer li {
    margin: 0 15px;
}

html {
    scroll-behavior: smooth;
}

/* --- ELEMENTOS GERAIS --- */
.calc-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Lato', sans-serif;
}

.breadcrumb {
    font-size: 0.9em;
    margin-bottom: 15px;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    font-size: 0.9em; 
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .current {
    color: #444;
}

.header-section {
    text-align: center;
    margin: 10px 0 30px 0;
}

.header-section h1 {
    color: #333;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.subtitle {
    color: #777;
    font-size: 1.1em;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.alert-info {
    background-color: #e3f2fd;
    color: #0d47a1;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9em;
    margin-bottom: 20px;
    border-left: 4px solid #2196f3;
}

.avaliacao-row {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    align-items: flex-end;
}



.input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.input-group label {
    font-size: 0.85em;
    color: #555;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="number"],
input[type="text"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 6px;
    font-size: 1.1em;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-outline {
    background-color: transparent;
    border: 2px dashed #ccc;
    color: #666;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
}

.result-card {
    margin-top: 25px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.aprovado {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.reprovado {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.em-andamento {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.page-container { 
    max-width: 700px; 
    margin: 0 auto; 
    padding: 20px; 
} 

.page-header { 
    text-align: center; 
    margin-bottom: 30px; 
} 

.page-header h1 { 
    margin-bottom: 5px; 
    color: #2c2c54; 
} 

/* --- LISTAS DE MATERIA --- */
.materias-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
} 

.materias-list li { 
    margin-bottom: 10px; 
} 

.materias-list a { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 15px; 
    background: #f5f3ff; 
    border-radius: 8px; 
    text-decoration: none; 
    color: #3f3d56; 
    font-weight: 500; 
    transition: background 0.2s; 
} 

.materias-list a:hover { 
    background: #e8e4ff; 
} 

/* SETA DA LISTA DE MATERIAS (CSS) */
.seta-lista {
    width: 0; 
    height: 0; 
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid #3f3d56; /* Aponta para direita */
    display: inline-block;
}

.empty { 
    color: #999; 
    font-style: italic; 
}

.divider { border: 0; border-top: 1px solid #eee; margin: 20px 0; } 

.home-container {
    width: 100%;
    /* MUDANÇA: Tirei a margem negativa que deixava torto no mobile */
    margin: 10px auto; 
    padding: 10px;
    box-sizing: border-box;
}

.welcome {
    text-align: left; 
    gap: 30px;
    padding: 50px 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 25px;
    border-bottom: 4px solid #5850ab;
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
}

.welcome h1 {
    font-size: 2em;
    color: #2c2c54;
    margin: 0 0 10px 0;
    font-weight: 800;
}

.welcome .destaque {
    color: #5850ab;
}

.welcome-subtitle {
    font-size: 1.3em;
    color: #4a3863;
    font-weight: 600;
    margin-bottom: 15px;
    margin-top: 0;
}

.welcome-description {
    color: #666;
    font-size: 1em;
    line-height: 1.6;
    margin: 0;
    max-width: 900px;
}


.info-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    margin-bottom: 25px;
}

.card-header {
    background-color: #faf9fd;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.card-header h3 {
    margin: 0;
    color: #4a3863;
    font-size: 1.35em;
}

.card-body {
    padding: 20px;
    font-size: 1.1em;
}

.update-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.update-item {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.update-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.update-item .date {
    display: inline-block;
    background-color: #efeafa;
    color: #5850ab;
    font-size: 0.8em;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    margin-bottom: 5px;
}

.update-item p {
    margin: 5px 0 0 0;
    font-size: 0.95em;
    color: #555;
    line-height: 1.4;
}

.contact-area {
    margin-top: 20px;
    background-color: #e9e7f66b;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e0dbf0;
}

.email-btn {
    display: inline-block;
    background-color: white;
    color: #5850ab;
    font-weight: bold;
    font-size: 1.1em;
    padding: 12px 20px;
    margin: 15px 0;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #5850ab;
    transition: all 0.2s ease;
}

.email-btn:hover {
    background-color: #5850ab;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(88, 80, 171, 0.2);
}

.contact-area p {
    margin: 0;
    color: #444;
}

.contact-area .small-text {
    font-size: 0.85em;
    color: #777;
    margin-top: 5px;
}

.card-header.clickable {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.card-header.clickable:hover {
    background-color: #f0eff5;
}

/* SETA PATCH NOTES (HOME) */
.arrow {
    width: 0; 
    height: 0; 
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #5850ab; /* Aponta para baixo */
    display: inline-block;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

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

.nav-user {
    cursor: default;
}

.btn-remover {
    flex: 0 0 36px;   /* largura fixa */
    height: 36px;

    align-self: flex-end;

    background: none;
    border: 1px solid #ccc;
    border-radius: 6px;

    font-size: 18px;
    cursor: pointer;
}


.btn-remover:hover {
    background: #fdeaea;
    border-color: #d32f2f;
    color: #d32f2f;
}



/* ==========================================================================
   ADAPTAÇÃO MOBILE
   ========================================================================== */

.menu-toggle { display: none; }

@media (max-width: 768px) {
    
    html, body { overflow-x: hidden; }
    main { padding: 20px; }

    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 2000;
        margin-right: 15px;
        flex-shrink: 0;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #4a3863;
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    .menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .menu-toggle.open span:nth-child(2) { opacity: 0; }
    .menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

    .nav-links {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #faf9fd;
        border-bottom: 2px solid #57437a;
        padding: 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 999;
        max-height: 80vh;
        overflow-y: auto;
        
        -webkit-overflow-scrolling: touch; 
    }

    .nav-links.active { display: flex; }

    .nav-links > li {
        width: 100%;
        border-bottom: 1px solid #e0e0e0;
        text-align: left;
    }

    .nav-links a {
        display: block;
        padding: 15px 20px;
        font-size: 1.1em;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-links > li > a::after { display: none; }

    .submenu {
        position: static; 
        display: none;
        width: 100%;
        background-color: #f0ebf8;
        box-shadow: none;
        padding: 0;
    }

    .submenu.open { display: block; }

    .submenu li a {
        color: #555 !important;
        padding-left: 30px; 
        border-bottom: 1px solid #e6e6e6;
    }

    .avaliacao-row {
        position: relative;
        flex-direction: column;
        background-color: #ffffff;
        border: 1px solid #e0e0e0;
        padding: 15px;
        padding-top: 40px; /* 👈 espaço pro X */
        margin-bottom: 20px;
        border-radius: 8px;
    }

    .btn-remover {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 28px;
    height: 28px;

    border: 1px solid #ccc;
    background: #fff;
    border-radius: 6px;

    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;

    }


    .input-group { width: 100%; }
    input[type="number"], .btn-primary, .btn-outline { width: 100%; box-sizing: border-box; }
    .input-group[style*="max-width"] { max-width: 100% !important; }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
        gap: 30px;
    }
    
    .footer-logo { flex-direction: column; }
    /* MUDANÇA: Zerei a margem lateral da imagem no mobile para centralizar */
    .footer-logo img { margin-right: 0; margin-bottom: 10px; }
    
    .footer-column { width: 100%; border-bottom: 1px solid #eee; padding-bottom: 20px; }
    .footer-column:last-child { border: none; }
}

/* ==========================================================================
   MOBILE HINT (SETA CSS)
   ========================================================================== */
.mobile-hint-overlay {
    display: none; 
}

@media (max-width: 768px) {
    /* 1. O fundo escuro que cobre a tela toda */
    .mobile-hint-overlay {
        position: fixed; /* Fixa na tela, ignora rolagem */
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7); /* Escurece o fundo */
        z-index: 9999; /* Garante que fique MUITO acima de tudo */
        display: none; /* Controlado pelo JS */
    }

    /* 3. A caixa de texto (Dica) */
    .hint-box {
        position: absolute;
        top: 90px; /* Logo abaixo da seta (70px + 20px da seta) */
        right: 15px; /* Alinhado com a direita */
        left: 15px; /* Ocupa a largura quase toda (centralizado) */
        animation: bounce 1.5s infinite; /* Animação de leve "bounce" para chamar atenção */
    
    /* ESTILO VISUAL (O fundo branco que você queria) */
        background-color: white; 
        color: #333333; /* Texto escuro para contraste */
        padding: 20px;
        border-radius: 10px;
        font-size: 16px;
        line-height: 1.5;
        text-align: center;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* Sombra para destacar */
        z-index: 10000;
    }

    .hint-box::after {
        content: "";
        position: absolute;
        top: -10px;
        left: 20px;
        border-width: 0 10px 10px 10px;
        border-color: transparent transparent white transparent;
        border-style: solid;
    }

    .hint-box p {
        margin: 0;
        color: #4a3863;
        font-weight: bold;
        font-size: 14px;
        line-height: 1.4;
    }

    @keyframes bounce {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }
}

/* ==========================================================================
   AJUSTE DE ESPAÇAMENTO: 5PX ENTRE LOGOS
   ========================================================================== */

.social-container {
    display: flex !important;
    flex-direction: column !important;
    /* Ajuste para não colar totalmente no título, mas ficar próximo */
    margin-top: 3px !important; 
    /* Espaço entre os blocos dos logos */
    gap: 7px !important; 
    padding: 0 !important;
}

.social-container .social {
    text-decoration: none !important;
    color: #4a3863 !important;
    font-size: 26px !important; 
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    /* Resetado para 0 para evitar sobreposição */
    margin-bottom: 0 !important; 
    transition: transform 0.3s ease;
}

.social-no-click {
    cursor: default !important;
}

.social-container .social span {
    font-size: 14px !important;
    text-transform: uppercase;
    font-family: 'Lato', sans-serif;
}

.social-container .social span.email-text {
    text-transform: none !important;
    font-weight: normal;
}

.social-container .social:hover {
    color: #5850ab !important;
    transform: translateX(5px);
}

/* ==========================================================================
   MODAL TBL (POP-UP)
   ========================================================================== */

/* Fundo escuro atrás do modal */
.modal-overlay {
    display: none; /* Oculto por padrão */
    position: fixed;
    z-index: 2000; /* Acima de tudo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5); /* Preto com transparência */
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

/* Caixa do modal */
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 25px;
    border: 1px solid #888;
    width: 90%;
    max-width: 450px; /* Largura máxima */
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: slideDown 0.3s;
}

/* Botão de fechar (X) */
.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Estilos específicos para inputs dentro do modal */
.tbl-input-group {
    margin-bottom: 15px;
}
.tbl-input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}
.tbl-input-group select, 
.tbl-input-group input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box; /* Garante que padding não estoure largura */
}

/* Botão que abre o modal na página */
.btn-tbl-trigger {
    background-color: #5850ab;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn-tbl-trigger:hover {
    background-color: #4a3863;
}

/* Animações */
@keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}
@keyframes slideDown {
    from {transform: translateY(-20px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}
