/* assets/css/estilo.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    color: #333;
    line-height: 1.6;
}

/* Login */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.login-container p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* Header */
.header {
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #333;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info span {
    color: #666;
    font-weight: 500;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn-login,
.btn-primary,
.btn-secondary,
.btn-logout,
.btn-back,
.btn-download {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-login,
.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-login:hover,
.btn-primary:hover {
    background: #5a67d8;
}

.btn-secondary {
    background: #48bb78;
    color: white;
}

.btn-secondary:hover {
    background: #38a169;
}

.btn-logout {
    background: #f56565;
    color: white;
    padding: 8px 16px;
}

.btn-logout:hover {
    background: #e53e3e;
}

.btn-back {
    background: #718096;
    color: white;
    padding: 8px 16px;
}

.btn-back:hover {
    background: #4a5568;
}

.btn-download {
    background: #4299e1;
    color: white;
    padding: 6px 12px;
    font-size: 14px;
}

.btn-download:hover {
    background: #3182ce;
}

/* Messages */
.error-message,
.success {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

/* Sections */
.section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section h2 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Tables */
.tabla-usuarios,
.tabla-documentos {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.tabla-usuarios th,
.tabla-documentos th {
    background: #667eea;
    color: white;
    padding: 12px;
    text-align: left;
}

.tabla-usuarios td,
.tabla-documentos td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.tabla-usuarios tr:hover,
.tabla-documentos tr:hover {
    background: #f7fafc;
}

/* Busqueda grid */
.busqueda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Form info */
.form-info {
    background: #f0f4f8;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.form-info p {
    color: #4a5568;
    font-size: 16px;
}

#rol_completo {
    font-weight: bold;
    color: #667eea;
}

/* Resultados header */
.resultados-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .busqueda-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 20px;
    }
}