
:root {
    --padrao-primary-red: #8b1014;
    --padrao-primary-red-hover: #700d10;
    --padrao-bg-color: #f3f4f6;
    --padrao-card-bg: #ffffff;
    --padrao-text-dark: #1f2937;
    --padrao-text-light: #6b7280;
    --padrao-border-color: #e5e7eb;

    --tecop-blue-label: #1e3a8a;
    --tecop-active-bg: #fbf5f5;
    --tecop-icon-blue: #3b82f6;
    
    --tecag-status-red-bg: #fee2e2;
    --tecag-status-red-text: #991b1b;
    --tecag-status-yellow-bg: #fef3c7;
    --tecag-status-yellow-text: #92400e;
    --tecag-status-green-bg: #d1fae5;
    --tecag-status-green-text: #065f46;

    --calend-calend-ead-color: #b91c1c;
    --calend-calend-semi-color: #450a0a;

    --sidebar-bg: #f4f4f4; 
    --sidebar-item: #ffffff;
    --sidebar-hover: #ff000000;
    --sidebar-active-red: #8b1014;
    --sidebar-text-color: #000000;
    --sidebar-text-muted: #000000;
    --sidebar-text-active: #ffffff;
    --sidebar-border-color: rgba(0, 0, 0, 0.1);

    --header-primary-red: #8b1014;
    --header-primary-red-hover: #700d10;
    --header-bg-color: #f3f4f6;
    --header-card-bg: #ffffff;
    --header-text-dark: #1f2937;
    --header-text-light: #6b7280;
    --header-border-color: #e5e7eb;
    
    --header-badge-admin-bg: #f3e8ff;
    --header-badge-admin-text: #7e22ce;
    --header-badge-operacao-bg: #e0f2fe;
    --header-badge-operacao-text: #0369a1;
    --header-badge-gestor-bg: #dcfce7;
    --header-badge-gestor-text: #15803d;

    --footer-bg-color: #f3f4f6;
    --footer-card-bg: #ffffff;
    --footer-text-dark: #1f2937;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body {
    width: 100%;
    min-height: 100vh;
}

body {
    background-color: var(--padrao-bg-color);
    color: var(--padrao-text-dark);
}


/*
======================
========HEADER========
======================
*/

.header-top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--header-card-bg);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--header-border-color);
    position: relative;
}

.header-top-navbar a { text-decoration: none; }

.header-top-navbar-title {
    font-size: 1.25rem;
    color: var(--header-primary-red);
    font-weight: 600;
}

.header-user-menu-wrapper {
    position: relative;
}

.header-user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--header-bg-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #00000030;
    cursor: pointer;
    transition: all 0.2s;
}

.header-user-profile-btn:hover, .header-user-profile-btn.header-active {
    border-color: var(--header-border-color);
    background-color: #e5e7eb;
}

#userLoginBtn{
    margin: .5rem;    
}

.header-btn-login-text{
    font-size: 1rem;
    font-weight: bold;
    color: var(--header-primary-red);
    padding: .3rem .5rem;
}

.header-user-avatar {
    background-color: var(--header-primary-red);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.header-user-info { text-align: left; }
.header-user-name { font-weight: 600; font-size: 0.9rem; color: var(--header-text-dark); display: block; }
.header-user-role { font-size: 0.75rem; color: var(--header-text-light); }

.header-chevron-icon {
    color: var(--header-text-light);
    transition: transform 0.2s;
}
.header-user-profile-btn.header-active .header-chevron-icon { transform: rotate(180deg); }

.header-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--header-card-bg);
    border: 1px solid var(--header-border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 260px;
    display: none;
    z-index: 100;
}

.header-dropdown-menu.header-show { display: block; }

.header-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--header-border-color);
}

.header-dropdown-email {
    font-size: 0.8rem;
    color: var(--header-text-light);
    margin-bottom: 0.5rem;
}

.header-role-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}
.header-badge-admin { background-color: var(--header-badge-admin-bg); color: var(--header-badge-admin-text); }
.header-badge-operacao { background-color: var(--header-badge-operacao-bg); color: var(--header-badge-operacao-text); }
.header-badge-gestor { background-color: var(--header-badge-gestor-bg); color: var(--header-badge-gestor-text); }

