* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Amazon Ember', 'Helvetica Neue', Arial, sans-serif;
    background: #0f171e;
    color: #ffffff;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #080c11d1 0%, #120d13c5 100%);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1a252f;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #00a8e1;
    border-radius: 3px;
}

/* Brand Section */
.brand-section {
    padding: 20px;
    border-bottom: 1px solid #37475a;
    background: linear-gradient(135deg, #232f3e 0%, #37475a 100%);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #9800b7 0%, #0073e6 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 168, 225, 0.3);
}

.brand-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #9602a3 0%, #ffffff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: #8eacc2;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Search Section */
.search-section {
    padding: 20px;
    border-bottom: 1px solid #37475a;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-box {
    width: 100%;
    background: #37475a;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px 16px 12px 45px;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box:focus {
    outline: none;
    border-color: #00a8e1;
    background: #485769;
    box-shadow: 0 0 0 3px rgba(0, 168, 225, 0.2);
}

.search-box::placeholder {
    color: #8eacc2;
}

.search-icon,
.search-spinner {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

.search-icon {
    color: #8eacc2;
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-spinner {
    color: #ce00e1;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Menu Sections */
.menu-section {
    padding: 20px 0;
    border-bottom: 1px solid #37475a;
}

.menu-title {
    padding: 0 20px 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #8eacc2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    margin: 0;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.menu-link:hover {
    background: rgba(0, 168, 225, 0.1);
    border-left-color: #00a8e1;
    transform: translateX(5px);
}

.menu-link.active {
    background: linear-gradient(90deg, rgba(0, 168, 225, 0.2) 0%, rgba(0, 168, 225, 0.05) 100%);
    border-left-color: #00a8e1;
    color: #00d4ff;
}

.menu-link.active::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #00a8e1;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 168, 225, 0.6);
}

.menu-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.menu-badge {
    margin-left: auto;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-live {
    background: linear-gradient(135deg, #00a8e1 0%, #0073e6 100%);
    color: #ffffff;
    animation: pulse 2s ease-in-out infinite;
}

.badge-new {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    color: #ffffff;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* User Section */
.user-section {
    padding: 20px;
    margin-top: auto;
}

.server-info {
    background: rgba(0, 168, 225, 0.1);
    border: 1px solid rgba(0, 168, 225, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.server-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #00d4ff;
    font-weight: 500;
}

.server-name i {
    font-size: 1rem;
}

.expiration-alert {
    background: linear-gradient(135deg, #ff9500 0%, #ffa726 100%);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    text-align: center;
    animation: glow 2s ease-in-out infinite alternate;
    border: 1px solid rgba(255, 167, 38, 0.3);
}

.expiration-alert.critical {
    background: linear-gradient(135deg, #f57c00 0%, #ff9800 100%);
    animation: urgentGlow 1s ease-in-out infinite alternate;
    border-color: rgba(245, 124, 0, 0.5);
}

.expiration-alert i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.expiration-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes glow {
    from { box-shadow: 0 2px 10px rgba(255, 167, 38, 0.3); }
    to { box-shadow: 0 4px 20px rgba(255, 167, 38, 0.6); }
}

@keyframes urgentGlow {
    from { box-shadow: 0 2px 10px rgba(245, 124, 0, 0.4); }
    to { box-shadow: 0 4px 20px rgba(245, 124, 0, 0.8); }
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(55, 71, 90, 0.5);
    border-radius: 8px;
    border: 1px solid #37475a;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(55, 71, 90, 0.8);
    border-color: #00a8e1;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a8e1 0%, #0073e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 168, 225, 0.3);
}

.user-info {
    flex: 1;
}

.username {
    font-size: 0.95rem;
    font-weight: 600;
}

.user-status {
    font-size: 0.75rem;
    color: #8eacc2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.logout-btn {
    background: none;
    border: none;
    color: #8eacc2;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    color: #00a8e1;
    background: rgba(0, 168, 225, 0.1);
}
 .mobile-toggle {
    position: fixed;
    top: 20px;
    right: 40%; /* Coloca el botón a la derecha */
    z-index: 2000; /* Superior al sidebar */
    background: #232f3e;
    border: none;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: block; /* Siempre visible */
    transition: background 0.3s ease;
}

.mobile-toggle:hover {
    background: #37475a;
}
/* Para que .open funcione en PC también */
.sidebar.open {
    transform: translateX(0);
    width: 280px;
}

.sidebar.collapsed {
    transform: translateX(-280px); /* mueve el sidebar fuera de la vista */
}

/* Asegura que main-content se ajuste cuando el sidebar está cerrado */
.main-content.collapsed {
    margin-left: 0 !important;
}

/* -------------------------------
   Main Content Layout
-------------------------------- */
.main-content {
    background: #0f171e;
    transition: all 0.3s ease;
    padding: 0;
    margin-left: 0;
}

/* Escritorio con menú abierto */
@media (min-width: 769px) {
    .main-content.with-sidebar {
        margin-left: 280px;
    }

    .sidebar.collapsed {
        width: 0;
        overflow: hidden;
    }

    .main-content.collapsed {
        margin-left: 0 !important;
    }
}

/* Móvil: menú ocupa el 60% de la pantalla, contenido se queda fijo */
@media (max-width: 768px) {
    .sidebar {
        width: 60%;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
