/* WebPalz Social portal. Phone first, light and dark. A calm violet theme: soft lavender-grey
   surfaces, white cards, one strong primary, and status colours used only for status. */
:root {
  --bg: #f5f4fa; --surface: #ffffff; --surface-2: #faf9fe; --sunken: #efedf7;
  --ink: #17142a; --soft: #5b5873; --muted: #8e8aa6; --line: #e6e3f0; --line-strong: #d6d2e6;
  --primary: #5b3df5; --primary-2: #7c5cff; --primary-ink: #ffffff; --primary-soft: #efebff; --primary-line: #d9d0ff;
  --ok: #0f8a5f; --ok-soft: #e4f6ee; --wait: #b25e09; --wait-soft: #fff3e0; --bad: #d33a3a; --bad-soft: #fdeceb;
  --go: #3d63dd; --go-soft: #e9efff; --idle: #6e6b85; --idle-soft: #f0eff5;
  --fb: #1877f2; --ig: #d62976; --yt: #ff0033;
  --radius: 16px; --radius-sm: 11px;
  --shadow: 0 1px 2px rgb(23 20 42 / .04), 0 2px 8px rgb(23 20 42 / .04);
  --shadow-lg: 0 12px 40px rgb(23 20 42 / .14);
  --sidebar: 260px; --tabbar: 66px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0d1a; --surface: #181527; --surface-2: #1c1930; --sunken: #13111f;
    --ink: #ecebf5; --soft: #b0adc6; --muted: #7d7996; --line: #2a2640; --line-strong: #39344f;
    --primary: #8b74ff; --primary-2: #a592ff; --primary-ink: #120f22; --primary-soft: #241e45; --primary-line: #3a3170;
    --ok: #45d39b; --ok-soft: #12291f; --wait: #f3b25e; --wait-soft: #2c2213; --bad: #ff7a7a; --bad-soft: #2f1618;
    --go: #84a3ff; --go-soft: #18213d; --idle: #a29fb8; --idle-soft: #221f33;
    --shadow: none; --shadow-lg: 0 12px 40px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Kannada", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img, video { max-width: 100%; display: block; }
svg { flex: none; }
h1 { font-size: 26px; line-height: 1.2; margin: 0; letter-spacing: -.02em; font-weight: 750; }
h2 { font-size: 17px; margin: 0; letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 0; display: flex; align-items: center; gap: 8px; }
h3 svg { width: 18px; height: 18px; color: var(--primary); }
p { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--sunken); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--soft); }
.small { font-size: 13px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.clamp1, .clamp2, .clamp3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.clamp1 { -webkit-line-clamp: 1; } .clamp2 { -webkit-line-clamp: 2; } .clamp3 { -webkit-line-clamp: 3; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.tight { gap: 8px; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; border-radius: 8px; }
.boot { display: grid; place-items: center; min-height: 100vh; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--primary-soft); border-top-color: var(--primary); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Shell: sidebar on wide screens; top bar + tab bar on phones ---- */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .switcher { flex: 1; min-width: 0; }
.content { max-width: 1120px; margin: 0 auto; padding: 18px 16px calc(var(--tabbar) + 32px + env(safe-area-inset-bottom)); min-width: 0; }
.content > * + * { margin-top: 22px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none !important; }
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a[aria-current="page"] { color: var(--primary); }
.tabbar .tab-new { justify-self: center; width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; color: var(--primary-ink); background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 40%, transparent); transform: translateY(-10px); }
.tabbar .tab-new svg { width: 26px; height: 26px; stroke-width: 2.4; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: var(--ink); text-decoration: none !important; }
.logo svg { width: 30px; height: 30px; padding: 6px; border-radius: 9px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); stroke-width: 2.2; }
.logo b { color: var(--primary); font-weight: 800; }
.me-mini { display: flex; text-decoration: none !important; }
.hide-phone { display: none !important; }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .topbar, .tabbar, .hide-desktop { display: none !important; }
  .hide-phone { display: inline-flex !important; }
  .sidebar { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line); }
  .sidebar .logo { padding: 2px 8px 6px; }
  .sidebar nav { display: grid; gap: 2px; margin-top: 2px; }
  .sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--soft); font-weight: 600; text-decoration: none; }
  .sidebar nav a svg { width: 20px; height: 20px; }
  .sidebar nav a:hover { background: var(--surface-2); color: var(--ink); }
  .sidebar nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
  .sidebar .create { width: 100%; }
  .me-link { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; color: var(--ink); text-decoration: none !important; border: 1px solid var(--line); }
  .me-link:hover, .me-link[aria-current="page"] { background: var(--surface-2); }
  .me-link b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .me-link small { color: var(--muted); font-size: 12px; }
  .content { padding: 32px 36px 56px; width: 100%; }
}

