/*
 * Page: Dashboard
 * Version: 1.0.0
 */

/* --- 1. VARIABLES --- */
:root {
    --vidnok-glass: rgba(255, 255, 255, 0.05); 
    --vidnok-border: rgba(255, 255, 255, 0.15); 
    --vidnok-primary: #a855f7;
    --vidnok-secondary: #ec4899;
    --vidnok-text-main: #ffffff; 
    --vidnok-text-muted: #cbd5e1;
    --bg-dark: #0f172a;
}

/* --- 2. RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-dark);
    color: var(--vidnok-text-main);
    line-height: 1.6;
    margin: 0; padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex; flex-direction: column;
}

a { text-decoration: none; transition: 0.3s; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
.vidnok-hidden { display: none; }
.hidden { display: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.5); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.8); }

/* --- 3. BACKGROUND --- */
.vidnok-fixed-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at 50% 50%, #2e1065 0%, #0f172a 100%);
    z-index: -999; pointer-events: none;
}
.vidnok-fixed-bg::before { content: ''; position: absolute; width: 60vw; height: 60vh; background: #a855f7; top: -10%; left: -10%; border-radius: 50%; filter: blur(100px); opacity: 0.5; z-index: -1; animation: vidnokPulse 8s infinite alternate; }
.vidnok-fixed-bg::after { content: ''; position: absolute; width: 60vw; height: 60vh; background: #ec4899; bottom: -10%; right: -10%; border-radius: 50%; filter: blur(100px); opacity: 0.5; z-index: -1; animation: vidnokPulse 8s infinite alternate; }
@keyframes vidnokPulse { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.1); opacity: 0.7; } }

/* --- 4. HEADER --- */
.vidnok-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 70px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 30px; z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--vidnok-border);
}

.vidnok-logo a { font-size: 1.4rem; font-weight: 800; color: white; text-transform: uppercase; }
.vidnok-logo img { height: 35px; width: auto; }

.vidnok-nav { display: flex; gap: 25px; position: absolute; left: 50%; transform: translateX(-50%); }
.vidnok-nav a { color: var(--vidnok-text-muted); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; }
.vidnok-nav a:hover, .vidnok-nav a.active { color: white; text-shadow: 0 0 15px var(--vidnok-primary); }

