/* Dashboard Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    color: #ffffff;
    overflow-x: hidden;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 9999;
    /* Hide scrollbars */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.sidebar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}

.sidebar-logo {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo .logo {
    font-size: 1.2rem !important;
}

.sidebar-logo .logo span {
    font-size: 1.2rem !important;
}

.sidebar-logo .dot-grid {
    width: 40px;
    height: 30px;
}

.sidebar-user-profile {
    padding: 16px;
    margin-bottom: 20px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    position: relative;
}

.sidebar-user-profile .user-name {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-user-profile .user-email {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
}

.sidebar-user-profile .profile-actions {
    display: flex;
    gap: 8px;
}

.sidebar-user-profile .profile-btn {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    text-align: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-user-profile .profile-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
    color: rgba(255, 255, 255, 1);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    width: 100%;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.35) 0%, rgba(139, 92, 246, 0.35) 100%);
    transition: width 0.4s ease;
    z-index: -1;
    box-shadow: 
        0 0 10px rgba(236, 72, 153, 0.1),
        0 0 20px rgba(139, 92, 246, 0.05);
}

.nav-item:hover::before {
    width: 100%;
    box-shadow: 
        0 0 15px rgba(236, 72, 153, 0.2),
        0 0 30px rgba(139, 92, 246, 0.1);
}

.nav-item:hover,
.nav-item.active {
    color: #ffffff;
}

.nav-item.active {
    background: rgba(139, 92, 246, 0.2);
}

/* Dropdown Menu Styles - Expanding downward with push */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > .nav-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-dropdown > .nav-item::after {
    content: '▼';
    font-size: 0.75rem;
    font-weight: 300;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.nav-dropdown.active > .nav-item::after {
    transform: rotate(180deg);
}

.nav-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 16px;
    /* Hide scrollbars */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.nav-dropdown-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}

.nav-dropdown.active .nav-dropdown-content {
    max-height: 200px;
}

.nav-dropdown-content a {
    display: block;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    border-radius: 8px;
    margin-top: 4px;
}

.nav-dropdown-content a:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #ffffff;
}

.nav-dropdown-content a.active {
    background: rgba(139, 92, 246, 0.2);
    color: #ffffff;
    font-weight: 600;
}

.nav-section-title {
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 24px 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 32px;
}

.header-logo {
    display: none;
}

/* WAVE LOGO STYLES - Exact copy from home page */
.logo::before {
    display: none !important;
    content: none !important;
}

.logo {
    font-size: 1.5rem !important;
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 16px !important;
    letter-spacing: -0.03em !important;
    cursor: pointer !important;
}

.logo:hover, 
.logo:focus, 
.logo:active,
.logo:visited {
    text-decoration: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.dot-grid {
    width: 48px;
    height: 36px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 0.5px;
    position: relative;
    transform: perspective(200px) rotateY(-15deg);
}

.dot {
    width: 2px;
    height: 2px;
    background: #8b5cf6;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Create wave pattern with gradient effect */
.dot {
    opacity: 0.3;
    transform: scale(0.6);
}

/* Wave pattern - each column has different heights */
.dot-grid .dot:nth-child(12n+1) { opacity: 0.2; transform: scale(0.5); }
.dot-grid .dot:nth-child(12n+2) { opacity: 0.3; transform: scale(0.6); }
.dot-grid .dot:nth-child(12n+3) { opacity: 0.4; transform: scale(0.7); }
.dot-grid .dot:nth-child(12n+4) { opacity: 0.5; transform: scale(0.8); }
.dot-grid .dot:nth-child(12n+5) { opacity: 0.6; transform: scale(0.9); }
.dot-grid .dot:nth-child(12n+6) { opacity: 0.8; transform: scale(1.1); }
.dot-grid .dot:nth-child(12n+7) { opacity: 0.9; transform: scale(1.2); }
.dot-grid .dot:nth-child(12n+8) { opacity: 1; transform: scale(1.3); }
.dot-grid .dot:nth-child(12n+9) { opacity: 0.9; transform: scale(1.2); }
.dot-grid .dot:nth-child(12n+10) { opacity: 0.7; transform: scale(1); }
.dot-grid .dot:nth-child(12n+11) { opacity: 0.5; transform: scale(0.8); }
.dot-grid .dot:nth-child(12n+12) { opacity: 0.3; transform: scale(0.6); }

/* Gradient effect from left to right */
.dot {
    background: linear-gradient(90deg, #6d28d9 0%, #8b5cf6 50%, #a78bfa 100%);
}

.logo span {
    font-size: 1.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: -0.03em;
    white-space: nowrap;
    text-decoration: none;
}

/* Hover state for the entire logo */
.logo:hover .dot-grid {
    transform: perspective(200px) rotateY(-10deg) scale(1.05);
}

.logo:hover .dot {
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: scale(var(--scale, 1)) translateY(0);
        opacity: var(--opacity, 0.6);
    }
    50% {
        transform: scale(calc(var(--scale, 1) * 1.3)) translateY(-2px);
        opacity: calc(var(--opacity, 0.6) * 1.2);
    }
}

/* Stagger the animation for wave effect */
.logo:hover .dot { animation-delay: calc(var(--delay, 0) * 1s); }

/* Add subtle glow effect on hover */
.logo:hover .dot-grid {
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.3));
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.header-title h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Buttons */
.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-small {
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #a78bfa;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-small:hover {
    background: rgba(139, 92, 246, 0.2);
}

/* Cards */
.stat-card,
.model-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.stat-card:hover,
.model-card:hover {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-4px);
}

.model-icon {
    width: 48px;
    height: 48px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.5rem;
    padding: 6px;
}

.model-icon svg {
    width: 100%;
    height: 100%;
}

.model-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.model-meta {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.model-actions {
    display: flex;
    gap: 8px;
}

/* Grid Layout */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 64px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 64px 32px;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 9999;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .models-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 16px;
    }

    .header {
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
    }

    .sidebar-logo .logo span {
        font-size: 1rem !important;
    }

    .sidebar-logo .dot-grid {
        width: 36px;
        height: 28px;
    }
}
