/**
 * AlienHost WHMCS Theme - Dashboard Styles
 * 
 * Estilos para el área de cliente y dashboard - Estilo oscuro
 */

/* ============================================
   DASHBOARD TILES - Muy oscuro como la web
   ============================================ */
.dashboard-tiles {
    margin-bottom: 2rem;
}

.dashboard-tile {
    display: block;
    position: relative;
    background: rgba(15, 20, 35, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dashboard-tile:hover {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.2);
    text-decoration: none;
}

.dashboard-tile .tile-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.dashboard-tile:hover .tile-icon {
    background: #8b5cf6;
    color: white;
    transform: scale(1.1);
}

.dashboard-tile .tile-content {
    position: relative;
    z-index: 1;
}

.dashboard-tile .tile-count {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.dashboard-tile .tile-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* Tile variations */
.tile-services .tile-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.tile-services:hover .tile-icon {
    background: #3b82f6;
}

.tile-domains .tile-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.tile-domains:hover .tile-icon {
    background: #22c55e;
}

.tile-tickets .tile-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.tile-tickets:hover .tile-icon {
    background: #ef4444;
}

.tile-invoices .tile-icon {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.tile-invoices:hover .tile-icon {
    background: var(--warning);
}

.tile-invoices.has-pending {
    border-color: rgba(245, 158, 11, 0.5);
}

/* Alert dot */
.tile-alert {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.pulse-dot {
    display: block;
    width: 12px;
    height: 12px;
    background: var(--danger);
    border-radius: 50%;
    animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Hover effect */
.tile-hover-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(100, 25, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.tile-hover-effect.active,
.dashboard-tile:hover .tile-hover-effect {
    opacity: 1;
}

/* ============================================
   KB SEARCH SECTION
   ============================================ */
.kb-search-section {
    margin-bottom: 2rem;
}

.kb-search-wrapper {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: var(--radius-xl);
    gap: 1rem;
}

.kb-search-icon {
    color: var(--text-muted);
    font-size: 1.25rem;
    padding-left: 0.5rem;
}

.kb-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0.75rem;
    outline: none;
}

.kb-search-input::placeholder {
    color: var(--text-muted);
}

.kb-search-btn {
    border-radius: var(--radius-lg);
}

/* ============================================
   DASHBOARD PANELS
   ============================================ */
.dashboard-panels {
    margin-top: 2rem;
}

.panel-dashboard {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-xl);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.panel-dashboard:hover {
    border-color: rgba(100, 25, 255, 0.3);
}

.panel-dashboard .panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(100, 25, 255, 0.08);
    border-bottom: 1px solid var(--border-color-light);
}

.panel-dashboard .panel-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-dashboard .panel-title i {
    color: var(--alien-primary);
}

.badge-count {
    background: var(--alien-primary);
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.panel-action .btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.panel-dashboard .panel-body {
    padding: 1.25rem;
}

/* Panel List Items */
.panel-list {
    margin: 0;
    border-radius: 0;
}

.panel-list .list-group-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color-light);
    border-radius: 0;
    color: var(--text-secondary);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-fast);
}

.panel-list .list-group-item:last-child {
    border-bottom: none;
}

.panel-list .list-group-item:hover {
    background: rgba(100, 25, 255, 0.1);
    color: var(--text-primary);
}

.panel-list .list-group-item.active {
    background: rgba(100, 25, 255, 0.2);
    color: var(--text-primary);
}

.panel-list .item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel-list .item-content i {
    color: var(--alien-primary);
    width: 20px;
}

.panel-list .item-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0;
    transition: all var(--transition-fast);
}

.panel-list .list-group-item:hover .item-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.panel-list .badge {
    background: rgba(100, 25, 255, 0.2);
    color: var(--alien-primary);
}

.panel-dashboard .panel-footer {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-color-light);
    padding: 1rem 1.25rem;
}

/* Panel accent colors */
.panel-accent-blue .panel-heading {
    border-left: 4px solid var(--info);
}

.panel-accent-green .panel-heading {
    border-left: 4px solid var(--success);
}

.panel-accent-red .panel-heading {
    border-left: 4px solid var(--danger);
}

.panel-accent-gold .panel-heading,
.panel-accent-orange .panel-heading {
    border-left: 4px solid var(--warning);
}

.panel-accent-purple .panel-heading {
    border-left: 4px solid var(--alien-primary);
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */
.sidebar-widget {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-xl);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(100, 25, 255, 0.08);
    border-bottom: 1px solid var(--border-color-light);
    cursor: pointer;
}

.sidebar-header .panel-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: transform var(--transition-fast);
}

.sidebar-widget.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-widget.collapsed .sidebar-body,
.sidebar-widget.collapsed .sidebar-menu,
.sidebar-widget.collapsed .sidebar-footer {
    display: none;
}

.sidebar-body {
    padding: 1rem 1.25rem;
}

.sidebar-menu {
    margin: 0;
}

.sidebar-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color-light);
    border-radius: 0;
    color: var(--text-secondary);
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-fast);
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-item:hover {
    background: rgba(100, 25, 255, 0.1);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: var(--alien-primary);
    color: white;
}

.sidebar-item.active .sidebar-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.sidebar-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sidebar-item .item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-item i {
    width: 18px;
}

.sidebar-badge {
    background: rgba(100, 25, 255, 0.2);
    color: var(--alien-primary);
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
}

.sidebar-footer {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-color-light);
    padding: 1rem 1.25rem;
}

/* Mobile sidebar */
.panel-sidebar-mobile {
    display: none;
}

@media (max-width: 991px) {
    .panel-sidebar-mobile {
        display: block;
    }
    
    .sidebar-mobile-select {
        width: 100%;
    }
}

/* ============================================
   ADDON SECTIONS
   ============================================ */
.addon-section {
    margin-bottom: 1.5rem;
}

.addon-section .panel {
    background: var(--gradient-card);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-xl);
}

/* ============================================
   SERVICE/PRODUCT CARDS
   ============================================ */
.service-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all var(--transition-normal);
}

.service-card:hover {
    border-color: var(--alien-primary);
    box-shadow: var(--shadow-glow);
}

.service-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color-light);
}

.service-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.service-card-status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-suspended {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.status-terminated {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-muted);
}

.service-card-body {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.service-card-body .info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.service-card-body .info-label {
    color: var(--text-muted);
}

.service-card-body .info-value {
    color: var(--text-primary);
    font-weight: 500;
}

.service-card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color-light);
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 767px) {
    .dashboard-tile {
        padding: 1rem;
    }
    
    .dashboard-tile .tile-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
    
    .dashboard-tile .tile-count {
        font-size: 1.5rem;
    }
    
    .kb-search-wrapper {
        flex-direction: column;
        padding: 1rem;
    }
    
    .kb-search-icon {
        display: none;
    }
    
    .kb-search-input {
        width: 100%;
        text-align: center;
    }
    
    .kb-search-btn {
        width: 100%;
    }
}
