:root {
  --ink: #111;
  --muted: #5e5e5e;
  --line: #e4e4e4;
  --fog: #f4f4f4;
  --blue: #00b4ea;
  --paper: #fff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: Onest, "Segoe UI", sans-serif;
  font-size: 15px;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 180, 234, 0.14), transparent 36%),
    var(--fog);
}
.card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.06);
}
.brand { font-family: Unbounded, Onest, sans-serif; font-weight: 600; letter-spacing: -0.03em; font-size: 22px; text-decoration: none; }
.tabs { display: flex; gap: 8px; margin: 18px 0; }
.tabs button, .btn, .ghost {
  min-height: 40px;
  border-radius: 12px;
  border: 1.6px solid #111;
  background: #fff;
  padding: 0 14px;
  font-weight: 600;
}
.tabs button.on, .btn { background: #111; color: #fff; }
.btn.blue { background: var(--blue); border-color: var(--blue); }
.ghost { background: transparent; }
.field { display: grid; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.field[hidden] { display: none; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 44px;
  border: 1.6px solid #d5d5d5;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.field textarea { min-height: 90px; resize: vertical; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fine { color: var(--muted); font-size: 13px; line-height: 1.45; }
.err { color: #b42318; font-size: 14px; margin-top: 10px; }
.shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; align-items: start; }
.side {
  background: #111; color: #fff; padding: 22px 16px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; align-self: start; height: 100vh; max-height: 100vh; overflow: auto;
}
.nav-label {
  margin: 16px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(255,255,255,.42);
}
.shell.slim .nav-label { display: none; }
.side button.nav, #fold, #logout { display: flex; align-items: center; gap: 12px; width: 100%; position: relative; font-size: 15px; }
.dot { margin-left: auto; background: var(--blue); color: #fff; border-radius: 99px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; font-style: normal; display: grid; place-items: center; }
.dot[hidden] { display: none; }
.shell.slim .dot { position: absolute; top: 6px; right: 8px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; }
.side svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.shell { transition: grid-template-columns .25s ease; }
.shell.slim { grid-template-columns: 84px minmax(0, 1fr); }
.shell.slim .nav span, .shell.slim .brand span:last-child, .shell.slim #fold span, .shell.slim #logout span { display: none; }
.shell.slim .side { align-items: center; padding-left: 10px; padding-right: 10px; }
.shell.slim .nav, .shell.slim #fold, .shell.slim #logout { justify-content: center; padding-left: 0; padding-right: 0; }
#screen.enter { animation: enter .4s ease; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.kpi, .channel, .tariff, .video { animation: enter .45s ease both; }
.stack { display: grid; gap: 8px; margin-top: 14px; }
.stack .btn, .stack .ghost { width: 100%; }
.compose-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.step { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.step h2 { font-family: Unbounded, Onest, sans-serif; font-size: 18px; letter-spacing: -0.03em; margin-bottom: 6px; }
.dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.dest-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fafafa; }
.dest-card b { display: block; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pick {
  display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #d0d0d0; border-radius: 999px;
  padding: 7px 12px; background: #fff; font-weight: 700; cursor: pointer;
}
.pick input { accent-color: #111; width: 16px; height: 16px; }
.pick.on, .pick:has(input:checked) { background: #111; color: #fff; border-color: #111; }
.empty-dest { border: 1.5px dashed #ccc; border-radius: 14px; padding: 16px; display: grid; gap: 10px; justify-items: start; }
.file-pick { display: flex; align-items: center; gap: 12px; margin-top: 8px; position: relative; }
.file-pick input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.file-pick .name { overflow-wrap: anywhere; }
.stage-preview.is-empty { background: #f7f7f7; border: 1.5px dashed #d0d0d0; min-height: 240px; }
.stage-preview.is-empty .fine { color: var(--muted); }
.stage-preview video[hidden] { display: none; }
.stage-preview {
  margin-top: 12px; min-height: 220px; max-height: 560px; border-radius: 16px; overflow: hidden;
  background: #161616; display: grid; place-items: center;
}
.stage-preview video { width: 100%; height: auto; max-height: 560px; object-fit: contain; background: #161616; display: block; }
.stage-preview.tall { max-width: 360px; margin-left: auto; margin-right: auto; }
.stage-preview.wide video { width: 100%; }
.stage-preview .fine { color: rgba(255,255,255,.75); padding: 16px; text-align: center; }
.btn, .ghost, .suggest, .account, .nav {
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.16); background: #2b2b2b; }
.ghost:hover { transform: translateY(-2px); background: #111; color: #fff; box-shadow: 0 8px 18px rgba(0,0,0,.08); }
.suggest:hover { transform: translateY(-2px); background: #111; color: #fff; }
.account:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.18); }
.side .nav:hover { transform: translateX(4px); }
.shell.slim .nav:hover { transform: none; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal .dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding-bottom: 2px; }
.cal-empty { min-height: 72px; }
.cal-day {
  min-height: 78px; border-radius: 14px; border: 1px solid var(--line); background: #fff;
  padding: 8px 8px 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
.cal-day .num { font-weight: 700; font-size: 15px; }
.cal-day .marks { display: flex; gap: 4px; min-height: 8px; }
.cal-day .marks i, .cal-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cal-day .marks i.wait, .cal-legend i.wait { background: var(--blue); }
.cal-day .marks i.done, .cal-legend i.done { background: #111; }
.cal-day .marks i.draft, .cal-legend i.draft { background: #c8c8c8; }
.cal-legend i.today { box-shadow: inset 0 0 0 1.5px var(--blue); background: transparent; }
.cal-day em { margin-top: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-day.weekend { background: #fafafa; }
.cal-day.past .num { color: #9a9a9a; }
.cal-day.today { box-shadow: inset 0 0 0 1.6px var(--blue); }
.cal-day.on { background: #111; color: #fff; border-color: #111; }
.cal-day.on .num, .cal-day.on em { color: #fff; }
.cal-day.on .marks i.done { background: #fff; }
.cal-day.on .marks i.draft { background: rgba(255,255,255,.55); }
.cal-day.on.today { box-shadow: inset 0 0 0 2px var(--blue); }
.cal-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.cal-head h2 { font-family: Unbounded, Onest, sans-serif; font-size: 26px; letter-spacing: -0.03em; text-transform: capitalize; margin-right: auto; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 12px; color: var(--muted); font-size: 13px; font-weight: 700; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-panel { margin-bottom: 4px; }
.next-post {
  margin-top: 12px; width: 100%; text-align: left; border: 1px solid var(--line); background: #f7fbfe;
  border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px;
}
.next-post span, .next-post em { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 700; }
.next-post b { font-size: 16px; }
.agenda { display: grid; gap: 8px; }
.agenda-head { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin: 16px 0 8px; }
.agenda-head h2 { font-family: Unbounded, Onest, sans-serif; font-size: 22px; letter-spacing: -0.03em; text-transform: capitalize; }
.slot { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 12px; }
.slot time { display: grid; }
.slot time b { font-size: 18px; }
.slot time span { font-size: 12px; color: var(--muted); font-weight: 700; }
.cal-day { transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.next-post { transition: transform .18s ease, box-shadow .18s ease; }
.next-post:hover, .cal-day:hover { transform: translateY(-2px); }
.custom-caps { display: grid; gap: 8px; margin-top: 8px; }
.custom-caps[hidden], [data-cap-wrap][hidden] { display: none; }
.filter-bar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 12px; }
.filter-bar select { min-height: 40px; border-radius: 10px; border: 1.6px solid #d5d5d5; padding: 0 10px; margin-left: 8px; }
.side a, .side button.nav, #fold, #logout {
  color: #fff; text-decoration: none; text-align: left; background: transparent; border: 0;
  border-radius: 12px; padding: 12px 14px; font-weight: 600;
}
.mark { width: 26px; height: 26px; border-radius: 8px; background: #fff; color: #111; display: none; place-items: center; font-weight: 700; }
.shell.slim .mark { display: grid; }
.side a.on, .side button.nav.on, .side a:hover, .side button.nav:hover { background: rgba(255,255,255,.08); }
.side .brand { padding: 6px 12px 16px; }
a.studio-credit {
  display: block; margin: 10px 4px 0; padding: 10px 8px 2px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.32); font-size: 11px; font-weight: 500;
  letter-spacing: 0.02em; text-decoration: none; background: transparent;
}
.side a.studio-credit:hover { background: transparent; color: rgba(255,255,255,.62); transform: none; }
.shell.slim a.studio-credit { font-size: 9px; line-height: 1.25; text-align: center; padding-left: 0; padding-right: 0; }
.side .spacer { flex: 1; }
.main { padding: 22px; min-width: 0; }
.top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.top h1 { font-family: Unbounded, Onest, sans-serif; font-size: 28px; letter-spacing: -0.03em; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.channel, .video, .stat, .plan {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff;
}
.channel b, .video h3 { display: block; }
.tag, .suggest {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 4px 10px; background: var(--fog); font-size: 13px; font-weight: 600;
}
.suggest { border: 1px solid #111; background: #fff; }
.tag button { border: 0; background: transparent; color: var(--muted); }
.checks { display: grid; gap: 8px; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; background: rgba(17,17,17,.45); display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal .panel { width: min(480px, 100%); }
.toast {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  background: #111; color: #fff; border-radius: 10px; padding: 10px 14px; opacity: 0; pointer-events: none;
}
.toast.show { opacity: 1; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 8px; background: var(--fog); }
.pill.bad { background: #ffe4e1; color: #9f1239; }
.pill.ok { background: #e7f8ee; color: #067647; }
.pill.wait { background: #fff4d6; color: #8a5a00; }
.ticket-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 12px; align-items: start; }
.ticket-list { display: grid; gap: 8px; }
.ticket { text-align: left; width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 12px; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.ticket:hover { transform: translateY(-2px); border-color: #111; box-shadow: 0 8px 18px rgba(0,0,0,.08); }
.ticket.on { border-color: #111; }
.ticket b { display: block; }
.bubbles { display: grid; gap: 8px; max-height: 420px; overflow: auto; margin-top: 14px; padding-right: 4px; }
.bubble { max-width: min(520px, 88%); border-radius: 14px; padding: 10px 12px; background: var(--fog); }
.bubble p { margin-top: 4px; white-space: pre-wrap; }
.bubble.me { margin-left: auto; background: #111; color: #fff; }
.bubble .fine { color: inherit; opacity: .72; }
.account {
  display: flex; align-items: center; gap: 10px;
  background: #111; color: #fff; border: 0; border-radius: 14px;
  padding: 6px 8px 6px 6px; min-height: 52px;
}
.avatar {
  width: 40px; height: 40px; border-radius: 12px; background: var(--blue); color: #fff;
  display: grid; place-items: center; font-family: Unbounded, Onest, sans-serif; font-weight: 600;
}
.account-text { display: grid; text-align: left; line-height: 1.15; }
.account-text b { font-size: 14px; }
.account-text small { color: rgba(255,255,255,.72); font-size: 12px; }
.account-balance { background: #fff; color: #111; border-radius: 10px; padding: 8px 10px; font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.kpi span { color: var(--muted); font-size: 12px; font-weight: 700; }
.kpi b { display: block; margin-top: 4px; font-family: Unbounded, Onest, sans-serif; font-size: 26px; letter-spacing: -0.04em; }
.dash { display: grid; grid-template-columns: 1.3fr .7fr; gap: 12px; margin-top: 12px; }
.dash h2, .block-title, .tariff h3, .billing-head h2 { font-family: Unbounded, Onest, sans-serif; letter-spacing: -0.03em; font-size: 22px; }
.block-title { font-size: 22px; margin: 16px 0 8px; }
.bars { height: 180px; display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; margin-top: 12px; }
.bar-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; }
.bar-col i { display: block; width: 100%; border-radius: 7px 7px 0 0; background: #111; min-height: 4px; }
.bar-col:nth-child(3n) i { background: var(--blue); }
.bar-col span { font-size: 10px; color: var(--muted); }
.splits { display: grid; gap: 12px; margin-top: 12px; }
.split { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-weight: 700; }
.split i { grid-column: 1 / -1; height: 6px; background: #eee; border-radius: 99px; overflow: hidden; }
.split em { display: block; height: 100%; background: #111; }
.mini { display: flex; gap: 10px; margin-top: 8px; }
.mini span { display: grid; font-size: 11px; color: var(--muted); }
.mini b { color: #111; font-size: 16px; }
.tariff { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.tariff.featured { outline: 1.6px solid #111; }
.tariff ul { margin: 0; padding: 0; list-style: none; }
.tariff li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.price { font-family: Unbounded, Onest, sans-serif; font-size: 32px; letter-spacing: -0.04em; }
.price small { font-family: Onest, sans-serif; font-size: 13px; color: var(--muted); letter-spacing: 0; }
.billing-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 4px; }
.ghost.on { background: #111; color: #fff; }
.billing-head input, .billing-head select { min-height: 40px; border-radius: 10px; border: 1.6px solid #d5d5d5; padding: 0 10px; }
@media (max-width: 1100px) {
  .compose-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell, .grid2, .grid3, .ticket-layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; max-height: none; flex-direction: row; flex-wrap: wrap; }
  .kpis, .dash { grid-template-columns: 1fr 1fr; }
  .billing-head { flex-direction: column; align-items: stretch; }
}
