/* HurricaneSync console. Colours match the public website (apps/web/assets/site.css). */
:root {
  --blue: #1f5fd6; --blue-dark: #16449c; --blue-2: #3b82f6; --pale: #e8f0fd; --ink: #14213d; --muted: #5a6478;
  --bg: #f4f7fc; --card: #ffffff; --line: #dde3ee; --text: var(--ink);
  --ok: #1e7a46; --ok-bg: #e6f4ec; --warn: #8a5a00; --warn-bg: #fff4d6; --bad: #b42318; --bad-bg: #fdecea;
  --youtube: #e00020; --instagram: #c13584; --facebook_page: #1877f2; --tiktok: #0f8f8a; --linkedin: #0a66c2; --x: #2b2f3a; --threads: #101010; --telegram: #229ed9;
  --email: #1f5fd6; --whatsapp: #1fa855;
  --radius: 16px; --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px rgba(20, 33, 61, .07);
  --hero: linear-gradient(135deg, #14213d 0%, #1b3f8f 55%, #1f5fd6 100%);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #6f9bff; --blue-dark: #8fb4ff; --pale: #18233a; --ink: #e9eef8; --muted: #a8b3c7;
    --bg: #0b1220; --card: #141d31; --line: #26334d;
    --ok: #6fd39a; --ok-bg: #12301f; --warn: #f5dc8c; --warn-bg: #3a300f; --bad: #ff8a80; --bad-bg: #3a1714;
    --x: #c9cfdb; --threads: #e6e6e6; --tiktok: #3fd6cf; --email: #6f9bff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --hero: linear-gradient(135deg, #0b1220 0%, #12245a 60%, #1b3f8f 100%);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--card); padding: 8px; z-index: 30; }
.ico { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* Left menu: dark "Jarvis" panel with glowing angled buttons. The same on every page; the pages stay clean. */
body { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { --glow: #3fd0ff; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: calc(20px + env(safe-area-inset-top)) 16px 18px; color: #dff6ff; background-color: #050c18;
  background-image: linear-gradient(rgba(63, 208, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(63, 208, 255, .05) 1px, transparent 1px);
  background-size: 40px 40px; border-right: 1px solid rgba(63, 208, 255, .3); }
.side-head { display: flex; flex-direction: column; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #eafaff; text-decoration: none; font-weight: 800; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 14px rgba(63, 208, 255, .6); }
.ws-pick { display: flex; gap: 8px; margin: 0 0 8px; }
.ws-box { flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; border: 1px solid var(--glow); border-radius: 10px; background: rgba(63, 208, 255, .1);
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8fc9e3; }
.ws-box select { width: 100%; background: transparent; color: #eafaff; border: 0; padding: 2px 0; font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.ws-box select option { color: #14213d; }
.ws-add { flex: none; width: 52px; min-height: 52px; padding: 0; font-size: 26px; font-weight: 400; color: #eafaff; background: rgba(63, 208, 255, .1); border: 1px solid var(--glow); box-shadow: none; }
.ws-add:hover { background: rgba(63, 208, 255, .28); box-shadow: 0 0 14px rgba(63, 208, 255, .45); }
.side-gear { display: none; }
.tabs { display: flex; flex-direction: column; gap: 8px; }
.tabs a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; color: #bfe9fa; text-decoration: none; font-weight: 600; font-size: 15px;
  border: 1px solid rgba(63, 208, 255, .22); background: rgba(10, 28, 50, .6); transition: background .2s, color .2s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); }
.tabs a:hover { background: rgba(63, 208, 255, .16); color: #fff; }
.tabs a[aria-current="page"] { color: #fff; border-color: var(--glow); background: linear-gradient(90deg, rgba(63, 208, 255, .35), rgba(63, 208, 255, .08)); box-shadow: 0 0 16px rgba(63, 208, 255, .35); }
.ico.line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.badge { margin-left: auto; background: #ff5d6c; color: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; line-height: 20px; min-width: 20px; text-align: center; box-shadow: 0 0 10px rgba(255, 93, 108, .7); }
.side-foot { margin-top: auto; padding: 16px 4px 0; font-size: 13px; color: #8fc9e3; }
.live { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #4ee08a; box-shadow: 0 0 8px #4ee08a; animation: live 1.8s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live { animation: none; } }
a.btn.ghost-link { display: inline-flex; align-items: center; text-decoration: none; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }

main { width: 100%; max-width: 1100px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 40px) 48px; }
.panel h1 { font-size: clamp(24px, 4vw, 32px); letter-spacing: -.02em; margin: 0 0 6px; }
.panel h2 { font-size: 18px; margin: 28px 0 10px; }
.sub { color: var(--muted); font-size: 17px; margin: 0 0 20px; max-width: 680px; }
.hint { color: var(--muted); font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 12px 0; box-shadow: var(--shadow); }

/* Controls */
button, .btn { font: inherit; font-weight: 600; border: 0; border-radius: 12px; padding: 10px 18px; min-height: 44px; cursor: pointer;
  background: linear-gradient(180deg, var(--blue-2), var(--blue)); color: #fff; box-shadow: 0 4px 12px rgba(31, 95, 214, .28); transition: transform .08s, box-shadow .15s; }
button:hover { box-shadow: 0 6px 18px rgba(31, 95, 214, .38); }
button:active { transform: translateY(1px); }
button.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
button.ghost:hover { background: var(--pale); }
button.danger { background: var(--card); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); box-shadow: none; }
button.danger:hover { background: var(--bad-bg); }
button[disabled] { opacity: .55; cursor: default; transform: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 60%, transparent); outline-offset: 2px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); }
select { width: auto; }
label { display: block; margin: 12px 0; font-size: 15px; font-weight: 600; }
label input, label textarea { margin-top: 6px; font-weight: 400; }
fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 12px 0; padding: 8px 14px 4px; }
legend { font-weight: 700; padding: 0 6px; }
details summary { cursor: pointer; color: var(--blue); font-weight: 600; margin-top: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--pale); color: var(--muted); }
.pill.ok { color: var(--ok); background: var(--ok-bg); } .pill.warn { color: var(--warn); background: var(--warn-bg); } .pill.bad { color: var(--bad); background: var(--bad-bg); }
.code { font: 700 26px/1.2 ui-monospace, Menlo, monospace; letter-spacing: 4px; padding: 12px 18px; background: var(--pale); color: var(--blue-dark); border: 2px dashed color-mix(in srgb, var(--blue) 45%, transparent); border-radius: 12px; display: inline-block; user-select: all; }
.mono { font-family: ui-monospace, Menlo, monospace; word-break: break-all; background: var(--pale); padding: 2px 8px; border-radius: 6px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; max-width: 90vw; z-index: 40; box-shadow: var(--shadow); font-weight: 600; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); max-width: 520px; width: calc(100% - 32px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(11, 18, 32, .5); }

/* Wizard: numbered stepper */
.steps { list-style: none; padding: 0; margin: 4px 0 20px; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; left: 10%; right: 10%; top: 22px; height: 3px; background: var(--line); border-radius: 2px; }
.steps li { position: relative; display: flex; justify-content: center; }
.steps li button { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; color: var(--muted); box-shadow: none; padding: 0 4px; min-height: 0; font-size: 14px; }
.steps .num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 17px; background: var(--card); border: 3px solid var(--line); color: var(--muted); }
.steps li.done .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li button[aria-current="step"] { color: var(--ink); }
.steps li button[aria-current="step"] .num { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 6px color-mix(in srgb, var(--blue) 18%, transparent); }
.steps li.done button[aria-current="step"] .num { color: #fff; }
#stepBody .card { padding: 24px; }
#stepBody h2 { margin-top: 0; font-size: 22px; }
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.apps button { background: var(--card); color: var(--ink); border: 2px solid var(--line); box-shadow: none; min-height: 56px; }
.apps button[aria-pressed="true"] { border-color: var(--blue); background: var(--pale); color: var(--blue-dark); }
.perm { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-weight: 400; }
.perm input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex: none; }

/* AI switch */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  background: var(--card); border: 1px solid var(--line); }
.switch-row:has([aria-checked="true"]) { background: linear-gradient(135deg, var(--ok-bg), var(--card)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.switch-row b { font-size: 18px; }
.switch { width: 64px; min-height: 36px; height: 36px; padding: 4px; border-radius: 999px; background: var(--line); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .15); flex: none; }
.switch span { display: block; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .18s; }
.switch[aria-checked="true"] { background: var(--ok); } .switch[aria-checked="true"] span { transform: translateX(28px); }

/* Approvals */
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; margin: 0 0 8px; box-shadow: var(--shadow); }
.seg button { background: none; color: var(--muted); box-shadow: none; min-height: 38px; padding: 6px 14px; border-radius: 9px; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.msg { border-left: 5px solid var(--ch, var(--blue)); }
.msg.ch-email { --ch: var(--email); } .msg.ch-whatsapp { --ch: var(--whatsapp); }
.msg-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.msg-head .pill:first-child { background: color-mix(in srgb, var(--ch, var(--blue)) 14%, var(--card)); color: var(--ch, var(--blue)); }
.msg textarea { min-height: 150px; line-height: 1.55; }
.msg .actions { display: flex; gap: 10px; margin-top: 12px; }
.msg .actions button:first-child { flex: 1; background: linear-gradient(180deg, #2fbf6b, var(--ok)); box-shadow: 0 4px 12px rgba(30, 122, 70, .3); }

/* Calendar */
.cal-head { display: flex; align-items: center; gap: 8px; } .cal-head h1 { flex: 1; text-align: center; margin: 0; }
#calAdd { margin-left: auto; min-height: 48px; padding: 8px 18px; font-size: 17px; font-weight: 700; border-radius: 24px; display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--shadow); }
#calAdd span { font-size: 26px; line-height: 1; font-weight: 600; }
a.brand { color: inherit; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
button.ghost.danger { color: var(--bad); }
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0 8px; }
.filters label { margin: 0; display: flex; align-items: center; gap: 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-toggle { min-height: 36px; padding: 6px 14px; border-radius: 999px; background: var(--card); color: var(--ink); border: 2px solid var(--c); box-shadow: none; }
.chip-toggle[aria-pressed="true"] { background: var(--c); color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--c) 40%, transparent); }
.pick-channels { display: grid; gap: 8px; margin: 0 0 12px; }
.pick-channels .label { font-weight: 600; }
.pick-channels .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-channels .chip-toggle.all { --c: var(--ink); width: 100%; }
.pick-channels .chip-toggle.all[aria-pressed="true"] { color: var(--bg); }
.pick-channels .hint { margin: 0; }
#stepUp input.code { font-size: 22px; letter-spacing: 4px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; background: var(--card); padding: 10px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.cal .dow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; padding: 4px 0; }
.cal .day { display: flex; flex-direction: column; align-items: stretch; background: var(--bg); color: var(--ink); border-radius: 10px; min-height: 104px; padding: 6px; border: 1px solid transparent; box-shadow: none; transition: background .15s; text-align: left; font-weight: 500; }
.cal .day:hover { background: var(--pale); box-shadow: none; }
.cal .day.other { opacity: .45; }
.cal .day.today { background: var(--pale); border-color: var(--blue); }
.cal .day.today .num { color: var(--blue); font-weight: 800; }
.cal .day.selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cal .day.drop { outline: 2px dashed var(--blue); background: var(--pale); }
.cal .num { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.cal .marks { display: none; flex-wrap: wrap; gap: 3px; justify-content: center; margin-top: auto; }
.cal .mark { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.cal .more { font-size: 10px; color: var(--muted); line-height: 7px; }
.cal .chips { display: block; min-width: 0; }
.sample[hidden], .move-bar[hidden] { display: none; }
.sample, .move-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 14px; }
.sample { color: var(--muted); }
.move-bar { background: var(--warn-bg); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: var(--radius); padding: 12px 16px; margin: 12px 0; font-weight: 600; }
.move-bar button { min-height: 36px; }
.cal-day h2 { margin-top: 20px; }
.post-card { border-left: 5px solid var(--c); display: flex; flex-direction: column; gap: 8px; }
.post-card .msg-head .pill:first-child { background: color-mix(in srgb, var(--c) 14%, var(--card)); color: var(--c); }
.post-card .title { font-size: 17px; }
.post-card .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.post { display: block; width: 100%; text-align: left; font-size: 12px; font-weight: 600; min-height: 0; padding: 5px 8px; margin: 3px 0; border-radius: 8px;
  background: color-mix(in srgb, var(--c) 14%, var(--card)); color: var(--ink); border: 0; border-left: 4px solid var(--c); box-shadow: none; cursor: grab;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post:hover { background: color-mix(in srgb, var(--c) 24%, var(--card)); box-shadow: none; }

/* Phones: dark top bar (logo, workspace, +, settings) and the menu as a bottom bar */
@media (max-width: 820px) {
  body { display: block; padding-bottom: 84px; }
  .side { position: sticky; top: 0; z-index: 30; height: auto; overflow: visible; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; gap: 0; border-right: 0; border-bottom: 1px solid rgba(63, 208, 255, .3); }
  .side-head { flex-direction: row; align-items: center; gap: 8px; }
  .brand span, .side-foot, .tabs .side-only { display: none; }
  .ws-pick { flex: 1; min-width: 0; margin: 0; }
  .ws-box { padding: 2px 8px; } .ws-box select { font-size: 14px; }
  .ws-add { width: 44px; min-height: 44px; font-size: 22px; }
  .side-gear { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--glow); border-radius: 10px; color: #eafaff; background: rgba(63, 208, 255, .1); }
  .side-gear[hidden] { display: none; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; flex-direction: row; gap: 2px; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: #050c18; border-top: 1px solid rgba(63, 208, 255, .35); }
  .tabs a { flex: 1; flex-direction: column; gap: 2px; min-height: 52px; padding: 4px 2px; font-size: 10.5px; justify-content: center; clip-path: none; border: 0; background: transparent; position: relative; border-radius: 10px; }
  .tabs a[aria-current="page"] { box-shadow: none; }
  .tabs a .badge { position: absolute; top: 0; right: 14%; margin: 0; }
  .tabs a[data-tab="create"] span:not(.badge) { font-size: 0; } .tabs a[data-tab="create"] span:not(.badge)::after { content: "Create"; font-size: 10.5px; }
  .tabs a[data-tab="accounts"] span:not(.badge) { font-size: 0; } .tabs a[data-tab="accounts"] span:not(.badge)::after { content: "Brands"; font-size: 10.5px; }
  .tabs a[data-tab="approvals"] span:not(.badge) { font-size: 0; } .tabs a[data-tab="approvals"] span:not(.badge)::after { content: "Approve"; font-size: 10.5px; }
  .tabs a[data-tab="dashboard"] span:not(.badge) { font-size: 0; } .tabs a[data-tab="dashboard"] span:not(.badge)::after { content: "Home"; font-size: 10.5px; }
  main { padding-top: 20px; }
  .steps .lbl { font-size: 11px; }
  .steps .num { width: 36px; height: 36px; font-size: 15px; } .steps::before { top: 18px; }
  /* A full month like Apple Calendar: day numbers and a dot per post; the day's posts show under the grid */
  .cal { gap: 3px; padding: 8px 6px; }
  .cal .dow { font-size: 10px; letter-spacing: 0; }
  .cal .day { min-height: 52px; padding: 4px 2px; border-radius: 8px; align-items: center; }
  .cal .num { font-size: 14px; margin-bottom: 2px; color: var(--ink); }
  .cal .day.other .num { color: var(--muted); }
  .cal .marks { display: flex; } .cal .chips { display: none; }
  .cal-head h1 { font-size: 20px; } .cal-head .ghost { padding: 6px 12px; min-height: 40px; }
  .msg .actions { position: sticky; bottom: 92px; }
}

/* Connections → Socials: one row per social, its colour on the left, one button on the right. */
.social-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.social-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--radius); background: var(--card); }
.social-row .who { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.social-row .who > div { display: flex; flex-direction: column; min-width: 0; }
.social-row .who .hint { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.social-row .logo { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--c); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.social-row button { flex: none; min-width: 96px; }
#socialsBrand { margin: 4px 0 10px; }
@media (prefers-color-scheme: dark) { .social-row[style*="--x"] .logo, .social-row[style*="--threads"] .logo { color: #0b1220; } }

/* New post + post approvals */
.yt-box { border: 1px solid var(--line, #ddd); border-radius: 12px; padding: 8px 12px 0; margin: 0 0 12px; }
.yt-box legend { font-weight: 600; padding: 0 4px; }
.post-card .caption { white-space: pre-wrap; margin: 6px 0; }
.issues { margin: 8px 0; padding-left: 20px; }
.issues li.bad { color: var(--bad, #b42318); font-weight: 600; }
.consent { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 0.95em; }
label.check { display: flex; align-items: center; gap: 8px; }
label.check input { width: auto; min-height: 0; }

/* Account + offline */
.card.links { display: grid; gap: 10px; }
.card.links p { margin: 0; }
.offline { position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 50; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-weight: 600; box-shadow: var(--shadow); text-align: center; }
.tabs a[hidden] { display: none; }
.tabs[hidden], .ws-pick[hidden], .side[hidden] { display: none; }
.update-bar { position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: var(--shadow); }
.update-bar[hidden] { display: none; }
.update-bar button { flex: none; }

/* Day and time picker (inside the box, never off-screen) */
fieldset.when { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 0 0 12px; display: grid; gap: 8px; }
fieldset.when legend { font-weight: 600; padding: 0 4px; }
.mini-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mini-head button { min-height: 36px; min-width: 44px; padding: 4px 10px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.mini-grid .dow { font-size: 12px; color: var(--muted); }
.mini-grid button { min-height: 38px; min-width: 0; padding: 0; border-radius: 10px; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: none; font-weight: 600; }
.mini-grid button.today { border-color: var(--blue); }
.mini-grid button[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.mini-grid button:disabled { opacity: .35; }
.when-time { display: flex; align-items: center; gap: 6px; }
.when-time span:first-child { font-weight: 600; margin-right: 6px; }
.when-time select { width: auto; min-width: 72px; }
.when-summary { margin: 0; }

/* Dashboard tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 8px 0 16px; }
.tile { display: flex; flex-direction: column; gap: 4px; margin: 0; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--blue); }
.tile.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-bg); }
.tile-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.tile-value { font-size: 34px; line-height: 1.1; }
@media (max-width: 820px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tile { padding: 14px; } .tile-value { font-size: 28px; } }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }

/* Brands and socials: workspace cards, brand cards, brand page */
.row.between { justify-content: space-between; }
.row.between h2 { margin: 18px 0 10px; }
.ws-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0 0 8px; }
.ws-card { display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: left; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); font-weight: 500; }
.ws-card:hover { box-shadow: var(--shadow); border-color: var(--blue); }
.ws-card[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 30%, transparent); }
.ws-card.new { border-style: dashed; justify-content: center; }
.ws-card .bar { display: block; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ws-card .bar span { display: block; height: 6px; background: var(--blue); }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.brand-card { display: flex; flex-direction: column; gap: 12px; margin: 0; color: var(--ink); text-decoration: none; }
.brand-card:hover { border-color: var(--blue); }
.brand-top { display: flex; align-items: center; gap: 12px; }
.av { width: 40px; height: 40px; border-radius: 11px; color: #fff; font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.av.big { width: 56px; height: 56px; border-radius: 14px; font-size: 20px; }
.nets { display: flex; gap: 6px; flex-wrap: wrap; }
.net { min-width: 28px; height: 26px; padding: 0 5px; border-radius: 7px; background: var(--c); color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.net.off { background: var(--card); color: var(--muted); border: 1px dashed var(--muted); }
.net.warn { outline: 2px solid var(--warn); outline-offset: 1px; }
.brand-card .pill { align-self: flex-start; }
a.back { display: inline-block; font-weight: 600; text-decoration: none; margin-bottom: 12px; color: var(--blue); }
.brand-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.brand-head h1 { margin: 0; }
.brand-head .hint { margin: 2px 0 0; }
input.colour { width: 64px; height: 44px; padding: 4px; }
#socialsBrand[hidden] { display: none; }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
#brandTabs { margin-bottom: 14px; flex-wrap: wrap; }

/* Owner link and consent log */
#ownerLink .row input { flex: 1; min-width: 0; }
.link-row { justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line, #e5e7eb); }
.consent-log { display: grid; gap: 8px; }
.consent { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line, #e5e7eb); }
.consent:first-child { border-top: 0; }
.danger-zone { border-color: #fca5a5; }

/* New post: brands, per-brand files and words, labels */
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.check input { width: auto; margin-top: 4px; }
.same-row { display: grid; gap: 4px; margin: 0 0 10px; }
.per-brand { display: grid; gap: 4px; }
.labels { display: grid; gap: 6px; padding-bottom: 10px; }
.switch-more { margin: 0 0 6px 26px; }
.warn-note { background: color-mix(in srgb, #f59e0b 14%, var(--card)); border-left: 4px solid #f59e0b; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; }

/* Approve many at once */
.batch-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.post-card .msg-head .pick { width: 20px; height: 20px; margin: 0; }
.batch-list { max-height: 40vh; overflow: auto; padding-left: 18px; }
.batch-list li { margin: 4px 0; }

/* Calendar week view: seven tall days showing every post */
#calView { margin-left: auto; }
.cal.week .day { min-height: 220px; align-content: start; }
.cal.week .day .chips { display: grid; }
.cal.week .day .marks { display: none; }
@media (max-width: 820px) { .cal.week .day { min-height: 120px; } .cal.week .day .chips { display: grid; gap: 2px; } }
@media (max-width: 820px) { .cal-head { flex-wrap: wrap; } .cal-head h1 { font-size: 1.15rem; } #calView { order: 5; margin: 0 auto; } }

/* Dashboard, "Jarvis" style (this page only): dark glowing panel, ring meters, bar graph */
#tab-dashboard { --glow: #3fd0ff; --j-ink: #dff6ff; --j-muted: #8fc9e3; --j-card: rgba(9, 22, 42, .85); --j-warn: #ffb547; --j-bad: #ff6b6b; --j-ok: #38e8a0; }
.jarvis { position: relative; color: var(--j-ink); background-color: #050c18; border: 1px solid rgba(63, 208, 255, .35); border-radius: 18px; padding: 18px; display: grid; gap: 14px;
  background-image: radial-gradient(circle at 15% 0%, rgba(63, 208, 255, .16), transparent 45%), linear-gradient(rgba(63, 208, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(63, 208, 255, .05) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px; box-shadow: 0 0 40px rgba(63, 208, 255, .12) inset, 0 18px 40px rgba(5, 12, 24, .25); overflow: hidden; }
.jarvis a { color: inherit; text-decoration: none; }
.j-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--j-muted); letter-spacing: .04em; text-transform: uppercase; }
.j-live { display: inline-flex; align-items: center; gap: 6px; color: var(--j-ok); font-weight: 700; }
.j-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--j-ok); box-shadow: 0 0 10px var(--j-ok); animation: j-pulse 1.6s ease-in-out infinite; }
.j-switch { margin-left: auto; min-height: 36px; padding: 6px 14px; color: var(--j-ink); background: rgba(63, 208, 255, .1); border: 1px solid var(--glow); box-shadow: none; text-transform: none; letter-spacing: 0; }
.j-rings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.j-ring { display: grid; justify-items: center; gap: 2px; padding: 12px 8px; background: var(--j-card); border: 1px solid rgba(63, 208, 255, .25); border-radius: 14px; text-align: center; }
.j-ring:hover, .j-stat:hover, .j-need:hover, .j-brand:hover, .j-bar:hover { border-color: var(--glow); box-shadow: 0 0 18px rgba(63, 208, 255, .3); }
.j-ring svg { width: 112px; height: 112px; transform: rotate(-90deg); }
.j-ring b { font-size: 15px; } .j-ring span { font-size: 13px; color: var(--j-muted); }
.ring-tick { fill: none; stroke: rgba(63, 208, 255, .25); stroke-width: 1; stroke-dasharray: 2 4; transform-origin: 50px 50px; animation: j-spin 30s linear infinite; }
.ring-track { fill: none; stroke: rgba(63, 208, 255, .12); stroke-width: 8; }
.ring-arc { fill: none; stroke: var(--glow); stroke-width: 8; stroke-linecap: round; filter: drop-shadow(0 0 5px rgba(63, 208, 255, .8)); animation: j-fill 1.2s cubic-bezier(.2, .8, .2, 1) .15s forwards; }
.ring-num, .ring-sub { transform: rotate(90deg); transform-origin: 50px 50px; text-anchor: middle; fill: var(--j-ink); }
.ring-num { font-size: 20px; font-weight: 700; } .ring-sub { font-size: 10px; fill: var(--j-muted); }
.j-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.j-stat { display: grid; gap: 2px; padding: 12px 14px; background: var(--j-card); border: 1px solid rgba(63, 208, 255, .25); border-left: 3px solid var(--glow); border-radius: 12px; }
.j-stat b { font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; } .j-stat span { font-size: 13px; color: var(--j-muted); }
.j-stat.warn { border-left-color: var(--j-warn); } .j-stat.warn b { color: var(--j-warn); }
.j-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.j-card { background: var(--j-card); border: 1px solid rgba(63, 208, 255, .25); border-radius: 14px; padding: 14px; display: grid; gap: 8px; align-content: start; }
.j-title { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; letter-spacing: .03em; }
.j-title span, .j-title a { font-weight: 500; font-size: 13px; color: var(--j-muted); }
.j-muted { color: var(--j-muted); font-size: 13px; margin: 0; }
.j-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; height: 170px; align-items: end; }
.j-bar { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 4px; height: 100%; border: 1px solid transparent; border-radius: 10px; padding: 4px 0; }
.j-bar-n { font-size: 13px; font-weight: 700; }
.j-bar-fill { align-self: end; width: 60%; height: max(var(--h), 4px); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #7fe3ff, #1f7fd6); box-shadow: 0 0 12px rgba(63, 208, 255, .6); transform-origin: bottom; transform: scaleY(0); animation: j-grow .8s cubic-bezier(.2, .8, .2, 1) var(--d) forwards; }
.j-bar-day { font-size: 12px; color: var(--j-muted); }
.j-need { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid rgba(63, 208, 255, .2); border-radius: 10px; }
.j-need b { color: var(--glow); white-space: nowrap; font-size: 14px; }
.j-brands { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.j-brands .j-title, .j-brands > p { grid-column: 1 / -1; }
.j-brand { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid rgba(63, 208, 255, .2); border-radius: 10px; }
.j-brand .av { grid-row: span 2; } .j-brand-name { font-weight: 600; } .j-brand .j-muted { grid-column: 2; }
.j-dot { grid-row: 1 / span 2; grid-column: 3; width: 10px; height: 10px; border-radius: 50%; background: var(--j-ok); box-shadow: 0 0 8px var(--j-ok); }
.j-dot.bad { background: var(--j-bad); box-shadow: 0 0 8px var(--j-bad); } .j-dot.off { background: #4b5b74; box-shadow: none; }
.j-table { display: grid; gap: 4px; }
.j-tr { display: grid; grid-template-columns: 2fr 1fr 1.4fr 1fr; gap: 8px; align-items: center; text-align: left; min-height: 40px; padding: 6px 10px; color: var(--j-ink); background: transparent; border: 1px solid rgba(63, 208, 255, .15); border-radius: 10px; box-shadow: none; font-weight: 500; }
.j-tr.on { border-color: var(--glow); } .j-th { border: 0; color: var(--j-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; min-height: 0; }
.j-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.j-actions .j-ghost { background: transparent; color: var(--j-ink); border: 1px solid var(--glow); box-shadow: none; }
@keyframes j-fill { to { stroke-dashoffset: var(--to); } }
@keyframes j-grow { to { transform: scaleY(1); } }
@keyframes j-spin { to { transform: rotate(360deg); } }
@keyframes j-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .ring-arc { animation: none; stroke-dashoffset: var(--to); } .j-bar-fill { animation: none; transform: none; } .ring-tick, .j-live::before { animation: none; }
}
@media (max-width: 820px) {
  .jarvis { padding: 12px; border-radius: 14px; }
  .j-rings, .j-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .j-ring svg { width: 92px; height: 92px; }
  .j-grid { grid-template-columns: 1fr; }
  .j-bars { height: 140px; gap: 4px; }
  .j-tr { grid-template-columns: 1.6fr .8fr 1.2fr .8fr; font-size: 14px; }
}
.j-fix { color: var(--j-warn); font-weight: 700; }

/* TikTok posting box */
.tiktok-box .checks { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.tiktok-box .check input:disabled + * , .tiktok-box label[title]:has(input:disabled) { opacity: .55; }

/* Team and activity */
.stack { display: grid; gap: 8px; }
.member { justify-content: space-between; }
.team-invite { justify-content: space-between; gap: 16px; }
.brand-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; padding: 4px 0 0 26px; }
.activity { display: grid; gap: 0; background: var(--card, #fff); border: 1px solid var(--line, #e3e7ef); border-radius: 12px; overflow: hidden; }
.activity .act { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--line, #e3e7ef); font-size: 14px; }
.activity .act:first-child { border-top: 0; }
.activity time { color: var(--muted, #667085); font-variant-numeric: tabular-nums; }
.two-step { justify-content: space-between; gap: 16px; }
.team-link { display: none; justify-content: space-between; text-decoration: none; color: inherit; }
@media (max-width: 820px) {
  .team-link { display: flex; }
  .activity .act { grid-template-columns: 1fr; gap: 2px; }
  .team-invite, .two-step, .member { flex-wrap: wrap; }
}

/* A post opened from a phone alert glows for a moment so it is easy to spot. */
.post-card.flash { box-shadow: 0 0 0 3px var(--blue), 0 8px 24px rgb(37 99 235 / .25); transition: box-shadow .3s; }
@media (prefers-reduced-motion: reduce) { .post-card.flash { transition: none; } }

/* The whole workspace box is the tap area for the switcher, not just the one line of text (a
   thumb-sized target on iPhone). The select reaches up over the small "Workspace" label. */
.ws-box { position: relative; }
.ws-box > span { position: relative; pointer-events: none; }
.ws-box select { padding-top: 18px; margin-top: -18px; padding-bottom: 8px; margin-bottom: -8px; cursor: pointer; }
