@font-face { font-family: "Inter"; src: url("/static/inter-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/static/space-grotesk-latin-wght.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --midnight: #050b18;
  --frost: #f4f7fa;
  --muted: #5b6878;
  --line: #dbe2ea;
  --card: #ffffff;
  --blue: #54c7f5;
  --green: #5ef2b2;
  --purple: #9b7cff;
  --ink: #0b1526;
  --danger: #c92a2a;
  --danger-bg: #fff0f0;
  --ok: #0c7a4f;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 Inter, system-ui, sans-serif; color: var(--ink); background: var(--frost); }
h1, h2, h3 { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: -0.01em; margin: 0 0 12px; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
a { color: #1c64c8; }
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
nav.side { background: var(--midnight); color: var(--frost); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
nav.side .logo { display: flex; align-items: center; gap: 10px; font-family: "Space Grotesk"; font-weight: 600; margin-bottom: 18px; color: var(--frost); text-decoration: none; }
nav.side .logo img { width: 30px; height: 30px; border-radius: 7px; }
nav.side a.item { color: #c5d0dc; text-decoration: none; padding: 8px 10px; border-radius: 8px; display: flex; justify-content: space-between; }
nav.side a.item:hover, nav.side a.item.on { background: #13203a; color: #fff; }
nav.side .badge { background: var(--green); color: var(--midnight); border-radius: 99px; font-size: 12px; padding: 0 7px; font-weight: 600; }
nav.side .brands { margin-top: 18px; font-size: 13px; color: #8796a8; padding: 0 10px; }
nav.side .brands a { color: #c5d0dc; text-decoration: none; display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
main { padding: 28px 34px 60px; max-width: 1200px; width: 100%; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.bar h1 { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: #b5c1ce; }
.btn.primary { background: var(--midnight); color: #fff; border-color: var(--midnight); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: default; }
label { font-weight: 600; display: block; margin: 14px 0 6px; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; }
input[type=text], input[type=password], input[type=datetime-local], textarea, select { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
textarea { min-height: 160px; resize: vertical; }
[aria-invalid=true] { border-color: var(--danger) !important; background: var(--danger-bg); }
.field-error { color: var(--danger); font-size: 13px; margin: 4px 0 0; }
.summary { border: 1px solid var(--danger); background: var(--danger-bg); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }
.summary h2 { font-size: 16px; color: var(--danger); margin-bottom: 6px; }
.summary ul { margin: 0; padding-left: 20px; }
.flash { background: #e8fbf2; border: 1px solid #9fe3c4; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; }
.flash.bad { background: var(--danger-bg); border-color: #f1b0b0; }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.accounts { display: grid; gap: 8px; }
.acct { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; font-weight: 500; }
.acct img, .avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--line); }
.net { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #eef2f6; color: var(--muted); font-weight: 600; white-space: nowrap; }
.pill.scheduled { background: #e3f4fd; color: #0b6b94; }
.pill.published { background: #e3fbf0; color: var(--ok); }
.pill.failed { background: var(--danger-bg); color: var(--danger); }
.pill.publishing { background: #f0ebff; color: #5a3fc0; }
.media-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.thumb { position: relative; width: 110px; }
.thumb img, .thumb video { width: 110px; height: 138px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #eef2f6; display: block; }
.thumb .ctl { display: flex; justify-content: space-between; margin-top: 4px; }
.thumb button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 13px; padding: 2px 4px; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--muted); cursor: pointer; background: #fff; }
.drop.over { border-color: var(--blue); background: #f0faff; }
.counts { font-size: 12px; color: var(--muted); margin-top: 4px; }
.counts .over { color: var(--danger); font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
.cal .dow { background: #f8fafc; padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cal .day { background: #fff; min-height: 112px; padding: 6px; font-size: 13px; }
.cal .day.other { background: #f8fafc; color: #a3afbd; }
.cal .day.today .num { background: var(--midnight); color: #fff; border-radius: 99px; padding: 0 7px; }
.cal .num { font-weight: 600; display: inline-block; margin-bottom: 4px; }
.cal .add { float: right; text-decoration: none; color: #a3afbd; font-weight: 600; visibility: hidden; }
.cal .day:hover .add { visibility: visible; }
.chip { display: block; text-decoration: none; color: var(--ink); border-left: 3px solid; background: #f4f7fa; border-radius: 4px; padding: 2px 6px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.chip.failed { background: var(--danger-bg); }
.chip.draft { opacity: 0.7; font-style: italic; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.msg { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.msg .who { font-weight: 600; }
.msg .text { white-space: pre-wrap; margin: 4px 0 8px; }
.msg .reply { background: #f4f7fa; border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.msg form textarea { min-height: 70px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); background: #fff; font-size: 14px; }
.tabs a.on { background: var(--midnight); color: #fff; border-color: var(--midnight); }
.muted { color: var(--muted); }
.stat { font-family: "Space Grotesk"; font-size: 28px; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.preview { white-space: pre-wrap; font-size: 14px; }
.login { max-width: 360px; margin: 12vh auto; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-row label { font-weight: 500; margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; background: #fff; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.empty { text-align: center; padding: 30px; color: var(--muted); }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  nav.side { flex-direction: row; flex-wrap: wrap; padding: 10px; }
  nav.side .brands { display: none; }
  main { padding: 18px; }
  .grid2 { grid-template-columns: 1fr; }
  .cal .day { min-height: 70px; }
}