.vidnok-user-actions { display: flex; align-items: center; gap: 15px; }
.v-welcome-text { font-size: 0.9rem; font-weight: 700; color: white; }
.v-icon-btn { font-size: 1.2rem; color: var(--vidnok-text-muted); cursor: pointer; transition: 0.3s; }
.v-icon-btn:hover { color: #fff; transform: scale(1.1); }
.text-danger:hover { color: #ef4444; }

.vidnok-mobile-trigger { display: none; }

@media (max-width: 900px) {
    .vidnok-nav, .vidnok-user-actions { display: none; }
    .vidnok-header { padding: 0 20px; justify-content: flex-start; }
    .vidnok-mobile-trigger { display: flex; align-items: center; z-index: 1002; }
    .vidnok-logo { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; z-index: 1001; }
    .vidnok-menu-btn { background: rgba(255,255,255,0.1); border: 1px solid var(--vidnok-border); border-radius: 8px; cursor: pointer; padding: 8px 12px; color: white; font-size: 1.2rem; }
}

/* --- 5. SIDEBAR --- */
.vidnok-sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); z-index: 2000; opacity: 0; visibility: hidden; transition: 0.3s; }
.vidnok-sidebar-overlay.active { opacity: 1; visibility: visible; }
.vidnok-mobile-sidebar {
    position: fixed; top: 0; left: 0; height: 100%; width: 280px;
    background: radial-gradient(circle at 0% 0%, #4c1d95 0%, #0f172a 100%);
    border-right: 1px solid var(--vidnok-border);
    z-index: 2001; transform: translateX(-100%); transition: 0.3s;
    padding: 20px; display: flex; flex-direction: column; gap: 15px;
}
.vidnok-mobile-sidebar.active { transform: translateX(0); }
.vidnok-sidebar-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--vidnok-border); padding-bottom: 15px; }
.v-menu-title { font-weight: 800; color: white; letter-spacing: 1px; }
.v-close-btn { color: white; font-size: 1.5rem; cursor: pointer; }
.vidnok-sidebar-links { display: flex; flex-direction: column; gap: 10px; }
.vidnok-sidebar-links a {
    display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 10px;
    color: var(--vidnok-text-muted); font-weight: 600;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.vidnok-sidebar-links a:hover, .vidnok-sidebar-links a.active {
    background: rgba(168, 85, 247, 0.25); color: white; border-color: var(--vidnok-primary);
}
.vidnok-sidebar-links a i { width: 20px; text-align: center; }

/* --- 6. DASHBOARD CONTENT --- */
.vidnok-container {
    max-width: 1200px; width: 100%; margin: 0 auto;
    padding: 100px 20px 40px; flex: 1; display: flex; flex-direction: column;
}

/* --- CARDS GRID --- */
.vidnok-dash-grid {
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px; margin-bottom: 50px;
}

/* Glass Card */
.vidnok-glass-card {
    background: var(--vidnok-glass); 
    border: 1px solid var(--vidnok-border);
    border-radius: 20px; 
    padding: 25px 15px;
    backdrop-filter: blur(15px); transition: 0.3s;
    
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    text-align: center;
    
    min-height: 180px; 
    height: 100%;
    
    border-bottom: 4px solid rgba(255,255,255,0.1); 
    position: relative; overflow: hidden;
    text-decoration: none; color: white;
}

.vidnok-glass-card:hover { 
    transform: translateY(-5px); 
    background: rgba(255,255,255,0.08); 
    box-shadow: 0 0 0 2px var(--vidnok-primary), 0 10px 40px rgba(0,0,0,0.3);
    border-color: transparent;
    border-bottom-color: var(--vidnok-primary);
}

/* Wallet Card */
.v-wallet-card { 
    border-bottom-color: var(--vidnok-primary); 
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), transparent); 
    justify-content: space-between;
}
.v-card-icon { font-size: 2rem; color: var(--vidnok-primary); margin-bottom: 5px; }
.v-card-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.v-amount { font-size: 1.4rem; font-weight: 800; color: white; line-height: 1.2; }
.v-sub-text { font-size: 0.7rem; color: var(--vidnok-text-muted); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

/* Action Button */
.v-btn-sm {
    background: linear-gradient(135deg, var(--vidnok-primary), var(--vidnok-secondary)); 
    color: white; 
    padding: 8px 0;
    width: 90%;
    border-radius: 8px;
    font-size: 0.8rem; font-weight: 800; 
    text-transform: uppercase; letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.4); 
    transition: all 0.3s ease;
    text-decoration: none; display: block;
    margin-top: 10px;
    flex-shrink: 0;
}
.v-btn-sm:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 15px rgba(236, 72, 153, 0.6); 
}

