:root { --primary: #a855f7; --secondary: #ec4899; --bg-dark: #0a0414; --sidebar-width: 280px; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg-dark); color: #fff; overflow: hidden; display: flex; height: 100vh; }

/* SIDEBAR & NAV */
.sidebar { width: var(--sidebar-width); background: rgba(10, 4, 20, 0.95); backdrop-filter: blur(30px); border-right: 1px solid rgba(168, 85, 247, 0.2); display: flex; flex-direction: column; padding: 40px 30px; z-index: 1000; flex-shrink: 0; justify-content: space-between; }
.logo-container { text-align: center; margin-bottom: 20px; flex-shrink: 0; }
.server-logo { max-width: 140px; height: auto; filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.4)); transition: 0.3s; }
.server-logo:hover { transform: scale(1.05) rotate(2deg); }
.nav-links { list-style: none; display: flex; flex-direction: column; gap: 15px; flex-grow: 1; overflow-y: auto; margin: 20px 0; }
.nav-item { color: #cbd5e1; text-decoration: none; padding: 12px 15px; border-radius: 12px; transition: 0.3s; display: flex; align-items: center; gap: 15px; cursor: pointer; border-left: 3px solid transparent; }
.nav-item:hover, .nav-item.active { background: rgba(168, 85, 247, 0.15); color: #fff; border-left: 3px solid var(--primary); }
.nav-item i { width: 25px; text-align: center; }
.nav-text-col { display: flex; flex-direction: column; line-height: 1.2; }
.user-settings-bar { padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; }
.settings-btn { background: none; border: none; color: #94a3b8; font-size: 1.5em; cursor: pointer; transition: 0.3s; }
.settings-btn:hover { color: var(--primary); transform: rotate(90deg); }

/* MAIN CONTENT */
#main-content { flex-grow: 1; overflow-y: auto; position: relative; background: radial-gradient(ellipse at top, #1e1b4b 0%, #0a0414 50%); scroll-behavior: smooth; padding:0; }
.page-section { padding: 50px; min-height: 100%; animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* UI ELEMENTS */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 80px; }
.server-title { font-size: 5em; font-weight: 900; background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #8b5cf6 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 10px; }
.home-actions { display: flex; gap: 20px; margin-top: 40px; justify-content: center; flex-wrap: wrap; }
.action-box { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(168, 85, 247, 0.4); padding: 20px 40px; border-radius: 15px; cursor: pointer; transition: 0.3s; text-align: center; color: white; min-width: 250px; text-decoration: none; }
.action-box:hover { background: rgba(168, 85, 247, 0.1); transform: translateY(-5px); border-color: var(--primary); }
.action-value { font-size: 1.4em; font-weight: 700; display: block; }

/* FORMS */
.form-container { max-width: 500px; margin: 0 auto; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1); padding: 40px; border-radius: 20px; }
.form-container.large { max-width: 800px; }
.form-group { margin-bottom: 25px; }
.form-label { display: block; margin-bottom: 10px; color: #cbd5e1; font-weight: 600; }
.form-input, .form-textarea, .form-select { width: 100%; padding: 15px; background: rgba(0,0,0,0.3); border: 1px solid rgba(168, 85, 247, 0.3); border-radius: 10px; color: white; transition: 0.3s; font-family: inherit; }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 10px rgba(168, 85, 247, 0.2); }
.form-textarea { resize: vertical; min-height: 100px; }
.submit-btn { width: 100%; padding: 15px; background: linear-gradient(135deg, var(--primary), var(--secondary)); border: none; border-radius: 10px; color: white; font-weight: 700; cursor: pointer; transition: 0.3s; margin-top: 10px; }
.submit-btn:hover { transform: scale(1.02); box-shadow: 0 0 20px rgba(168, 85, 247, 0.5); }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* AUTH */
.auth-toggle { display: flex; gap: 10px; margin-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.auth-tab { flex: 1; text-align: center; padding: 10px; cursor: pointer; color: #94a3b8; font-weight: 600; transition: 0.3s; }
.auth-tab.active { color: #fff; border-bottom: 2px solid var(--primary); }
.auth-form { display: none; animation: fadeIn 0.3s; }
.auth-form.active { display: block; }

/* DASHBOARD */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 40px; }
.dash-card { background: rgba(255,255,255,0.05); padding: 20px; border-radius: 15px; border-left: 4px solid var(--primary); }
.app-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: rgba(0,0,0,0.2); border-radius: 10px; overflow: hidden; }
.app-table th, .app-table td { padding: 15px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); }
.app-table th { background: rgba(168, 85, 247, 0.2); }
.status-badge { padding: 5px 10px; border-radius: 20px; font-size: 0.8em; font-weight: bold; }
.status-Pending { background: #fbbf24; color: #000; }
.status-Accepted { background: #22c55e; color: #000; }
.status-Denied { background: #ef4444; color: white; }

/* STAFF GRID & LIST */
.grid-container { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; margin-top: 50px; }
.info-card { background: rgba(255,255,255,0.03); padding: 40px; border-radius: 20px; width: 320px; border-top: 4px solid var(--primary); text-align: center; cursor: pointer; transition: transform 0.3s; }
.info-card:hover { transform: translateY(-10px); background: rgba(255,255,255,0.05); }
.info-card i { font-size: 3em; margin-bottom: 20px; color: var(--primary); }
.staff-header-title { text-align: center; margin-bottom: 50px; font-size: 3em; font-weight: 800; }
.staff-category { margin-bottom: 20px; border-radius: 15px; background: rgba(255,255,255,0.02); overflow: hidden; border: 1px solid rgba(255,255,255,0.05); }
.category-header { padding: 20px 30px; background: rgba(255,255,255,0.03); display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.member-list { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; }
.staff-category.open .member-list { max-height: 500px; }
.member-card { padding: 15px 30px; border-top: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: 15px; }
.member-avatar { width: 40px; height: 40px; border-radius: 50%; background: #1e1b4b; display: flex; align-items: center; justify-content: center; font-weight: bold; }

/* MISC */
.center-container { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60vh; text-align: center; }
.center-icon { font-size: 5em; color: var(--secondary); margin-bottom: 30px; animation: float 3s infinite ease-in-out; }
.center-msg { font-size: 2em; font-weight: 700; max-width: 600px; line-height: 1.5; }
.back-btn { padding: 12px 30px; background: transparent; border: 2px solid var(--primary); color: white; border-radius: 10px; cursor: pointer; font-weight: 600; transition: all 0.3s; margin-top: 20px; }
.back-btn:hover { background: var(--primary); }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-20px); } 100% { transform: translateY(0px); } }

/* Mobile */
@media (max-width: 900px) { body { flex-direction: column; overflow-y: auto; height: auto; } .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; padding: 20px; position: relative; } .nav-links { flex-direction: row; margin: 0; width: 100%; justify-content: center; } .nav-item span, .nav-text-col { display: none; } .user-settings-bar { border: none; padding: 0; } }

/* --- MODAL STYLING --- */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.custom-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: linear-gradient(135deg, #1e1b4b 0%, #0a0414 100%);
    border: 2px solid #a855f7;
    margin: auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- STORE STYLES --- */
.store-category {
    margin-bottom: 50px;
    background: rgba(255,255,255,0.02);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.05);
}

.category-title {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(168, 85, 247, 0.3);
}

.category-title h2 {
    font-size: 2em;
    margin: 0;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.store-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.store-item-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.store-item-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.2);
}

.item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.store-item-card h3 {
    font-size: 1.4em;
    margin: 10px 0;
    color: #fff;
}

.store-item-card p {
    color: #94a3b8;
    font-size: 0.9em;
    margin-bottom: 15px;
    flex-grow: 1;
}

.item-price {
    font-size: 1.8em;
    font-weight: bold;
    color: #22c55e;
    margin: 15px 0;
}

.buy-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1em;
}

.buy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

/* ADMIN STORE STYLES */
.admin-category-item {
    background: rgba(255,255,255,0.03);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
}

.admin-category-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(168, 85, 247, 0.3);
}

.action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* FILE INPUT STYLING */
input[type="file"].form-input {
    cursor: pointer;
}

input[type="file"].form-input::-webkit-file-upload-button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 10px;
}

input[type="file"].form-input::-webkit-file-upload-button:hover {
    transform: scale(1.05);
}

/* UPLOAD PROGRESS BAR */
#upload-progress {
    margin: 20px 0;
}

#progress-bar {
    transition: width 0.3s ease;
    position: relative;
}

#progress-text {
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* RESPONSIVE IMPROVEMENTS */
@media (max-width: 768px) {
    .store-items-grid {
        grid-template-columns: 1fr;
    }
    
    .category-title {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-category-item {
        flex-direction: column;
        gap: 15px;
    }
}