/* CSS VARIABLES */
:root {
    --bg-dark: #0f172a; --bg-card: #1e293b; --text-main: #f8fafc;
    --text-muted: #94a3b8; --accent: #3b82f6; --accent-hover: #2563eb;
    --border: #334155; --danger: #ef4444; --success: #10b981;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif; }
body { background-color: var(--bg-dark); color: var(--text-main); height: 100vh; overflow: hidden; }

/* LOGIN SCREEN */
#login-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; width: 100vw; position: absolute; top: 0; left: 0; z-index: 100; background-color: var(--bg-dark); }
.login-box { background: var(--bg-card); padding: 40px; border-radius: 12px; border: 1px solid var(--border); width: 90%; max-width: 400px; text-align: center; }
.login-box h2 { margin-bottom: 20px; font-weight: 600; }
.login-box input { width: 100%; padding: 12px; margin-bottom: 15px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-dark); color: white; }
.btn-primary { width: 100%; padding: 12px; border: none; border-radius: 6px; font-weight: bold; background: var(--accent); color: white; cursor: pointer; transition: 0.2s; }

/* MAIN APP LAYOUT (FIXED: display: grid instead of display: none) */
#app-container { display: grid; height: 100vh; grid-template-columns: 260px 1fr; position: relative; }

/* SIDEBAR */
.sidebar { background: var(--bg-card); border-right: 1px solid var(--border); padding: 20px; display: flex; flex-direction: column; gap: 15px; transition: transform 0.3s ease; z-index: 40; }
.brand { font-size: 1.2rem; font-weight: bold; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center;}
.nav-item { padding: 12px 15px; border-radius: 8px; cursor: pointer; color: var(--text-muted); display: flex; justify-content: space-between; align-items: center; transition: 0.2s; }
.nav-item:hover, .nav-item.active { background: var(--border); color: var(--text-main); }
.badge { background: var(--accent); color: white; padding: 2px 8px; border-radius: 12px; font-size: 0.8rem; }
.btn-add { background: var(--success); margin-top: 10px; }

/* MAIN STAGE & HEADER */
.main-stage { display: flex; flex-direction: column; height: 100vh; position: relative; width: 100%; }
.header { padding: 20px; border-bottom: 1px solid var(--border); background: var(--bg-dark); display: flex; gap: 15px; align-items: center; }
.search-bar { flex: 1; padding: 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); color: white; outline: none; }
.filter-select { padding: 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); color: white; outline: none; cursor: pointer; }

/* HAMBURGER MENU (MOBILE ONLY) */
.menu-btn { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* MODAL */
#injection-modal { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 50; justify-content: center; align-items: center; }
.modal-content { background: var(--bg-card); width: 95%; max-width: 800px; border-radius: 12px; padding: 20px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 15px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; font-size: 1.2rem; font-weight: bold; }
.close-btn { cursor: pointer; color: var(--text-muted); font-size: 1.5rem; }
#json-input { width: 100%; height: 300px; background: var(--bg-dark); color: var(--success); border: 1px solid var(--border); border-radius: 8px; padding: 15px; font-family: monospace; resize: none; outline: none; }
.modal-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;}

/* MOBILE RESPONSIVE QUERIES */
@media (max-width: 768px) {
    #app-container { grid-template-columns: 1fr; }
    .sidebar { position: absolute; left: 0; top: 0; height: 100vh; width: 260px; transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .menu-btn { display: block; }
    .header { flex-wrap: wrap; }
    .search-bar, .filter-select { width: 100%; flex: none; }
}

.hidden { display: none !important; }
