/* =====================================================
   DASHBOARD ULTRA GLASS - PI APOTEMA
   Glassmorphism Premium 2024
===================================================== */
:root {
    :root {
        /* Color de fondo oscuro con un toque turquesa muy profundo */
        --bg-body: #0f172a;
        /* Azul noche profundo */

        /* Cambiar a morado oscuro atenuado para que coincida con el tema */
        --brand-teal: #403060;
        /* Morado oscuro atenuado */
        --brand-teal-light: #6b5c92;
        /* Para estados activos */

        /* Ajustar las tarjetas de vidrio para que se vean mejor sobre fondo oscuro */
        --glass-bg: rgba(30, 41, 59, 0.7);
        /* Azul pizarra con transparencia */
        --glass-border: rgba(255, 255, 255, 0.1);
        --text-main: #f1f5f9;
        /* Texto claro para que sea legible */
    }

    body {
        background-color: var(--bg-body);
        color: var(--text-main);
    }
}

[data-theme="dark"] {
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --text-dark: #f1f5f9;
    --text-muted: #94a3b8;
}

.dashboard-ultra-glass {
    padding: 2rem;
    background: var(--bg-body, #f8fafc);
    min-height: 100vh;
}

/* =====================================================
   HERO SECTION
===================================================== */
.hero-ultra {
    position: relative;
    background: linear-gradient(135deg, var(--emerald-dark), var(--emerald), var(--emerald-light));
    border-radius: 24px;
    padding: 2.5rem 3rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.hero-blur-bg {
    position: absolute;
    top: -50%;
    right: -30%;
    width: 70%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    animation: floatBg 8s ease-in-out infinite;
}

@keyframes floatBg {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-20px, 20px) rotate(5deg);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.greeting-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 30px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.chip-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.5rem;
    letter-spacing: -1px;
}

.hero-sub {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-size: 1rem;
    text-transform: capitalize;
}

.hero-actions {
    display: flex;
    gap: 12px;
}

.hero-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-btn.primary {
    background: white;
    color: var(--emerald-dark);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hero-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.hero-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.hero-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

/* =====================================================
   STATS GRID
===================================================== */
.stats-glass-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
}

.card-icon.emerald {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

.card-icon.violet {
    background: linear-gradient(135deg, var(--violet), var(--violet-light));
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}

.card-icon.blue {
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.card-icon.amber {
    background: linear-gradient(135deg, var(--amber), var(--amber-light));
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}

.card-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.card-badge.neutral {
    background: rgba(107, 114, 128, 0.1);
    color: var(--gray-500);
}

.card-badge.primary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
}

.card-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald);
}

.online-dot {
    width: 6px;
    height: 6px;
    background: var(--emerald);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.card-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.card-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    margin: 0.5rem 0 1rem;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.dot.green {
    background: var(--emerald);
}

.dot.blue {
    background: var(--blue);
}

.dot.violet {
    background: var(--violet);
}

.dot.pulse {
    animation: pulse 1.5s infinite;
}

/* Progress Bars */
.card-progress {
    margin-top: 1rem;
}

.progress-thin {
    height: 4px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

[data-theme="dark"] .progress-thin {
    background: rgba(255, 255, 255, 0.1);
}

.progress-bar-thin {
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s ease;
}

.progress-bar-thin.emerald {
    background: linear-gradient(90deg, var(--emerald), var(--emerald-light));
}

.progress-bar-thin.violet {
    background: linear-gradient(90deg, var(--violet), var(--violet-light));
}

.progress-bar-thin.blue {
    background: linear-gradient(90deg, var(--blue), var(--blue-light));
}

/* Card Action */
.card-action {
    position: relative;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    background: linear-gradient(135deg, #1e293b, #334155);
    border: none;
}

.card-action:hover {
    transform: translateY(-6px) scale(1.02);
}

.action-bg {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 50%);
    animation: floatBg 6s ease-in-out infinite;
}

.action-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 1rem 0;
}

.action-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
    backdrop-filter: blur(10px);
}

.action-content h3 {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.action-content p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin: 0;
}

