/* Signtility console. Same family as Crewtility (Montserrat headings / Open Sans text, navy accents, borderless
   white cards on a soft grey page, white sidebar with a grey active pill); Signtility blue replaces Crewtility orange. */
:root {
  --bg: #edeff2; --panel: #ffffff; --ink: #1f2233; --text: #4a4d57; --muted: #80838c; --line: #eceef1; --line-strong: #cfd2d8;
  --brand: #1d6bf3; --brand-hover: #1559d1; --brand-ink: #ffffff; --brand-soft: #e8f0fe;
  --navy: #232a52; --link: #1d6bf3; --pill: #e3e6ea;
  --warn: #b45309; --warn-soft: #fef3c7; --bad: #d92d20; --bad-soft: #fde7e6; --ok: #1f8a4c; --ok-soft: #e3f6ea;
  --radius: 10px; --btn-radius: 6px; --header-h: 64px; --side-w: 236px; --nav-h: 62px;
  --shadow: 0 1px 3px rgba(31, 34, 51, .08), 0 1px 2px rgba(31, 34, 51, .04);
  --pop: 0 12px 40px rgba(20, 24, 45, .18), 0 2px 6px rgba(20, 24, 45, .08);
  --head-font: Montserrat, Inter, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #23252b; --panel: #2e3138; --ink: #f1f2f4; --text: #d0d2d6; --muted: #9a9da4; --line: #3b3e46; --line-strong: #50545c;
    --brand: #4d8dff; --brand-hover: #6aa0ff; --brand-ink: #ffffff; --brand-soft: #26324d;
    --navy: #262c4f; --link: #74a8ff; --pill: #40434b;
    --warn: #f5b04a; --warn-soft: #4a3c20; --bad: #fb8585; --bad-soft: #4d2a2a; --ok: #5bd894; --ok-soft: #22432f;
    --shadow: none; --pop: 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #23252b; --panel: #2e3138; --ink: #f1f2f4; --text: #d0d2d6; --muted: #9a9da4; --line: #3b3e46; --line-strong: #50545c;
  --brand: #4d8dff; --brand-hover: #6aa0ff; --brand-ink: #ffffff; --brand-soft: #26324d;
  --navy: #262c4f; --link: #74a8ff; --pill: #40434b;
  --warn: #f5b04a; --warn-soft: #4a3c20; --bad: #fb8585; --bad-soft: #4d2a2a; --ok: #5bd894; --ok-soft: #22432f;
  --shadow: none; --pop: 0 12px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
h1, h2, h3, .brand, #nav a, th, .field > span, .tile b, .btn { font-family: var(--head-font); }
h1 { font-size: 1.75rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin: 0; }
h2 { font-size: 1.08rem; font-weight: 600; color: var(--ink); margin: 0 0 .7rem; }
h3 { font-size: .95rem; font-weight: 600; color: var(--ink); margin: 0 0 .4rem; }
small, .muted { color: var(--muted); }
p { margin: 0 0 .8rem; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------ shell */
header#top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--header-h); display: flex; align-items: center;
  gap: 1rem; padding: 0 16px 0 0; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.35rem; color: var(--ink); letter-spacing: -.01em;
  height: 100%; padding: 0 20px; width: var(--side-w); border-right: 1px solid var(--line); }
.brand img { width: 38px; height: 38px; display: block; }
.company { font-family: var(--head-font); font-weight: 600; color: var(--ink); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.who { margin-left: auto; display: flex; align-items: center; gap: .9rem; }
.livebadge { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; font-weight: 600; color: var(--text); font-family: var(--head-font); }
.me { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff;
  font: 700 .85rem var(--head-font); letter-spacing: .02em; }
.menu { position: fixed; top: calc(var(--header-h) - 6px); right: 14px; z-index: 40; min-width: 220px; padding: .4rem; border-radius: 10px;
  background: var(--panel); box-shadow: var(--pop); border: 1px solid var(--line); }
.menu .menuhead { padding: .55rem .7rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.menu .menuhead b { display: block; color: var(--ink); font-family: var(--head-font); }
.menu a, .menu button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .7rem; border: 0; background: none;
  color: var(--ink); font: 500 .92rem "Open Sans", system-ui, sans-serif; border-radius: 6px; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--pill); }

#nav { position: fixed; z-index: 15; background: var(--panel); }
#nav a { display: flex; align-items: center; gap: .85rem; color: var(--text); font-weight: 500; font-size: .95rem; border-radius: 8px; }
#nav a:hover { color: var(--ink); }
#nav a.on { background: var(--pill); color: var(--ink); font-weight: 600; }
#nav a.on svg { color: var(--brand); }
#nav .navsep { height: 1px; background: var(--line); margin: .6rem .4rem; }
#nav .navver { margin-top: auto; padding: .6rem .9rem; font-size: .78rem; color: var(--muted); }
main { padding: calc(var(--header-h) + 24px) 20px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); max-width: 1320px; }

