:root {
    --bg: #0a0e17;
    --surface: #111827;
    --surface-light: #1f2937;
    --border: #374151;
    --text: #e5e7eb;
    --text-muted: #9ca3af;
    --accent: #34d399;
    --accent-hover: #6ee7b7;
    --error: #f87171;
    --error-bg: #451a1a;
    --success: #34d399;
    --success-bg: #0d3326;
    --radius: 6px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", ui-monospace, monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navigation */
.nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
}

.nav-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--accent);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
}

.nav-links a:hover {
    color: var(--text);
}

/* Layout */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Auth card (login/register) */
.auth-card {
    max-width: 400px;
    margin: 4rem auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.auth-card h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.auth-footer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Forms */
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    margin-top: 1rem;
}

label:first-of-type {
    margin-top: 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9375rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s;
}

input:focus {
    border-color: var(--accent);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-primary {
    width: 100%;
    margin-top: 1.5rem;
    background: var(--accent);
    color: var(--bg);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font);
    padding: 0;
}

.btn-link:hover {
    color: var(--text);
}

.inline {
    display: inline;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success);
}

/* Headings */
h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* Utilities */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mono { font-family: var(--font-mono); }
