body {
    font-family: 'Outfit', sans-serif;
    background-color: #ffffff;
    color: #000000;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Hubot Sans', sans-serif;
}

a {
    color: #000000;
    cursor: pointer;
}

/* =================================
   General Button System
   ================================= */
.button {
    display: inline-flex; /* Use flex for alignment */
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid #000000;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    width: auto; /* Default to auto width */
    background-color: #ffffff;
    color: #000000;
}

.button i {
    margin-right: 8px; /* Space between icon and text */
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #f2f2f2;
}

.button-full-width {
    width: 100%;
}

/* Primary Action Button (e.g., login, create) */
.button-primary {
    background-color: #000000;
    color: #ffffff;
}
.button-primary:hover {
    background-color: #333333;
}

/* Success Action Button (e.g., save, confirm) */
.button-success {
    background-color: #000000;
    color: #ffffff;
}
.button-success:hover {
    background-color: #333333;
}

/* Secondary Action Button (e.g., edit, import) */
.button-secondary {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #000000;
}
.button-secondary:hover {
    background-color: #f2f2f2;
}

/* Danger Action Button (e.g., delete, remove) */
.button-danger {
    background-color: transparent;
    color: #000000;
    border: none;
}
.button-danger:hover {
    background-color: transparent;
    color: #666666;
}

/* Warning/Edit Action Button (e.g., edit) */
.button-warning {
    background-color: transparent;
    color: #000000;
    border: none;
}
.button-warning:hover {
    background-color: transparent;
    color: #666666;
}

.button-danger i,
.button-warning i {
    color: #000000; /* Iconos negros para botones de peligro y advertencia */
}

.button-danger:hover i,
.button-warning:hover i {
    color: #666666; /* Iconos gris oscuro al pasar el ratón */
}

/* Small Button Variant */
.button-sm {
    padding: 5px 10px;
    font-size: 0.9em;
}

.button-sm i {
    margin-right: 0; /* No margin for icon-only small buttons */
}


/* Auth Container - The main login/register box */
#auth-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Login/Register Containers */
#login-container,
#register-container {
    width: 100%; /* Take full width of parent */
}

/* Form Header */
#login-container h2,
#register-container h2 {
    font-size: 2em;
    margin-bottom: 25px;
    color: #000000;
}

input, select {
    padding: 12px 15px;
    border: 1px solid #cccccc;
    border-radius: 8px; /* Rounded inputs */
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
    width: 100%; /* Inputs take full width of form */
    box-sizing: border-box; /* Important for consistent sizing */
}

input:focus, select:focus {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25);
    outline: none;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #000000;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between inputs */
    width: 100%; /* Forms take full width of their parent */
}

.color-palette {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.color-box {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid #cccccc;
    transition: border-color 0.2s;
}

/* Paragraphs for links */
p {
    margin-top: 20px;
    font-size: 0.9em;
    color: #666666;
}

#app-container {
    width: 100%;
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: row;
    background-color: #ffffff;
    border-radius: 0;
    overflow: hidden;
}

/* Estilos para la nueva barra lateral */
#sidebar {
    width: 240px; /* Ancho fijo de la barra lateral */
    background-image: url('FONDO2.png'); /* Fondo de imagen para la barra lateral */
    background-size: cover;
    background-position: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Alineado a la izquierda */
    flex-shrink: 0; /* Evitar que la barra lateral se encoja */
    border-right: 1px solid #cccccc; /* Separador del contenido principal */
}

.sidebar-new-logo {
    width: 180px; /* Adjust as needed */
    height: auto;
    margin-bottom: 20px; /* Space below the logo */
}





.sidebar-header {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 20px; /* Space below the header */
}

#daily-schedule {
    width: 100%;
    margin-bottom: 40px; /* Increased separation */
}

#daily-schedule h4 {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: left; /* Alineado a la izquierda */
    color: white;
    font-family: 'Hubot Sans', sans-serif;
}

#schedule-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px; /* Opcional: para controlar la altura si hay muchas clases */
    overflow-y: auto;
}

.schedule-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.schedule-item.current-time {
    background-color: #FFFFFF; /* Fondo blanco para la materia de la hora actual */
    color: #000000; /* Texto negro */
}

