:root {
    --bg: #f4f6f9;
    --card: #ffffff;
    --border: #e2e6ec;
    --text: #1c2530;
    --muted: #6b7785;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --ok: #16a34a;
    --err: #dc2626;
    --wait: #d97706;
}

* { box-sizing: border-box; }

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

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111827;
    color: #fff;
    padding: 12px 24px;
}
.topbar .brand { color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; }
.topbar nav a { color: #cbd5e1; margin-left: 18px; text-decoration: none; }
.topbar nav a:hover { color: #fff; }

.container { max-width: 860px; margin: 24px auto; padding: 0 16px; }

.header-row { display: flex; align-items: center; justify-content: space-between; }
h1 { font-size: 24px; }
h2 { font-size: 18px; margin-top: 0; }
h3 { font-size: 15px; color: var(--muted); margin-bottom: 8px; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 18px;
}
.card.danger { border-color: #f3c2c2; }
.login-card { max-width: 380px; margin: 60px auto; }

label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 14px; }
input, textarea, select {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
}
textarea { resize: vertical; }
.hint { font-size: 12px; color: var(--muted); margin: -6px 0 14px; }

.btn {
    display: inline-block;
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: #f1f5f9; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { color: var(--err); border-color: #f3c2c2; }
.btn.danger:hover { background: #fef2f2; }
.btn.small { padding: 5px 10px; font-size: 13px; }

.inline-form { display: flex; gap: 10px; }
.inline-form input { margin-top: 0; }

.data-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.data-table th, .data-table td {
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: top;
}
.data-table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.data-table.compact td, .data-table.compact th { padding: 6px 8px; font-size: 13px; }
.detail-cell { color: var(--muted); word-break: break-word; max-width: 320px; }

code { background: #eef2f7; padding: 2px 6px; border-radius: 5px; font-size: 13px; }
.hook-url { display: inline-block; word-break: break-all; }
.hook-url.big { font-size: 15px; padding: 8px 12px; }
pre.sample {
    background: #0f172a;
    color: #e2e8f0;
    padding: 14px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
}

.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #e5e7eb;
    color: #374151;
}
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.err { background: #fee2e2; color: var(--err); }
.badge.wait { background: #fef3c7; color: var(--wait); }

.error { color: var(--err); font-weight: 600; }
.muted { color: var(--muted); }