/* ---- Business switcher ---- */
.switcher { position: relative; }
.switch-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); cursor: pointer; text-align: left; }
.switch-btn:hover:not([disabled]) { border-color: var(--line-strong); }
.switch-btn[disabled] { cursor: default; opacity: 1; }
.switch-btn > svg { width: 18px; height: 18px; color: var(--muted); }
.switch-name { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.switch-name small { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.switch-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; min-width: 240px; max-height: 60vh; overflow: auto; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.menu button, .menu-add { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; font-weight: 550; color: var(--ink); }
.menu button:hover, .menu-add:hover { background: var(--surface-2); text-decoration: none; }
.menu button.on { background: var(--primary-soft); color: var(--primary); }
.menu button > svg { width: 16px; height: 16px; }
.menu-add { color: var(--primary); border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }
.menu-add svg { width: 18px; height: 18px; }
.menu-search { margin-bottom: 6px; }

/* ---- Marks and avatars ---- */
.mark { flex: none; display: inline-grid; place-items: center; border-radius: 28%; object-fit: contain; background: #fff; color: #fff; font-weight: 750; border: 1px solid var(--line); overflow: hidden; }
span.mark { border: 0; }
.mark.all { width: 32px; height: 32px; background: var(--primary-soft); color: var(--primary); }
.mark.all svg { width: 18px; height: 18px; }
.avatar { flex: none; display: inline-grid; place-items: center; border-radius: 50%; font-weight: 700; font-size: 13px; background: linear-gradient(135deg, var(--primary-soft), color-mix(in srgb, var(--primary-soft) 50%, var(--go-soft))); color: var(--primary); }

/* ---- Buttons and inputs ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 650; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover:not([disabled]) { background: var(--surface-2); }
.btn:active:not([disabled]) { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover:not([disabled]) { background: color-mix(in srgb, var(--primary) 88%, #000); }
.btn.good { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.good:hover:not([disabled]) { background: color-mix(in srgb, var(--ok) 88%, #000); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--primary); }
.btn.ghost:hover:not([disabled]) { background: var(--primary-soft); }
.btn.danger { color: var(--bad); }
.btn.ghost.danger:hover:not([disabled]) { background: var(--bad-soft); }
.btn.danger-solid { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); width: 100%; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn.small svg { width: 16px; height: 16px; }
.btn.big { min-height: 50px; font-size: 16px; border-radius: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--soft); cursor: pointer; text-decoration: none !important; }
.icon-btn:hover:not([disabled]) { color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.icon-btn.danger { color: var(--bad); border-color: transparent; background: transparent; }
.icon-btn[disabled] { opacity: .45; cursor: not-allowed; }
.field { display: block; min-width: 0; }
.field > span { display: block; font-size: 13px; font-weight: 650; margin-bottom: 6px; color: var(--ink); }
.field > small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); }
input[disabled], textarea[disabled] { background: var(--surface-2); color: var(--soft); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
textarea.tall { min-height: 160px; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.check input { margin-top: 2px; width: 18px; height: 18px; flex: none; }
.code { letter-spacing: .45em; font-size: 22px !important; text-align: center; font-variant-numeric: tabular-nums; }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .wide { grid-column: 1 / -1; } }
.narrow { max-width: 640px; }

/* Segmented control */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--soft); font-weight: 650; font-size: 13px; cursor: pointer; white-space: nowrap; }
.seg button svg { width: 16px; height: 16px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(23 20 42 / .12); }

/* ---- Cards, notes, chips ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card.inset { background: var(--surface-2); box-shadow: none; }
.pad { padding: 18px; }
.note { padding: 12px 14px; border-radius: 12px; background: var(--idle-soft); color: var(--soft); font-size: 14px; }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.note.wait { background: var(--wait-soft); color: var(--wait); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--idle-soft); color: var(--idle); white-space: nowrap; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.wait { background: var(--wait-soft); color: var(--wait); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.go { background: var(--go-soft); color: var(--go); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--sunken); color: var(--soft); }
.where { display: inline-flex; gap: 4px; align-items: center; }
.net { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: #fff; }
.net svg { width: 13px; height: 13px; stroke-width: 2.2; }
.net.facebook { background: var(--fb); } .net.instagram { background: linear-gradient(45deg, #f9a825, var(--ig) 55%, #7b3fe4); } .net.youtube { background: var(--yt); }
.empty { display: grid; justify-items: center; gap: 6px; padding: 36px 20px; text-align: center; color: var(--soft); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); }
.empty b { color: var(--ink); }
.empty-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--primary-soft); color: var(--primary); margin-bottom: 4px; }
.empty-icon svg { width: 24px; height: 24px; }
.skeleton { display: grid; gap: 12px; }
.skeleton div { height: 74px; border-radius: var(--radius); background: linear-gradient(90deg, var(--sunken), var(--surface-2), var(--sunken)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton.tall div { height: 420px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- Page heads and sections ---- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.eyebrow { font-size: 13px; font-weight: 650; color: var(--primary); margin-bottom: 4px !important; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 650; color: var(--soft); margin-bottom: 8px; }
.back svg { width: 16px; height: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-head h2 { display: flex; align-items: center; gap: 8px; }
.section-head a { font-size: 13px; font-weight: 650; }
.two-col { display: grid; gap: 22px; }
.two-col > * { min-width: 0; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; align-items: start; } .two-col.wide-left { grid-template-columns: 1.4fr 1fr; } }

/* ---- Overview ---- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
.stat { display: grid; gap: 2px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; }
a.stat:hover { border-color: var(--primary-line); }
.stat b { font-size: 28px; line-height: 1.1; letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--soft); }
.stat.wait b { color: var(--wait); } .stat.ok b { color: var(--ok); } .stat.bad b { color: var(--bad); }
.setup { padding: 18px; background: linear-gradient(135deg, var(--primary-soft), var(--surface) 70%); border-color: var(--primary-line); }
.setup-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ring { --p: 0; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--line) 0); flex: none; }
.ring span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 12px; font-weight: 750; }
.steps { display: grid; gap: 6px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none !important; }
.step > svg { width: 16px; height: 16px; margin-left: auto; color: var(--muted); }
.step.done { color: var(--soft); }
.step.done span:not(.tick) { text-decoration: line-through; }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.tick svg { width: 14px; height: 14px; stroke-width: 3; }
.step.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.approvals { display: grid; gap: 14px; }
@media (min-width: 720px) { .approvals { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
.approval { display: grid; grid-template-columns: 112px minmax(0, 1fr); overflow: hidden; }
.approval-media { background: var(--sunken) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); min-height: 150px; }
.approval-media svg { width: 28px; height: 28px; }
.approval-body { padding: 14px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.approval-body p { font-size: 14px; color: var(--soft); }
.approval-body .btn { min-height: 38px; padding: 7px 14px; }
@media (min-width: 720px) { .approval { grid-template-columns: 1fr; } .approval-media { aspect-ratio: 4 / 3; min-height: 0; } }
.when-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; color: var(--soft); }
.when-pill svg { width: 14px; height: 14px; }
.caught-up { display: flex; align-items: center; gap: 14px; padding: 18px; }
.caught-up > svg { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); stroke-width: 2.5; }
.timeline { list-style: none; margin: 0; padding: 6px; }
.timeline a { display: grid; grid-template-columns: 74px 12px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; color: var(--ink); text-decoration: none !important; }
.timeline a:hover { background: var(--surface-2); }
.tl-when { display: grid; line-height: 1.25; }
.tl-when b { font-size: 13px; } .tl-when small { color: var(--muted); font-size: 12px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 4px var(--go-soft); }
.tl-dot.idle { background: var(--idle); box-shadow: 0 0 0 4px var(--idle-soft); }
.tl-text { min-width: 0; display: grid; font-size: 14px; }
.recent { display: grid; gap: 6px; }
.recent-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; color: var(--ink); text-decoration: none !important; background: var(--surface); border: 1px solid var(--line); }
.recent-item:hover { border-color: var(--primary-line); }
.recent-img { width: 48px; height: 48px; border-radius: 10px; background: var(--sunken) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); }
.recent-img svg { width: 20px; height: 20px; }
.recent-text { min-width: 0; display: grid; font-size: 14px; }
.health-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .health-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.health { display: grid; gap: 12px; padding: 16px; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.health:hover { border-color: var(--primary-line); }
.health > .row > svg { width: 18px; height: 18px; color: var(--muted); }
.health-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.health-nums span { display: grid; padding: 8px; border-radius: 10px; background: var(--surface-2); font-size: 12px; color: var(--soft); }
.health-nums b { font-size: 18px; color: var(--ink); }
.health-nums .wait b { color: var(--wait); } .health-nums .bad b { color: var(--bad); }
.conn-dot { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--idle-soft); color: var(--muted); }
.conn-dot svg { width: 14px; height: 14px; }
.conn-dot.connected { background: var(--ok-soft); color: var(--ok); }
.conn-dot.problem { background: var(--bad-soft); color: var(--bad); }

/* Team inbox */
.inbox .list, .inbox.compact .list { display: grid; gap: 6px; }
.inbox.compact { padding: 16px; border-color: color-mix(in srgb, var(--wait) 35%, var(--line)); }
.inbox-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 10px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; color: var(--ink); font: inherit; }
.inbox-item:hover { border-color: var(--primary-line); background: var(--surface-2); }
.inbox-text { min-width: 0; display: grid; gap: 2px; font-size: 14px; }

