:root {
    --bg-deep: #050505;
    --bg-card: #0a0a0a;
    --bg-input: #121212;
    --border-dim: #1f1f1f;
    --border-bright: #333333;
    --primary: #6366f1; 
    --text-white: #ffffff;
    --text-gray: #a1a1aa;
    --success: #10b981;
    --danger: #ef4444;
    --font-main: 'Inter', system-ui, sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}



* { box-sizing: border-box; }

body {
    margin: 0; font-family: var(--font-main);
    background-color: var(--bg-deep); color: var(--text-white);
    height: 100vh; overflow: hidden;
}

/* --- popup notifi --- */
.popup-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 200; justify-content: center; align-items: center; animation: fadeIn 0.2s; }
.popup-card { background: #111; border: 1px solid var(--border-bright); padding: 30px; border-radius: 16px; width: 90%; max-width: 320px; text-align: center; box-shadow: 0 10px 40px -10px rgba(0,0,0,0.8); transform: scale(0.9); animation: popScale 0.2s forwards; }
@keyframes popScale { to { transform: scale(1); } }
.popup-icon-area { font-size: 3rem; margin-bottom: 15px; }

/* ---auth main styles --- */
.auth-container { height: 100vh; display: flex; justify-content: center; align-items: center; position: relative; background: #020202; }
.auth-bg-pattern { position: absolute; inset: 0; background-image: radial-gradient(#222 1px, transparent 1px); background-size: 24px 24px; opacity: 0.8; pointer-events: none; }
.auth-glow { position: absolute; width: 600px; height: 600px; background: radial-gradient(circle, rgba(99,102,241,0.15), transparent 70%); top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.auth-panel { position: relative; z-index: 10; width: 100%; max-width: 400px; padding: 40px; background: rgba(10,10,10,0.6); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; animation: floatUp 0.6s ease; }
@keyframes floatUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.logo-icon-container { width: 60px; height: 60px; background: #111; border: 1px solid #333; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px auto; font-size: 1.8rem; }
.auth-header { text-align: center; margin-bottom: 30px; }
.input-group { position: relative; margin-bottom: 16px; }
.input-group i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #555; pointer-events: none; }
.auth-input { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--border-dim); color: white; padding: 12px 12px 12px 40px; border-radius: 8px; transition: 0.2s; }
.auth-input:focus { outline: none; border-color: var(--primary); background: rgba(0,0,0,0.6); }
.btn-login { width: 100%; padding: 12px; background: white; color: black; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; margin-top: 10px; }
.btn-login:hover { background: #f0f0f0; }
.btn-google { width: 100%; padding: 12px; background: transparent; border: 1px solid var(--border-dim); color: #888; border-radius: 8px; cursor: pointer; display: flex; justify-content: center; gap: 10px; }
.btn-google:hover { color: white; border-color: white; }
.divider { display: flex; align-items: center; margin: 20px 0; color: #444; font-size: 0.75rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #222; }
.toggle-link { text-align: center; margin-top: 20px; font-size: 0.85rem; color: #555; }
.toggle-link a { color: #888; cursor: pointer; } .toggle-link a:hover { color: white; }

/* --- dashboard layout --- */
.dashboard-container { display: none; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg-card); border-right: 1px solid var(--border-dim); display: flex; flex-direction: column; padding: 24px; height: 100vh; position: sticky; top: 0; }
.sidebar-profile { display: flex; align-items: center; gap: 12px; padding-bottom: 24px; border-bottom: 1px solid var(--border-dim); margin-bottom: 24px; }
.avatar-circle { width: 36px; height: 36px; background: #111; border: 1px solid #333; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.nav-btn-side { display: flex; align-items: center; gap: 12px; padding: 10px; color: var(--text-gray); cursor: pointer; border-radius: 8px; margin-bottom: 4px; transition: 0.2s; }
.nav-btn-side:hover, .nav-btn-side.active { background: rgba(255,255,255,0.05); color: white; }

.main-content { padding: 40px; overflow-y: auto; max-width: 1200px; margin: 0 auto; width: 100%; height: 100vh; }
.top-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }

/* status badge */
.sys-badge { font-size: 0.75rem; background: rgba(16,185,129,0.1); color: var(--success); padding: 4px 10px; border-radius: 20px; border: 1px solid rgba(16,185,129,0.2); transition: 0.3s; }
.sys-badge.offline { background: rgba(239,68,68,0.1); color: var(--danger); border-color: rgba(239,68,68,0.2); }

.content-view { display: none; animation: fadeIn 0.2s ease; } .content-view.active { display: block; } @keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* --- widget --- */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-box { background: var(--bg-card); border: 1px solid var(--border-dim); padding: 20px; border-radius: 12px; }
.stat-num { font-size: 1.5rem; font-weight: 700; color: white; }
.panel-card { background: var(--bg-card); border: 1px solid var(--border-dim); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.panel-head { padding: 20px; border-bottom: 1px solid var(--border-dim); }
.panel-body { padding: 20px; }

/* --- APP LIST --- */
.app-row { background: var(--bg-card); border: 1px solid var(--border-dim); border-radius: 8px; margin-bottom: 12px; transition: 0.2s; }
.app-row:hover { border-color: var(--border-bright); transform: translateY(-1px); }
.app-row-header { padding: 16px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.app-title { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 0.95rem; }
.app-meta { font-family: var(--font-code); font-size: 0.8rem; color: #666; margin-right: 15px; }
.app-row-details { padding: 20px; border-top: 1px solid var(--border-dim); background: #080808; display: none; }
.app-row.expanded .app-row-details { display: block; }
.secret-box { display: flex; justify-content: space-between; background: #000; border: 1px solid #222; padding: 12px; border-radius: 6px; font-family: var(--font-code); color: #a1a1aa; margin-bottom: 20px; font-size: 0.85rem; }
.copy-icon { cursor: pointer; color: #555; } .copy-icon:hover { color: white; }

/* --- TERMINAL --- */
.terminal-window { background: #0c0c0c; border: 1px solid var(--border-dim); border-radius: 8px; font-family: var(--font-code); margin-top: 20px; overflow: hidden; }
.terminal-bar { background: #151515; padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-dim); }
.terminal-dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ff5f56; } .dot-yellow { background: #ffbd2e; } .dot-green { background: #27c93f; }
.terminal-tabs { display: flex; gap: 15px; font-size: 0.85rem; }
.t-tab { cursor: pointer; color: #666; padding: 2px 0; }
.t-tab.active { color: white; border-bottom: 1px solid var(--primary); }
.terminal-content { padding: 20px; color: #ccc; font-size: 0.85rem; line-height: 1.6; }

/* --- DOWNLOAD CARDS --- */
.download-card { flex: 1; min-width: 200px; background: var(--bg-card); border: 1px solid var(--border-dim); padding: 15px; border-radius: 8px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: 0.2s; }
.download-card:hover { border-color: var(--primary); transform: translateY(-2px); background: #0f0f0f; }
.dl-icon { width: 36px; height: 36px; background: #151515; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #888; }

/* --- ins --- */
.discord-msg-container { display: flex; gap: 15px; margin-bottom: 20px; padding: 10px; border-radius: 8px; transition: 0.2s; }
.discord-msg-container:hover { background: rgba(255,255,255,0.02); }
.discord-avatar { width: 40px; height: 40px; background: #5865F2; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.discord-body { flex: 1; }
.discord-header { font-size: 1rem; font-weight: 500; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.bot-tag { background: #5865F2; font-size: 0.65rem; padding: 2px 4px; border-radius: 4px; line-height: 1; height: 16px; margin-top: 2px; }
.discord-time { font-size: 0.75rem; color: #72767d; font-weight: 400; margin-left: 5px; }
.discord-text { color: #dcddde; font-size: 0.95rem; line-height: 1.4; }
.d-code { background: #2f3136; padding: 2px 4px; border-radius: 3px; font-family: var(--font-code); font-size: 0.85em; }
.discord-block { background: #2f3136; padding: 10px; border-radius: 4px; border-left: 4px solid #202225; font-family: var(--font-code); margin-top: 8px; font-size: 0.85em; color: #dcddde; width: fit-content; }
.discord-file-btn { background: #2f3136; border: 1px solid #202225; padding: 10px 16px; border-radius: 4px; display: flex; align-items: center; cursor: pointer; color: #dcddde; font-size: 0.9rem; transition: 0.2s; }
.discord-file-btn:hover { background: #36393f; border-color: #000; }

/* --- buttons --- */
.btn-primary-sm { background: white; color: black; border: none; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.85rem; }
.btn-ghost-sm { background: transparent; border: 1px solid var(--border-dim); color: #888; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; }
.btn-danger-sm { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--danger); padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; }

.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 100; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal-content { background: var(--bg-card); border: 1px solid var(--border-bright); width: 500px; padding: 24px; border-radius: 12px; }
.user-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-dim); }

/* --- mobile --- */
.mobile-toggle { display: none; }
@media (max-width: 768px) {
    .dashboard-container { grid-template-columns: 1fr; }
    .sidebar { display: none; position: fixed; top: 0; left: 0; height: 100%; width: 260px; z-index: 50; box-shadow: 10px 0 50px black; }
    .sidebar.open { display: flex; }
    .mobile-toggle { display: block; font-size: 1.5rem; cursor: pointer; margin-right: 15px; }
    .main-content { padding: 70px 20px; }
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    display: none;
}

.sidebar-close-btn {
    display: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 49;
    backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
    .dashboard-container { grid-template-columns: 1fr; }
    
    .sidebar { 
        display: none; 
        position: fixed; 
        top: 0; 
        left: 0; 
        height: 100%; 
        width: 260px; 
        z-index: 50; 
        box-shadow: 10px 0 50px #000; 
    }
    
    .sidebar.open { 
        display: flex; 
    }

    .sidebar-overlay.open {
        display: block;
    }

    .sidebar-close-btn {
        display: block;
        position: absolute;
        top: 25px;
        right: 20px;
        font-size: 1.2rem;
        cursor: pointer;
        color: #666;
        transition: 0.2s;
    }
    
    .sidebar-close-btn:hover {
        color: #fff;
    }

    .main-content { padding: 70px 20px; }
}