:root {
    color-scheme: light dark;
    --border: color-mix(in srgb, currentColor 15%, transparent);
    --muted: color-mix(in srgb, currentColor 55%, transparent);
}

body {
    font-family: system-ui, sans-serif;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 16px 48px;
    line-height: 1.5;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 20px 20px;
    margin: 0 -16px 24px;
    background: var(--brand-primary);
    color: #fff;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-logo {
    height: 64px;
    width: auto;
}

.topbar-title {
    font-weight: 600;
    font-size: 2rem;
}

.topbar-account {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.logout-link {
    color: inherit;
    text-decoration: underline;
    opacity: 0.85;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
    margin: 64px auto;
}

.job-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.job-header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.job-description {
    color: var(--muted);
    margin: 8px 0;
}

.job-command {
    margin: 4px 0;
}

.job-command code {
    font-size: 0.85rem;
}

.job-timestamps {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 4px 0 12px;
}

.job-log pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: color-mix(in srgb, currentColor 6%, transparent);
    padding: 12px;
    border-radius: 6px;
    max-height: 320px;
    overflow-y: auto;
    font-size: 0.8rem;
}

.badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 100px;
    white-space: nowrap;
}

.badge-running { background: color-mix(in srgb, var(--brand-accent) 20%, transparent); color: var(--brand-accent-dark); }
.badge-success { background: #2e7d3233; color: #2e7d32; }
.badge-failed { background: #c6282833; color: #c62828; }
.badge-idle { background: color-mix(in srgb, currentColor 10%, transparent); color: var(--muted); }

.job-params {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    max-width: 420px;
}

.job-params label {
    font-size: 0.85rem;
    color: var(--muted);
    display: block;
    margin-bottom: 2px;
}

.job-params input {
    width: 100%;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    background: transparent;
    color: inherit;
}

input,
button {
    padding: 8px 20px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 0.95rem;
}

button {
    cursor: pointer;
    background: var(--brand-accent);
    color: #1a1a1a;
    border-color: transparent;
    font-weight: 600;
}

button:hover:not(:disabled) {
    background: var(--brand-accent-dark);
    color: #fff;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error {
    color: #c62828;
}
