/* assets/css/style.css - Shelly H&T Ultra Premium Dashboard */

:root {
    /* Colores y Gradientes */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    /* Tema Oscuro (Por defecto) */
    --bg-primary: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #263347;
    --border-color: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Sombras y Efectos */
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.3);
    --glass-blur: blur(10px);
    
    /* Transiciones */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tema Claro */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.2);
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    transition: var(--transition-smooth);
    min-height: 100vh;
}

/* Contenedor Principal */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* Tarjetas Glassmorphism */
.card-premium {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.card-premium:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(102, 126, 234, 0.3);
}

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

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

/* Métricas Principales */
.metric-value-animated {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin: 10px 0;
    display: inline-block;
}

.metric-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
}

.metric-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Grid de Métricas */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* Botones Premium */
.btn-premium {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-outline-premium {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-outline-premium:hover, .btn-outline-premium.active {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Tablas */
.table-premium {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-premium th {
    padding: 16px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.table-premium td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.table-premium tr:last-child td {
    border-bottom: none;
}

.table-premium tbody tr {
    transition: background 0.2s ease;
}

.table-premium tbody tr:hover {
    background: var(--bg-card-hover);
}

/* Badges de Estado */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-online {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-offline {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Gauges y Gráficos */
.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

.gauge-wrapper {
    position: relative;
    text-align: center;
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--border-color) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Animaciones */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeInUp 0.5s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container { padding: 16px; }
    .metrics-grid { grid-template-columns: 1fr; }
    .metric-value-animated { font-size: 2.5rem; }
    .card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}