/* ---- Post rows, tiles, lists ---- */
.list { display: grid; }
.list.card > * + * { border-top: 1px solid var(--line); }
.post-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.post-row-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; color: var(--ink); text-decoration: none !important; border-radius: var(--radius); }
.post-row-main:hover { background: var(--surface-2); }
.thumb { position: relative; width: 64px; height: 80px; border-radius: 10px; background: var(--sunken) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.thumb svg { width: 22px; height: 22px; }
.badge { position: absolute; bottom: 4px; left: 4px; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; background: rgb(0 0 0 / .6); color: #fff; }
.post-row-text { min-width: 0; display: grid; gap: 6px; font-size: 14px; }
.post-row-text > .clamp2 { font-weight: 550; }
.meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--soft); }
.post-brand { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--soft); min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; } }
.tile { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: var(--sunken); color: #fff; text-decoration: none !important; }
@media (min-width: 720px) { .tile { border-radius: 12px; } }
.tile-img { position: absolute; inset: 0; background: var(--sunken) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); transition: transform .3s; }
.tile-img svg { width: 26px; height: 26px; }
.tile-state, .tile-when { position: absolute; left: 6px; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 7px; border-radius: 6px; font-size: 10px; font-weight: 700; background: rgb(0 0 0 / .55); }
.tile-state { top: 6px; } .tile-when { bottom: 6px; }
.tile-state.wait { background: rgb(178 94 9 / .9); } .tile-state.bad { background: rgb(211 58 58 / .9); } .tile-state.ok { background: rgb(15 138 95 / .9); }
.tile:hover .tile-img { transform: scale(1.03); }

