/* Estilos para el Colegio Estrada */
/* Autor: Sistema de Facturación SVD */
/* Versión: 1.0 */

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Verdana', Arial, sans-serif;
    background-image: url('images/bgw.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* Contenedor principal */
.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Encabezado */
.header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #003366;
}

.header img {
    margin-right: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #003366;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Títulos */
h1, h2, h3 {
    color: #003366;
    margin-bottom: 20px;
}

h1 {
    font-size: 28px;
    border-bottom: 3px solid #003366;
    padding-bottom: 10px;
}

h2 {
    font-size: 22px;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
    margin-top: 30px;
}

h3 {
    font-size: 18px;
    color: #004c99;
}

/* Formularios */
.login-form {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin: 20px 0;
}

.login-form table {
    width: 100%;
    margin: 0 auto;
}

.login-form td {
    padding: 10px;
    text-align: left;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #003366;
    box-shadow: 0 0 8px rgba(0, 51, 102, 0.2);
    outline: none;
}

.login-form input[type="submit"] {
    background: linear-gradient(135deg, #003366, #004c99);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 51, 102, 0.3);
}

.login-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 51, 102, 0.4);
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo img {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Información de usuario */
.user-info {
    background-color: #e8f4f8;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #003366;
    margin-bottom: 30px;
}

.user-info p {
    margin: 8px 0;
    font-size: 16px;
}

.user-info strong {
    color: #003366;
}

/* Sección de facturas */
.invoice-section {
    margin-bottom: 30px;
}

/* Tablas */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px 15px;
    text-align: left;
}

/* Ajustes específicos para columnas de la tabla de facturas */
th:nth-child(2), td:nth-child(2) {
    min-width: 100px;
    white-space: nowrap;
}

th:nth-child(4), td:nth-child(4) {
    min-width: 120px;
    text-align: right;
    white-space: nowrap;
}

th {
    background-color: #003366;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e3f2fd;
}

/* Botones */
.btn-download, .btn-logout, .btn-retry {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-download {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
    color: white;
    text-decoration: none;
}

.btn-logout {
    background: linear-gradient(135deg, #003366, #004c99);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 51, 102, 0.3);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 51, 102, 0.4);
    color: white;
    text-decoration: none;
}

.btn-retry {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 53, 69, 0.4);
    color: white;
    text-decoration: none;
}

/* Sección de pagos */
.payment-section {
    margin: 40px 0;
    text-align: center;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.payment-section h3 {
    margin-bottom: 20px;
    color: #003366;
}

.payment-button {
    display: inline-block;
    transition: all 0.3s;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.payment-button:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.payment-button img {
    display: block;
    transition: transform 0.3s;
}

/* Mensajes de error */
.error-message {
    text-align: center;
    padding: 25px;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(114, 28, 36, 0.1);
}

.error-message h2 {
    color: #721c24;
    border: none;
    margin-bottom: 15px;
}

/* Footer */
.footer {
    margin-top: 40px;
    text-align: center;
    border-top: 2px solid #eee;
    padding-top: 25px;
    color: #666;
    font-size: 14px;
}

.footer p {
    margin: 5px 0;
}

/* Enlaces */
a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #004c99;
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 20px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
    }
    
    .header img {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px 10px;
    }
    
    .payment-button img {
        width: 150px;
        height: auto;
    }
}

@media (max-width: 480px) {
    .login-form {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 6px 8px;
    }
    
    .btn-download, .btn-logout, .btn-retry {
        padding: 8px 15px;
        font-size: 12px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeIn 0.6s ease-out;
}

/* Utilidades */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}