:root {
    --primary: #7000ff;
    --primary-glow: rgba(112, 0, 255, 0.4);
    --secondary: #00f2fe;
    --secondary-glow: rgba(0, 242, 254, 0.4);
    --accent: #ff007a;
    --accent-glow: rgba(255, 0, 122, 0.4);
    --bg: #050608;
    --sidebar: #0a0b0e;
    --card: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
.hidden { display: none !important; }

body { 
    background: var(--bg); 
    color: var(--text); 
    height: 100vh; 
    overflow: hidden; 
    position: relative;
}

/* CYBER GLOW BACKGROUND */
body::before {
    content: ''; position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, var(--primary-glow) 0%, transparent 40%),
                radial-gradient(circle at 80% 20%, var(--secondary-glow) 0%, transparent 30%);
    z-index: -1; opacity: 0.25; transform: translate3d(0, 0, 0); pointer-events: none;
}
@keyframes flow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* LOGIN OVERLAY */
.login-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #050608; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
}
.login-card {
    width: 450px; padding: 60px; background: var(--card); border: 1px solid var(--border);
    border-radius: 40px; backdrop-filter: blur(16px); background: rgba(18, 20, 29, 0.85); text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

/* MAIN LAYOUT */
#admin-panel { display: flex; width: 100%; height: 100vh; }

.sidebar {
    width: 320px; background: rgba(10, 11, 14, 0.95); backdrop-filter: blur(16px); background: rgba(10, 11, 14, 0.96);
    border-right: 1px solid var(--border); padding: 50px 25px;
    display: flex; flex-direction: column; gap: 30px; z-index: 100;
    overflow-y: auto; scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.main-content {
    flex: 1; min-width: 0; padding: 40px 30px; overflow-y: auto; overflow-x: hidden; position: relative;
    background: radial-gradient(circle at top right, rgba(112, 0, 255, 0.05), transparent);
}

/* SIDEBAR NAVIGATION */
.nav-links { list-style: none; }
.nav-links li { 
    padding: 18px 25px; border-radius: 20px; cursor: pointer; 
    color: var(--text-dim); font-weight: 800; font-size: 0.9rem;
    display: flex; align-items: center; gap: 18px; margin-bottom: 10px; 
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
}
.nav-links li i { font-size: 1.1rem; width: 25px; text-align: center; transition: 0.3s; }
.nav-links li:hover { background: rgba(255,255,255,0.05); color: #fff; transform: translateX(5px); }
.nav-links li.active { 
    background: var(--card); color: var(--secondary); 
    border: 1px solid rgba(0, 242, 254, 0.2);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4), 0 0 20px rgba(0, 242, 254, 0.1); 
}
.nav-links li.active i { color: var(--secondary); filter: drop-shadow(0 0 8px var(--secondary-glow)); }

/* STATS ROW */
.stats-row { display: flex; justify-content: flex-end; gap: 25px; margin-bottom: 60px; }
.stat-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 30px; 
    padding: 25px; min-width: 140px; text-align: center; backdrop-filter: blur(30px);
    transition: 0.4s; position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.02)); pointer-events: none;
}
.stat-card h3 { font-size: 0.6rem; color: var(--text-dim); letter-spacing: 2.5px; font-weight: 900; margin-bottom: 12px; }
.stat-card h2 { font-size: 2.2rem; font-family: 'Outfit'; font-weight: 900; letter-spacing: -1px; }

/* HOME HEADER */
.home-header { display: flex; align-items: center; gap: 35px; margin-bottom: 60px; }
.home-header h1 { font-family: 'Outfit'; font-size: 5rem; font-weight: 900; letter-spacing: -5px; line-height: 1; }

/* FOLDER GRID */
.folder-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 35px; }
.folder-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 35px; 
    padding: 60px 40px; text-align: center; cursor: pointer; transition: 0.5s;
    position: relative; overflow: hidden;
}
.folder-card:hover { 
    transform: translateY(-10px) scale(1.02); 
    border-color: var(--secondary); 
    background: rgba(255,255,255,0.06);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 30px rgba(0, 242, 254, 0.1);
}
.folder-card i { font-size: 5rem; margin-bottom: 25px; display: block; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3)); }
.folder-card h3 { font-family: 'Outfit'; font-size: 1.4rem; letter-spacing: 2px; font-weight: 900; color: #fff; }

/* ACTIVITY FEED */
.activity-feed { display: flex; flex-direction: column; gap: 20px; }
.activity-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 25px; 
    padding: 20px 25px; display: flex; justify-content: space-between; align-items: center;
    backdrop-filter: blur(20px); transition: 0.3s;
}
.activity-card:hover { background: rgba(255,255,255,0.05); transform: translateX(-5px); }

/* PREMIUM UTILS */
.glass-card { background: var(--card); backdrop-filter: blur(16px); background: rgba(18, 20, 29, 0.85); border: 1px solid var(--border); border-radius: 25px; padding: 30px; }
.btn-pro {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white; border: none; padding: 18px 35px; border-radius: 20px;
    font-weight: 900; cursor: pointer; transition: 0.4s; letter-spacing: 1px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}