.schedule-item.current-time .time,
.schedule-item.current-time .name {
    color: black;
}



.schedule-item .time {
    font-weight: bold;
    display: block;
    margin-bottom: 3px;
    color: white;
}

.schedule-item .name {
    color: white;
}

.sidebar-divider {
    display: none;
}

#sidebar .button {
    width: 100%;
    margin-bottom: 10px;
}

#logout-button {
    margin-bottom: 0; /* Remove any default bottom margin */
}

.sidebar-bottom-buttons {
    margin-top: auto;
    width: 100%; /* Ensure it takes full width of sidebar */
    display: flex;
    flex-direction: column;
    gap: 10px; /* Space between buttons */
}

.sidebar-nav-item {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align to the left */
    width: 100%; /* Take full width of parent */
    padding: 10px 0; /* Vertical padding */
    gap: 10px; /* Space between icon and text */
    font-size: 1em;
    transition: opacity 0.3s;
}

.sidebar-nav-item:hover {
    opacity: 1; /* Ya lo cambiamos, pero lo mantengo para claridad */
    transform: none;
    box-shadow: none;
    background-color: transparent; /* Asumiendo que el fondo original es transparente o el de la sidebar */
}

/* Estilos para el contenedor de perfil */
#profile-container {
    width: 100%;
    background-color: #ffffff;
}

.profile-info p {
    font-size: 1.1em;
    margin-bottom: 10px;
    text-align: left;
}

.profile-info strong {
    color: #333333;
}

#change-password-button {
    margin-top: 20px;
    width: auto;
    align-self: flex-start;
}

#page-content {
    background-color: #ffffff; /* Forzar fondo blanco */
    flex-grow: 1;
    overflow-y: auto;
    padding: 30px;
    margin: 20px;
}

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

#materias-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.materia-item {
    background-color: #000000; /* Color por defecto */
    color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    overflow: hidden;
}

.materia-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.cohort-item-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #000000; /* Asegura que el texto del nombre de la cohorte sea negro */
}

.materia-item-carrera {
    font-size: 1em;
    opacity: 0.9;
}

#materia-detail-container {
    width: 100%;
    background-color: #ffffff;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #cccccc;
    padding-bottom: 15px;
}

.detail-header h2 {
    margin: 0;
    text-align: left;
}

.detail-title-container {
    flex-grow: 1;
}

#materia-detail-carrera {
    margin: 0;
    text-align: left;
    font-size: 1em;
    color: #666666;
    font-weight: normal;
}

.detail-header .actions {
    display: flex;
    gap: 10px;
}

.detail-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #000000;
}

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

.students-actions {
    display: flex;
    gap: 10px;
}

#add-student-form {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

#add-student-form input {
    flex-grow: 1;
}

#students-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.student-item {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.student-item > span:first-child {
    flex-grow: 1; /* Make student name take available space */
    text-align: left;
}

.attendance-percentage {
    font-weight: bold;
    color: #000000;
    min-width: 50px; /* Give it a minimum width to align */
    text-align: right;
    margin-left: 15px;
}

.student-actions {
    display: flex;
    gap: 10px;
    margin-left: 15px;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #cccccc;
}

.tab-button {
    background-color: transparent;
    color: #666666;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1.1em;
    margin-right: 10px;
    transition: color 0.3s, border-color 0.3s;
}

.tab-button.active {
    color: #000000;
    border-bottom-color: #000000;
    font-weight: bold;
}

.tab-button:hover:not(.active) {
    color: #000000;
}

.tab-content {
    display: none;
}

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

.attendance-date-selector {
    margin-bottom: 20px;
}

.attendance-date-selector label {
    margin-right: 10px;
    font-weight: bold;
}

.attendance-date-selector input[type="date"] {
    padding: 8px;
    border: 1px solid #cccccc;
    border-radius: 4px;
}

#attendance-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.attendance-item {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.attendance-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-grow: 1;
}

.attendance-item input[type="checkbox"] {
    margin-right: 15px;
    width: 18px;
    height: 18px;
}

.criterion-item {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    background-color: #f2f2f2;
    padding: 10px;
    border-radius: 8px;
}

