/**
 * Dashboard 2.0 - Premium Layout & Effects
 * Modern dashboard enhancements with hero section, bento layout, and animations
 */

/* ===================================
   ANIMATED HERO SECTION
   =================================== */

.dashboard-hero {
    background: linear-gradient(135deg, #0a0e27 0%, #1a2142 50%, #0a0e27 100%);
    background-size: 200% 200%;
    animation: heroGradient 8s ease infinite;
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 243, 255, 0.1);
}

@keyframes heroGradient {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Animated gradient line */
.hero-gradient-line {
    height: 3px;
    background: linear-gradient(90deg,
            transparent 0%,
            #00f3ff 20%,
            #d946ef 50%,
            #00f3ff 80%,
            transparent 100%);
    background-size: 200% 100%;
    animation: lineSlide 3s linear infinite;
    margin: 20px 0;
    border-radius: 2px;
}

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

    100% {
        background-position: 200% 0;
    }
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #00f3ff 0%, #ffffff 50%, #d946ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.hero-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.hero-stat-item {
    text-align: center;
}

.hero-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #00f3ff;
    margin-bottom: 5px;
}

.hero-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Floating particles effect */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0, 243, 255, 0.5);
    border-radius: 50%;
    animation: particleFloat 20s infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* ===================================
   BENTO BOX LAYOUT
   =================================== */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 140px;
    gap: 20px;
    margin-bottom: 30px;
}

/* Compact cards (1x1) */
.bento-item-sm {
    grid-column: span 2;
    grid-row: span 1;
}

/* Medium cards (2x1) */
.bento-item-md {
    grid-column: span 3;
    grid-row: span 1;
}

/* Large cards (2x2) */
.bento-item-lg {
    grid-column: span 4;
    grid-row: span 2;
}

/* Wide cards (full width, tall) */
.bento-item-wide {
    grid-column: span 6;
    grid-row: span 1;
}

/* Featured card (prominent) */
.bento-item-featured {
    grid-column: span 3;
    grid-row: span 2;
}

/* ===================================
   GLOW CARDS
   =================================== */

.glow-card {
    position: relative;
    background: rgba(10, 14, 39, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.glow-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #00f3ff, #d946ef);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    filter: blur(20px);
}

.glow-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 243, 255, 0.3);
}

.glow-card:hover::before {
    opacity: 0.4;
}

/* Glow variants */
.glow-card-cyan::before {
    background: #00f3ff;
}

.glow-card-purple::before {
    background: #d946ef;
}

.glow-card-green::before {
    background: #10b981;
}

.glow-card-orange::before {
    background: #f59e0b;
}

/* ===================================
   ANIMATED NUMBERS
   =================================== */

.animated-number {
    display: inline-block;
    transition: all 0.3s ease;
}

.number-increase {
    animation: numberPulse 0.6s ease;
    color: #10b981 !important;
}

.number-decrease {
    animation: numberPulse 0.6s ease;
    color: #ef4444 !important;
}

@keyframes numberPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* Counter animation */
.counter {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ===================================
   SPARKLINE CHARTS
   =================================== */

.sparkline-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.sparkline {
    display: inline-flex;
    align-items: flex-end;
    height: 30px;
    gap: 2px;
}

.sparkline-bar {
    width: 3px;
    background: rgba(0, 243, 255, 0.3);
    border-radius: 2px 2px 0 0;
    transition: all 0.3s ease;
}

.sparkline-bar.up {
    background: linear-gradient(to top, #10b981, #34d399);
}

.sparkline-bar.down {
    background: linear-gradient(to top, #ef4444, #f87171);
}

.sparkline-bar:hover {
    background: #00f3ff;
    transform: scaleY(1.2);
}

/* Trend arrow */
.trend-arrow {
    font-size: 14px;
    font-weight: 700;
}

.trend-arrow.up {
    color: #10b981;
}

.trend-arrow.down {
    color: #ef4444;
}

/* ===================================
   CARD ENHANCEMENTS
   =================================== */

.metric-card-enhanced {
    position: relative;
    overflow: visible;
}

.metric-icon {
    position: absolute;
    top: -15px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00f3ff, #0066ff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.4);
}

/* ===================================
   RESPONSIVE BENTO
   =================================== */

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .bento-item-lg,
    .bento-item-featured {
        grid-column: span 4;
    }

    .bento-item-wide {
        grid-column: span 4;
    }
}

@media (max-width: 768px) {
    .dashboard-hero {
        padding: 24px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 15px;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 120px;
        gap: 12px;
    }

    .bento-item-sm,
    .bento-item-md,
    .bento-item-lg,
    .bento-item-wide,
    .bento-item-featured {
        grid-column: span 2;
        grid-row: span 1;
    }
}

/* ===================================
   LOADING STATES
   =================================== */

.card-loading {
    position: relative;
    pointer-events: none;
}

.card-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

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

/* === ORBIT ana sayfa — daha kompakt yoğunluk === */
.dashboard-hero {
    padding: 14px 18px;
    margin-bottom: 10px;
    border-radius: 12px;
}

.hero-title {
    font-size: 22px;
    margin-bottom: 4px;
}

.hero-subtitle {
    font-size: 13px;
    line-height: 1.35;
}

.hero-gradient-line {
    margin: 8px 0;
}

.hero-stats {
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.hero-stat-value {
    font-size: 18px;
}

.hero-stat-label {
    font-size: 10px;
}

.fusion-main .metrics-grid {
    gap: 8px;
}

.fusion-main #realtime-clock-widget,
.fusion-main #quick-stats-widget {
    min-height: 0;
}

/* Widget satırları index’teki inline grid ile uyumlu: daha sıkı boşluk */
.orbit-dash-compact-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 8px !important;
    margin-bottom: 10px !important;
}

.orbit-dash-compact-row-2 {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 8px !important;
    margin-bottom: 10px !important;
}

@media (max-width: 900px) {

    .orbit-dash-compact-row,
    .orbit-dash-compact-row-2 {
        grid-template-columns: 1fr;
    }
}