:root {
    --bg: #f3efe6;
    --ink: #1d1a16;
    --muted: #5e584f;
    --line: #ddd4c4;
    --card: #fffdf8;
    --accent: #0e5f5c;
    --accent-ink: #f7fffe;
    --warn: #8a3b12;
    --ok: #1d6b3a;
    --bad: #8d2430;
    --shadow: 0 10px 30px rgba(60, 42, 20, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(14, 95, 92, 0.08), transparent 32rem),
        var(--bg);
    font: 15px/1.45 "Segoe UI", "Helvetica Neue", sans-serif;
}

code { font-family: Consolas, "Courier New", monospace; font-size: 0.92em; }

.top, .layout { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.top {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    padding: 28px 0 18px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1, h2, h3 { font-weight: 650; letter-spacing: -0.02em; }
h1 { margin: 0; font-size: 32px; }
h2 { margin: 0 0 6px; font-size: 24px; }
h3 { margin: 0 0 12px; font-size: 18px; }

.sandbox-link, button, select, input {
    font: inherit;
}

.sandbox-link, button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    text-decoration: none;
}

.sandbox-link, .primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.secondary, .ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

button:disabled { opacity: 0.6; cursor: wait; }

.layout { display: grid; grid-template-columns: 180px 1fr; gap: 22px; padding-bottom: 48px; }

.nav { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 16px; align-self: start; }

.nav button {
    text-align: left;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
}

.nav button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

.panel-head p, .hint { color: var(--muted); margin: 0; }
.section-gap { margin-top: 28px; }

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.facts div, .card, .output, .map, .log-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.facts div { padding: 12px 14px; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 4px 0 0; font-weight: 650; word-break: break-word; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.card { padding: 16px; display: grid; gap: 10px; align-content: start; }

label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }

input, select {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 10px;
    padding: 8px 10px;
}

.dates, .line, .channels { display: flex; flex-wrap: wrap; gap: 8px; }
.dates label, .line label { flex: 1 1 140px; }
.channels { margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.check input { width: auto; }

.line { align-items: end; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.restrictions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1 1 100%; }

.output { margin-top: 14px; padding: 0; overflow: hidden; }
.output:empty, .map:empty { display: none; }
.step, .call { padding: 14px 16px; border-top: 1px solid var(--line); }
.step:first-child, .call:first-child { border-top: 0; }
.step header, .call header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.badge { border-radius: 999px; padding: 2px 8px; font-size: 12px; background: #eee7dc; }
.badge.ok { background: #e5f6ea; color: var(--ok); }
.badge.bad { background: #fde8ea; color: var(--bad); }

pre {
    margin: 10px 0 0;
    padding: 12px;
    overflow: auto;
    background: #1d1a16;
    color: #f6f1e7;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.45;
}

.webhook { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.webhook code { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }

.table-wrap { overflow: auto; margin-top: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 650; }
.map { padding: 14px 16px; margin-bottom: 12px; }
.plan { margin: 2px 0; }
.room-block { margin-top: 10px; }
.room-block strong { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chips span { background: #efe8db; border-radius: 999px; padding: 3px 8px; font-size: 12px; }

.log-list { display: grid; gap: 10px; }
.log-item { padding: 12px 14px; }
.log-item header { display: flex; justify-content: space-between; gap: 8px; }
.fetch-card, .noshow, .settings { max-width: 640px; }

@media (max-width: 860px) {
    .layout, .grid-2 { grid-template-columns: 1fr; }
    .nav { position: static; flex-direction: row; overflow: auto; }
    .top { align-items: start; flex-direction: column; }
}