.criterion-item input {
    margin-bottom: 0;
}

.criterion-item .criterion-name {
    flex-grow: 1;
}

.criterion-item .criterion-points {
    width: 80px;
    text-align: center;
}

.remove-criterion-button {
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1em;
    flex-shrink: 0;
}

#assignments-list {
    margin-top: 20px;
    display: flex; /* Changed from grid */
    flex-direction: column; /* Stack items vertically */
    gap: 20px;
}

.assignment-item {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    display: flex;
    flex-direction: column; /* Stack content vertically */
    width: 98%; /* Make the card take almost the full width */
    margin-right: 2%; /* Add a small margin to the right */
}

.assignment-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #000000;
}

.assignment-item h5 {
    margin-top: 15px;
    margin-bottom: 5px;
    color: #333333;
}

.assignment-item ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.assignment-item ul li {
    padding: 4px 0;
    border-bottom: 1px dotted #cccccc;
}

.assignment-item ul li:last-child {
    border-bottom: none;
}

.assignment-item p {
    margin: 0 0 15px 0;
    font-size: 0.9em;
    color: #666666;
}

.assignment-actions {
    margin-top: auto; /* Push actions to the bottom */
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 30px;
    border: 1px solid #999999;
    width: 80%;
    max-width: 600px;
    border-radius: 12px;
    position: relative;
    animation: fadeIn 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

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

@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.95);}
    to {opacity: 1; transform: scale(1);}
}

.close-button {
    color: #999999;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
}
.close-button:hover,
.close-button:focus {
    color: #000000;
}

.modal-content h2 {
    text-align: left;
    margin-top: 0;
    margin-bottom: 25px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-grow: 1;
}

.form-group label {
    font-weight: 500;
    font-size: 0.9em;
    color: #333333;
}

#generic-modal .modal-content {
    max-width: 450px;
    text-align: center;
}

#generic-modal-title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    color: #000000;
}

#generic-modal-message {
    margin-bottom: 25px;
    font-size: 1.1em;
    color: #333333;
    line-height: 1.5;
}

.generic-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

#grading-modal .modal-content {
    max-width: 800px;
    text-align: left;
}

#grading-modal-title {
    margin-bottom: 20px;
    text-align: center;
}

.grading-student-item {
    background-color: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.grading-student-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #000000;
}

.grading-criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.grading-criterion-item {
    background-color: #f2f2f2;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.grading-criterion-item input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    text-align: center;
}

.grading-total-score {
    font-weight: bold;
    margin-top: 15px;
    text-align: right;
    font-size: 1.2em;
}

#grades-summary-table-container {
    overflow-x: auto;
}

.grades-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9em;
}

.grades-summary-table th,
.grades-summary-table td {
    border: 1px solid #cccccc;
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
}

.grades-summary-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 2;
}

.grades-summary-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.grades-summary-table tbody tr:hover {
    background-color: #e6e6e6;
}

.grades-summary-table td:first-child,
.grades-summary-table th:first-child {
    position: sticky;
    left: 0;
    background-color: #f2f2f2;
    z-index: 3;
    font-weight: bold;
}

.grades-summary-table tbody td:first-child {
    background-color: #ffffff;
}

.grades-summary-table tbody tr:nth-child(even) td:first-child {
    background-color: #f9f9f9;
}

.grades-summary-table tbody tr:hover td:first-child {
    background-color: #e6e6e6;
}

.branding-footer p {
    color: #FFFFFF;
    opacity: 1;
}

/* =================================
   Summary Table Parcial Colors
   ================================= */
.grades-summary-table .parcial-primer-parcial-color {
    background-color: #EBF5FB !important; /* Light Blue */
    color: #2874A6 !important;
}

.grades-summary-table .parcial-segundo-parcial-color {
    background-color: #E9F7EF !important; /* Light Green */
    color: #239B56 !important;
}

.grades-summary-table .parcial-tercer-parcial-color {
    background-color: #FEF9E7 !important; /* Light Yellow */
    color: #B7950B !important;
}

.grades-summary-table .parcial-general-color {
    background-color: #EAEDED !important; /* Light Gray */
    color: #566573 !important;
}