:root {
    --primary: #f8fafc; /* Slate 50 */
    --primary-glow: rgba(248, 250, 252, 0.15);
    --secondary: #94a3b8; /* Slate 400 */
    --accent: #475569; /* Slate 600 */
    --bg-main: #020617; /* Slate 950 */
    --card-bg: rgba(15, 23, 42, 0.7); /* Slate 900 with opacity */
    --card-border: rgba(255, 255, 255, 0.06);
    --text-main: #f1f5f9; /* Slate 100 */
    --text-muted: #94a3b8; /* Slate 400 */
    --danger: #ef4444;
    --success: #10b981;
    --glass-blur: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Premium Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(148, 163, 184, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(71, 85, 105, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 1) 0%, var(--bg-main) 100%);
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 var(--primary-glow); }
    70% { box-shadow: 0 0 0 15px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.fade-in { animation: fadeIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards; }

/* Layout Components */
.glass-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
}

.panel-box {
    width: 100%;
    max-width: 1300px;
    margin: 40px auto;
    padding: 40px;
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    border-radius: 40px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
}

.login-box {
    width: 100%;
    max-width: 440px;
    padding: 50px;
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    border-radius: 40px;
    box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.8);
    position: relative;
}

/* Typography Extensions */
.text-gradient {
    background: linear-gradient(135deg, #f8fafc 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Navigation */
.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 8%;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger {
    padding: 14px 30px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: #f1f5f9;
    color: #0f172a;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: #ffffff;
    box-shadow: 0 12px 25px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: #f1f5f9;
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 30px;
    border-radius: 28px;
    text-align: center;
    transition: all 0.3s;
}

.stat-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-4px);
}

.stat-value {
    font-size: 2.4rem;
    font-weight: 800;
    display: block;
    margin-bottom: 4px;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Dashboard Content */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--card-border);
    border-radius: 32px;
    padding: 35px;
}

.card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Forms */
.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 10px;
    margin-left: 4px;
}

.input-group input, .input-group select {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--card-border);
    padding: 16px 20px;
    border-radius: 18px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.input-group input:focus, .input-group select:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.4);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

th {
    padding: 0 20px 10px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 800;
}

td {
    background: rgba(255, 255, 255, 0.02);
    padding: 18px 20px;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

td:first-child {
    border-left: 1px solid var(--card-border);
    border-radius: 20px 0 0 20px;
}

td:last-child {
    border-right: 1px solid var(--card-border);
    border-radius: 0 20px 20px 0;
}

/* User Dashboard Cards */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.folder-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--card-border);
    border-radius: 35px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.folder-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
}

.folder-banner {
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    gap: 20px;
}

.folder-icon-box {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #f1f5f9, #94a3b8);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #0f172a;
}

.file-row {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--card-border);
    transition: background 0.2s;
}

.file-row:hover { background: rgba(255, 255, 255, 0.01); }

/* Custom Badge */
.badge {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Progress Area */
#progress-area {
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid var(--card-border);
}

/* Banners */
.error-banner, .success-banner {
    padding: 16px 20px;
    border-radius: 18px;
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.4s ease-out;
}

.error-banner { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.success-banner { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }

/* Mobile-First Refinements */
@media (max-width: 768px) {
    .nav-header {
        padding: 15px 20px;
    }
    
    .nav-brand {
        font-size: 1.2rem;
    }

    .hero-section {
        padding: 35px 25px !important;
        margin-bottom: 25px !important;
        border-radius: 25px !important;
    }

    .hero-section h1 {
        font-size: 1.8rem !important;
    }

    .folder-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 5px;
    }

    .folder-card {
        border-radius: 25px;
    }

    .folder-banner {
        padding: 20px;
    }

    .file-row {
        padding: 15px 20px;
        flex-direction: row;
        align-items: center;
    }

    .file-info-text {
        max-width: 140px;
    }

    .btn-primary {
        padding: 10px 18px;
        font-size: 0.75rem;
    }

    /* Bottom Nav for App Feel */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.9);
        backdrop-filter: blur(15px);
        border-top: 1px solid var(--card-border);
        justify-content: space-around;
        padding: 12px 0;
        z-index: 1000;
    }

    .mobile-nav-item {
        color: var(--text-muted);
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.65rem;
        font-weight: 700;
        gap: 4px;
    }

    .mobile-nav-item.active {
        color: var(--text-main);
    }

    .mobile-nav-item i {
        font-size: 1.2rem;
    }

    body {
        padding-bottom: 80px; /* Space for bottom nav */
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}