@media (min-width: 900px) {
  #nav { top: var(--header-h); bottom: 0; left: 0; width: var(--side-w); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px;
    border-right: 1px solid var(--line); }
  #nav a { padding: .62rem .9rem; }
  #nav .mobileonly, .mobileonly-tiles { display: none !important; }
  main { margin-left: var(--side-w); padding: calc(var(--header-h) + 30px) 32px 48px; }
}
@media (max-width: 899px) {
  .brand { width: auto; border-right: 0; padding-right: 4px; }
  .brand span { display: none; }
  #nav { left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); display: flex; justify-content: space-around;
    padding: 6px 4px env(safe-area-inset-bottom); border-top: 1px solid var(--line); }
  #nav a { flex: 1; flex-direction: column; gap: 2px; justify-content: center; font-size: .7rem; padding: 4px 0; }
  #nav a.on { background: none; color: var(--brand); }
  #nav .sideonly, #nav .navsep, #nav .navver { display: none; }
  .livebadge .lbtext { display: none; }
  main { padding-left: 16px; padding-right: 16px; }
}

/* ------------------------------------------------------------ page parts */
.pagehead { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.pagehead .grow { flex: 1; min-width: 12rem; }
.pagehead p { margin: .2rem 0 0; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: .3rem; font: 600 .85rem var(--head-font); color: var(--muted); margin-bottom: .5rem; }
.back:hover { color: var(--ink); }
.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem; }
.card > h2:first-child { margin-top: 0; }
.cardhead { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.cardhead h2 { margin: 0; flex: 1; }
.row { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 1.25rem; align-items: start; }
.split > .sticky { position: sticky; top: calc(var(--header-h) + 20px); }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .split > .sticky { position: static; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: 0 1rem; border-radius: var(--btn-radius);
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--pill); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--pill); }
.btn.sm { min-height: 32px; padding: 0 .7rem; font-size: .82rem; }
.btn.icon { padding: 0; width: 36px; min-height: 36px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg.i { width: 18px; height: 18px; }

/* forms */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; min-width: 0; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--ink); }
.field small { font-size: .8rem; }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=time], input[type=search], select, textarea {
  width: 100%; min-height: 42px; padding: .5rem .75rem; border: 1px solid var(--line-strong); border-radius: var(--btn-radius); background: var(--panel);
  color: var(--ink); font: 400 .95rem "Open Sans", system-ui, sans-serif; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
.fields2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 600px) { .fields2 { grid-template-columns: 1fr; } }
.check { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .92rem; color: var(--ink); }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.seg { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--pill); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: .38rem .8rem; border-radius: 6px; font: 600 .84rem var(--head-font); color: var(--text); cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.days { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.days button { width: 34px; height: 32px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--muted);
  font: 600 .78rem var(--head-font); cursor: pointer; }
