:root {
    --bg: #0f1419;
    --card: #1a2332;
    --text: #e7ecf3;
    --muted: #9aa8bc;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --danger: #ef4444;
    --border: #2d3a4f;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

.brand { color: var(--text); font-weight: 700; text-decoration: none; font-size: 1.2rem; }
.nav-links a { color: var(--muted); margin-left: 1rem; text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.user { margin-left: 1rem; color: var(--muted); }

.container { max-width: 1100px; margin: 2rem auto; padding: 0 1rem; }
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card.narrow { max-width: 420px; margin: 4rem auto; }

h1, h2 { margin-top: 0; }
.header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }

label { display: block; margin-bottom: 1rem; color: var(--muted); }
input, select, button {
    font: inherit;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #111827;
    color: var(--text);
}
button, .btn-primary {
    cursor: pointer;
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}
button:hover { background: var(--accent-hover); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.6rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.stat { font-size: 2rem; font-weight: 700; color: var(--accent); }
.alert.error { background: rgba(239,68,68,0.15); color: #fca5a5; padding: 0.75rem; border-radius: 6px; margin-bottom: 1rem; }
.alert.success { background: rgba(34,197,94,0.15); color: #86efac; padding: 0.75rem; border-radius: 6px; margin-bottom: 1rem; }
.alert.warn { background: rgba(234,179,8,0.15); color: #fde047; padding: 0.75rem; border-radius: 6px; margin-bottom: 1rem; }
.form-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin-bottom: 1rem; }
.hidden { display: none; }
.footer { text-align: center; color: var(--muted); padding: 2rem; font-size: 0.85rem; }
code { background: #111827; padding: 0.15rem 0.4rem; border-radius: 4px; }

.hotkey-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    cursor: pointer;
}
.hotkey-item:hover { border-color: var(--accent); }
.hotkey-item.selected { border-color: var(--accent); background: rgba(59,130,246,0.1); }
