/* =========================================
   1. ESTILOS GLOBALES Y TIPOGRAFÍA
   ========================================= */
body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
}

.bg-primary { background-color: #0056b3 !important; }
.text-warning { color: #ffc107 !important; }

/* Títulos de sección con barra amarilla corporativa */
.section-title {
    border-left: 5px solid #ffc107;
    padding-left: 15px;
    font-weight: 800;
    color: #002d5a;
}

.badge { font-size: 0.8rem; }

.btn-export {
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* =========================================
   2. BARRAS DE NAVEGACIÓN (NAVBAR)
   ========================================= */
.navbar-admin, .navbar-cliente {
    background-color: #002d5a; /* Azul corporativo Servicable */
}

/* =========================================
   3. TARJETAS (CARDS) GENERALES
   ========================================= */
.card-custom {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* =========================================
   4. MAPA DE GOOGLE
   ========================================= */
#map, #mapa {
    height: 350px;
    width: 100%;
    background-color: #e9ecef;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}

/* =========================================
   5. SISTEMA DE NOTIFICACIONES (CAMPANITA)
   ========================================= */
.bell-icon {
    font-size: 1.3rem;
    color: #ffffff;
    transition: 0.2s;
}

.bell-icon:hover { color: #ffc107; }

.nav-notif .dropdown-menu {
    width: 320px;
    border: none;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-radius: 12px;
    margin-top: 10px;
}

.notif-scroll {
    max-height: 380px;
    overflow-y: auto;
}

/* Scrollbar interno para la lista de notificaciones */
.notif-scroll::-webkit-scrollbar { width: 5px; }
.notif-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }

.notif-item {
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.2s;
    padding: 12px 15px;
    text-decoration: none;
    display: flex;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background-color: #f0f7ff; }

/* El contador rojo de la campanita */
.notif-count {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.65rem;
    border: 2px solid #002d5a; /* Borde del mismo color que el Nav para que resalte */
    padding: 3px 5px;
}

/* =========================================
   6. ANIMACIONES GLOBALES
   ========================================= */
/* Punto verde parpadeante para clientes online o notificaciones en vivo */
.live-dot, .status-online {
    display: inline-block;
    height: 10px;
    width: 10px;
    background-color: #28a745;
    border-radius: 50%;
    margin-right: 5px;
    animation: palpitar 2s infinite;
}

@keyframes palpitar {
    0% { opacity: 1; box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { opacity: 0.7; box-shadow: 0 0 0 5px rgba(40, 167, 69, 0); }
    100% { opacity: 1; box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* =========================================
   7. LANDING PAGE Y PRECIOS (INDEX.PHP)
   ========================================= */
.hero-section {
    background: linear-gradient(135deg, rgba(0,78,146,0.9) 0%, rgba(0,4,40,0.9) 100%), url('img/hero-bg.jpg') center/cover;
    color: white;
    padding: 100px 0 80px 0;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    margin-bottom: 3rem;
}

.pricing-card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    background-color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
}

.card-header-price {
    background-color: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.price-tag {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0056b3;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.pricing-card ul li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.pricing-card ul li:last-child {
    border-bottom: none;
}

.tv-badge {
    background-color: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    vertical-align: middle;
}

.faq-section { background-color: #f8f9fa; padding: 60px 0; }
.accordion-button:not(.collapsed) { background-color: #e7f1ff; color: #0056b3; }

/* =========================================
   8. PANEL DE CLIENTE
   ========================================= */
.plan-header {
    background: linear-gradient(135deg, #0056b3, #002d5a);
    color: white;
    padding: 25px;
    text-align: center;
}
/* =======================================================================
   NUEVO DISEÑO: SIDEBAR RETRÁCTIL (Menú Lateral)
   ======================================================================= */
body {
    background-color: #f4f6f9;
    overflow-x: hidden;
    margin: 0;
}
.wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* --- SIDEBAR OSCURO --- */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #002d5a 0%, #00152e 100%);
    color: #fff;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}
.sidebar.collapsed {
    width: 80px;
}
.sidebar .logo-details {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}
.sidebar .logo-details .logo_name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    transition: opacity 0.3s;
}
.sidebar.collapsed .logo-details .logo_name {
    opacity: 0;
    display: none;
}
.sidebar .nav-links {
    padding: 20px 0;
    list-style: none;
    margin: 0;
    flex-grow: 1;
}
.sidebar .nav-links li {
    list-style: none;
    margin-bottom: 5px;
}
.sidebar .nav-links li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    white-space: nowrap;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}
.sidebar .nav-links li a:hover, 
.sidebar .nav-links li a.active {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left: 4px solid #ffc107; /* Línea amarilla indicadora */
}
.sidebar .nav-links li a i {
    font-size: 1.3rem;
    min-width: 40px;
    text-align: center;
}
.sidebar.collapsed .nav-links li a span.link_name {
    display: none; /* Oculta el texto al encoger */
}

/* --- CONTENIDO PRINCIPAL --- */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.4s ease;
    width: calc(100% - 260px);
}
.sidebar.collapsed ~ .main-content {
    width: calc(100% - 80px);
}

/* --- CABECERA SUPERIOR BLANCA --- */
.top-header {
    height: 70px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 999;
}
.toggle-btn {
    font-size: 1.8rem;
    cursor: pointer;
    color: #002d5a;
    transition: transform 0.3s;
}
.toggle-btn:hover {
    transform: scale(1.1);
}
/* =======================================================================
   ESTILOS ESPECÍFICOS DEL PANEL DE CLIENTE
   ======================================================================= */
.card-pendiente {
    background-color: white;
    border-top: 5px solid #ffc107;
    border-radius: 15px;
}
.alerta-corte {
    background-color: #e0f2fe;
    border-left: 5px solid #0284c7 !important;
    color: #0369a1;
}