.days button.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.err { color: var(--bad); font-size: .88rem; margin: .2rem 0 .8rem; min-height: 1em; }
.err:empty { display: none; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.tile { display: flex; flex-direction: column; gap: .15rem; padding: 1.1rem 1.2rem; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); }
a.tile:hover { box-shadow: var(--pop); }
.tile .tilelabel { display: flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.tile .tilelabel svg { color: var(--brand); }
.tile b { font-size: 1.9rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.tile b small { font-size: 1rem; font-weight: 600; }

/* status */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.dot.off { background: var(--bad); }
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .55rem; border-radius: 99px; font: 600 .75rem var(--head-font);
  background: var(--pill); color: var(--text); white-space: nowrap; }
.badge.on { background: var(--ok-soft); color: var(--ok); }
.badge.off { background: var(--bad-soft); color: var(--bad); }
.badge.blue { background: var(--brand-soft); color: var(--brand); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

/* thumbnails: a 16:9 box holding a real slide */
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #111; }
.thumb.tall { aspect-ratio: 9 / 16; }
.thumb > .slbox { position: absolute; inset: 0; }
.thumb .kindtag { position: absolute; left: 8px; bottom: 8px; z-index: 2; }
.thumb .durtag { position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: .1rem .45rem; border-radius: 5px; background: rgba(0,0,0,.65);
  color: #fff; font: 600 .72rem var(--head-font); }
.thumb.empty { display: grid; place-items: center; background: var(--pill); color: var(--muted); font: 600 .85rem var(--head-font); text-align: center; padding: 1rem; }
.kindtag { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .45rem; border-radius: 5px; background: rgba(0,0,0,.6); color: #fff;
  font: 600 .7rem var(--head-font); letter-spacing: .02em; }
.kindtag svg.i { width: 13px; height: 13px; }

/* screen cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.1rem; }
.scard { display: flex; flex-direction: column; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; color: var(--text); }
a.scard:hover { box-shadow: var(--pop); }
.scard .thumb { border-radius: 0; }
.scard .scbody { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; gap: .3rem; }
.scard .sctop { display: flex; align-items: center; gap: .5rem; }
.scard .sctop b { flex: 1; min-width: 0; font: 600 1rem var(--head-font); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard .scmeta { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); min-width: 0; }
.scard .scmeta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard .scmeta svg.i { width: 15px; height: 15px; }
.offline-veil { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(15, 17, 26, .72); color: #fff;
  font: 600 .9rem var(--head-font); text-align: center; padding: 1rem; }
.addcard { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; min-height: 230px; border-radius: var(--radius);
  border: 2px dashed var(--line-strong); color: var(--muted); font: 600 .95rem var(--head-font); cursor: pointer; background: none; }
.addcard:hover { border-color: var(--brand); color: var(--brand); }
.addcard svg.i { width: 30px; height: 30px; }

/* media library */
.toolbar { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar input[type=search] { max-width: 280px; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 1rem; }
.mcard { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; position: relative; border: 2px solid transparent; }
.mcard:hover { box-shadow: var(--pop); }
.mcard.sel { border-color: var(--brand); }
.mcard .thumb { border-radius: 0; }
.mcard .mbody { padding: .6rem .8rem .7rem; }
.mcard .mbody b { display: block; font: 600 .9rem var(--head-font); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard .mbody small { font-size: .78rem; }
.mcard .tick { position: absolute; right: 8px; top: 8px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff;
  display: none; place-items: center; }
.mcard.sel .tick { display: grid; }
.drop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(29, 107, 243, .16); border: 4px dashed var(--brand);
  font: 700 1.4rem var(--head-font); color: var(--brand); pointer-events: none; }
.uploads { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.upload { display: flex; align-items: center; gap: .8rem; padding: .6rem .9rem; border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); font-size: .88rem; }
.upload .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--pill); overflow: hidden; min-width: 60px; }
.upload .bar i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }
.upload b { max-width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }

/* app picker */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: .8rem; }
.appbtn { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel);
  text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.appbtn:hover { border-color: var(--brand); background: var(--brand-soft); }
.appbtn .appic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex: none; }
.appbtn b { display: block; color: var(--ink); font-family: var(--head-font); font-size: .95rem; }
.appbtn small { font-size: .82rem; line-height: 1.4; display: block; }

