/**
 * Estilos principales - BexenCardio.local
 * Archivo: assets/css/estilos.css
 * Descripción: Estilos CSS principales del sitio web
 * Autor: Josu Garate
 * Fecha: 2025-08-07
 */

/* ===========================================
   RESET Y CONFIGURACIÓN BASE
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* ===========================================
   VARIABLES DE COLORES CORPORATIVOS
   =========================================== */
:root {
    --bexen-blue: #14387f;
    --bexen-purple: #944b96;
    --bexen-green: #28a745;
    --bexen-light-blue: #e3f2fd;
    --bexen-dark-blue: #0d2b5a;
    --bexen-gray: #6c757d;
    --bexen-light-gray: #f8f9fa;
    --bexen-white: #ffffff;
}

/* ===========================================
   LAYOUT PRINCIPAL
   =========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================================
   CABECERA Y MENÚ
   =========================================== */
.header {
    background-color: var(--bexen-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px 0 10px 0;
    text-align: center;
}

.logo {
    height: 65px;
    width: auto;
    margin-bottom: 12px;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-subtitle {
    font-size: 1rem;
    color: var(--bexen-blue);
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===========================================
   CONTENIDO PRINCIPAL
   =========================================== */
.main-content {
    min-height: 70vh;
    padding: 2rem 0;
}

/* ===========================================
   PIE DE PÁGINA
   =========================================== */
.footer {
    background-color: #343a40;
    color: #fff;
    padding: 2rem 0;
    margin-top: auto;
}

/* ===========================================
   UTILIDADES
   =========================================== */
.text-center {
    text-align: center;
}

/* ===========================================
   ESTILOS PARA ADMINISTRACIÓN DE PROCESOS
   =========================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--bexen-gray);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: var(--bexen-blue);
    color: white;
    font-weight: 600;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.estado-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.estado-activo {
    background-color: var(--bexen-green);
    color: white;
}

.estado-inactivo {
    background-color: var(--bexen-gray);
    color: white;
}



/* Estilo para mensaje de loading */
.loading-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.categoria-badge {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #bbdefb;
}

.btn-preview {
    background: #6f42c1;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    margin: 0 0.25rem;
    transition: background-color 0.3s ease;
}

.btn-preview:hover {
    background: #5a32a3;
}

.badge-success {
    background-color: var(--bexen-green);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge-error {
    background-color: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge-canceled {
    background-color: var(--bexen-gray);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.mensaje {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.mensaje-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensaje-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.modal-large {
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.logs-table {
    max-height: 400px;
    overflow-y: auto;
}

.formulario-generico {
    padding: 1rem;
}

.formulario-generico h3 {
    margin-bottom: 1rem;
    color: var(--bexen-blue);
}

.formulario-generico p {
    margin-bottom: 1.5rem;
    color: var(--bexen-gray);
}

.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

/* ===========================================
   CABECERA Y MENÚ
   =========================================== */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    flex-direction: column;
}

.site-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.user-info {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.logout-link {
    color: #007bff;
    text-decoration: none;
}

.logout-link:hover {
    text-decoration: underline;
}

/* ===========================================
   NAVEGACIÓN
   =========================================== */
.main-nav {
    background-color: var(--bexen-blue);
    border-bottom: 1px solid var(--bexen-dark-blue);
}

.main-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    flex: 1;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--bexen-white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: var(--bexen-dark-blue);
    color: var(--bexen-white);
    transform: translateY(-1px);
}

.nav-item.active .nav-link {
    background-color: var(--bexen-white);
    color: var(--bexen-blue);
    font-weight: 600;
}

.nav-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* ===========================================
   PÁGINA DE INICIO
   =========================================== */
.welcome-section {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--bexen-blue), var(--bexen-dark-blue));
    color: var(--bexen-white);
    margin: -2rem -20px 2rem -20px;
}

.welcome-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.welcome-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.quick-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: var(--bexen-blue);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(20, 56, 127, 0.15);
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    color: var(--bexen-white);
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(20, 56, 127, 0.25);
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.info-card h3 {
    color: var(--bexen-white);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.info-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--bexen-white);
    color: var(--bexen-blue);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px solid var(--bexen-white);
}

.card-link:hover {
    background-color: transparent;
    color: var(--bexen-white);
    transform: translateY(-2px);
}

/* ===========================================
   SECCIONES DE CONTENIDO
   =========================================== */
.news-section,
.stats-section,
.quick-links-section {
    margin-bottom: 3rem;
}

.news-section h2,
.stats-section h2,
.quick-links-section h2 {
    color: #333;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.news-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-item h3 {
    color: #333;
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--bexen-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--bexen-gray);
    font-size: 1.1rem;
    font-weight: 500;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* ===========================================
   FORMULARIOS GENERADOS DINÁMICAMENTE
   =========================================== */
.formulario-generado {
    padding: 20px;
}

.formulario-generado h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.formulario-generado p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ===========================================
   PROCESOS SIN FORMULARIO
   =========================================== */
.proceso-sin-formulario {
    padding: 20px;
    text-align: center;
}

.proceso-sin-formulario h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.proceso-sin-formulario p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.info-message {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: #1976d2;
}

.info-message p {
    margin: 0 0 10px 0;
    color: #1976d2;
}

.info-message p:last-child {
    margin-bottom: 0;
}

.info-message strong {
    color: #0d47a1;
}

.info-field {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.info-field label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.info-content {
    color: #666;
    line-height: 1.6;
    white-space: pre-line;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-field input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-field label {
    margin: 0;
    font-weight: 500;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-cancel:hover {
    background: #5a6268;
}

/* ===========================================
   PROCESOS DE CIERRE DE MES
   =========================================== */
.process-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #007bff;
}

.process-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.process-icon {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 15px;
    text-align: center;
}

.process-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.process-card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.process-actions {
    margin-bottom: 15px;
}

.btn-execute {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-execute:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
}

.btn-execute:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.process-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.activo {
    background: #28a745;
}

.status-indicator.inactivo {
    background: #dc3545;
}

.quick-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
    transition: transform 0.3s, box-shadow 0.3s;
}

.quick-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 56, 127, 0.15);
    color: var(--bexen-blue);
    background-color: var(--bexen-light-blue);
}

.link-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

/* ===========================================
   PIE DE PÁGINA
   =========================================== */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 1rem;
    border-bottom: 1px solid #555;
    padding-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.footer-info {
    list-style: none;
    padding: 0;
}

.footer-info li {
    margin-bottom: 0.5rem;
    color: #ccc;
}

.footer-divider {
    border: none;
    border-top: 1px solid #555;
    margin: 2rem 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright p {
    margin: 0.5rem 0;
    color: #ccc;
}

.footer-legal a {
    color: #ccc;
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-legal a:hover {
    color: #fff;
}

/* ===========================================
   UTILIDADES ADICIONALES
   =========================================== */
.page-header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.content-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.company-info p {
    margin-bottom: 0.5rem;
}

/* ===========================================
   PÁGINA DE PROCESOS IZARO
   =========================================== */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.process-card {
    background: var(--bexen-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(20, 56, 127, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.process-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(20, 56, 127, 0.15);
    border-color: var(--bexen-blue);
}

.process-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.process-card h3 {
    color: var(--bexen-blue);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.process-card p {
    color: var(--bexen-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.process-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn-execute, .btn-schedule {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-execute {
    background-color: var(--bexen-green);
    color: var(--bexen-white);
}

.btn-execute:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.btn-schedule {
    background-color: var(--bexen-blue);
    color: var(--bexen-white);
}

.btn-schedule:hover {
    background-color: var(--bexen-dark-blue);
    transform: translateY(-2px);
}

.process-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.active {
    background-color: var(--bexen-green);
}

/* ===========================================
   ESTILOS DE CATEGORÍAS
   =========================================== */
.categoria-section {
    margin-bottom: 3rem;
}

.categoria-titulo {
    color: var(--bexen-blue);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--bexen-blue);
    position: relative;
}

.categoria-titulo::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--bexen-purple);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.header-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--bexen-gray);
    color: var(--bexen-white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.header-actions .btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
}

.badge-info {
    background-color: var(--bexen-light-blue);
    color: var(--bexen-blue);
}

.badge-secondary {
    background-color: #e9ecef;
    color: var(--bexen-gray);
}

.status-indicator.inactive {
    background-color: var(--bexen-gray);
}

.status-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===========================================
   LOGS DE EJECUCIÓN
   =========================================== */
.logs-container {
    background: var(--bexen-white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.log-entry {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--bexen-gray);
    min-width: 150px;
}

.log-process {
    font-weight: 600;
    color: var(--bexen-blue);
}

.log-status {
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.log-status.success {
    background-color: #d4edda;
    color: #155724;
}

.log-status.error {
    background-color: #f8d7da;
    color: #721c24;
}

.log-details {
    color: var(--bexen-gray);
    font-size: 0.9rem;
}

/* ===========================================
    MODALES Y FORMULARIOS DE PROCESOS
    =========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--bexen-white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.close {
    color: var(--bexen-gray);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--bexen-blue);
}

.process-form h2 {
    color: var(--bexen-blue);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.process-description {
    color: var(--bexen-gray);
    margin-bottom: 2rem;
    font-style: italic;
}

.process-form-content {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--bexen-blue);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--bexen-blue);
    box-shadow: 0 0 0 3px rgba(20, 56, 127, 0.1);
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--bexen-gray);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    font-weight: normal;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.btn-cancel {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--bexen-gray);
    background-color: transparent;
    color: var(--bexen-gray);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background-color: var(--bexen-gray);
    color: var(--bexen-white);
}

.process-result {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--bexen-blue);
}

.process-result h3 {
    color: var(--bexen-blue);
    margin-bottom: 1rem;
}

.result-status {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.result-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.result-details {
    background-color: var(--bexen-white);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}

.result-logs {
    background-color: var(--bexen-white);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.result-logs h4 {
    color: var(--bexen-blue);
    margin-bottom: 0.5rem;
}

.result-logs pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    margin: 0;
}

/* ===========================================
    RESPONSIVE
    =========================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .welcome-section h1 {
        font-size: 2rem;
    }
    
    .quick-info-grid,
    .news-grid,
    .stats-grid,
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ===========================================
   ESTILOS ADICIONALES PARA FORMULARIOS
   =========================================== */
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--bexen-blue);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--bexen-blue);
    box-shadow: 0 0 0 3px rgba(20, 56, 127, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-help {
    font-size: 0.875rem;
    color: var(--bexen-gray);
    margin-top: 0.25rem;
}

.required {
    color: #dc3545;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Estilos para cajas informativas */
.info-box,
.warning-box {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-box {
    background: #e3f2fd;
    border: 1px solid #2196f3;
}

.warning-box {
    background: #fff3e0;
    border: 1px solid #ff9800;
}

.info-icon,
.warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-content h4,
.warning-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--bexen-blue);
}

.info-content ul,
.warning-content ul {
    margin: 0;
    padding-left: 1.5rem;
}

.info-content li,
.warning-content li {
    margin-bottom: 0.25rem;
}

.warning-content h4 {
    color: #e65100;
}

.warning-content p {
    margin: 0;
    color: #e65100;
}

/* Estilos para botones con iconos */
.btn-icon {
    margin-right: 0.5rem;
}

/* Estilos para formularios de procesos */
.process-form {
    max-width: 100%;
}

.form-header {
    margin-bottom: 2rem;
    text-align: center;
}

.form-header h2 {
    color: var(--bexen-blue);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--bexen-gray);
    margin: 0;
}

.form-content {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* ===========================================
   BOTONES DE ADMINISTRACIÓN
   =========================================== */
.btn-secondary {
    background-color: var(--bexen-blue);
    color: var(--bexen-white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background-color: var(--bexen-dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 56, 127, 0.3);
    text-decoration: none;
    color: var(--bexen-white);
}

.btn-primary {
    background-color: var(--bexen-green);
    color: var(--bexen-white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 0.95rem;
}

.btn-primary:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    text-decoration: none;
    color: var(--bexen-white);
}

.btn-danger {
    background-color: #dc3545;
    color: var(--bexen-white);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.3);
    text-decoration: none;
    color: var(--bexen-white);
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 0.9rem;
}

.btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255, 193, 7, 0.3);
    text-decoration: none;
    color: #212529;
}

.btn-info {
    background-color: #17a2b8;
    color: var(--bexen-white);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 0.9rem;
}

.btn-info:hover {
    background-color: #138496;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(23, 162, 184, 0.3);
    text-decoration: none;
    color: var(--bexen-white);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Botones con iconos */
.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-with-icon i,
.btn-with-icon span {
    font-size: 1rem;
}

/* Botones deshabilitados */
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.btn-warning:disabled,
.btn-info:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-success {
    background-color: #28a745;
    color: var(--bexen-white);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 0.9rem;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.3);
    text-decoration: none;
    color: var(--bexen-white);
}

.btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Botón pequeño para acciones en tablas */
.btn-small {
    background-color: var(--bexen-blue);
    color: var(--bexen-white);
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 0.8rem;
    margin: 0.1rem;
}

.btn-small:hover {
    background-color: var(--bexen-dark-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(20, 56, 127, 0.3);
    text-decoration: none;
    color: var(--bexen-white);
}

.btn-small.btn-danger {
    background-color: #dc3545;
}

.btn-small.btn-danger:hover {
    background-color: #c82333;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.btn-small.btn-success {
    background-color: #28a745;
}

.btn-small.btn-success:hover {
    background-color: #218838;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.btn-small.btn-info {
    background-color: #17a2b8;
}

.btn-small.btn-info:hover {
    background-color: #138496;
    box-shadow: 0 2px 6px rgba(23, 162, 184, 0.3);
}

/* Estilos para mensajes */
.mensaje {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.mensaje-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensaje-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Estilos para tablas de datos */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bexen-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.data-table th {
    background-color: var(--bexen-blue);
    color: var(--bexen-white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Badges de estado */
.estado-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}

.estado-activo {
    background-color: #d4edda;
    color: #155724;
}

.estado-inactivo {
    background-color: #f8d7da;
    color: #721c24;
}

/* Contenedor de tabla */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Acciones de formulario */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* ===========================================
   SELECTOR DE ICONOS
   =========================================== */
.icon-selector {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f8f9fa;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.icon-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    user-select: none;
}

.icon-option:hover {
    border-color: var(--bexen-blue);
    background-color: var(--bexen-light-blue);
    transform: scale(1.1);
}

.icon-option.selected {
    border-color: var(--bexen-blue);
    background-color: var(--bexen-blue);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(20, 56, 127, 0.3);
}

.selected-icon-display {
    text-align: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-weight: 500;
    color: var(--bexen-blue);
}

.selected-icon-display span {
    font-size: 1.5rem;
    margin-left: 0.5rem;
}

/* ===========================================
   CAMPOS DE FORMULARIO MEJORADOS
   =========================================== */
.form-input-large,
.form-textarea-large {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background-color: #f8f9fa;
}

.form-input-large:focus,
.form-textarea-large:focus {
    outline: none;
    border-color: var(--bexen-blue);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(20, 56, 127, 0.1);
    transform: translateY(-1px);
}

.form-input-large::placeholder,
.form-textarea-large::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.form-textarea-large {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-input-number {
    width: 120px;
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.form-input-number:focus {
    outline: none;
    border-color: var(--bexen-blue);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(20, 56, 127, 0.1);
}

/* ===========================================
   SWITCH DE ESTADO
   =========================================== */
.switch-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: var(--bexen-green);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--bexen-green);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.switch-label {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--bexen-green);
    transition: color 0.3s ease;
}

/* ===========================================
   TEXTO DE AYUDA MEJORADO
   =========================================== */
.form-help {
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #1565c0;
}

.form-help strong {
    color: #0d47a1;
}

/* Responsive para el selector de iconos */
@media (max-width: 768px) {
    .icon-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 0.3rem;
    }
    
    .icon-option {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .form-input-large,
    .form-textarea-large {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
    
    .switch {
        width: 50px;
        height: 28px;
    }
    
    .slider:before {
        height: 20px;
        width: 20px;
        left: 4px;
        bottom: 4px;
    }
    
    input:checked + .slider:before {
        transform: translateX(22px);
    }
}

/* ===========================================
   GENERADORES DE FORMULARIOS Y SQL
   =========================================== */
.form-type-selector {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
}

.form-type-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.form-type-option:hover {
    border-color: var(--bexen-blue);
    background-color: var(--bexen-light-blue);
}

.form-type-option input[type="radio"] {
    margin: 0;
}

.form-type-option input[type="radio"]:checked + .form-type-label {
    color: var(--bexen-blue);
    font-weight: 600;
}

.form-type-label {
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
}

/* Generador de formularios */
.form-generator {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f8f9fa;
}

.form-generator-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.form-fields-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.form-field-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.form-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: var(--bexen-blue);
    color: white;
}

.form-field-header h4 {
    margin: 0;
    font-size: 1rem;
}

.form-field-content {
    padding: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-col {
    display: flex;
    flex-direction: column;
}

.form-col label {
    font-weight: 600;
    color: var(--bexen-blue);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input,
.form-select,
.form-textarea {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--bexen-blue);
    box-shadow: 0 0 0 3px rgba(20, 56, 127, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.campo-opciones {
    grid-column: 1 / -1;
}

/* Generador SQL */
.sql-generator {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f8f9fa;
}

.sql-generator-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.sql-params-container {
    margin-top: 1rem;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.sql-param-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.sql-param-item:last-child {
    margin-bottom: 0;
}

/* Preview del formulario */
.form-preview {
    padding: 1rem;
}

.form-preview h3 {
    color: var(--bexen-blue);
    margin-bottom: 1.5rem;
    text-align: center;
}

.preview-form {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.preview-form .form-group {
    margin-bottom: 1rem;
}

.preview-form label {
    display: block;
    font-weight: 600;
    color: var(--bexen-blue);
    margin-bottom: 0.5rem;
}

.preview-form input,
.preview-form select,
.preview-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.preview-form input:focus,
.preview-form select:focus,
.preview-form textarea:focus {
    outline: none;
    border-color: var(--bexen-blue);
    box-shadow: 0 0 0 3px rgba(20, 56, 127, 0.1);
}

.preview-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Campos de información en preview */
.info-field {
    margin-bottom: 1rem;
}

.info-content {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-line;
}

.info-content:empty {
    display: none;
}

/* Responsive para generadores */
@media (max-width: 768px) {
    .form-type-selector {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .form-generator-header,
    .sql-generator-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-field-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .icon-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .icon-option {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .switch-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .form-generator,
    .sql-generator {
        padding: 0.5rem;
    }
    
    .form-field-content {
        padding: 0.5rem;
    }
}

/* ===========================================
   INFORMACIÓN DEL USUARIO Y LOGOUT
   =========================================== */
.user-info {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding: 0 20px;
    color: white;
}

.user-details {
    display: flex;
    align-items: center;
    margin-right: 15px;
    font-size: 14px;
}

.user-details i {
    font-size: 18px;
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.user-name {
    font-weight: 500;
    margin-right: 5px;
}

.user-role {
    font-size: 12px;
    opacity: 0.8;
    font-style: italic;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bexen-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
    flex-shrink: 0;
    text-align: center;
    line-height: 1;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-left: 10px;
    padding: 5px;
}

.logout-btn:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

.logout-btn {
    font-size: 16px;
}

/* Responsive para información del usuario */
@media (max-width: 768px) {
    .user-info {
        padding: 0 10px;
    }
    
    .user-details {
        font-size: 12px;
        margin-right: 10px;
    }
    
    .user-name {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .user-role {
        display: none;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 10px;
        margin-left: 8px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
}

@media (max-width: 480px) {
    .user-info {
        padding: 0 5px;
    }
    
    .user-details {
        font-size: 11px;
        margin-right: 5px;
    }
    
    .user-name {
        max-width: 60px;
    }
    
    .user-avatar {
        width: 24px;
        height: 24px;
        font-size: 9px;
        margin-left: 5px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .logout-btn {
        font-size: 14px;
        padding: 3px;
    }
}

/* ===========================================
   HERRAMIENTAS Y MANTENEDOR MULTIMEDIA
   =========================================== */

/* Estilos para la página de herramientas */
.tools-section {
    text-align: center;
    margin-bottom: 3rem;
}

.tools-section h1 {
    color: var(--bexen-blue);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--bexen-gray);
    max-width: 600px;
    margin: 0 auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.tool-card {
    background: var(--bexen-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.tool-card h3 {
    color: var(--bexen-blue);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.tool-card p {
    color: var(--bexen-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.tool-link {
    display: block;
    background: var(--bexen-blue);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--bexen-blue);
    margin-left: auto;
    margin-right: auto;
    margin-top: auto;
    text-align: center;
    width: fit-content;
}

.tool-link:hover {
    background: var(--bexen-dark-blue);
    border-color: var(--bexen-dark-blue);
    color: white;
    transform: translateY(-2px);
}

.tool-link.disabled {
    background: var(--bexen-gray);
    border-color: var(--bexen-gray);
    cursor: not-allowed;
    opacity: 0.6;
}

.tool-link.disabled:hover {
    transform: none;
    background: var(--bexen-gray);
}

.tool-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-links .tool-link {
    margin: 0;
    text-align: center;
}

/* ===========================================
   MAPA DE CONTACTOS
   =========================================== */

/* Leyenda de colores */
.contacto-verde {
    width: 20px;
    height: 20px;
    background-color: #28a745;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.contacto-naranja {
    width: 20px;
    height: 20px;
    background-color: #fd7e14;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.contacto-rojo {
    width: 20px;
    height: 20px;
    background-color: #dc3545;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Estilos para el mapa */
#mapa-contactos {
    border-radius: 8px;
    overflow: hidden;
}

/* Popup personalizado */
.contacto-popup {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-width: 200px;
}

.contacto-popup .popup-titulo {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.contacto-popup .popup-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.contacto-popup .popup-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

/* Tarjetas de estadísticas */
.stat-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card.verde {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left-color: #28a745;
}

.stat-card.naranja {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-left-color: #fd7e14;
}

.stat-card.rojo {
    background: linear-gradient(135deg, #fab1a0 0%, #e17055 100%);
    border-left-color: #dc3545;
}

.stat-icon {
    margin-right: 15px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: #34495e;
}

.stat-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-style: italic;
}

/* Estilos para el mantenedor de contenido multimedia */
.admin-section {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-section h1 {
    color: var(--bexen-blue);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.admin-nav {
    background: var(--bexen-white);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.nav-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-tab {
    background: transparent;
    border: 2px solid var(--bexen-light-blue);
    color: var(--bexen-blue);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-tab:hover {
    background: var(--bexen-light-blue);
    border-color: var(--bexen-blue);
}

.nav-tab.active {
    background: var(--bexen-blue);
    border-color: var(--bexen-blue);
    color: white;
}

.tab-content {
    background: var(--bexen-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    min-height: 400px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bexen-light-blue);
}

.content-header h2 {
    color: var(--bexen-blue);
    font-size: 1.6rem;
    margin: 0;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--bexen-blue);
    color: white;
    border: 2px solid var(--bexen-blue);
}

.btn-primary:hover {
    background: var(--bexen-dark-blue);
    border-color: var(--bexen-dark-blue);
    transform: translateY(-2px);
}

.content-body {
    color: var(--bexen-gray);
    line-height: 1.6;
}

/* ===========================================
   FORMULARIOS DEL MANTENEDOR
   =========================================== */

/* Mensajes de estado */
.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.error-message {
    text-align: center;
    padding: 1rem;
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Tablas de datos */
.table-container {
    overflow-x: auto;
    margin: 1rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9rem;
}

.data-table th {
    background: #f8f9fa;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* Badges de estado */
.estado-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado-activo {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.estado-inactivo {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Botones pequeños */
.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    margin: 0 0.25rem;
}

.noticia-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.form-section h4 {
    color: var(--bexen-blue);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--bexen-light-blue);
    padding-bottom: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--bexen-blue);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--bexen-blue);
    box-shadow: 0 0 0 3px rgba(20, 56, 127, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--bexen-gray);
    font-size: 0.85rem;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: var(--bexen-gray);
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.archivos-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 2px dashed #e9ecef;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--bexen-light-blue);
}

.btn-success {
    background: var(--bexen-green);
    border-color: var(--bexen-green);
}

.btn-success:hover {
    background: #218838;
    border-color: #218838;
}

.btn-secondary {
    background: var(--bexen-gray);
    border-color: var(--bexen-gray);
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #5a6268;
}

/* Responsive para herramientas y mantenedor */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
    
    .nav-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-tab {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .content-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .tab-content {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .tools-section h1 {
        font-size: 2rem;
    }
    
    .admin-section h1 {
        font-size: 1.8rem;
    }
    
    .tool-card {
        padding: 1rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
}

/* ===========================================
   INDICADOR DE OJO - ADMIN
   =========================================== */
.ojo-indicador {
    margin-left: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.ojo-indicador:hover {
    transform: scale(1.2);
}

.ojo-cargando {
    color: #666;
    animation: spin 1s linear infinite;
}

.ojo-abierto {
    color: #28a745;
}

.ojo-cerrado {
    color: #dc3545;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===========================================
   POPUP DE NOTICIA
   =========================================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-overlay.popup-visible {
    opacity: 1;
}

.popup-noticia {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.popup-overlay.popup-visible .popup-noticia {
    transform: scale(1);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.popup-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.popup-cerrar {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.popup-cerrar:hover {
    background-color: #f0f0f0;
    color: #333;
}

.popup-content {
    padding: 20px;
}

.popup-content p {
    margin-bottom: 15px;
    color: #555;
}

.pantallas-lista {
    margin: 15px 0;
}

.categoria-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.categoria-item h4 {
    margin: 0 0 10px 0;
    color: #007bff;
    font-size: 1rem;
}

.categoria-item ul {
    margin: 0;
    padding-left: 20px;
}

.categoria-item li {
    margin-bottom: 8px;
    color: #555;
}

.popup-info {
    margin-top: 20px;
    padding: 15px;
    background: #e9ecef;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.popup-info p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.popup-info p:last-child {
    margin-bottom: 0;
}
