:root {
    --sidebar-w: 260px;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #0b0f1a;
    --sidebar-bg: #111827;
    --card-bg: #1f2937;
    --input-bg: #0f172a;
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --success: #10b981;
    --error: #ef4444;
    --warn: #f59e0b;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}
h1, h2, h3, .sidebar-brand { font-family: 'Outfit', sans-serif; }
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    flex-shrink: 0;
}
.sidebar-brand {
    padding: 0 24px 32px 24px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-item {
    padding: 12px 24px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}
.nav-item:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.03); }
.nav-item.active {
    color: var(--text-main);
    background: rgba(99, 102, 241, 0.1);
    border-left-color: var(--primary);
}
.main-content { flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; }
header {
    padding: 24px 40px;
    background: rgba(11, 15, 26, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-title h2 { margin: 0; font-size: 1.25rem; }
.content-body { padding: 40px; max-width: 1000px; width: 100%; }
.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-ongoing { background: var(--primary); animation: pulse 1.5s infinite; }
.dot-idle { background: var(--success); }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--border);
    margin-bottom: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.form-group { margin-bottom: 24px; }
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.hint { font-size: 0.8rem; color: #6b7280; margin-top: 8px; display: block; }
.hint a { color: var(--primary); text-decoration: none; font-weight: 500; }
.hint a:hover { text-decoration: underline; }
.input-wrapper { position: relative; display: flex; align-items: center; }
input, textarea, select {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.2s;
    outline: none;
}
input:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); }
textarea { resize: vertical; min-height: 100px; font-family: 'Inter', sans-serif; }
.mono-text { font-family: "JetBrains Mono", monospace; font-size: 0.85rem; }
.toggle-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    color: var(--text-muted);
    user-select: none;
}
.blur-text { filter: blur(8px); transition: filter 0.3s; }
.blur-text:focus { filter: none; }
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}
.btn:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; }
.btn-run { background: #059669; width: 100%; justify-content: center; }
.btn-run:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.mode-toggle {
    display: flex;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}
.mode-btn {
    flex: 1;
    padding: 16px 20px;
    background: var(--input-bg);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
}
.mode-btn.active-mode { background: rgba(99, 102, 241, 0.15); color: var(--text-main); box-shadow: inset 0 -2px 0 var(--primary); }
.users-table { width: 100%; border-collapse: collapse; }
.users-table th { text-align: left; padding: 12px 8px; color: var(--text-muted); font-size: 0.8rem; border-bottom: 1px solid var(--border); text-transform: uppercase; }
.users-table td { padding: 14px 8px; font-size: 0.9rem; border-bottom: 1px dotted var(--border); vertical-align: middle; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }
.badge-active { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-blocked { background: rgba(239,68,68,0.15); color: var(--error); }
.inline-input { width: 50px; padding: 4px 8px; text-align: center; background: var(--input-bg); border: 1px solid var(--border); border-radius: 6px; color: white; }
.user-actions { display: flex; gap: 6px; }
.icon-btn { background: none; border: 1px solid var(--border); color: var(--text-muted); padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.icon-btn.danger:hover { border-color: var(--error); color: var(--error); }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.stat-num { font-weight: 600; color: var(--primary); }
.dev-badge {
    background: var(--warn);
    color: black;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 12px;
}
.log-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.log-table th { text-align: left; padding: 12px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.log-table td { padding: 16px 12px; font-size: 0.9rem; border-bottom: 1px dotted var(--border); }
.log-link { color: var(--primary); text-decoration: none; font-weight: 500; }
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--success);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    display: none;
    z-index: 100;
}
.add-user-row { display: flex; gap: 12px; align-items: center; }
.add-user-row input { flex: 1; }
.section-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; line-height: 1.6; }