/* themes picker */
.themes { display: flex; gap: .5rem; flex-wrap: wrap; }
.themes button { width: 46px; height: 32px; border-radius: 7px; border: 2px solid var(--line-strong); cursor: pointer; padding: 0; }
.themes button.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.th-navy { background: linear-gradient(135deg, #2f3870, #232a52); }
.th-light { background: linear-gradient(135deg, #fff, #eef2f8); }
.th-dark { background: linear-gradient(135deg, #1a1d26, #0d0f14); }
.th-brand { background: linear-gradient(135deg, #1d6bf3, #1559d1); }
.th-warm { background: linear-gradient(135deg, #3a261a, #2a1b12); }
.th-fresh { background: linear-gradient(135deg, #155240, #0f3b2e); }

/* menu editor */
.msec { border: 1px solid var(--line); border-radius: 10px; padding: .8rem; margin-bottom: .8rem; background: var(--bg); }
.msec .row { margin-bottom: .5rem; }
.mitem { display: grid; grid-template-columns: minmax(0, 2fr) 90px minmax(0, 2fr) 36px; gap: .4rem; margin-bottom: .4rem; }
.mitem input { min-height: 36px; padding: .3rem .55rem; font-size: .88rem; }
@media (max-width: 600px) { .mitem { grid-template-columns: 1fr 80px 36px; } .mitem .mnote { grid-column: 1 / 3; } }

/* playlist editor */
.plist { display: flex; flex-direction: column; gap: .5rem; }
.pitem { display: grid; grid-template-columns: 22px 30px 112px minmax(0, 1fr) auto auto; align-items: center; gap: .7rem; padding: .5rem .6rem;
  border-radius: 9px; background: var(--panel); border: 1px solid var(--line); }
.pitem.dragging { opacity: .4; }
.pitem.over { border-color: var(--brand); box-shadow: 0 -3px 0 var(--brand); }
.pitem .grip { cursor: grab; color: var(--muted); display: grid; place-items: center; }
.pitem .num { font: 700 .85rem var(--head-font); color: var(--muted); text-align: center; }
.pitem .thumb { width: 112px; border-radius: 6px; }
.pitem b { display: block; color: var(--ink); font: 600 .92rem var(--head-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pitem .secs { display: flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--muted); }
.pitem .secs input { width: 70px; min-height: 34px; padding: .25rem .45rem; text-align: right; }
.pitem .secs select { min-height: 34px; padding: .25rem .4rem; width: auto; }
@media (max-width: 640px) {
  .pitem { grid-template-columns: 22px 88px minmax(0, 1fr) auto; }
  .pitem .num { display: none; }
  .pitem .thumb { width: 88px; }
  .pitem .secs { grid-column: 3; }
}
.plcard .thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); aspect-ratio: 16 / 9; }
.plcard .thumbs .thumb { border-radius: 0; aspect-ratio: auto; }
.previewbox { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.previewbox.tall { aspect-ratio: 9 / 16; max-height: 70vh; margin: 0 auto; }
.previewbox iframe { width: 100%; height: 100%; border: 0; display: block; }

/* lists & tables */
.list { display: flex; flex-direction: column; }
.list > .li { display: flex; align-items: center; gap: .9rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.list > .li:first-child { border-top: 0; padding-top: .2rem; }
.li .liic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex: none; }
.li b { color: var(--ink); font-family: var(--head-font); font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-size: .78rem; font-weight: 600; color: var(--muted); padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
td { padding: .7rem .6rem; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.rule { display: flex; flex-direction: column; gap: .6rem; padding: .75rem; border-radius: 9px; border: 1px solid var(--line); margin-bottom: .55rem; background: var(--bg); }
.rule.live { border-color: var(--ok); }
.ruletop { display: flex; align-items: center; gap: .6rem; }
.ruletop select { flex: 1; min-width: 0; min-height: 38px; padding: .3rem .6rem; }
.rulewhen { display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; }
.rule .times { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); }
.rule .times input { width: 124px; min-height: 34px; padding: .2rem .45rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }

/* empty states, onboarding */
.empty { text-align: center; padding: 3rem 1.5rem; }
.empty .emptyic { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); margin-bottom: 1rem; }
.empty .emptyic svg.i { width: 30px; height: 30px; }
.empty h2 { font-size: 1.2rem; }
.empty p { max-width: 460px; margin: 0 auto 1.2rem; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.step { display: flex; gap: .8rem; padding: 1rem; border-radius: 10px; border: 1px solid var(--line); color: var(--text); }
a.step:hover { border-color: var(--brand); }
.step .stepn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--pill); color: var(--ink); font: 700 .85rem var(--head-font); flex: none; }
.step.done .stepn { background: var(--ok); color: #fff; }
.step b { display: block; color: var(--ink); font-family: var(--head-font); }
.step small { display: block; font-size: .84rem; line-height: 1.45; }

/* dialogs */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: var(--panel);
  color: var(--text); box-shadow: var(--pop); }
dialog.wide { width: min(1000px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(15, 18, 35, .5); }
.dlg { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.dlghead { display: flex; align-items: center; gap: .8rem; padding: 1.1rem 1.3rem .4rem; }
.dlghead h2 { margin: 0; flex: 1; font-size: 1.15rem; }
.dlgbody { padding: .6rem 1.3rem 1rem; overflow: auto; }
.dlgfoot { display: flex; gap: .6rem; justify-content: flex-end; padding: .9rem 1.3rem 1.1rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dlgfoot .left { margin-right: auto; }
.pairhow { display: flex; gap: 1rem; align-items: center; padding: .9rem 1rem; border-radius: 10px; background: var(--bg); margin-bottom: 1.1rem; font-size: .9rem; }
.pairhow code { font: 600 .9rem ui-monospace, Menlo, monospace; color: var(--ink); background: var(--panel); padding: .1rem .4rem; border-radius: 4px; }
.codeinput { font: 700 1.6rem var(--head-font) !important; letter-spacing: .3em; text-transform: uppercase; text-align: center; min-height: 56px !important; }

/* toast */
#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 80; padding: .7rem 1.1rem;
  border-radius: 9px; background: #1f2233; color: #fff; font: 600 .9rem var(--head-font); opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: #b42318; }
@media (min-width: 900px) { #toast { bottom: 28px; left: calc(50% + var(--side-w) / 2); } }

/* sign-in */
body.out header#top, body.out #nav { display: none; }
body.out main { margin: 0; max-width: none; padding: 0; }
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(120% 90% at 85% 0%, #2f3870, #232a52 55%, #171c3a); position: relative; overflow: hidden; }
.signin::before { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(80% 70% at 50% 40%, #000, transparent); -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000, transparent); }
.signcard { position: relative; width: min(420px, 100%); background: var(--panel); border-radius: 16px; padding: 2rem 1.8rem 1.6rem; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.signcard.wide { width: min(520px, 100%); }
.signlogo { display: flex; align-items: center; gap: .65rem; justify-content: center; margin-bottom: 1.2rem; font: 700 1.6rem var(--head-font); color: var(--ink); letter-spacing: -.01em; }
.signlogo img { width: 46px; height: 46px; }
.signcard h1 { font-size: 1.25rem; text-align: center; margin-bottom: .3rem; }
.signcard .lead { text-align: center; color: var(--muted); margin-bottom: 1.4rem; font-size: .92rem; }
.signcard .btn.primary { width: 100%; min-height: 46px; font-size: 1rem; }
.signfoot { text-align: center; margin-top: 1.1rem; font-size: .8rem; color: var(--muted); }
.signfoot a { color: var(--muted); font-weight: 600; }
.meter { height: 5px; border-radius: 3px; background: var(--pill); overflow: hidden; margin-top: .4rem; }
.meter i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }

/* ------------------------------------------------------------ Signtility staff bar ("Open As" from the Signtility console) */
:root { --staff-h: 36px; }
#staffbar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: var(--staff-h); display: flex; align-items: center; gap: .9rem;
  padding: 0 12px 0 16px; background: #232a52; color: #fff; font: 600 .82rem/1 var(--head-font); border-bottom: 2px solid #1d6bf3; }
#staffbar.writing { border-bottom-color: #f59e0b; }
#staffbar .stafftext { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
#staffbar .stafftext b { color: #7fb0ff; font-weight: 700; }
#staffbar .staffsw { display: flex; align-items: center; gap: .4rem; cursor: pointer; white-space: nowrap; }
#staffbar .staffsw input { width: 16px; height: 16px; accent-color: #f59e0b; margin: 0; }
#staffbar .staffend { border: 0; border-radius: 5px; background: #1d6bf3; color: #fff; font: 700 .8rem/1 var(--head-font); padding: .45rem .8rem; cursor: pointer; }
#staffbar .staffend:hover { background: #1559d1; }
body.staffing { --header-h: calc(64px + var(--staff-h)); }
body.staffing header#top { top: var(--staff-h); height: 64px; }
@media (max-width: 640px) { #staffbar .stafftext { font-size: .74rem; } }

/* Add a screen: which step */
.stepof { font: 600 .72rem var(--head-font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: -.2rem 0 .9rem; }
/* a screen's name at the top of its page: looks like a heading, click to rename */
.pagehead input.titleedit { font: 700 1.9rem/1.2 var(--head-font) !important; color: var(--ink); background: transparent !important; border: 1px solid transparent !important;
  border-radius: 8px; padding: .05rem .35rem !important; margin-left: -.4rem; min-width: 4ch; max-width: 100%; height: auto !important; min-height: 0 !important;
  box-shadow: none !important; cursor: text; }
.pagehead input.titleedit:hover { border-color: var(--line-strong) !important; }
.pagehead input.titleedit:focus { outline: none; border-color: var(--brand) !important; background: var(--panel) !important; }
.savenote { font-size: .85rem; color: var(--muted); margin-left: .4rem; }
.savenote.ok { color: var(--ok, #1f8a4c); } .savenote.bad { color: var(--bad, #d22300); }

/* a screen card's preview when the TV has no playlist: a small copy of the name card the TV shows */
.thumb.idle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; text-align: center; padding: .8rem;
  background: radial-gradient(ellipse 90% 80% at 60% 10%, #2e3770 0%, #232a52 50%, #191d3b 100%); color: #fff; }
.thumb.idle img { width: 30px; height: 30px; }
.thumb.idle b { font: 700 1rem var(--head-font); }
.thumb.idle span { font-size: .72rem; color: rgba(255, 255, 255, .7); }

/* ------------------------------------------------------------ polish pass (2026-11-02): closer to the designer's finish */
:root { --radius: 14px; --btn-radius: 8px; }
.card { padding: 1.4rem 1.5rem; border: 1px solid transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card, :root:not([data-theme="light"]) .tile, :root:not([data-theme="light"]) .scard { border: 1px solid var(--line); } }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .tile, :root[data-theme="dark"] .scard { border: 1px solid var(--line); }
h1 { font-size: 1.85rem; font-weight: 700; }
.card > h2, .cardhead h2 { font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.cardhead { margin-bottom: 1.1rem; }
/* selects match text boxes (Safari ignores height on native selects) */
select { -webkit-appearance: none; appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2380838c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 16px; }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=time], input[type=search], select, textarea { background-color: var(--bg); border-color: var(--line-strong); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.seg { background: var(--bg); border: 1px solid var(--line); }
.seg button { padding: .42rem .85rem; }
.seg button.on { background: var(--brand); color: #fff; box-shadow: none; }
#nav a.on { background: var(--brand-soft); color: var(--brand); }
.tile { padding: 1.15rem 1.3rem; }
.tile .tilelabel svg { width: 30px; height: 30px; padding: 6px; border-radius: 8px; background: var(--brand-soft); }
a.tile, a.scard { transition: box-shadow .15s, transform .15s; }
a.tile:hover, a.scard:hover { transform: translateY(-2px); }
.btn { transition: background .12s, border-color .12s; }
.kv { gap: .55rem 1.2rem; }

/* ------------------------------------------------------------ a screen's page */
.screenhead { align-items: flex-start; }
.titlerow { gap: .6rem; }
.titlewrap { position: relative; display: inline-flex; align-items: center; cursor: text; }
.titlewrap .pencil { position: absolute; right: -1.6rem; color: var(--muted); opacity: 0; transition: opacity .15s; pointer-events: none; }
.titlewrap:hover .pencil { opacity: 1; }
.titlewrap:focus-within .pencil { opacity: 0; }
.pagehead input.titleedit { margin-left: -.4rem; }
.statusline { margin: .25rem 0 0 !important; color: var(--muted); font-size: .92rem; }
.dot.pulse { animation: dotpulse 2s ease-in-out infinite; }
@keyframes dotpulse { 50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); } 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); } }
.dot.off.pulse { animation-name: dotpulsebad; }
@keyframes dotpulsebad { 50% { box-shadow: 0 0 0 6px rgba(217, 45, 32, 0); } 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 45, 32, .45); } }

.health .cardhead { flex-wrap: wrap; }
.htiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.3rem; }
.htile { display: flex; flex-direction: column; gap: .1rem; padding: .85rem 1rem; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.htile span { font: 600 .74rem var(--head-font); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.htile b { font: 700 1.55rem/1.2 var(--head-font); color: var(--ink); }
.htile small { font-size: .8rem; }
.htile.good b { color: var(--ok); } .htile.bad b { color: var(--bad); } .htile.warn b { color: var(--warn); }
.hchart { margin-bottom: 1.2rem; }
.hlegend { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .78rem; color: var(--muted); margin-bottom: .35rem; flex-wrap: wrap; }
.hlegend .keys { display: inline-flex; align-items: center; gap: .35rem; }
.hlegend .k { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: .5rem; }
.hsvg { display: block; width: 100%; height: 130px; }
.hsvg rect.up, .hlegend .k.up { fill: #22c55e; background: #22c55e; }
.hsvg rect.patchy, .hlegend .k.patchy { fill: #f5a623; background: #f5a623; }
.hsvg rect.down, .hlegend .k.down { fill: var(--bad); background: var(--bad); }
.hsvg rect.nodata { fill: var(--line); }
.hsvg rect:hover { opacity: .75; }
.hsvg line.grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hsvg path.rtt { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.haxis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: .3rem; }
.outages h3 { font: 700 .74rem var(--head-font); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .5rem; }
.outages p { margin: 0; font-size: .9rem; }
.outage { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.outage:first-of-type { border-top: 0; }
.outage b { color: var(--ink); font-weight: 600; flex: 1; }
.outage.now b { color: var(--bad); }

/* ------------------------------------------------------------ media library */
.mtoolbar { gap: .6rem; margin-bottom: 1.2rem; }
.searchbox { position: relative; display: flex; align-items: center; flex: 0 1 300px; }
.searchbox svg.i { position: absolute; left: .75rem; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.searchbox input[type=search] { padding-left: 2.3rem; max-width: none; }
.segn { margin-left: .4rem; font-size: .72rem; opacity: .6; font-weight: 700; }
.seg button.on .segn { opacity: .85; }
.sortsel { width: auto; min-width: 11rem; }
.mgrid { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 1.1rem; }
.mcard { border: 1px solid var(--line); transition: box-shadow .15s, transform .15s, border-color .15s; }
.mcard:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.mcard .mbody { padding: .75rem .95rem .85rem; }
.mcard .mbody b { font-size: .95rem; }
.mcard .mbody small { display: block; margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb .kindtag { left: 10px; top: 10px; bottom: auto; background: rgba(15, 18, 34, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: .2rem .5rem; border-radius: 99px; }
.thumb .durtag { top: 10px; bottom: auto; right: 10px; border-radius: 99px; }
.usedtag { position: absolute; right: 10px; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .5rem;
  border-radius: 99px; background: rgba(29, 107, 243, .9); color: #fff; font: 700 .7rem var(--head-font); }
.usedtag svg.i { width: 13px; height: 13px; }
.thumb .durtag ~ .usedtag { right: 64px; }
.mhover { position: absolute; inset: 0; z-index: 4; display: flex; align-items: flex-end; justify-content: space-between; gap: .4rem; padding: 10px;
  background: linear-gradient(180deg, transparent 45%, rgba(10, 12, 24, .72)); opacity: 0; transition: opacity .15s; }
.mcard:hover .mhover, .mcard:focus-visible .mhover { opacity: 1; }
.mhover .btn { background: rgba(255, 255, 255, .94); color: #1f2233; border-color: transparent; }
.mhover .btn:hover { background: #fff; }
/* web page items: a dark card with the site's name instead of a blank white box */
.thumb .sl-web { background: linear-gradient(150deg, #2f3870, #171c3a); color: #fff; }
.thumb .sl-web .sl-inner { color: rgba(255, 255, 255, .85); }

/* ------------------------------------------------------------ fill the screen: wide pages, a two-column dashboard */
main { max-width: none; }
@media (min-width: 900px) { main { padding-left: 36px; padding-right: 36px; } }
.dashtiles { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.dashtiles .tile { gap: .35rem; min-height: 132px; }
.dashtiles .tile .meter { margin-top: .35rem; }
.meter { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; align-items: start; }
@media (min-width: 1300px) { .dash { grid-template-columns: minmax(0, 1fr) 380px; } .dashside { position: sticky; top: calc(var(--header-h) + 24px); } }
.dashmain > .cardhead { margin-top: .2rem; }
.dashcards { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.dashside { display: flex; flex-direction: column; gap: 1.1rem; }
.dashside .card { margin: 0; }
.card.side { padding: 1.1rem 1.2rem; }
.sideitem { display: flex; align-items: center; gap: .75rem; padding: .6rem .4rem; margin: 0 -.4rem; border-radius: 8px; color: var(--text); }
.sideitem + .sideitem { border-top: 1px solid var(--line); border-radius: 0; }
.sideitem:hover { background: var(--bg); }
.sideitem b { display: block; color: var(--ink); font: 600 .92rem var(--head-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sideitem small { display: block; font-size: .8rem; color: var(--muted); }
.sideitem > svg.i { color: var(--muted); width: 16px; height: 16px; }
.dot.warnd { background: #f5a623; }
.sidethumb { width: 74px; flex: none; }
.sidethumb .thumb { border-radius: 6px; }
.allgood { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font: 600 .9rem var(--head-font); }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.qa { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; padding: .9rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  color: var(--ink); font: 600 .88rem var(--head-font); cursor: pointer; text-align: left; }
.qa:hover { border-color: var(--brand); color: var(--brand); }
.qa svg.i { color: var(--brand); }
