:root {
    --bg: #0a0a0a;
    --surface: #161616;
    --border: #2a2a2a;
    --text: #e0e0e0;
    --muted: #888;
    --accent: #1d9bf0;
    --green: #00c853;
    --red: #ff4444;
    --yellow: #ffab00;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
}

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

.nav-brand {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

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

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

main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

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

h1 { font-size: 1.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.2rem; margin-bottom: 0.75rem; }

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.form-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

input[type="url"], input[type="text"], select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
}

small {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
}

.btn:hover { opacity: 0.9; }
.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.85rem; }

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending { background: #333; color: var(--muted); }
.status-badge.running { background: #1a3a5c; color: var(--accent); }
.status-badge.done { background: #1a3a1a; color: var(--green); }
.status-badge.failed { background: #3a1a1a; color: var(--red); }
.status-badge.cancelled { background: #333; color: var(--muted); }
.status-badge.stopped { background: #3a3a1a; color: #e6c619; }

table {
    width: 100%;
    border-collapse: collapse;
}

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

th { color: var(--muted); font-weight: 500; }
td a { color: var(--accent); text-decoration: none; }
.url-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.progress-log {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    font-family: "JetBrains Mono", "Fira Code", monospace;
    font-size: 0.8rem;
    line-height: 1.6;
}

.progress-line { color: var(--muted); }
.progress-line:last-child { color: var(--text); }

.job-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }
.btn-warning { background: #b8860b; }
.btn-danger { background: #c0392b; }
.btn-warning:hover { background: #9a7209; }
.btn-danger:hover { background: #a93226; }

.muted { color: var(--muted); font-size: 0.85rem; margin-top: 0.5rem; }
.error { color: var(--red); margin-top: 0.5rem; }

.cookie-status { margin: 1rem 0; }
.job-info p { margin-bottom: 0.5rem; }

@media (max-width: 600px) {
    main { margin: 1rem auto; }
    .card { padding: 1rem; }
    .nav-links a { margin-left: 1rem; }
}
