/* LAYOUT BÁSICO */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;700&display=swap');

/* Variables personalizables para el difuminado de borde */
:root {
    --blur-color: 0, 114, 255;
    /* Color RGB del difuminado (azul por defecto) */
    --blur-intensity: 1.0;
    /* Intensidad/opacidad del difuminado (0.0 a 1.0) */
    --blur-size: 45px;
    /* Tamaño del difuminado en píxeles */
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: #f0f2f5;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Overlay de difuminado que cubre toda la pantalla */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    box-shadow: inset 0 0 var(--blur-size) rgba(var(--blur-color), var(--blur-intensity));
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - 260px);
}

.content-wrapper {
    margin-left: 260px;
    padding-top: 85px;
    min-height: 100vh;
    width: calc(100% - 260px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 260px;
    width: calc(100% - 260px);
    height: 85px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.header-title h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: 0.5px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

.header-brand .fas.fa-bullseye {
    font-size: 28px;
    color: #0072ff;
    font-weight: 900;
}

.header-brand span {
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1f2937;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.header-link:hover {
    color: #0072ff;
    background: rgba(0, 114, 255, 0.05);
}

/* Sidebar */
.sidebar {
    position: fixed;
    align-items: center !important;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.02);
}

.sidebar-header {
    padding: 30px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.sidebar-logo {
    width: auto;
    height: 100px;
    filter: drop-shadow(0 0 15px rgba(0, 114, 255, 0.3));
}

.brand-main {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.brand-sub {
    margin-bottom: -15px;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 400;
    letter-spacing: 1px;
    text-align: center;
}

.sidebar-nav {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 12px;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(0, 114, 255, 0.08);
    color: #0072ff;
}

.nav-link:hover i,
.nav-link.active i {
    transform: translateX(4px);
}

/* Footer */
.main-footer {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: #f0f2f5;
    margin-top: auto;
    margin-left: 260px;
    width: calc(100% - 260px);
    box-sizing: border-box;
}

/* Login Modal */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.login-modal-content {
    width: 90%;
    max-width: 380px;
    padding: 30px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
}

.login-modal-content h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #0072ff;
}

.login-modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 28px;
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-close-btn:hover {
    color: #ff3860;
}

/* Responsive */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1f2937;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.menu-toggle:hover {
    color: #0072ff;
}

/* Sidebar overlay element created dynamically by JS */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 990;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.active {
        transform: translateX(0) !important;
    }

    .sidebar-overlay.active {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto;
    }

    .main-header,
    .content-wrapper,
    .main-footer {
        left: 0;
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .header-brand span {
        display: none;
    }

    .header-brand .fas.fa-bullseye {
        font-size: 22px;
    }

    .header-link {
        font-size: 0;
        padding: 8px 12px;
    }

    .header-link i {
        font-size: 1.2rem;
        margin: 0;
    }

    .main-header {
        padding: 0 15px;
    }
}