body,
html {
    min-height: 100%;
    margin: 0;
    padding: 0;
    background-color: #ececec;
}

/* TOPO */
#topbar {
    background-color: #808080;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

#logostart {
    width: 120px;
    height: auto;
}

#menuToggle {
    position: relative;
    z-index: 1001;
    top: 36px;
    float: left;
}

#menuToggle ion-icon {
    font-size: 32px;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#menuToggle ion-icon:hover {
    transform: scale(1.2);
    color: #3e48a3;
}

#showBtn {
    display: inline-block;
}

#hideBtn {
    display: none;
}

/* MAIN */
main {
    display: flex;
    min-height: 110vh;
    padding-top: 56px;
}

/* CONTEÚDO */
#content {
    width: 100%;
    padding: 20px;
    background: #ececec;
}

/*  */
# {
    width: 100%;
    max-width: 320px;
    background-color: #f5f5f5;
    padding: 30px 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    color: #2c2c2c;
    transition: all 0.3s ease;
    position: relative;
}

#sidebar h3 {
    font-size: 20px;
    font-weight: bold;
    color: #2c2c2c;
    margin-bottom: 20px;
}

#sidebar .btn {
    margin-bottom: 20px;
    background-color: #ffffff;
    color: #2c2c2c;
    border: 1px solid #ddd;
    width: 100%;
    text-align: center;
    border-radius: 10px;
}

#sidebar ul.navbar-nav {
    width: 100%;
    padding: 0;
}

#sidebar .nav-item {
    margin: 10px 0;
    text-align: center;
}

#sidebar .nav-link {
    font-size: 16px;
    color: #2c2c2c;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

#sidebar .nav-link i,
#sidebar .nav-link span {
    font-size: 20px;
    color: white;
    font-weight: bold;
}

#sidebar .nav-link:hover {
    color: #3e48a3;
}

#sidebar a:hover {
    color: #3e48a3;
}

/* FOOTER */
#footer {
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 10px 20px;
    font-size: 9px;
    background: none;
    color: #000;
    z-index: 10;
}

#sidebar .blocoFooterMenu span {
    font-size: 14px;
}

.m-b-40 {
    margin-bottom: 40px;
}

.tituloDasModulos {
    text-transform: uppercase;color: #003F82;font-weight: bold;border-bottom: 2px solid #003F82;padding: 10px 0;margin: 0 0 20px 0;
}

.titleItems {
    font-size: 26px;font-weight: bold;color: #36373d;
    border-bottom: 3px solid #07509D;
    padding-bottom: 10px;
}

.titlesegunda {
    font-size: 26px;font-weight: bold;color: #36373d;
    border-bottom: 3px solid #243782;
    padding-bottom: 10px;
}

.titleterca {
    font-size: 26px;font-weight: bold;color: #36373d;
    border-bottom: 3px solid #e94e24;
    padding-bottom: 10px;
}

.titlequarta {
    font-size: 26px;font-weight: bold;color: #36373d;
    border-bottom: 3px solid #282b34;
    padding-bottom: 10px;
}

.titlequinta {
    font-size: 26px;font-weight: bold;color: #36373d;
    border-bottom: 3px solid #eca935;
    padding-bottom: 10px;
}

.titlesexta {
    font-size: 26px;font-weight: bold;color: #36373d;
    border-bottom: 3px solid #43aaa0;
    padding-bottom: 10px;
}

.textItems p {
    margin-bottom: 20px;
}

.textModulo {
    margin-bottom: 20px;
}

.textModulo:first-child {
    margin-top: 40px;
}

/* RESPONSIVO MOBILE */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }

    #sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        height: 110vh;
        width: 100%;
        max-width: none;
        z-index: 999;
        background-color: #f5f5f5;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        display: none;
    }

    #showSidebarBtn {
        display: inline-block !important;
    }

    #hideSidebarBtn {
        display: none;
    }

    #topbar-logo,
    #imgMenuAssinatura {
        display: none;
    }

    #menuToggle {
        top: 14px;
    }

    #logoHeader {
        height: auto;
        width: 220px;
        position: relative;
        top: -20px;
        left: 45px;
    }

    #logoHeaderCel {
        height: auto;
        width: 220px;
        position: relative;
        left: 45px;
    }

    .blocoFooterMenu {
        position: absolute;
        bottom: 140px;
    }
    #dashboard_container {
        justify-content: center;
    }
}

/* AJUSTE DESKTOP: Sidebar com altura dinâmica e sem sumir */
@media (min-width: 769px) {
    #sidebar {
        min-height: calc(100vh - 56px);
        height: calc(100vh - 56px);
        position: fixed;
        top: 56px;
        left: 0;
        padding-bottom: 0;
        overflow-y: auto;
    }

    main {
        margin-left: 320px;
        align-items: flex-start;
    }

    #showSidebarBtn {
        display: inline-block !important;
    }

    #hideSidebarBtn {
        display: none;
    }
    #logoHeader {
        margin: 10px;
        width: 90%;
    }
    .blocoFooterMenu {
        position: relative;
        bottom: 25px;
    }
    #dashboard_container {
        justify-content: space-between;
    }
}

/* --------------------- */
/*    GRID DE MÓDULOS    */
/* --------------------- */
.ag-courses_grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-start;
    /* distribui igualmente */
    gap: 20px;
    margin-top: 40px;
}

.ag-courses_item {
    flex: 0 0 24%;
    max-width: 25%;
    background: #969696;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 10px;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Centralizar conteúdo interno */
.ag-courses-item_content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* Responsividade */
@media (max-width: 1200px) {
    .ag-courses_item {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

#dashboard_container {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

#dashboard_modulos,
#dashboard_diarias,
#dashboard_atos {
    background-color: #f9f9f9;
    padding: 20px;
    color: #4a568d;
    border-radius: 20px;
    width: 30%;
    min-width: 280px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

#dashboard_modulos hr,
#dashboard_diarias hr,
#dashboard_atos hr {
    border: none;
    border-top: 2px solid #4a568d;
    width: 50%;
    margin: 10px auto;
}

.ag-status-pendente {
    background: #969696 !important;
    transition: all 0.2s ease-in-out;
}

.ag-status-pendente:hover {
    background: #7a7a7a !important;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Bloquear hover visual para os outros estados */
.ag-status-correto {
    background: #0f7c1c !important;
    cursor: default;
}

.ag-status-errado {
    background: #d62828 !important;
    cursor: default;
}

.ag-status-correto:hover{
    background: #085a12 !important;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

}
.ag-status-errado:hover {
    background: #aa1e1e !important;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bodyBlue {
    background: linear-gradient(135deg, #1a80d1, #00408b);
}

.bodyModulo1 {
    background: linear-gradient(135deg, #243782, #423db7);
}

.bodyModulo2 {
    background: linear-gradient(135deg, #e94e24, #f76c3a);
}

.bodyModulo3 {
    background: linear-gradient(135deg, #1a80d1, #00408b);
}

.bodyModulo4 {
    background: linear-gradient(135deg, #eca935, #ffd25e);
}

.bodyModulo5 {
    background: linear-gradient(135deg, #43aaa0, #00495e);
}

.ag-badges_item {
    flex: 0 0 24%;
    max-width: 19%;
    background: #dacfcf;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 10px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ag-badges_master {
    flex: 0 0 24%;
    max-width: 81%;
    background: #dacfcf;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 10px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-white {
    background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important;
}

.bg-cyan {
    background: #1FB5FF !important;
}

.bg-yellow {
    background: #FFBF00 !important;
}