.btn-pro:hover { transform: translateY(-5px); box-shadow: 0 20px 40px var(--primary-glow); }

@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.5; } 100% { transform: scale(1); opacity: 1; } }
.live-pulse { width: 12px; height: 12px; background: #00ff88; border-radius: 50%; box-shadow: 0 0 15px #00ff88; animation: pulse 1.5s infinite; }

.section { display: none; animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards; }
.section.active { display: block; }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

.trace-panel {
    background: linear-gradient(135deg, rgba(0,242,254,0.05), rgba(112,0,255,0.05));
    border: 1px solid var(--border); border-radius: 30px; padding: 35px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.trace-item {
    background: rgba(255,255,255,0.02); padding: 12px 15px; border-radius: 15px;
    border: 1px solid var(--border);
}
.res-tag {
    font-size: 0.55rem; padding: 3px 6px; border-radius: 5px; font-weight: 900;
    border: 1px solid var(--border); background: rgba(255,255,255,0.05);
}
.res-tag.active { background: rgba(0,255,136,0.1); color: #00ff88; border-color: rgba(0,255,136,0.3); }

/* GRID & FLEX RESPONSIVE LAYOUTS */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 60px;
}
.wallet-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
}
.trace-stats-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}
.ai-results-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}
.modal-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* MEDIA QUERIES FOR SMALL SCREENS */
@media (max-width: 1200px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .wallet-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 1024px) {
    #admin-panel {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        padding: 20px;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .sidebar p {
        display: none;
    }
    .nav-links {
        display: flex;
        gap: 15px;
        margin: 0 !important;
        padding: 10px 0;
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    .nav-links li {
        margin-bottom: 0;
        white-space: nowrap;
        padding: 12px 20px;
    }
    .main-content {
        padding: 40px 20px;
    }
    .stats-row {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 15px;
        margin-bottom: 40px;
    }
    .stat-card {
        flex: 1;
        min-width: 140px;
    }
    .home-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .home-header h1 {
        font-size: 3.5rem;
        letter-spacing: -2px;
    }
}

@media (max-width: 768px) {
    .folder-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .trace-stats-layout, .ai-results-layout, .modal-grid-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .modal-grid-layout .form-group {
        grid-column: span 1 !important;
    }
    .login-card {
        width: 90%;
        padding: 40px 20px;
    }
    .modal-content {
        width: 95%;
        padding: 30px 15px !important;
    }
}


/* MODAL OVERLAYS */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(3, 4, 6, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 60px 20px;
}
.modal-content {
    background: rgba(10, 11, 14, 0.9);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.6);
}

/* PREMIUM FORM CONTROL STYLES */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}
.form-group label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    transition: 0.3s;
}
.form-group:focus-within label {
    color: var(--secondary);
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 20px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
}
.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
}

/* PREMIUM FILE UPLOAD FIELD */
.form-group input[type="file"] {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 12px 18px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    font-size: 0.85rem;
    outline: none;
    font-weight: 600;
}
.form-group input[type="file"]:hover {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.04);
    color: white;
}
.form-group input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #8E2DE2, #4A00E0);
    border: none;
    border-radius: 10px;
    color: white;
    padding: 8px 16px;
    margin-right: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}
.form-group input[type="file"]::file-selector-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(142, 45, 226, 0.4);
}

/* RESPONSIVE DESIGN FOR MODALS */
@media (max-width: 768px) {
    .modal-content {
        padding: 30px !important;
    }
    .modal-grid-layout {
        grid-template-columns: 1fr !important;
    }
    .modal-content > div[style*="display:flex"],
    .modal-content > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 15px !important;
    }
    .modal-content .btn-pro {
        width: 100% !important;
        height: 60px !important;
        margin-bottom: 10px !important;
    }
}


/* RESPONSIVE TABLE STYLES WITH HORIZONTAL SCROLL */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 25px;
    background: var(--card);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px); background: rgba(18, 20, 29, 0.85);
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}
.table-responsive::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

table {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

thead {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border);
}

th {
    padding: 18px 24px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    text-transform: uppercase;
}

td {
    padding: 18px 24px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #fff;
    vertical-align: middle;
}

tbody tr {
    transition: 0.2s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}


/* ULTRA SMOOTH PAGINATION & CONTROLS */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 20px;
    min-width: 320px;
    flex: 1;
}
.search-input-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    width: 100%;
}
.search-input-box input::placeholder {
    color: var(--text-dim);
}

.sort-select-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 18px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
}
.sort-select-box option {
    background: #0d0f17;
    color: #fff;
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border);
    border-radius: 0 0 25px 25px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dim);
}

.page-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: #fff;
    padding: 8px 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
}
.page-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--secondary);
    transform: translateY(-2px);
}
.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
