/* Unified look for every module (loaded last): purple hero header, lavender page, white cards, one nav, one button style. */
:root { --u-ink: #212020; --u-mut: #6b6862; --u-line: #ecebe6; --u-pri: #373636; --u-gold: #dfbe72 }

/* ---- header band for all inner pages (History, Previews, TV look, LED, Ads, Approvals, Log, Plan, Account, More, Team...) */
body.sub #hd {
    background: #1a1919 url(img/home-hero.webp) right center / cover no-repeat; border-bottom: 1px solid rgba(217, 185, 110, .45); color: #ffffff;
    box-shadow: 0 8px 22px rgba(26, 25, 25, .28)
}
body.sub #hd:before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(26, 25, 25, .96) 35%, rgba(26, 25, 25, .45) 100%) }
body.sub #hd { position: relative }
body.sub #hd > * { position: relative; z-index: 1 }
body.sub #hd h1 { color: #ffffff; font-weight: 800; letter-spacing: -.01em }
body.sub #hd .ib, body.sub #hd .back { color: #ffffff }
body.sub #hd .pill { background: rgba(255, 255, 255, .14); color: #ffffff; border: 1px solid rgba(228, 188, 94, .55) }
body.sub #hd select { background: rgba(43, 42, 42, .85); color: #ffffff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: 8px 12px }
body.sub, html:has(body.sub) { background: linear-gradient(180deg, #f9f8f6, #f0f0ec) fixed }
body.sub #view { color: var(--u-ink) }
body.sub .pg h2 { color: var(--u-ink); font-weight: 800 }
body.sub .pg p, body.sub .m { color: var(--u-mut) }

/* ---- cards, tables, forms, buttons: same as TVs and Publish */
body.sub .card, body.sub .rows, body.sub .plan, body.sub .kpi {
    background: #ffffff; border: 1px solid var(--u-line); border-radius: 24px; box-shadow: 0 10px 28px rgba(43, 42, 42, .12); color: var(--u-ink)
}
body.sub .card-h h2, body.sub .card > h2 { color: var(--u-ink); font-weight: 800; padding-left: 12px; border-left: 5px solid var(--u-gold); line-height: 1.3 }
body.sub .kpi:before { background: linear-gradient(180deg, #dfbe72, #c8a24b) }
body.sub th { color: var(--u-mut); background: #f8f8f6 }
body.sub td, body.sub th { border-color: #f3f3f0 }
body.sub .fld input, body.sub .fld select, body.sub input:not([type=checkbox]):not([type=radio]):not([type=file]), body.sub select, body.sub textarea {
    border: 1.5px solid #e6e5de; border-radius: 14px; background: #fdfdfc; color: var(--u-ink); min-height: 46px
}
body.sub input:focus, body.sub select:focus, body.sub textarea:focus { outline: 0; border-color: var(--u-pri); box-shadow: 0 0 0 3px rgba(55, 54, 54, .18) }
body.sub .btn.pri, body.home .btn.pri, body.pub .btn.pri {
    color: #ffffff; border: 1.5px solid rgba(228, 188, 94, .8); border-radius: 16px; min-height: 50px; font-weight: 700;
    background: linear-gradient(180deg, #383636, #252424); box-shadow: 0 8px 20px rgba(55, 54, 54, .4), inset 0 1px 0 rgba(255, 255, 255, .25)
}
body.sub .btn.gold { background: linear-gradient(180deg, #f5e0b0, #dab45d 60%, #c8a24b); color: #1f1e1e; border: 0; border-radius: 16px; font-weight: 700 }
body.sub .btn:not(.pri):not(.gold):not(.dng) { border-radius: 14px; border: 1.5px solid #e6e5de; background: #f8f8f6; color: #302e2e; font-weight: 700 }
body.sub .btn.dng { border-radius: 14px }
body.sub .chip { border-radius: 999px; font-weight: 700 }
body.sub .lnk { color: var(--u-pri); font-weight: 700 }
body.sub .rows a, body.sub .rows button { color: var(--u-ink) }
body.sub .rows .ic { color: var(--u-pri) }

/* ---- mobile: one bottom navigation (dark floating pill) on every screen */
@media(max-width:900px) {
    #tabs {
        left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); height: 72px; padding-bottom: 0; border-radius: 30px;
        border: 1px solid rgba(222, 185, 98, .35); backdrop-filter: none; background: linear-gradient(180deg, #242323, #201f1f); box-shadow: 0 12px 30px rgba(0, 0, 0, .5)
    }
    #tabs a { color: #ffffff } #tabs a.on { color: var(--u-gold) }
    #tabs a.on .ic { background: transparent; color: var(--u-gold); filter: drop-shadow(0 2px 8px rgba(220, 177, 78, .6)) }
    #tabs a.on:before { top: auto; bottom: 0; width: 56%; height: 3px; background: linear-gradient(90deg, #dfbe72, #c8a24b); border-radius: 3px 3px 0 0 }
    #mn { padding-bottom: calc(var(--tab, 72px) + 24px + env(safe-area-inset-bottom)) }
    body.sub #view, body.pub #view { padding-left: 12px; padding-right: 12px }
    /* TVs header: keep the title clear of the skyline */
    body.tvs .homehero.tvhero { background-image: linear-gradient(90deg, rgba(26, 25, 25, .95) 38%, rgba(26, 25, 25, .25) 100%), url(img/home-hero.webp) }
    .tvhero .hbar { flex-wrap: wrap; row-gap: 8px }
    .tvttl { flex: 1 1 150px } .tvttl h1 { font-size: 24px } .tvttl p { max-width: 190px; font-size: 12.5px }
    .tvhero .hbr { margin-left: auto; max-width: 52% }
}

/* ---- desktop: same sidebar, header band and centred content width */
@media(min-width:901px) {
    body.sub #hd { border-radius: 0 0 24px 24px; padding-left: 28px; padding-right: 28px; min-height: 64px }
    body.sub #view { max-width: 1120px; margin: 0 auto; padding: 24px 28px 60px }
    body.sub .grid { gap: 18px }
    body.tvs .tvhero { min-height: 190px }
}

@media(max-width:900px) {
    .tvhd { gap: 10px } .tvhd img { height: 40px } .tvhd h2 { font-size: 20px; white-space: nowrap }
    .tvpill { min-height: 38px; padding: 0 11px; font-size: 13.5px }
    .tvrm { align-self: center; min-width: 62px; padding: 10px 6px }
    .tvth { width: 78px }
}

/* ---- laptop polish: the whole menu fits on a 800 px screen; quiet scrollbar if it ever does not */
#nav { scrollbar-width: thin; scrollbar-color: rgba(217, 185, 110, .35) transparent }
@media (min-width: 901px) and (max-height: 880px) {
    .sbh { padding: 14px 16px 12px }
    .ng { padding: 10px 10px 3px }
    #nav a { padding: 6px 10px; margin: 0 }
}
.stack > .bn { margin-top: 12px !important }