/* Tool Cards */
.v-tool-card { gap: 15px; }
.v-tool-icon { 
    width: 50px; height: 50px; 
    border-radius: 12px; 
    display: flex; align-items: center; justify-content: center; 
    background: rgba(255,255,255,0.08); 
    font-size: 1.5rem;
}
.blue { color: #60a5fa; } .green { color: #4ade80; } .orange { color: #fb923c; }
.v-tool-card span { font-weight: 700; font-size: 1.1rem; }

/* Border Colors */
.v-tool-card:nth-child(2) { border-bottom-color: #60a5fa; }
.v-tool-card:nth-child(2):hover { box-shadow: 0 0 0 2px #60a5fa; border-color: transparent; }

.v-tool-card:nth-child(3) { border-bottom-color: #4ade80; }
.v-tool-card:nth-child(3):hover { box-shadow: 0 0 0 2px #4ade80; border-color: transparent; }

.v-tool-card:nth-child(4) { border-bottom-color: #fb923c; }
.v-tool-card:nth-child(4):hover { box-shadow: 0 0 0 2px #fb923c; border-color: transparent; }

/* --- HISTORY SECTION --- */
.vidnok-section { margin-bottom: 50px; }
.v-sec-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--vidnok-border); }
.v-sec-header h2 { font-size: 1.2rem; font-weight: 700; color: white; margin: 0; }

.v-history-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.v-select { background: rgba(0,0,0,0.3); border: 1px solid var(--vidnok-border); color: white; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.v-btn-outline { background: transparent; border: 1px solid var(--vidnok-border); color: white; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.v-btn-outline:hover { background: white; color: black; }
.v-btn-danger { background: #ef4444; border: none; color: white; padding: 6px 12px; border-radius: 6px; cursor: pointer; }

/* Gallery Grid */
.vidnok-gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
    gap: 15px; max-height: 500px; overflow-y: auto; padding-right: 10px;
}
.vidnok-gallery-item {
    position: relative; aspect-ratio: 1; border-radius: 12px; 
    overflow: hidden; border: 1px solid var(--vidnok-border); 
    background: black; transition: 0.3s;
}
.vidnok-gallery-item img, .vidnok-gallery-item video { width: 100%; height: 100%; object-fit: cover; }
.vidnok-gallery-item:hover { transform: scale(1.02); border-color: var(--vidnok-primary); z-index: 2; }

.v-check-overlay { position: absolute; top: 10px; left: 10px; z-index: 5; display: none; }
.vidnok-gallery-grid.selection-mode .v-check-overlay { display: block; }
.v-item-checkbox { width: 18px; height: 18px; cursor: pointer; }

.v-download-btn {
    position: absolute; bottom: 10px; right: 10px; 
    width: 30px; height: 30px; border-radius: 50%; 
    background: rgba(255,255,255,0.2); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center; 
    color: white; opacity: 0; transition: 0.3s;
}
.vidnok-gallery-item:hover .v-download-btn { opacity: 1; }
.v-download-btn:hover { background: var(--vidnok-primary); }

/* --- ORDERS TABLE --- */
.v-table-wrapper { padding: 0; overflow-x: auto; display: block; }
.vidnok-table { width: 100%; border-collapse: collapse; text-align: left; }
.vidnok-table th { padding: 15px 20px; background: rgba(255,255,255,0.05); color: var(--vidnok-text-muted); font-size: 0.8rem; text-transform: uppercase; }
.vidnok-table td { padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.9rem; color: white; }
.text-primary { color: var(--vidnok-primary); font-weight: bold; }
.text-right { text-align: right; }
.v-status-badge { padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; background: rgba(255,255,255,0.1); }
.v-status-badge.completed { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.v-status-badge.pending { background: rgba(251, 146, 60, 0.2); color: #fb923c; }

.vidnok-empty-state { text-align: center; padding: 40px; color: var(--vidnok-text-muted); border: 2px dashed var(--vidnok-border); border-radius: 12px; }
.vidnok-empty-state i { font-size: 2rem; margin-bottom: 10px; opacity: 0.5; }

/* Responsive */
@media (max-width: 1024px) {
    .vidnok-dash-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .vidnok-dash-grid { grid-template-columns: 1fr; }
    .vidnok-gallery-grid { grid-template-columns: repeat(2, 1fr); max-height: 400px; }
    .v-sec-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

.vidnok-custom-footer { text-align: center; padding: 30px; color: var(--vidnok-text-muted); border-top: 1px solid var(--vidnok-border); margin-top: auto; font-size: 0.9rem; background: rgba(15, 23, 42, 0.3); }

/* Spacing Fix */
.vidnok-dash-wrap {
    padding-top: 20px;
    position: relative;
    z-index: 10;
}