/* Tabs and toolbars */
.tabs-line { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs-line::-webkit-scrollbar { display: none; }
.tabs-line button { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--soft); font-weight: 650; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs-line button.on { color: var(--primary); border-bottom-color: var(--primary); }
.tabs-line button.on .count { background: var(--primary-soft); color: var(--primary); }
.dot-bad { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-top: 14px !important; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); }
.search:focus-within { border-color: var(--primary); }
.search svg { width: 16px; height: 16px; }
.search input { border: 0 !important; box-shadow: none !important; padding: 0 !important; background: transparent !important; }

/* ---- Calendar ---- */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cal-title { font-size: 18px; min-width: 0; margin: 0 4px; }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 14px !important; }
.filters::-webkit-scrollbar { display: none; }
.filters button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--soft); font-size: 13px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.filters button i { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); }
.filters .f-waiting i { background: var(--wait); } .filters .f-scheduled i { background: var(--go); } .filters .f-posted i { background: var(--ok); } .filters .f-failed i { background: var(--bad); }
.filters button span { color: var(--muted); font-weight: 600; }
.filters button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filters button.on span { color: inherit; opacity: .7; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; margin-top: 14px !important; }
.dow { padding: 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cell { min-width: 0; min-height: 62px; padding: 6px 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.cell:nth-child(7n) { border-right: 0; }
.cell:hover { background: var(--surface-2); }
.cell.other { background: var(--surface-2); }
.cell.other .num { color: var(--muted); opacity: .6; }
.cell-head { display: flex; align-items: center; justify-content: center; }
.num { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 650; color: var(--soft); }
.cell.today .num { background: var(--primary); color: var(--primary-ink); }
.cell.picked { box-shadow: inset 0 0 0 2px var(--primary); }
.cell-add { display: none; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 7px; background: var(--primary-soft); color: var(--primary); cursor: pointer; place-items: center; }
.cell-add svg { width: 14px; height: 14px; stroke-width: 2.4; }
.cell-posts { display: none; }
.dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); }
.dots i.wait { background: var(--wait); } .dots i.go { background: var(--go); } .dots i.ok { background: var(--ok); } .dots i.bad { background: var(--bad); }
.day-panel { margin-top: 18px !important; }
@media (min-width: 720px) {
  .cell { min-height: 116px; padding: 6px; }
  .cell-head { justify-content: space-between; }
  .cell-posts { display: grid; gap: 3px; }
  .dots { display: none; }
  .cell:hover .cell-add { display: grid; }
  .day-panel { display: none; }
  .cell.picked { box-shadow: none; }
}
.pill { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 3px 6px 3px 3px; border-radius: 7px; font-size: 11.5px; line-height: 1.3; color: var(--ink); text-decoration: none !important; background: var(--idle-soft); border-left: 3px solid var(--idle); }
.pill:hover { filter: brightness(.97); }
.pill.wait { background: var(--wait-soft); border-color: var(--wait); } .pill.go { background: var(--go-soft); border-color: var(--go); } .pill.ok { background: var(--ok-soft); border-color: var(--ok); } .pill.bad { background: var(--bad-soft); border-color: var(--bad); }
.pill i { width: 0; }
.pill-img { flex: none; width: 20px; height: 20px; border-radius: 4px; background: center / cover no-repeat; }
.pill-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.more { font-size: 11px; color: var(--soft); font-weight: 650; padding-left: 4px; }
.week { display: grid; gap: 10px; margin-top: 14px !important; }
.week-day { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; min-width: 0; }
.week-head { display: grid; justify-items: center; align-content: start; gap: 2px; padding-top: 6px; color: var(--soft); font-size: 12px; font-weight: 650; }
.week-head b { font-size: 20px; color: var(--ink); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; }
.week-day.today .week-head b { background: var(--primary); color: var(--primary-ink); }
.week-head .cell-add { display: grid; }
.week-posts { display: grid; gap: 8px; min-width: 0; }
.week-empty { padding: 14px; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.week-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; min-width: 0; }
.week-card:hover { border-color: var(--primary-line); }
.wc-img { width: 56px; height: 70px; border-radius: 8px; background: var(--sunken) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); }
.wc-img svg { width: 20px; height: 20px; }
.wc-body { min-width: 0; display: grid; gap: 4px; align-content: start; font-size: 13px; }
.wc-body .chip { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) {
  .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
  .week-day { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .week-head { grid-template-columns: auto auto 1fr; justify-items: start; align-items: center; padding: 4px; }
  .week-head .cell-add { justify-self: end; }
  .week-card { grid-template-columns: minmax(0, 1fr); }
  .wc-img { width: 100%; height: auto; aspect-ratio: 4 / 5; }
}
.agenda-day + .agenda-day { margin-top: 18px; }
.day-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px 2px; }

