:root {
    --bg-dark: #09090b;
    --bg-sidebar: #0c0c0e;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --font-family: 'Inter', sans-serif;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    outline: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

body { background: var(--bg-dark); color: var(--text-main); font-family: var(--font-family); font-size: 14px; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* Layout */
.wrapper { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: var(--bg-sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; height: 100%; z-index: 100; }
.content { flex: 1; margin-left: 260px; padding: 30px; }

/* Sidebar */
.logo { padding: 25px; font-size: 1.2rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.logo i { color: var(--primary); font-size: 1.4rem; }
.nav-menu { flex: 1; padding: 20px 10px; }
.nav-menu a { display: flex; align-items: center; gap: 12px; padding: 12px 15px; color: var(--text-muted); border-radius: 10px; margin-bottom: 5px; font-weight: 500; }
.nav-menu a:hover, .nav-menu a.active { background: rgba(99, 102, 241, 0.1); color: var(--text-main); }
.nav-menu a i { width: 20px; text-align: center; }
.nav-menu a.active i { color: var(--primary); }

.sidebar-footer { padding: 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.admin-info { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; background: var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.info span { display: block; font-weight: 600; font-size: 0.9rem; }
.info small { color: var(--text-muted); font-size: 0.75rem; }
.logout-btn { color: var(--text-muted); padding: 5px; transition: 0.3s; }
.logout-btn:hover { color: var(--danger); transform: translateX(2px); }

/* Components */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
h1 { font-size: 1.8rem; font-weight: 700; }
h2 { font-size: 1.2rem; margin-bottom: 15px; font-weight: 600; }
.glass-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 20px; backdrop-filter: blur(10px); transition: border-color 0.3s; }
.glass-card:hover { border-color: rgba(255,255,255,0.15); }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { display: flex; align-items: center; gap: 20px; }
.stat-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.icon-users { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.icon-shops { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.icon-logs { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.icon-items { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.stat-data h3 { font-size: 1.6rem; font-weight: 700; line-height: 1; margin-bottom: 5px; }
.stat-data p { color: var(--text-muted); margin: 0; }

/* Tables */
.table-container { overflow-x: auto; width: 100%; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { color: var(--text-muted); font-weight: 500; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

.user-info { display: flex; align-items: center; gap: 12px; }
.avatar-sm { width: 32px; height: 32px; background: rgba(255,255,255,0.05); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: var(--text-muted); }
.u-text { display: flex; flex-direction: column; }
.u-text .sub { font-size: 0.75rem; color: var(--text-muted); }

.key-box { background: rgba(0,0,0,0.3); padding: 4px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 1px dashed var(--border); transition: 0.2s; }
.key-box:hover { border-color: var(--primary); }
.key-box code { font-family: monospace; color: var(--primary); }
.key-box i { font-size: 0.8rem; color: var(--text-muted); }

/* Badges & Colors */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-primary { color: var(--primary) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }
.font-bold { font-weight: 700; }

.badge { padding: 4px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; display: inline-block; }
.badge-success { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-pill { background: rgba(99, 102, 241, 0.1); color: var(--primary); padding: 5px 12px; border-radius: 20px; font-weight: 600; font-size: 0.85rem; }
.date-badge { background: rgba(255,255,255,0.05); padding: 6px 12px; border-radius: 8px; color: var(--text-muted); font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }

/* Buttons & Inputs */
.btn-primary { background: var(--primary); color: white; padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; transition: 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-full { width: 100%; }
.btn-glass { background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: white; padding: 8px 16px; border-radius: 8px; cursor: pointer; transition: 0.3s; }
.btn-glass:hover { background: rgba(255,255,255,0.1); border-color: var(--primary); }
.btn-mini { padding: 4px 8px; font-size: 0.8rem; border-radius: 4px; cursor: pointer; border: 1px solid transparent; background: rgba(255,255,255,0.05); color: var(--text-muted); transition: 0.2s; }
.btn-mini:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-mini.danger:hover { background: rgba(239, 68, 68, 0.2); color: var(--danger); border-color: var(--danger); }
.btn-mini.success:hover { background: rgba(34, 197, 94, 0.2); color: var(--success); border-color: var(--success); }

.search-bar { padding: 0; display: flex; align-items: center; background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.search-bar input { background: transparent; border: none; color: white; padding: 10px 15px; flex: 1; min-height: 40px; }
.search-bar button { background: transparent; border: none; color: var(--text-muted); padding: 0 15px; cursor: pointer; min-height: 40px; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 20px; }
.p-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; }
.p-btn:hover { border-color: var(--primary); color: var(--primary); }
.p-info { color: var(--text-muted); font-size: 0.9rem; }

/* Login */
.auth-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: #050507; }
.glow-bg { position: fixed; width: 600px; height: 600px; background: var(--primary); filter: blur(200px); opacity: 0.15; border-radius: 50%; pointer-events: none; }
.login-container { width: 400px; padding: 40px; position: relative; z-index: 2; }
.login-header { text-align: center; margin-bottom: 30px; }
.logo-icon { width: 50px; height: 50px; background: linear-gradient(135deg, var(--primary), #a855f7); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: white; margin: 0 auto 15px; box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.9rem; }
.input-wrapper { position: relative; }
.input-wrapper i { position: absolute; left: 15px; top: 13px; color: var(--text-muted); }
.input-wrapper input { width: 100%; padding: 12px 12px 12px 40px; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 10px; color: white; }
.input-wrapper input:focus { border-color: var(--primary); }
.btn-block { width: 100%; padding: 12px; font-size: 1rem; }
.alert { padding: 12px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem; display: flex; gap: 10px; align-items: center; }
.alert.error { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }

/* Shops Grid */
.shops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.shop-card { padding: 0; overflow: hidden; transition: 0.3s; display: flex; flex-direction: column; }
.shop-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.sc-header { padding: 15px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); font-size: 0.8rem; background: rgba(0,0,0,0.2); }
.server-badge { color: var(--primary); font-weight: 600; }
.uid { color: var(--text-muted); font-family: monospace; }
.sc-user { padding: 20px; text-align: center; flex: 1; }
.sc-avatar { width: 50px; height: 50px; background: var(--bg-sidebar); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; border: 1px solid var(--border); color: var(--text-muted); font-size: 1.2rem; }
.sc-stats { display: flex; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-col { flex: 1; padding: 10px; text-align: center; }
.stat-col:first-child { border-right: 1px solid var(--border); }
.stat-col small { display: block; color: var(--text-muted); font-size: 0.75rem; margin-bottom: 3px; }
.sell b { color: var(--success); }
.buy b { color: var(--primary); }
.shop-card .btn-full { border-radius: 0; border: none; padding: 12px; }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index: 1000; display: none; align-items: center; justify-content: center; }
.modal-window { width: 500px; max-height: 80vh; display: flex; flex-direction: column; padding: 0; background: #121214; }
.modal-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; overflow-y: auto; }
.close-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.2rem; }
.m-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.m-item:last-child { border: none; }
.m-price { font-weight: 700; font-family: monospace; }
.modal-section-title { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; margin: 20px 0 10px; font-weight: 700; }
.modal-section-title:first-child { margin-top: 0; }

/* Dashboard Grids */
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.chart-box { position: relative; height: 300px; width: 100%; }
.analytics-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-full { margin-bottom: 20px; }

@media (max-width: 1000px) {
    .dashboard-grid, .analytics-grid, .grid-2, .vip-grid { grid-template-columns: 1fr !important; }
}

/* Specific elements from pages */
.progress-bar { background: rgba(255,255,255,0.1); border-radius: 4px; height: 6px; width: 100%; margin-top: 5px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 4px; }
.click-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.click-item:last-child { border: none; }
.target-tag { background: rgba(99, 102, 241, 0.1); color: #a5b4fc; padding: 2px 8px; border-radius: 4px; font-family: monospace; font-size: 0.8rem; }
.vip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }