:root {
  --bg: #f6f5f1; --card: #ffffff; --text: #1f1f1d; --muted: #6b6a64; --line: #e3e1d9;
  --accent: #2a5bd7; --accent-weak: #e8eefc; --ok: #1d7a4b; --ok-weak: #e3f3ea;
  --warn: #9a5b00; --warn-weak: #fdf1dc; --bad: #b42318; --bad-weak: #fde8e6; --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", "Assistant", Arial, sans-serif; font-size: 16px; line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 16px; }
.narrow { max-width: 560px; }
header.top { background: var(--card); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
header.top .brand { font-weight: 700; font-size: 18px; color: var(--text); }
header.top nav { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; }
header.top nav a { color: var(--muted); }
header.top nav a.on { color: var(--text); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 14px 0; }
h1 { font-size: 24px; margin: 8px 0 6px; } h2 { font-size: 19px; margin: 4px 0 10px; } h3 { font-size: 16px; margin: 4px 0 8px; }
.muted { color: var(--muted); } .small { font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.metric .label { color: var(--muted); font-size: 14px; } .metric .value { font-size: 26px; font-weight: 600; }
.metric.warn { background: var(--warn-weak); } .metric.bad { background: var(--bad-weak); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: right; padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 14px; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 13px; background: #eeede8; }
.badge.active, .badge.published, .badge.ready, .badge.sent { background: var(--ok-weak); color: var(--ok); }
.badge.payment_problem, .badge.held, .badge.encoding, .badge.uploading, .badge.scheduled, .badge.pending { background: var(--warn-weak); color: var(--warn); }
.badge.lapsed, .badge.failed { background: var(--bad-weak); color: var(--bad); }
.badge.manual, .badge.queued, .badge.draft { background: var(--accent-weak); color: var(--accent); }
form.inline { display: inline; }
label { display: block; margin: 10px 0 4px; font-weight: 600; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=datetime-local], input[type=url], textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid #cfcdc4; border-radius: 8px; font: inherit; background: #fff; }
textarea { min-height: 110px; }
button, .btn { display: inline-block; padding: 9px 16px; border-radius: 8px; border: 1px solid #cfcdc4;
  background: #fff; font: inherit; cursor: pointer; color: var(--text); }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--bad); border-color: #f0b4ae; }
button:hover, .btn:hover { filter: brightness(0.97); text-decoration: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--accent-weak); margin: 12px 0; }
.notice.warn { background: var(--warn-weak); } .notice.bad { background: var(--bad-weak); }
.row { display: flex; gap: 14px; flex-wrap: wrap; } .row > * { flex: 1 1 220px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
code.ltr { font-size: 13px; background: #f1f0eb; padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.episode-list a.ep { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.episode-list a.ep:hover { text-decoration: none; background: #faf9f6; }
.player iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: #000; }
audio { width: 100%; }
.apps { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs { display: flex; gap: 6px; margin: 6px 0 12px; }
.tabs a { padding: 6px 12px; border-radius: 8px; color: var(--muted); }
.tabs a.on { background: var(--card); border: 1px solid var(--line); color: var(--text); }
.progress { height: 10px; background: #eeede8; border-radius: 6px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
@media (max-width: 640px) { .hide-sm { display: none; } th, td { padding: 7px 4px; } }
