:root {
    --bg: #0f1419;
    --panel: #1a2332;
    --border: #2d3a4d;
    --text: #e8eef5;
    --muted: #8b9cb3;
    --accent: #3d8bfd;
    --danger: #e85d5d;
    --ok: #3dd68c;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
    min-height: 100vh;
}
.top {
    border-bottom: 1px solid var(--border);
    background: var(--panel);
}
.top .inner, .main .inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
}
.top .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.brand {
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}
.top nav a {
    color: var(--muted);
    margin-left: 1rem;
    text-decoration: none;
}
.top nav a:hover { color: var(--accent); }
.main .inner { padding-top: 1.25rem; padding-bottom: 2rem; }
h1 { font-size: 1.35rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; color: var(--muted); font-weight: 600; }
.flash {
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}
.flash.ok { border-color: #2d5c45; background: #14241c; color: #b8f0cf; }
.flash.err { border-color: #5c3030; background: #2a1818; color: #f0c0c0; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
th, td {
    text-align: left;
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid var(--border);
}
th { color: var(--muted); font-weight: 600; }
.btn {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background: var(--accent);
    color: #fff;
}
.btn.secondary { background: #2d3a4d; color: var(--text); }
.btn.danger { background: var(--danger); }
.btn.sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }
label {
    display: block;
    margin: 0.35rem 0 0.15rem;
    font-size: 0.85rem;
    color: var(--muted);
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
textarea {
    width: 100%;
    max-width: 42rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-size: 0.95rem;
}
textarea { min-height: 5rem; max-width: 100%; }
.form-actions { margin-top: 1.25rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.help { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; max-width: 42rem; }
.embed-panel {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.1rem 1.25rem;
    background: var(--panel);
    margin-top: 0.5rem;
}
.embed-panel h2 { margin-top: 0; }
.sync-run-heading { margin: 1rem 0 0.35rem; font-size: 1rem; font-weight: 600; }
pre.sync-log {
    margin: 1rem 0 0;
    padding: 1rem;
    max-height: min(70vh, 32rem);
    overflow: auto;
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

textarea.codebox {
    width: 100%;
    max-width: 100%;
    min-height: 11rem;
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    line-height: 1.4;
    resize: vertical;
}
