:root { color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; font-family: ui-sans-serif, system-ui, sans-serif; background: #0e0e10; color: #eee; }
img { max-width: 100%; height: auto; }
header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid #2a2a2e; }
nav a { color: #9cd; margin-left: 1rem; text-decoration: none; }
.card { width: min(22rem, calc(100% - 2rem)); margin: 8vh auto; padding: 1.5rem; background: #18181b; border-radius: 12px; }
.login { text-align: center; }
.login h1 { font-size: 1.35rem; margin: 0.4rem 0; }
.brand-lockup { margin: 0 0 1rem; }
.brand-logo { width: 7.5rem; max-width: 42vw; height: auto; display: block; margin: 0 auto 0.6rem; background: transparent; }
.brand-name { letter-spacing: 0.28em; font-size: 0.95rem; font-weight: 700; margin: 0 0 0.35rem; color: #e8e4d9; }
.login form { text-align: left; }
label { display: block; margin: 0.75rem 0; font-size: 0.9rem; }
input { width: 100%; margin-top: 0.3rem; padding: 0.5rem; border-radius: 6px; border: 1px solid #333; background: #111; color: #eee; }
button { margin-top: 0.75rem; padding: 0.55rem 1rem; border: 0; border-radius: 6px; background: #3b82f6; color: #fff; cursor: pointer; }
.muted { color: #9a9aa3; }
.tiny { font-size: 0.8rem; }
.eyebrow { letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; color: #888; }
.brands { list-style: none; padding: 0; }
.brands li { margin: 0.75rem 0; padding: 1rem; background: #18181b; border-radius: 10px; display: grid; gap: 0.25rem; }
.brands a { color: inherit; text-decoration: none; display: grid; gap: 0.25rem; }
.brands span, .soon span { color: #9a9aa3; font-size: 0.9rem; }
.brands .btnrow { margin-top: 0.7rem; }
.brand-row { display: flex; gap: 1rem; align-items: flex-start; }
.brand-mark { width: 4.5rem; height: 4.5rem; flex-shrink: 0; object-fit: contain; background: #0e0e10; border-radius: 8px; padding: 0.25rem; }
.brand-mark.ph { display: flex; align-items: center; justify-content: center; color: #666; font-size: 0.7rem; text-align: center; }
.brand-main { min-width: 0; flex: 1; display: grid; gap: 0.25rem; }
.chips-net { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.35rem 0 0; }
.chip { font-size: 0.72rem; padding: 0.15rem 0.45rem; border-radius: 999px; border: 1px solid #333; color: #aaa; }
.chip.live { border-color: #2a7a4a; color: #8fd9a8; background: #13291c; }
.chip.listed { border-color: #8a7a2a; color: #e6d48a; background: #2a2614; }
.chip.soon { opacity: 0.7; }
.chips-net .chip {
  display: inline-block;
  width: auto;
  margin: 0;
  text-align: center;
  text-decoration: none;
  background: transparent;
}
.chips-net .chip.live { background: #13291c; }
.chips-net .chip.listed { background: #2a2614; }
.chips-net a.chip-link { cursor: pointer; }
.chips-net a.chip-link:hover { filter: brightness(1.2); }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.kit-card { background: #18181b; border-radius: 10px; padding: 0.75rem; }
.kit-card img {
  width: 100%; height: 7rem; object-fit: contain; border-radius: 6px;
  background:
    linear-gradient(45deg, #2a2a30 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(45deg, transparent 75%, #2a2a30 75%) 0 0 / 12px 12px,
    linear-gradient(45deg, transparent 75%, #2a2a30 75%) 6px 6px / 12px 12px,
    linear-gradient(45deg, #2a2a30 25%, #16161a 25%) 6px 6px / 12px 12px;
}
.kit-card a { color: #9cd; }
.kit-file { display: flex; align-items: center; justify-content: center; min-height: 7rem; font-weight: 700; letter-spacing: 0.08em; }
.kit-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 0.6rem; margin: 0.75rem 0 1.2rem; }
.kit-swatch { min-height: 5.5rem; border-radius: 10px; padding: 0.7rem; display: flex; align-items: end; font-size: 0.78rem; line-height: 1.3; color: #fff; }
.kit-swatch.light { color: #191d1e; border: 1px solid #333; }
.kit-list { padding-left: 1.2rem; max-width: 46rem; }
.kit-list li { margin: 0.3rem 0; }
.top a { color: #9cd; text-decoration: none; margin: 0 0 0.35rem; }
.soon { opacity: 0.55; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.4rem; border-bottom: 1px solid #2a2a2e; vertical-align: top; }
code { font-size: 0.85em; }
.app-body { display: flex; min-height: 100vh; }
.rail { width: 13rem; flex-shrink: 0; background: #141416; padding: 1.2rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.rail-logo { width: 4.25rem; max-width: 4.25rem; height: auto; display: block; margin: 0 auto 0.4rem; }
.rail-name { text-align: center; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.75rem; margin: 0 0 1rem; color: #c9a227; }
.rail nav { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.rail nav button { background: transparent; color: #ccc; text-align: left; margin: 0; border-radius: 8px; }
.rail nav button.on, .rail nav button:hover { background: #2a2a30; color: #fff; }
.rail nav .nav-end { margin-top: auto; border: 1px solid #333; }
.rail-foot { margin-top: 0.6rem; }
.manual { max-width: 42rem; line-height: 1.5; }
.manual h1 { font-size: 1.5rem; }
.manual h2 { margin-top: 1.4rem; font-size: 1.1rem; color: #c9a227; }
.manual h3 { margin-top: 1rem; font-size: 1rem; }
.manual ul { padding-left: 1.2rem; }
.manual li { margin: 0.25rem 0; }
.manual table { width: 100%; margin: 0.6rem 0; font-size: 0.9rem; }
.stage { flex: 1; min-width: 0; }
.top { display: flex; gap: 1rem; align-items: end; padding: 1rem 1.5rem; border-bottom: 1px solid #2a2a2e; }
.top label { margin: 0; }
.top input, .top select { width: auto; min-width: 12rem; }
#view { padding: 1.25rem 1.5rem 3rem; max-width: 72rem; }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } .app-body { flex-direction: column; } .rail { width: auto; } }
.cardlet { background: #18181b; border-radius: 12px; padding: 1rem; margin: 0.75rem 0; cursor: pointer; }
form.cardlet { cursor: default; }
.meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.4rem; }
.st, .net, .pill { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.15rem 0.4rem; border-radius: 999px; background: #2a2a30; }
.st.posted, .st.published { background: #1d4d32; }
.st.approved, .st.queued, .st.scheduled { background: #3b4d1d; }
.st.blocked { background: #5a2020; }
.st.draft, .st.review { background: #333; }
.pill.ok { background: #1d4d32; }
.warn { color: #f0b429; font-size: 0.85rem; }
.ok { color: #7ddea0; }
.issues { padding-left: 1.1rem; }
textarea, select { width: 100%; margin-top: 0.3rem; padding: 0.5rem; border-radius: 6px; border: 1px solid #333; background: #111; color: #eee; font: inherit; }
.btnrow { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.primary { background: #c9a227; color: #111; }
.chk { display: flex; align-items: center; gap: 0.4rem; }
.chk input { width: auto; }
.nets { border: 1px solid #333; border-radius: 8px; padding: 0.6rem 0.8rem; margin: 0.75rem 0; }
.cal-day h2 { font-size: 0.95rem; color: #c9a227; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 1rem 0; }
.stat { background: #18181b; border-radius: 12px; padding: 1rem; }
.stat b { display: block; font-size: 1.4rem; }
.dim { opacity: 0.55; }
.week { display: flex; flex-direction: column; overflow-x: auto; }
.week-head, .week-row { display: grid; grid-template-columns: 3.5rem repeat(7, minmax(5.5rem, 1fr)); min-width: 44rem; }
.week-head { font-size: 0.75rem; color: #9a9aa3; margin-bottom: 0.3rem; }
.slot { min-height: 56px; border: 1px solid #2a2a2e; padding: 2px; }
.hr { font-size: 0.7rem; color: #666; padding-top: 4px; }
.chip { display: block; width: 100%; margin: 2px 0; font-size: 0.7rem; background: #164e63; text-align: left; }
.chip.posted, .chip.published { background: #333; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mday { min-height: 5.5rem; background: #18181b; border-radius: 8px; padding: 0.35rem; }
.mday.mute { opacity: 0.4; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow: auto; z-index: 20; }
.modal.hidden { display: none; }
.dialog { background: #18181b; width: min(36rem, 100%); border-radius: 12px; padding: 1rem 1.2rem 1.4rem; }
.dialog.post-dlg { width: min(62rem, 96vw); }
.post-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 860px) { .post-grid { grid-template-columns: 1fr; } }
.post-dlg textarea { min-height: 8rem; }
.plat-media { background: #141416; border-radius: 10px; padding: 0.75rem; margin: 0.55rem 0; }
.plat-head { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 0.4rem; }
.plat-media .prev { width: 100%; max-height: 11rem; object-fit: contain; background: #000; border-radius: 6px; display: block; }
.plat-media .prev.empty { min-height: 4.5rem; display: flex; align-items: center; justify-content: center; background: #111; }
.plat-media .prompt-btn { margin: 0.45rem 0 0; background: #2a2a30; font-size: 0.85rem; }
.plat-media .prompt-btn.has-prompt { border: 1px solid #c9a227; }
.prev-hit {
  display: block; width: 100%; margin: 0; padding: 0;
  border: 0; background: transparent; cursor: zoom-in; border-radius: 6px;
}
.prev-hit:hover { outline: 2px solid #c9a227; }
.prev-hit:focus-visible { outline: 2px solid #c9a227; }
.prev-hit .prev { pointer-events: none; }
.okline { color: #8fd9a8; }
.approve-box { background: #141416; border-radius: 10px; padding: 0.75rem; margin-top: 0.75rem; }
.approve-box button { margin-top: 0.4rem; }
#art-prompt { z-index: 35; align-items: flex-start; }
.art-prompt-dlg { width: min(40rem, 96vw); }
.art-prompt-dlg textarea {
  min-height: 14rem; font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92rem; line-height: 1.45; margin-top: 0.4rem;
}
.ap-ref { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.7rem; }
.ap-ref.hidden { display: none; }
.ap-ref img { width: 4.2rem; height: 4.2rem; object-fit: cover; border-radius: 6px; background: #000; }
.ap-ref a { color: #9cd; }
#ap-status { min-height: 1.1rem; margin: 0.35rem 0 0; color: #8fd9a8; }
#media-prev { z-index: 30; align-items: center; }
.media-prev-dlg { width: min(56rem, 100%); background: #121214; }
.media-prev-dlg header { gap: 0.6rem; }
#mp-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zoom-bar {
  display: flex; align-items: center; gap: 0.25rem;
  margin-left: auto; flex-shrink: 0;
}
.zoom-bar.hidden { display: none; }
.zoom-bar button {
  margin: 0; min-width: 2rem; padding: 0.28rem 0.55rem;
  background: #2a2a30; color: #eee; font-size: 1rem; line-height: 1;
}
.zoom-bar button:hover { background: #3a3a44; }
.zoom-bar button:disabled { opacity: 0.35; cursor: default; }
#mp-zoom-pct {
  min-width: 3.4rem; text-align: center;
  font-variant-numeric: tabular-nums; font-size: 0.85rem; color: #ddd;
}
#mp-x { margin: 0; }
.phone-stage { display: flex; justify-content: center; align-items: center; padding: 0.6rem 0 1rem; }
.phone {
  background: #0a0a0c;
  border: 3px solid #3a3a42;
  box-shadow: 0 0 0 2px #1a1a1e, 0 18px 40px rgba(0,0,0,.55);
  overflow: hidden;
  display: flex;
}
.phone.portrait {
  width: min(22rem, 78vw);
  height: min(46rem, 78vh);
  border-radius: 2.2rem;
  flex-direction: column;
}
.phone.landscape {
  width: min(48rem, 92vw);
  height: min(26rem, 70vh);
  border-radius: 2.2rem;
  flex-direction: row;
}
.phone-ear, .phone-bar { flex-shrink: 0; background: #0a0a0c; display: flex; align-items: center; justify-content: center; }
.phone.portrait .phone-ear { height: 1.55rem; }
.phone.portrait .phone-bar { height: 1.35rem; }
.phone.landscape .phone-ear { width: 1.55rem; }
.phone.landscape .phone-bar { width: 1.35rem; }
.phone.portrait .phone-ear::after, .phone.landscape .phone-ear::after {
  content: ""; width: 5.4rem; height: 0.68rem; background: #000; border-radius: 999px;
}
.phone.landscape .phone-ear::after { width: 0.68rem; height: 5.4rem; }
.phone.portrait .phone-bar::after, .phone.landscape .phone-bar::after {
  content: ""; width: 7rem; height: 0.28rem; background: #3a3a42; border-radius: 999px;
}
.phone.landscape .phone-bar::after { width: 0.28rem; height: 7rem; }
.phone-screen {
  flex: 1; min-width: 0; min-height: 0;
  background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden;
  cursor: zoom-in; touch-action: none;
}
.phone-screen.is-zoomed { cursor: grab; }
.phone-screen.is-panning { cursor: grabbing; }
.phone-zoom {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  transform-origin: center center;
  will-change: transform;
}
.phone-screen img, .phone-screen video,
.phone-zoom img, .phone-zoom video {
  width: 100%; height: 100%; max-height: none; min-height: 0; object-fit: contain; background: #000; border: 0;
}
.cal-list-wrap { margin-top: 1.75rem; }
.cal-list-wrap h2 { margin: 0; font-size: 1.15rem; }
.cal-list-scroll { overflow: auto; max-height: min(28rem, 55vh); border: 1px solid #2a2a2e; border-radius: 10px; }
.cal-list { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.cal-list th { position: sticky; top: 0; background: #18181b; text-align: left; padding: 0.5rem 0.6rem; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: #9a9aa3; cursor: pointer; white-space: nowrap; }
.cal-list th.cal-th-media { cursor: default; }
.cal-list td { padding: 0.45rem 0.6rem; border-top: 1px solid #2a2a2e; vertical-align: middle; }
.cal-list tbody tr { cursor: pointer; }
.cal-list tbody tr:hover { background: #1c1c22; }
.cal-thumb { width: 2.6rem; height: 2.6rem; object-fit: cover; border-radius: 6px; background: #111; display: block; }
.cal-thumb.empty { display: block; width: 2.6rem; height: 2.6rem; border-radius: 6px; background: #1a1a1e; border: 1px dashed #333; }
.cal-media { display: inline-block; }
.media-prev-dlg img, .media-prev-dlg video, .media-prev-dlg iframe { width: 100%; max-height: 72vh; object-fit: contain; background: #000; border: 0; min-height: 16rem; }
.media-prev-dlg .phone-screen img, .media-prev-dlg .phone-screen video,
.media-prev-dlg .phone-zoom img, .media-prev-dlg .phone-zoom video {
  width: 100%; height: 100%; max-height: none; min-height: 0; object-fit: contain;
}
.dialog header { display: flex; justify-content: space-between; align-items: center; border: 0; padding: 0 0 0.5rem; }
.errbox { background: #5a2020; padding: 0.6rem; border-radius: 8px; margin: 0.5rem 0; }
.media-drop { min-height: 12rem; border: 1px dashed #3a3a42; border-radius: 10px; padding: 0.4rem; }
.media-drop.over, body.media-dragging .media-drop { border-color: #c9a227; background: rgba(201, 162, 39, 0.08); }
.media-drag-overlay {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 10, 12, 0.78);
  border: 3px dashed #c9a227;
  color: #f0e6c8; font-size: 1.35rem; font-weight: 600;
  pointer-events: none;
}
.media-drag-overlay.hidden { display: none; }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--media-tile, 9rem), 1fr)); gap: 0.75rem; margin-top: 1rem; }
.asset { position: relative; }
.asset.on { outline: 2px solid #c9a227; }
.asset img, .asset video { width: 100%; height: var(--media-tile, 9rem); object-fit: cover; border-radius: 8px; background: #111; }
.asset .sel { position: absolute; top: 0.3rem; left: 0.3rem; margin: 0; }
.media-table { width: 100%; margin-top: 1rem; font-size: 0.9rem; }
.media-table tr.on { background: #222228; }
.media-th img, .media-th video { width: 3.2rem; height: 2.4rem; object-fit: cover; border-radius: 4px; background: #111; }
.pdf-ph { display: inline-flex; align-items: center; justify-content: center; width: 3.2rem; height: 2.4rem; background: #2a2a30; border-radius: 4px; font-size: 0.7rem; }
.chat { max-height: 22rem; overflow: auto; background: #141416; border-radius: 12px; padding: 0.75rem; }
.msg { margin: 0.6rem 0; }
.msg.user { color: #ddd; }
.msg.agent { background: #1c1c22; padding: 0.6rem; border-radius: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }
.chips button { background: #2a2a30; margin: 0; font-size: 0.8rem; }