/* ---- Post page ---- */
.post-head h1 { font-size: 22px; margin-bottom: 8px; }
.post-layout { display: grid; gap: 20px; align-items: start; }
@media (min-width: 900px) { .post-layout { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; } .post-preview { position: sticky; top: 24px; } }
.post-preview { display: grid; gap: 12px; justify-items: center; min-width: 0; }
.post-side { display: grid; gap: 16px; min-width: 0; }
.decide { padding: 18px; display: grid; gap: 10px; border-color: var(--primary-line); background: linear-gradient(180deg, var(--primary-soft), var(--surface) 80%); }
.decide-btns { display: grid; gap: 8px; }
@media (min-width: 560px) { .decide-btns { grid-template-columns: 1fr 1fr; } }
.journey { list-style: none; margin: 0; padding: 0; display: grid; }
.journey li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 16px; }
.journey li:last-child { padding-bottom: 0; }
.journey li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.journey li:last-child::before { display: none; }
.journey li.done::before { background: var(--ok); }
.j-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); background: var(--surface); }
.j-dot svg { width: 15px; height: 15px; stroke-width: 3; }
.journey li.done .j-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.journey li.now:not(.done) .j-dot { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.journey li.bad .j-dot { background: var(--bad); border-color: var(--bad); color: #fff; }
.journey b { font-size: 14px; display: block; }
.journey small { color: var(--soft); font-size: 13px; }
.live-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.live-links .btn svg:last-child { width: 14px; height: 14px; color: var(--muted); }
.team-panel { border-style: dashed; border-color: var(--primary-line); }
.convo { padding: 18px; }
.thread { display: grid; gap: 12px; margin: 4px 0 14px; }
.msg { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.bubble { padding: 10px 12px; border-radius: 4px 14px 14px 14px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.msg.changes .bubble { background: var(--wait-soft); border-color: color-mix(in srgb, var(--wait) 25%, transparent); }
.bubble b { font-size: 13px; }
.bubble time { font-size: 11px; color: var(--muted); }
.bubble p { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.bubble .chip { margin-top: 4px; }
.composer-line { display: flex; gap: 8px; align-items: flex-end; }
.composer-line textarea { min-height: 44px; height: 44px; max-height: 160px; }
.composer-line textarea:focus { height: 96px; }

/* Previews: how a post looks on Facebook / Instagram */
.pv { width: 100%; max-width: 420px; background: #fff; color: #050505; border: 1px solid #dbdbdb; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Kannada", sans-serif; }
.pv-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.pv-head b { font-size: 14px; display: block; line-height: 1.2; }
.pv-head small { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #65676b; }
.pv-head small svg { width: 12px; height: 12px; }
.pv .mark { border-color: #eee; }
.ig-ring { padding: 2px; border-radius: 50%; background: linear-gradient(45deg, #f9a825, #d62976, #7b3fe4); display: inline-flex; }
.ig-ring .mark { border-radius: 50%; border: 2px solid #fff; }
.pv-media { background: #f0f0f0; }
.pv-media img, .pv-media video { width: 100%; max-height: 560px; object-fit: cover; background: #000; }
/* A Reel shows whole (black bars at the sides), as it plays full screen: cropping it to the height cut off its top and bottom. */
.pv-media video { object-fit: contain; }
.pv-media.sq img { aspect-ratio: 4 / 5; }
.pv-blank { aspect-ratio: 4 / 5; display: grid; place-items: center; align-content: center; gap: 8px; color: #8e8e8e; font-size: 13px; }
.pv-blank svg { width: 36px; height: 36px; }
.pv-bar { display: flex; align-items: center; gap: 16px; padding: 10px 12px; color: #262626; }
.pv-bar svg { width: 22px; height: 22px; }
.fb-bar { justify-content: space-around; border-top: 1px solid #e4e6eb; margin: 0 12px; padding: 6px 0; color: #65676b; font-size: 13px; font-weight: 600; }
.fb-bar span { display: inline-flex; align-items: center; gap: 6px; }
.fb-bar svg { width: 18px; height: 18px; }
.pv-caption { padding: 0 12px 6px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-text { padding: 0 12px 10px; }
.pv-more { border: 0; background: none; padding: 0; color: #8e8e8e; cursor: pointer; font-size: 14px; }
.pv-time { display: block; padding: 0 12px 12px; color: #8e8e8e; font-size: 11px; text-transform: uppercase; letter-spacing: .02em; }

.ico-line { display: flex; align-items: center; gap: 6px; }
.ico-line svg { width: 16px; height: 16px; color: var(--yt); }
.pv.yt { background: #000; border-color: #000; max-width: 300px; }
.yt-screen { position: relative; aspect-ratio: 9 / 16; background: #111; color: #fff; }
.yt-screen > img, .yt-screen > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yt-screen .pv-blank { position: absolute; inset: 0; aspect-ratio: auto; color: #aaa; }
.yt-screen::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgb(0 0 0 / .75)); pointer-events: none; }
.yt-screen > video { cursor: pointer; }
.yt-play { position: absolute; z-index: 2; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.yt-play svg { width: 30px; height: 30px; margin-left: 3px; }
.yt-rail { position: absolute; right: 8px; bottom: 70px; z-index: 1; display: grid; gap: 14px; justify-items: center; }
.yt-rail span { display: grid; justify-items: center; gap: 2px; }
.yt-rail svg { width: 26px; height: 26px; }
.yt-rail span:nth-child(2) svg { transform: rotate(180deg); }
.yt-rail small { font-size: 11px; }
.yt-info { position: absolute; left: 12px; right: 64px; bottom: 12px; z-index: 1; display: grid; gap: 8px; }
.yt-info p { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.yt-chan { display: flex; align-items: center; gap: 8px; min-width: 0; }
.yt-chan b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-chan .mark { border-color: #fff; }
.yt-sub { padding: 4px 10px; border-radius: 999px; background: #fff; color: #000; font-size: 12px; font-weight: 700; }
/* A landscape video: a regular YouTube video, shown like the watch page (player, then title and channel). */
.pv.yt-wide { max-width: 520px; background: #0f0f0f; color: #f1f1f1; }
.yt-player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.yt-player > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.yt-watch { padding: 12px; display: grid; gap: 10px; }
.yt-watch p { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }

/* ---- Composer ---- */
.compose { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1040px) { .compose { grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; } }
.compose-steps { display: grid; gap: 14px; min-width: 0; }
.step-card { padding: 18px; display: grid; gap: 14px; }
.step-title { display: flex; gap: 12px; align-items: flex-start; }
.step-title p { margin-top: 2px; }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 750; font-size: 13px; background: var(--primary-soft); color: var(--primary); }
.step-n svg { width: 16px; height: 16px; }
.drop { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.drop:hover { border-color: var(--primary); background: var(--primary-soft); }
.drop.has { padding: 14px; border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.drop-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); color: var(--primary); border: 1px solid var(--line); }
.drop-icon svg { width: 24px; height: 24px; }
.drop-done { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 650; }
.drop-done svg { width: 18px; height: 18px; }
.design-canvas { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); max-width: 360px; }
.design-canvas canvas { width: 100%; height: auto; display: block; }
.net-toggles { display: grid; gap: 8px; }
@media (min-width: 560px) { .net-toggles { grid-template-columns: 1fr 1fr; } }
.net-toggle { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 13px; cursor: pointer; font-weight: 650; color: var(--ink); text-decoration: none !important; }
.net-toggle > svg { width: 22px; height: 22px; color: var(--muted); }
.net-toggle span { flex: 1; }
.net-toggle i { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-strong); display: grid; place-items: center; }
.net-toggle i svg { width: 14px; height: 14px; stroke-width: 3; }
.net-toggle.on { border-color: var(--primary); background: var(--primary-soft); }
.net-toggle.on i { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.net-toggle.on:first-child > svg { color: var(--fb); }
.net-toggle.on:nth-child(2) > svg { color: var(--ig); }
.net-toggle.off { color: var(--muted); border-style: dashed; font-weight: 550; font-size: 14px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick button { padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 650; cursor: pointer; color: var(--soft); }
.quick button.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.brand-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.brand-choices button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 650; }
.brand-choices button.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.compose-preview { min-width: 0; }
.compose-preview .sticky { display: grid; gap: 14px; justify-items: stretch; }
@media (min-width: 1040px) { .compose-preview .sticky { position: sticky; top: 24px; } }
.compose-preview .pv { justify-self: center; }
.compose-actions { display: grid; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
@media (max-width: 1039px) { .compose-actions { position: sticky; bottom: calc(var(--tabbar) + 10px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); } }
@media (min-width: 960px) and (max-width: 1039px) { .compose-actions { bottom: 12px; } }
.progress { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--soft); }

/* ---- Business ---- */
.brand-head h1 { font-size: 24px; }
.account-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); }
.card > .account-row:first-child { border-top: 0; }
.net-badge { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--sunken); color: var(--soft); font-weight: 800; }
.net-badge svg { width: 20px; height: 20px; }
.net-badge.facebook { background: var(--fb); color: #fff; } .net-badge.instagram { background: linear-gradient(45deg, #f9a825, var(--ig) 55%, #7b3fe4); color: #fff; } .net-badge.youtube { background: var(--yt); color: #fff; }
.net-badge.google { background: #fff; color: #4285f4; border: 1px solid var(--line); } .net-badge.whatsapp { background: #25d366; color: #fff; }
.share-steps { padding: 16px; border-radius: 14px; background: var(--primary-soft); font-size: 14px; }
.share-steps ol { margin: 8px 0; padding-left: 20px; display: grid; gap: 6px; }
.swatches { display: flex; gap: 14px; flex-wrap: wrap; }
.swatch { display: grid; gap: 4px; justify-items: start; }
.swatch span { width: 64px; height: 44px; border-radius: 10px; border: 1px solid var(--line); }
.swatch small { font-weight: 650; font-size: 12px; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 25%, var(--line)); }

/* People */
.person { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.person .who { overflow-wrap: anywhere; }
.person .controls { display: flex; align-items: center; gap: 4px; }
.person select { width: auto; min-height: 36px; padding: 6px 10px; }
@media (max-width: 520px) { .person .controls { width: 100%; padding-left: 48px; } }
.role-pick { display: grid; gap: 8px; }
.role-pick label { display: grid; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: 12px; cursor: pointer; }
.role-pick label small { color: var(--soft); font-size: 12px; }
.role-pick label.on { border-color: var(--primary); background: var(--primary-soft); }
.role-pick label.on b { color: var(--primary); }

/* ---- Sign in ---- */
.signin-page { min-height: 100vh; display: grid; }
.signin-art { display: none; }
.signin-form { width: 100%; max-width: 420px; margin: 0 auto; padding: 48px 20px; display: grid; gap: 16px; align-content: center; }
.signin-form h1 { font-size: 30px; }
.btn.google { background: var(--surface); }
.btn.google svg { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.phone-input { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.phone-input span { display: grid; place-items: center; padding: 0 12px; background: var(--surface-2); color: var(--soft); font-weight: 650; border-right: 1px solid var(--line); }
.phone-input input { border: 0 !important; border-radius: 0 !important; }
.phone-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); }
.phone-input input:focus { box-shadow: none !important; }
.fine { margin-top: 6px; }
@media (min-width: 900px) {
  .signin-page { grid-template-columns: 1.1fr 1fr; }
  .signin-art { display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 56px; position: relative; overflow: hidden; color: #fff; background: radial-gradient(120% 90% at 0% 0%, #7c5cff 0%, #5b3df5 45%, #2a1a8a 100%); }
  .signin-art .logo { color: #fff; } .signin-art .logo b { color: #d9d0ff; } .signin-art .logo svg { background: rgb(255 255 255 / .18); }
  .signin-art h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.02em; max-width: 460px; }
  .signin-art ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 440px; }
  .signin-art li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: rgb(255 255 255 / .9); }
  .signin-art li svg { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: rgb(255 255 255 / .14); }
  .art-cards { position: absolute; right: -60px; bottom: -40px; display: flex; gap: 14px; transform: rotate(-8deg); opacity: .35; }
  .art-cards span { width: 150px; height: 190px; border-radius: 18px; background: rgb(255 255 255 / .25); }
  .art-cards span:nth-child(2) { transform: translateY(-40px); }
}
.logo.big { font-size: 22px; }

/* ---- Toast ---- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); animation: rise .2s ease-out; }
.toast svg { width: 18px; height: 18px; color: #45d39b; }
.toast.bad svg { color: #ff8a8a; }
.toast-action { color: inherit; text-decoration: underline; white-space: nowrap; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (min-width: 960px) { .toast { bottom: 24px; left: calc(50% + var(--sidebar) / 2); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- Per-platform status on the icons ---- */
.net { position: relative; }
.net.planned { opacity: .9; }
.net.failed, .net.missed { filter: grayscale(.6); opacity: .75; }
.net-state { position: absolute; right: -4px; bottom: -4px; width: 12px; height: 12px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--surface); color: #fff; }
.net-state svg { width: 8px !important; height: 8px !important; stroke-width: 3.5 !important; }
.net.posted .net-state { background: var(--ok); }
.net.failed .net-state, .net.missed .net-state { background: var(--bad); }
.net.posting .net-state { background: var(--go); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.7); opacity: .6; } }
.where { gap: 6px; }
.net-words { font-size: 12px; font-weight: 600; color: var(--soft); margin-right: 4px; }
.net-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.net-list li { display: grid; grid-template-columns: 24px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.net-list li:first-child { border-top: 0; padding-top: 0; }
.net-list .net { width: 24px; height: 24px; }
.net-list .net svg { width: 15px; height: 15px; }
.net-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 650; }
.net-link svg { width: 14px; height: 14px; }
.pill .where { margin-left: auto; gap: 2px; flex: none; }
.pill .net { width: 14px; height: 14px; border-radius: 4px; }
.pill .net svg { width: 9px; height: 9px; }
.pill .net-state { width: 8px; height: 8px; right: -3px; bottom: -3px; border-width: 1px; }
.pill .net-state svg { display: none; }
.tile-nets { position: absolute; right: 6px; bottom: 6px; padding: 3px; border-radius: 7px; background: rgb(0 0 0 / .45); display: flex; }
.tile-nets .net-state { border-color: transparent; }
.tile-nets { padding: 2px; border-radius: 6px; }
.tile-nets .where { gap: 3px; }
.tile-nets .net { width: 16px; height: 16px; border-radius: 4px; }
.tile-nets .net svg { width: 10px; height: 10px; }
.tile-nets .net-state { width: 9px; height: 9px; right: -3px; bottom: -3px; }
.tile-nets .net-state svg { width: 6px !important; height: 6px !important; }
.tile-when { max-width: calc(100% - 52px); }
.net-list li { grid-template-columns: 24px 1fr auto minmax(0, auto); }
.net-list li.off .net { filter: grayscale(1); opacity: .5; }
.net-act { justify-self: end; }
.net-act .btn { min-height: 30px; padding: 4px 10px; }

.account-row .grow { min-width: 0; overflow-wrap: anywhere; }
.account-row .btn { flex: none; }
.account-row { flex-wrap: wrap; }
.account-row .acts { flex-basis: 100%; display: flex; gap: 8px; padding-left: 56px; }
.person .controls { flex-wrap: wrap; gap: 8px; }
.pending-phone { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-left: 48px; }
.pending-phone input.code { max-width: 160px; }

/* Colours: a picker and its hex code per role */
.colour-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.colour-field { display: flex; gap: 12px; align-items: flex-start; }
.colour-field input[type="color"] { width: 56px; height: 56px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: none; cursor: pointer; flex: none; }
.colour-field input[type="color"]:disabled { cursor: default; opacity: .8; }
.colour-field .hex { margin-top: 6px; width: 100%; max-width: 130px; font-family: ui-monospace, monospace; }
.colour-field .hex[aria-invalid="true"] { border-color: var(--bad); }

/* How to connect an account */
.how > summary { cursor: pointer; font-weight: 650; font-size: 14px; padding: 4px 0; }
.how > .stack { margin-top: 10px; }
.how ol { margin: 6px 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.way { padding: 14px; border-radius: 14px; background: var(--primary-soft); display: grid; gap: 8px; justify-items: start; }

/* How posts did */
.numbers { display: grid; gap: 8px; margin-bottom: 14px; }
.numbers:last-child { margin-bottom: 0; }
.numbers .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.numbers .stat { padding: 10px 12px; box-shadow: none; }
.numbers .stat b { font-size: 20px; }
.results-table { display: grid; gap: 2px; font-size: 14px; }
.results-row { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
.results-row.wide { grid-template-columns: minmax(0, 3fr) minmax(0, 1.2fr) repeat(4, minmax(0, 1fr)); }
.results-row.head { font-size: 12px; color: var(--soft); font-weight: 650; border-bottom-color: var(--line); }
a.results-row:hover { background: var(--bg-soft, rgb(0 0 0 / .03)); }
.top-post { padding: 8px 0; gap: 12px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
@media (max-width: 560px) { .results-row.wide { grid-template-columns: minmax(0, 3fr) repeat(2, minmax(0, 1fr)); } .results-row.wide > span:nth-child(n+5), .results-row.head.wide > span:nth-child(n+5) { display: none; } }

/* ---- Results on home, native-style counts, audience comments ---- */
.stat small { font-size: 12px; margin-top: 2px; }
.stat small.up { color: var(--ok); }
.best-post { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px; align-items: center; color: var(--ink); text-decoration: none !important; }
.best-img { position: relative; width: 96px; aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; background: var(--sunken) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); }
.best-img svg { width: 24px; height: 24px; }
.best-hook { font-size: 17px; font-weight: 650; margin: 8px 0 4px; }
.milestones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.milestones .chip { text-decoration: none !important; }
.top-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.top-tile { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: var(--sunken); text-decoration: none !important; }
.top-tile-num { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.aud-row { display: grid; gap: 4px; padding: 12px 14px; color: var(--ink); text-decoration: none !important; border-bottom: 1px solid var(--line); }
.aud-row:last-child { border-bottom: 0; }
.tips { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.pv-counts { padding: 0 12px 6px; font-size: 13px; line-height: 1.5; color: #262626; }
.pv-counts .muted { color: #737373; }
.fb-counts { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; color: #65676b; }
.fb-react { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #1877f2; color: #fff; vertical-align: middle; }
.fb-react svg { width: 11px; height: 11px; }
.yt-views { display: block; opacity: .85; margin-top: 2px; }
.aud-comment { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.aud-comment p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.aud-comment.done { opacity: .6; }
.best-post > div { min-width: 0; }
.chip svg { width: 14px; height: 14px; }
.vid { overflow: hidden; }
.vid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.vid .badge { position: absolute; left: 8px; bottom: 8px; z-index: 1; }
/* A top tile writes its views along the bottom, so its Reel badge sits in the top corner instead. */
.top-tile .tile-img .badge { top: 8px; bottom: auto; }