.header-dropdown-list { list-style: none; padding: 0.5rem 0; }

.header-dropdown-item {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--header-text-dark);
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.header-dropdown-item:hover { background-color: var(--header-bg-color); }
.header-dropdown-item svg { color: var(--header-text-light); }

.header-dropdown-divider { border-top: 1px solid var(--header-border-color); margin: 0.5rem 0; }

.header-dropdown-item.header-logout { color: var(--header-primary-red); }
.header-dropdown-item.header-logout svg { color: var(--header-primary-red); }

.header-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.header-modal-overlay.header-show { display: flex; }

.header-modal-card {
    background-color: var(--header-card-bg);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.header-modal-sm { max-width: 400px; }
.header-modal-lg { max-width: 600px; }

.header-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--header-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-modal-title { font-size: 1.1rem; color: var(--header-primary-red); font-weight: 600; }

.header-btn-close {
    background: none; border: none; color: var(--header-text-light);
    font-size: 1.2rem; cursor: pointer;
}

.header-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.header-modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--header-border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.header-form-group { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.header-form-group label { font-size: 0.85rem; color: var(--header-text-dark); font-weight: 500; }
.header-form-control {
    padding: 0.65rem; border: 1px solid var(--header-border-color);
    border-radius: 6px; font-size: 0.9rem; width: 100%;
    outline: none;
}
.header-form-control:focus { border-color: var(--header-primary-red); }

.header-btn {
    padding: 0.65rem 1.2rem; border-radius: 6px; font-size: 0.9rem;
    font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 0.5rem;
    border: 1px solid transparent; transition: all 0.2s;
}
.header-btn-primary { background-color: var(--header-primary-red); color: white; }
.header-btn-primary:hover { background-color: var(--header-primary-red-hover); }
.header-btn-outline { background-color: white; border-color: var(--header-border-color); color: var(--header-text-dark); }
.header-btn-outline:hover { background-color: var(--header-bg-color); }
.header-btn-full { width: 100%; justify-content: center; }
.header-btn-danger-text { background: none; border: none; color: var(--header-primary-red); font-size: 0.8rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 0.25rem; }

.header-add-user-box {
    border: 1px solid #e5e7eb; background-color: #fafafa;
    border-radius: 8px; padding: 1.5rem; margin-bottom: 2rem;
}
.header-add-user-title { font-size: 0.9rem; font-weight: 600; color: var(--header-primary-red); margin-bottom: 1rem; }
.header-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.header-users-list-header { font-size: 0.95rem; font-weight: 600; color: var(--header-primary-red); margin-bottom: 1rem; }
.header-search-bar { margin-bottom: 1rem; position: relative; }
.header-search-bar svg { position: absolute; left: 10px; top: 10px; color: var(--header-text-light); }
.header-search-bar input { padding-left: 2.2rem; }

.header-user-list { display: flex; flex-direction: column; gap: 0.75rem; }
.header-user-card { border: 1px solid var(--header-border-color); border-radius: 8px; padding: 1rem; display: flex; justify-content: space-between; align-items: center; }
.header-user-card-info { display: flex; align-items: center; gap: 1rem; }
.header-user-card-details h4 { font-size: 0.9rem; color: var(--header-text-dark); margin-bottom: 0.1rem; }
.header-user-card-details p { font-size: 0.8rem; color: var(--header-text-light); margin-bottom: 0.4rem; }

@media (max-width: 999px) {
    .header-top-navbar {
        margin-left: 0; 
        padding: 0.75rem 1rem; 
    }

    .header-top-navbar-title {
        font-size: 0.95rem; 
        line-height: 1.3;
    }

    .header-user-info {
        display: none;
    }

    .header-user-profile-btn {
        padding: 0.4rem;
        gap: 0.25rem;
    }
}

/*
* ================= FIM DO HEADER =================
*/


/*
=======================
======CALENDARIO=======
=======================
*/

.calend-container {
    margin: 0;
    padding: 0 2rem 2rem 2rem;
}

.calend-page-title {
    font-size: 1.5rem;
    color: var(--padrao-primary-red);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.calend-filters-section {
    background-color: var(--padrao-card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--padrao-border-color);
    margin-bottom: 1.5rem;
}

.calend-filters-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--padrao-text-dark);
    margin-bottom: 1rem;
}

.calend-filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

.calend-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calend-filter-group label {
    font-size: 0.75rem;
    color: var(--padrao-text-light);
}

.calend-filter-group select {
    padding: 0.75rem;
    border: 1px solid var(--padrao-border-color);
    border-radius: 6px;
    outline: none;
    background-color: #fff;
    color: var(--padrao-text-dark);
    cursor: pointer;
}

.calend-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.calend-calendar-card {
    background-color: var(--padrao-card-bg);
    border: 1px solid var(--padrao-border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.calend-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calend-month-nav {
    background: none;
    border: none;
    color: var(--padrao-text-light);
    cursor: pointer;
    padding: 0.5rem;
}

.calend-month-nav:hover { color: var(--padrao-primary-red); }

.calend-current-month {
    font-weight: 600;
    color: var(--padrao-primary-red);
    font-size: 1.1rem;
}

.calend-weekdays {
    display: grid;
    /* Força colunas estritamente iguais */
    grid-template-columns: repeat(7, minmax(0, 1fr));
    text-align: center;
    font-size: 0.75rem;
    color: var(--padrao-text-light);
    margin-bottom: 0.5rem;
}

.calend-days-grid {
    display: grid;
    /* Força colunas estritamente iguais */
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
}

.calend-day-cell {
    border: 1px solid var(--padrao-border-color);
    border-radius: 6px;
    min-height: 90px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    background-color: #fff;
    transition: var(--padrao-border-color) 0.2s;
    min-width: 0; 
    overflow: hidden;
}

.calend-day-cell.calend-empty {
    background-color: #f9fafb;
    color: #d1d5db;
}

.calend-day-cell.calend-has-classes {
    cursor: pointer;
}

.calend-day-cell.calend-has-classes:hover {
    border-color: var(--padrao-primary-red);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.calend-day-cell.calend-selected {
    border-color: var(--padrao-primary-red);
    border-width: 2px;
}

.calend-day-number {
    font-size: 0.75rem;
    color: var(--padrao-text-light);
    margin-bottom: 0.25rem;
}

.calend-class-pill {
    font-size: 0.6rem;
    color: white;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: block; /* Necessário para o ellipsis funcionar */
}

.calend-pill-ead { background-color: var(--calend-calend-ead-color); }
.calend-pill-semi { background-color: var(--calend-calend-semi-color); }

.calend-day-badge {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    background-color: var(--padrao-primary-red);
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calend-calendar-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--padrao-text-light);
}

.calend-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calend-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.calend-details-card {
    background-color: var(--padrao-card-bg);
    border: 1px solid var(--padrao-border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.calend-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--padrao-text-light);
    text-align: center;
    gap: 1rem;
    min-height: 300px;
}

.calend-details-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--padrao-primary-red);
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--padrao-border-color);
    padding-bottom: 1rem;
}

.calend-class-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.calend-class-item {
    border: 1px solid var(--padrao-border-color);
    border-radius: 6px;
    padding: 1rem;
    position: relative;
}

.calend-class-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--padrao-text-dark);
    margin-bottom: 0.5rem;
    padding-right: 3rem; /* Espaço pro badge */
}

.calend-class-info {
    font-size: 0.8rem;
    color: var(--padrao-text-light);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.calend-info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calend-modality-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    font-weight: bold;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
}

@media (max-width: 1400px) {
    .calend-main-grid { grid-template-columns: 1fr; }
}

@media (max-width: 999px) {
    .calend-container { margin-left: 0;}
    .calend-filters-grid { grid-template-columns: 1fr; }
    .calend-days-grid { gap: 0.25rem; }
    .calend-day-cell { min-height: 70px; padding: 0.25rem; }
    .calend-class-pill { display: none; }
}

/*
* ================= FIM DO CALENDARIO ================
*/


/*
=======================
========FOOTER=========
=======================
*/

.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    background-color: var(--footer-card-bg);
    padding: 1rem;
}


/*
* ================= FIM DO FOOTER ================
*/

