/* === ESTILOS PÁGINA PRINCIPAL === */

/* Header y Navegación */
header {
    background-color: #1c1818; 
    color: white;
    padding: 10px 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px; 
    margin: 0 auto;
}

header h1 {
    margin: 0;
    font-size: 26px;
}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
}

nav li {
    margin-left: 20px;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: #4a6583; 
}

/* Bienvenida al usuario */
.user-welcome {
    color: #ecf0f1; 
    font-style: italic;
    font-size: 14px;
    margin-right: 10px;
}

/* Contenido Principal (Panel) */
.main-content {
    max-width: 1100px;
    margin: 40px auto; 
    padding: 0 20px;
}

.main-content h2 {
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 30px;
    text-align: center;
}

/* Contenedor del Dashboard (Flexbox) */
.dashboard-container {
    display: flex;
    justify-content: center; 
    gap: 30px;
    flex-wrap: wrap;
}

/* Cajas individuales */
.dashboard-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0; 
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 25px 30px;
    flex-basis: 300px; 
    flex-grow: 1;
    text-align: center;
}

.dashboard-item h3 {
    margin-top: 0;
    font-size: 22px;
    color: #d53333;
}

strong{color: #d53333}

.dashboard-item p {
    color: #777;
    font-size: 15px;
    margin-bottom: 25px;
}

/* Botones del Dashboard */
.btn-dashboard {
    display: inline-block;
    text-decoration: none;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border-color: #1c1818;
}

.btn-opcion {
    background-color: #de2720; 
}
.btn-opcion:hover {
    background-color: #a11915;
}

.btn-aceptar {
    background-color: #2ecc71; 
}
.btn-aceptar:hover {
    background-color: #27ae60;
}

.btn-historial {
    background-color: #95a5a6; 
}
.btn-historial:hover {
    background-color: #7f8c8d;
}

/* === ESTILOS PÁGINA FORMULARIOS === */

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 30px 40px;
}

.form-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    color: #333;
    max-width: 100%;
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    text-align: left;
}

.form-group select {
    width: auto;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 15px;
    cursor: pointer;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C2.185 5.355 2.408 5 2.811 5h9.458c.403 0 .626.355.36.658l-4.796 5.482a.5.5 0 0 1-.726 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}

.form-group select:focus, 
.form-group input:focus {
    border-color: #4a5568; 
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 85, 104, 0.1);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group textarea{
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 15px;
}
.form-group input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
    color: #6c757d;
}
.form-group textarea {
    resize: vertical; 
    min-height: 80px;
}

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

.form-row .form-group {
    flex: 1;
}

.form-actions {
    margin-top: 30px;
    text-align: right; 
}

.form-actions button {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #007bff; 
    color: white;
}
.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d; 
    color: white;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

/* === ESTILOS PÁGINA TABLAS  === */

/* Usamos un contenedor similar al de formularios */
.table-container {
    max-width: 1000px; 
    margin: 0 auto;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 30px 40px;
    overflow-x: auto;
}

.table-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    color: #333;
}

/* Estilos de la tabla de ventas */
.sales-table {
    width: 100%;
    border-collapse: collapse; 
    margin-bottom: 20px;
}

.sales-table th,
.sales-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

/* Encabezado de la tabla */
.sales-table thead {
    background-color: #34495e; 
    color: white;
}

.sales-table thead th {
    font-size: 14px;
    text-transform: uppercase;
    font-weight: bold;
}

/* Cuerpo de la tabla */
.sales-table tbody tr:hover {
    background-color: #f9f9f9; 
}

/* Celdas específicas */
.sales-table .price,
.sales-table .stock,
.sales-table .subtotal {
    color: #333;
    font-family: 'Courier New', Courier, monospace;
}

/* Input de cantidad */
.sales-table .quantity {
    width: 60px;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-size: 15px;
}

/* Pie de tabla (Total) */
.sales-table tfoot td {
    border-bottom: none;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.sales-table .total-label {
    text-align: right;
}

#total-amount {
    font-family: 'Courier New', Courier, monospace;
    color: #27ae60; 
}

/* === ESTILOS PÁGINA HISTORIAL === */

/* Estilos específicos para la tabla de historial */
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    min-width: 800px;
}

.history-table th,
.history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

/* Encabezado de la tabla */
.history-table thead {
    background-color: #a11915;
    color: white;
}

.history-table thead th {
    font-size: 14px;
    text-transform: uppercase;
}

/* Filas del cuerpo */
.history-table tbody tr:nth-of-type(even) {
    background-color: #f9f9f9; 
}

.history-table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Botón de detalles */
.btn-details {
    background-color: #007bff; 
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-details:hover {
    background-color: #565758;
}

/*Carrusel*/

.slide {
    position: relative;
    box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.64);
    margin-top: 26px;
}

.slide-inner {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: calc( 300px + 3em);
}

.slide-open:checked + .slide-item {
    position: static;
    opacity: 100;
}

.slide-item {
    position: absolute;
    opacity: 0;
    -webkit-transition: opacity 0.6s ease-out;
    transition: opacity 0.6s ease-out;
    width: 100%;
}

.slide-item img {
    display: block;
    height: 500px;
    width: 100%;
    object-fit: cover;
    filter: brightness(0.4);
}

.slide-control {
    background: rgba(0, 0, 0, 0.28);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: none;
    font-size: 40px;
    height: 40px;
    line-height: 35px;
    position: absolute;
    top: 50%;
    -webkit-transform: translate(0, -50%);
    cursor: pointer;
    -ms-transform: translate(0, -50%);
    transform: translate(0, -50%);
    text-align: center;
    width: 40px;
    z-index: 10;
}

.slide-control.prev {
    left: 2%;
}

.slide-control.next {
    right: 2%;
}

.slide-control:hover {
    background: rgba(0, 0, 0, 0.8);
    color: #aaaaaa;
}

#slide-1:checked ~ .control-1,
#slide-2:checked ~ .control-2,
#slide-3:checked ~ .control-3 {
    display: block;
}

.slide-indicador {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    bottom: 2%;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
}

.slide-indicador li {
    display: inline-block;
    margin: 0 5px;
}

.slide-culo {
    color: #828282;
    cursor: pointer;
    display: block;
    font-size: 35px;
}

.slide-circulo:hover {
    color: #aaaaaa;
}

#slide-1:checked ~ .control-1 ~ .slide-indicador 
     li:nth-child(1) .slide-circulo,
#slide-2:checked ~ .control-2 ~ .slide-indicador 
      li:nth-child(2) .slide-circulo,
#slide-3:checked ~ .control-3 ~ .slide-indicador 
      li:nth-child(3) .slide-circulo {
    color: #e30303;
}

.caption{
    position: absolute;
    top: 50%;
    left:50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.caption h2{
    font-size: 2em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(58, 54, 54, 0.63);
    color: white;
}

.caption a{
    display: inline-block;
    padding: 10px 25px;
    cursor: pointer;
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    box-shadow: 2px 2px 4px rgba(58, 54, 54, 0.63);
}

.caption a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    color: #ffffff;
}

/*calificaciones y kardex*/
.main-view { display: none; }
#section-calif {
    display: block;
}

/* Alumnos en riesgo */
.lista-riesgo {
    width: 80%;
    margin: 20px auto;
    padding: 0;
    list-style: none;
}

.lista-riesgo li {
    background-color: #ffe0b3;
    margin: 5px 0;
    padding: 8px 12px;
    border-radius: 5px;
    color: #856404;
}
