:root {
    --bg: #ffffff;
    --fg: #1a1a1a;
    --muted: #666666;
    --border: #e0e0e0;
    --accent: #2563eb;
    --accent-fg: #ffffff;
    --danger: #dc2626;
    --success: #16a34a;
    --warn: #d97706;
    --card-bg: #f9fafb;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: var(--fg);
    background: var(--bg);
    margin: 0;
    line-height: 1.5;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

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

.site-header nav a, .site-header nav .link-button {
    margin-left: 1.25rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
}
.site-header nav a:hover, .site-header nav .link-button:hover { color: var(--fg); }

.link-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
h2 { font-size: 1.15rem; margin-top: 2rem; }
p.subtitle { color: var(--muted); margin-top: 0; }

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

label { display: block; font-weight: 600; margin-bottom: 0.3rem; margin-top: 1rem; }
label:first-child { margin-top: 0; }

input[type=text], input[type=email], textarea, select {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.checkbox-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; font-weight: 400; }

button, .button {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-fg);
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.1rem;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    margin-top: 1.25rem;
}
button:hover, .button:hover { opacity: 0.9; }
button.secondary, .button.secondary { background: var(--bg); color: var(--fg); border: 1px solid var(--border); }

table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }
tr:hover { background: var(--card-bg); }
td a { color: var(--accent); text-decoration: none; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}
.badge-created, .badge-detecting, .badge-running { background: #dbeafe; color: #1e40af; }
.badge-awaiting_input { background: #fef3c7; color: #92400e; }
.badge-succeeded { background: #dcfce7; color: #166534; }
.badge-failed, .badge-aborted { background: #fee2e2; color: #991b1b; }
.badge-cancelled { background: #f3f4f6; color: #4b5563; }

.field-row { display: flex; justify-content: space-between; padding: 0.35rem 0; border-bottom: 1px dashed var(--border); font-size: 0.92rem; }
.field-row .k { color: var(--muted); }

.notice { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.92rem; }
.notice-warn { background: #fef3c7; color: #92400e; }
.notice-danger { background: #fee2e2; color: #991b1b; }
.notice-info { background: #dbeafe; color: #1e40af; }

pre {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.85rem;
    white-space: pre-wrap;
}

.muted { color: var(--muted); font-size: 0.88rem; }
