:root {
  --bg: #F4F6F8;
  --card: #FFFFFF;
  --line: #D5DAE1;
  --line-strong: #8A94A3;
  --ink: #161B22;
  --muted: #55606E;
  --accent: #1D4ED8;
  --accent-soft: #EEF3FF;
  --ok-bg: #E8F1EC;
  --ok: #14532D;
  --warn-bg: #FFF4E5;
  --warn: #7A3A05;
  --warn-line: #C9853A;
  --bad-bg: #FDECEC;
  --bad: #8A1C1C;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', 'Noto Sans Tamil', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

h1 { margin: 0; font-size: 28px; line-height: 1.3; }
h2 { margin: 0; font-size: 17px; }
p { margin: 0; }
a { color: var(--accent); }

button, input, select, textarea { font: inherit; color: inherit; }

.topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { font-size: 18px; font-weight: 700; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: 8px; color: var(--ink); font-weight: 600; text-decoration: none;
}
.nav a[aria-current="page"] { background: var(--ink); color: #FFFFFF; }
.tools { display: flex; align-items: center; gap: 8px; }

.page { max-width: 1240px; margin: 0 auto; padding: 28px 24px 64px; display: flex; flex-direction: column; gap: 24px; }
.lead { color: var(--muted); margin-top: 4px; }
.cols { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.side { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.grow { flex: 1 1 auto; min-width: 0; }

.btn {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--card); font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink);
}
.btn:hover { border-color: var(--ink); }
.btn:disabled { cursor: not-allowed; background: #EEF1F4; color: #5A6370; border-color: var(--line); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn.big { min-height: 52px; font-size: 16px; font-weight: 700; width: 100%; }
.btn.seg[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.btn.quiet { border-color: transparent; background: transparent; }

.field { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--card); max-width: 100%; }
textarea.field { width: 100%; resize: vertical; }
label { font-weight: 600; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: none; }

.drop { align-items: center; text-align: center; padding: 22px 16px; border: 2px dashed var(--line-strong); border-radius: 8px; background: var(--bg); }

.platform { border: 1px solid var(--line-strong); border-radius: 8px; }
.platform.on { border-color: var(--accent); background: var(--accent-soft); }
.platform.off { border-color: var(--line); background: #EEF1F4; color: #5A6370; }
.platform-head { display: flex; align-items: center; gap: 10px; padding: 4px 12px; min-height: 52px; }
.platform-head .check { flex: 1 1 auto; font-weight: 600; }
.platform-list { padding: 0 12px 8px 42px; display: flex; flex-direction: column; }
.platform-list .check { min-height: 36px; }

.note { padding: 12px 14px; border-radius: 8px; }
.note.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.note.ok { background: var(--ok-bg); color: var(--ok); }
.note.bad { background: var(--bad-bg); color: var(--bad); }

.count { font-size: 34px; font-weight: 700; line-height: 1.1; }

.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.badge.pending { background: #E6EAF0; color: #2A3442; }
.badge.running { background: var(--accent-soft); color: #163A9E; }
.badge.published { background: var(--ok-bg); color: var(--ok); }
.badge.failed { background: var(--bad-bg); color: var(--bad); }
.badge.cancelled { background: #E6EAF0; color: #55606E; }
.badge.demo { background: var(--warn-bg); color: var(--warn); }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; min-height: 52px; }
.item.done { background: var(--bg); }
.caption { white-space: pre-wrap; overflow-wrap: anywhere; }
.bar { height: 8px; border-radius: 4px; background: #E3E7EC; overflow: hidden; }
.bar > div { height: 8px; background: var(--accent); }

.login { max-width: 400px; margin: 12vh auto 0; padding: 0 24px; }

.btn.tiny { min-height: 28px; min-width: 28px; padding: 0 6px; font-size: 16px; }
.cal-scroll { overflow-x: auto; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); gap: 6px; min-width: 800px; }
.dow { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: capitalize; padding: 0 4px; }
.day { min-height: 104px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); display: flex; flex-direction: column; gap: 4px; }
.day.empty { border-color: transparent; background: transparent; }
.day.today { border: 2px solid var(--accent); }
.chip { font-size: 12px; line-height: 1.35; padding: 3px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.chip.pending { background: var(--accent-soft); color: #163A9E; }
.chip.published { background: var(--ok-bg); color: var(--ok); }
.chip.failed { background: var(--bad-bg); color: var(--bad); }
.chip.cancelled { background: #E6EAF0; color: #55606E; text-decoration: line-through; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: #EEF1F4; padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; }

.previews { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.pv { margin: 0; display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
.pv .frame { height: 180px; max-width: 100%; background: #161B22; border-radius: 8px; overflow: hidden; }
.pv figcaption { display: flex; flex-direction: column; }
.pv .fits { color: var(--ok); }
.pv .cut { color: var(--warn); font-weight: 600; }
.thumb { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; background: #161B22; flex: none; }
