/* Libero Apps social calendar. Dark Libero look: near-black, blue-purple glow, inset grouped panels, no grey text. */
@font-face { font-family: 'Tomorrow'; src: url('fonts/tomorrow-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Tomorrow'; src: url('fonts/tomorrow-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #0d0b1b; --panel: rgba(25, 21, 54, .82); --panel-2: rgba(36, 31, 74, .9); --hair: rgba(255,255,255,.1); --hair-2: rgba(255,255,255,.2);
  --ink: #f4f2fb; --ink-2: #d8d3ea; --accent: #b39dff; --purple: #8b6cff; --magenta: #d94fa6; --coral: #ff6b6b;
  --draft: #d8d3ea; --submitted: #ffb340; --approved: #b39dff; --scheduled: #5ac8fa; --published: #4cd964; --failed: #ff6b6b;
  --title: 'Tomorrow', -apple-system, BlinkMacSystemFont, 'SF Pro Display', Arial, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--text); -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; }
a { color: var(--accent); }
.hidden { display: none !important; }
.glow { position: fixed; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: 0; opacity: .5; }
.g1 { width: 60vw; height: 60vw; left: -25vw; top: -25vw; background: radial-gradient(circle, #4a35b8 0%, rgba(74,53,184,0) 70%); }
.g2 { width: 50vw; height: 50vw; right: -20vw; top: 30vh; background: radial-gradient(circle, #8a2a7a 0%, rgba(138,42,122,0) 70%); }

.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px 20px; background: rgba(13,11,27,.8); backdrop-filter: saturate(160%) blur(20px); -webkit-backdrop-filter: saturate(160%) blur(20px); border-bottom: 1px solid var(--hair); }
.wordmark { font-family: var(--title); font-weight: 600; letter-spacing: .3em; text-transform: uppercase; font-size: 13px; position: relative; padding-bottom: 5px; }
.wordmark::after { content: ""; position: absolute; left: 0; bottom: 0; width: 42%; height: 2px; background: linear-gradient(90deg, var(--purple), var(--coral)); }
.client { font-family: var(--title); font-weight: 600; font-size: 14px; color: var(--ink-2); border-left: 1px solid var(--hair-2); padding-left: 14px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; color: var(--ink-2); font: 600 14px var(--text); padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.tabs button.on { color: var(--ink); background: rgba(255,255,255,.08); }
.who { margin-left: auto; font-size: 13px; color: var(--ink-2); display: flex; gap: 12px; align-items: center; }
.who button { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; }

.app { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 24px 20px 80px; }
.loading { color: var(--ink-2); }
h1 { font-family: var(--title); font-size: 26px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-family: var(--title); font-size: 17px; margin: 28px 0 10px; letter-spacing: .02em; }
.sub { color: var(--ink-2); margin: 0 0 18px; max-width: 72ch; }

.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
.bar .grow { flex: 1; }
.month { font-family: var(--title); font-size: 20px; min-width: 9ch; text-align: center; }
button, .btn { font: 600 14px var(--text); color: var(--ink); background: var(--panel-2); border: 1px solid var(--hair-2); border-radius: 9px; padding: 8px 13px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { background: linear-gradient(90deg, var(--purple), var(--magenta)); border-color: transparent; color: #fff; }
button.danger { color: var(--coral); }
button.link { background: none; border: 0; color: var(--accent); padding: 4px 0; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: 15px var(--text); color: var(--ink); background: rgba(13,11,27,.7); border: 1px solid var(--hair-2); border-radius: 9px; padding: 8px 10px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(179,157,255,.2); }
textarea { width: 100%; min-height: 150px; resize: vertical; line-height: 1.5; }
label.f { display: block; margin: 12px 0 0; }
label.f > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; }
label.f input:not([type=checkbox]), label.f select { width: 100%; }
.check { display: inline-flex; gap: 8px; align-items: center; margin: 10px 16px 0 0; }

/* inset grouped panel */
.panel { background: var(--panel); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; }
.panel + .panel { margin-top: 14px; }
.row { display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--hair); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .meta { color: var(--ink-2); font-size: 13px; }
.pad { padding: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }

/* status: a dot and a word, never a pill */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--draft)); }
.st.draft { --c: var(--draft); } .st.submitted { --c: var(--submitted); } .st.approved { --c: var(--approved); } .st.scheduled { --c: var(--scheduled); } .st.published { --c: var(--published); } .st.failed { --c: var(--failed); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 12px; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; background: var(--panel); }
.cal .dow { padding: 8px 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--hair); }
.cal .day { min-height: 128px; padding: 6px 6px 8px; border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); }
.cal .day:nth-child(7n+1) { border-left: 0; }
.cal .day.out { background: rgba(0,0,0,.25); }
.cal .day.today .n { color: #fff; background: var(--purple); }
.cal .n { display: inline-block; min-width: 24px; padding: 1px 6px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.cal .ev { display: block; font-size: 12px; font-weight: 600; color: var(--ink); padding: 2px 4px; margin-bottom: 3px; background: rgba(179,157,255,.14); border-radius: 5px; }
.cal .p { display: flex; gap: 5px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px; padding: 3px 4px; font: 12px/1.3 var(--text); color: var(--ink); cursor: pointer; }
.cal .p:hover { background: rgba(255,255,255,.07); }
.cal .p .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.cal .p .t { color: var(--ink-2); flex: none; }
.cal .p .g { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .more { font-size: 12px; color: var(--accent); background: none; border: 0; padding: 2px 4px; cursor: pointer; }
@media (max-width: 820px) {
  .cal { grid-template-columns: 1fr; }
  .cal .dow { display: none; }
  .cal .day { min-height: 0; border-left: 0; }
  .cal .day:not(.has):not(.today) { display: none; }
}

/* drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); z-index: 40; background: #15122c; border-left: 1px solid var(--hair-2); transform: translateX(100%); transition: transform .25s cubic-bezier(.32,.72,0,1); overflow-y: auto; padding: 20px 22px 40px; }
.drawer.open { transform: none; box-shadow: -30px 0 60px rgba(0,0,0,.5); }
.drawer .head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.drawer .head h1 { font-size: 20px; flex: 1; }
.drawer .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.preview { margin-top: 14px; border: 1px solid var(--hair); border-radius: 12px; overflow: hidden; background: rgba(0,0,0,.25); }
.preview .txt { padding: 12px 14px; white-space: pre-wrap; font-size: 14px; }
.preview img { display: block; width: 100%; }
.err { color: var(--coral); font-size: 13px; margin-top: 8px; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--hair); background: rgba(0,0,0,.3); }

/* sign-in */
.auth { max-width: 400px; margin: 10vh auto 0; }
.auth h1 { font-size: 30px; margin-bottom: 8px; }
.auth .panel { padding: 6px 18px 20px; margin-top: 18px; }
.auth button.primary { width: 100%; margin-top: 18px; padding: 11px; }

/* popup */
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(5,4,14,.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: min(480px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #18143a; border: 1px solid var(--hair-2); border-radius: 16px; padding: 22px 22px 20px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal h1 { font-size: 21px; margin-bottom: 6px; }
.modal .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.modal .actions .grow { flex: 1; }
.pw { display: flex; gap: 8px; }
.pw input { flex: 1; }
.ok { color: var(--published); font-size: 13px; margin-top: 8px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.help { font-size: 13px; color: var(--ink-2); margin-top: 6px; }

/* header logo, client list */
.client .clogo { height: 24px; width: auto; max-width: 200px; display: block; }
.tabs button.back { color: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tile { display: block; text-align: left; padding: 0; overflow: hidden; background: var(--panel); border: 1px solid var(--hair); border-radius: 14px; cursor: pointer; font: inherit; color: var(--ink); }
.tile:hover { border-color: var(--accent); }
.tile .logo { height: 110px; display: flex; align-items: center; justify-content: center; padding: 18px 24px; background: rgba(0,0,0,.28); border-bottom: 1px solid var(--hair); }
.tile .logo img { max-width: 100%; max-height: 74px; object-fit: contain; }
.tile .logo span { font-family: var(--title); font-size: 22px; }
.tile .tname { font-family: var(--title); font-weight: 600; font-size: 16px; padding: 12px 16px 2px; }
.tile .tstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; padding: 10px 16px 14px; }
.tile .tstats b { display: block; font-family: var(--title); font-size: 20px; }
.tile .tstats span { font-size: 12px; color: var(--ink-2); }
.tile > .st { padding: 0 16px 14px; }
.meter { height: 8px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 12px; }
.meter i { display: block; height: 100%; }
.logo-well { display: flex; align-items: center; justify-content: center; height: 110px; border-radius: 12px; background: #0d0b1b; border: 1px solid var(--hair); }
.clogo-lg { max-height: 70px; max-width: 80%; object-fit: contain; }

/* centred, colour-coded pop-ups (no side rails: colour lives in the icon disc and a soft tint) */
.notice-wrap { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; pointer-events: none; padding: 16px; }
.notice { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; max-width: min(460px, 100%); padding: 16px 16px 16px 18px; border-radius: 16px; background: #1a1640; border: 1px solid var(--hair-2); box-shadow: 0 24px 70px rgba(0,0,0,.6); opacity: 0; transform: scale(.96); transition: opacity .18s, transform .18s; }
.notice.on { opacity: 1; transform: none; }
.notice .msg, .ask .msg { flex: 1; font-size: 15px; line-height: 1.45; margin: 3px 0 0; }
.notice .x { background: none; border: 0; color: var(--ink-2); font-size: 20px; line-height: 1; padding: 0 2px; }
.ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 700; font-size: 15px; color: #0d0b1b; background: var(--c); }
.notice.ok, .ask.ok { --c: var(--published); background: linear-gradient(0deg, rgba(76,217,100,.10), rgba(76,217,100,.10)), #1a1640; border-color: rgba(76,217,100,.45); }
.notice.error, .ask.error { --c: var(--failed); background: linear-gradient(0deg, rgba(255,107,107,.12), rgba(255,107,107,.12)), #1a1640; border-color: rgba(255,107,107,.5); }
.notice.warn { --c: var(--submitted); background: linear-gradient(0deg, rgba(255,179,64,.12), rgba(255,179,64,.12)), #1a1640; border-color: rgba(255,179,64,.5); }
.notice.info, .ask.info { --c: var(--accent); background: linear-gradient(0deg, rgba(179,157,255,.12), rgba(179,157,255,.12)), #1a1640; border-color: rgba(179,157,255,.45); }
.modal.ask { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.modal.ask .msg { min-width: 0; flex: 1 1 260px; }
.modal.ask .actions { flex-basis: 100%; }
button.danger-solid { background: var(--coral); border-color: transparent; color: #fff; }
a.btn { display: inline-block; text-decoration: none; color: var(--ink); }

/* waitlist */
.wl-map { height: 460px; border-radius: 14px; overflow: hidden; border: 1px solid var(--hair); background: var(--panel); }
.wl-map .leaflet-popup-content { font: 14px/1.45 -apple-system, BlinkMacSystemFont, Inter, Arial, sans-serif; color: #1d1d1f; }
.wl-map .leaflet-popup-content a { color: #123375; }
button.row.wl-region { width: 100%; background: none; border: 0; border-top: 1px solid var(--hair); border-radius: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
button.row.wl-region:first-child { border-top: 0; }
button.row.wl-region.on { background: var(--panel-2, rgba(255,255,255,.06)); }
@media (max-width: 640px) { .wl-map { height: 340px; } }

/* connection lights: green = connected, red = disconnected */
.lights { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 2px; }
.tile .lights { padding: 0 16px 10px; margin: 0; }
.light { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; cursor: default; }
.light i { width: 11px; height: 11px; border-radius: 50%; background: var(--published); box-shadow: 0 0 0 3px rgba(76,217,100,.22); }
.light.off i { background: var(--failed); box-shadow: 0 0 0 3px rgba(255,107,107,.25); }
.light.off { color: var(--failed); }

/* which networks a post goes to, and its live links */
.nets { display: inline-flex; gap: 4px; margin-left: 6px; flex-wrap: wrap; }
.net { font-size: 11px; font-weight: 700; color: var(--ink); }
.net + .net::before { content: "· "; color: var(--ink); font-weight: 400; }
.net.up { color: var(--published); } .net.bad { color: var(--failed); }
.netlinks { margin: 12px 0 4px; border-top: 1px solid var(--hair); }
.netline { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.netline .grow { flex: 1; }
.light.wait i { background: var(--scheduled); box-shadow: 0 0 0 3px rgba(90,200,250,.22); }
.cal .p .nets { flex: none; flex-wrap: nowrap; white-space: nowrap; margin-left: auto; }
.cal .p .g { flex: 1; min-width: 0; }

.warnline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--hair); font-size: 14px; }
.warnline:last-child { border-bottom: 1px solid var(--hair); margin-bottom: 12px; }

.tiles-head { grid-column: 1 / -1; margin: 6px 0 -4px; }

/* Overview dashboard: Apple-style widgets (solid fills, ink text, status colours only) */
.ov { max-width: 1100px; }
.ovhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.ovhead h1 { margin: 0; font-size: 30px; letter-spacing: -.02em; }
.ovsub { margin: 4px 0 0; font-size: 16px; color: var(--ink); }
.wgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.widget { background: #1b1740; border: 1px solid var(--hair); border-radius: 20px; padding: 16px 18px 16px; min-height: 150px; display: flex; flex-direction: column; }
.widget.hero { background: #2a1f63; border-color: #4a3a9a; }
.wtop { display: flex; align-items: center; gap: 8px; }
.wlabel { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink); }
.wvalue { font-family: var(--text); font-size: 44px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: 10px 0 6px; color: var(--ink); }
.wfoot { font-size: 13px; color: var(--ink); margin-top: auto; line-height: 1.4; }
.ic { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; align-items: center; justify-content: center; background: #3b2f8a; color: #fff; flex: none; }
.ic svg { width: 16px; height: 16px; }
.widget.hero .ic { background: #ff9f0a; color: #1b1740; }
.delta { font-weight: 700; white-space: nowrap; } .delta.up { color: var(--published); } .delta.down { color: var(--failed); }
.spark { display: block; color: #ff9f0a; height: 44px; margin: 0 0 6px; } .spark svg { width: 100%; height: 44px; }
.wrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
.panel2 { background: #1b1740; border: 1px solid var(--hair); border-radius: 20px; padding: 16px 18px; margin-top: 14px; }
.wrow .panel2 { margin-top: 0; }
.ptitle { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.ptitle .grow { flex: 1; }
.best { display: flex; gap: 14px; color: var(--ink); text-decoration: none; }
.best img { width: 160px; height: 160px; object-fit: contain; background: #0d0b1b; border-radius: 12px; flex: none; }
.btext { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bline { font-weight: 600; font-size: 15px; line-height: 1.35; }
.bnums { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; } .bnums b { font-size: 20px; }
.blink { color: var(--accent); font-weight: 600; font-size: 14px; margin-top: auto; }
.meet { display: grid; gap: 2px; }
.mrow { display: grid; grid-template-columns: 96px 1fr 90px 28px; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--hair); color: var(--ink); text-decoration: none; font-size: 14px; }
.mrow:first-child { border-top: 0; }
.mtown { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mbar { height: 8px; border-radius: 4px; background: #2e2866; overflow: hidden; } .mbar i { display: block; height: 100%; background: #ff9f0a; border-radius: 4px; min-width: 2px; }
.mn { text-align: right; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.scard { background: none; border: 0; padding: 0; text-align: left; color: var(--ink); cursor: pointer; font: inherit; }
.scard img, .scard .noimg { width: 132px; height: 165px; object-fit: cover; border-radius: 12px; display: block; background: #2e2866; }
.sday { font-size: 13px; font-weight: 600; margin-top: 6px; } .snet { font-size: 12px; }
.kv { display: flex; gap: 28px; flex-wrap: wrap; } .kv div { display: flex; flex-direction: column; } .kv b { font-size: 30px; letter-spacing: -.02em; } .kv span { font-size: 13px; }
.ovnote { font-size: 13px; color: var(--ink); margin: 10px 0 0; }
.empty { color: var(--ink); margin: 0; font-size: 14px; }
@media (max-width: 900px) { .wgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .wgrid { grid-template-columns: 1fr; } .ovhead { flex-direction: column; align-items: flex-start; } .wvalue { font-size: 38px; } }

.mrow.np { grid-template-columns: 96px 1fr auto; }
.mco { font-weight: 400; }
.mplace { font-size: 13px; text-align: right; }
