:root {
  --green: #1F4A2C; --green-2: #2d6a40; --orange: #F07F1E; --cream: #F8F7F4;
  --ink: #1b1f1c; --muted: #5c655f; --line: #dfe3dc; --card: #ffffff; --bad: #b3261e; --ok: #1e7b34;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --cream: #121513; --ink: #eef1ec; --muted: #a3ada6; --line: #2c332e; --card: #1b201c; --green-2: #7fc793; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--green); color: #fff; }
.top .logo { border-radius: 50%; background: #fff; }
.top .title { flex: 1; min-width: 0; }
.top h1 { margin: 0; font-size: 19px; }
.top .sub { margin: 0; font-size: 13px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.banner { margin: 0; padding: 8px 16px; background: var(--orange); color: #1b1f1c; font-size: 14px; }
main { max-width: 720px; margin: 0 auto; padding: 12px 16px 96px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 12px 0; }
h2 { font-size: 17px; margin: 0 0 8px; }
label { display: block; margin: 8px 0; font-size: 14px; color: var(--muted); }
input, select, textarea { width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--cream); border: 1px solid var(--line); border-radius: 10px; }
textarea { resize: vertical; }
button, .file-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; font: inherit; font-weight: 600; border-radius: 12px; border: 1px solid transparent; cursor: pointer; }
.primary { background: var(--orange); color: #1b1f1c; }
.primary:disabled { opacity: .45; cursor: default; }
.ghost { background: transparent; color: var(--green-2); border-color: var(--line); }
.small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 12px 0; }
.bar.sticky { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); justify-content: flex-end; z-index: 4; }
.chk { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink); }
.chk input { width: auto; margin: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.warn { color: var(--bad); display: block; }
.hint { color: var(--muted); display: block; margin-top: -4px; }
.item { display: grid; grid-template-columns: 120px 1fr; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 12px 0; }
.item.done { border-color: var(--ok); }
.item.error { border-color: var(--bad); }
.item.sending { opacity: .8; }
.media { position: relative; }
.thumb { width: 120px; height: 160px; object-fit: cover; border-radius: 10px; background: #000; display: block; }
.badge { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.fields { min-width: 0; }
.fields .preset { margin-top: 0; font-size: 14px; padding: 8px 10px; }
.fields textarea { margin-top: 8px; }
.msg { margin: 6px 0; font-size: 14px; }
.item.done .msg { color: var(--ok); font-weight: 600; }
.item.error .msg { color: var(--bad); }
.sched { list-style: none; margin: 0; padding: 0; }
.sched li { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.sched li:first-child { border-top: 0; }
.sched li.muted { display: block; }
.sched p { margin: 2px 0 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.mini { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--line); display: block; }
summary { cursor: pointer; font-weight: 600; }
#toast { position: fixed; left: 16px; right: 16px; bottom: 76px; margin: 0 auto; max-width: 560px; padding: 12px 14px; border-radius: 12px; background: var(--green); color: #fff; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 10; }
#toast.show { opacity: 1; }
#toast.bad { background: var(--bad); }
@media (max-width: 420px) {
  .item { grid-template-columns: 96px 1fr; }
  .thumb { width: 96px; height: 128px; }
}

/* ---- Sắp đăng ---- */
.next-card { border-color: var(--orange); }
.next { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start; }
.next-img { width: 112px; height: 140px; object-fit: cover; border-radius: 10px; background: var(--line); display: block; }
.next .count { margin: 0; font-size: 22px; font-weight: 700; color: var(--orange); }
.next .when-big { margin: 2px 0 6px; font-weight: 600; }
.next .cap { margin: 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.soon { margin: 10px 0 0; }
.push-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.push-row .bell { font-weight: 600; flex: 1 1 100%; }
.push-row .lead { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink); }
.push-row .lead select { width: auto; margin: 0; padding: 6px 8px; }
.row.head { margin: 16px 0 4px; }
.row.head h2 { margin: 0; }
.label { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fields .row { gap: 6px; }
.fields .row span { display: flex; gap: 6px; flex-shrink: 0; }
.msg.bad { color: var(--bad); }
.bar.sticky .file-btn { flex: 0 0 auto; }
.bar.sticky #btn-submit { flex: 1 1 auto; max-width: 320px; }