.action-arrow {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    background: var(--emerald);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transform: translate(-10px, -10px);
    transition: all 0.3s ease;
}

.card-action:hover .action-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* =====================================================
   DOCK FLOTANTE
===================================================== */
.dock-section {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.dock-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    padding: 12px 20px;
    box-shadow: var(--glass-shadow);
}

.dock-item {
    position: relative;
    text-decoration: none;
}

.dock-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.dock-icon.violet {
    background: linear-gradient(135deg, var(--violet), var(--violet-light));
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.dock-icon.emerald {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.dock-icon.blue {
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.dock-icon.amber {
    background: linear-gradient(135deg, var(--amber), var(--amber-light));
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

.dock-icon.gray {
    background: linear-gradient(135deg, var(--gray-500), var(--gray-400));
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.25);
}

.dock-item:hover .dock-icon {
    transform: translateY(-14px) scale(1.18);
}

.dock-item::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 18px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--text-dark);
    color: white;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

.dock-item:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dock-divider {
    width: 1px;
    height: 34px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 10px;
}

[data-theme="dark"] .dock-divider {
    background: rgba(255, 255, 255, 0.1);
}

/* =====================================================
   PANELS GRID
===================================================== */
.panels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.panel-card {
    padding: 0;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .panel-header {
    border-color: rgba(255, 255, 255, 0.05);
}

.panel-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.panel-icon.amber {
    background: linear-gradient(135deg, var(--amber), var(--amber-light));
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.panel-header p {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Shortcuts List */
.shortcuts-list {
    padding: 0.5rem;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.shortcut-item:hover {
    background: rgba(16, 185, 129, 0.06);
    transform: translateX(6px);
}

.shortcut-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.shortcut-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.shortcut-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
}

.shortcut-icon.amber {
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber);
}

.shortcut-icon.violet {
    background: rgba(139, 92, 246, 0.1);
    color: var(--violet);
}

.shortcut-icon.emerald {
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald);
}

.shortcut-left span {
    font-size: 0.9rem;
    font-weight: 500;
}

.shortcut-item i.bi-chevron-right {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.shortcut-item:hover i.bi-chevron-right {
    transform: translateX(4px);
    color: var(--emerald);
}

/* Card Sistema */
.card-system {
    background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald) 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.system-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.live-ring {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    animation: pulse 1.5s infinite;
}

.system-time {
    font-family: 'Liberation Mono', 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    font-weight: 700;
}

.system-body {
    text-align: center;
    padding: 1rem 0 1.5rem;
}

.system-logo {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    backdrop-filter: blur(10px);
}

.system-body h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.system-body p {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0 0 1rem;
}

.version-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.system-metrics {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.metric {
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric i {
    font-size: 1.3rem;
    opacity: 0.8;
}

.metric small {
    display: block;
    font-size: 0.7rem;
    opacity: 0.8;
}

.metric strong {
    font-size: 0.85rem;
}

.system-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    overflow: hidden;
}

.wave-line {
    position: absolute;
    bottom: 0;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='rgba(255,255,255,0.08)'/%3E%3C/svg%3E");
    background-size: 50% 100%;
    animation: waveMove 20s linear infinite;
}

.wave-line:nth-child(2) {
    animation-delay: -10s;
    opacity: 0.5;
}

@keyframes waveMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1400px) {
    .stats-glass-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .panels-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-ultra-glass {
        padding: 1rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-btn {
        justify-content: center;
    }

    .stats-glass-grid {
        grid-template-columns: 1fr;
    }

    .dock-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        padding: 16px;
    }

    .dock-divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-ultra {
        padding: 1.5rem;
    }

    .card-number {
        font-size: 2.2rem;
    }

    .dock-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
}

/* =====================================================
   APPLE STYLE BUTTONS (V4.2)
===================================================== */
.btn-light-apple {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
}

.btn-light-apple:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.btn-light-apple:active {
    transform: translateY(0);
}

.btn-dark-apple {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.btn-dark-apple:hover {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
    color: #ffffff !important;
}