/* ============================================================
   AlPlanner (البلانر) — brand design language (v5: navy reskin)
   Palette extracted from the logo: navy #072946 anchor, red
   #E34647 action, teal #007AA0 links, sky #76C7E5 accents.
   Every color lives in a custom property; html[data-theme="dark"]
   overrides the full palette (navy world, not gray). The topbar is
   navy in BOTH themes. IG gradient + media letterbox black
   intentionally stay fixed in both themes.
   ============================================================ */

:root {
  color-scheme: light;
  --navy: #072946;
  --bg: #F2F4F7;
  --card: #FFFFFF;
  --primary: #E34647;
  --primary-hover: #CF3C3D;
  /* fills that carry white text (kept ≥4.5:1 where the theme allows;
     light base #E34647 is the contract-exact brand red at 4.01:1) */
  --primary-fill: #E34647;
  --primary-fill-hover: #CF3C3D;
  --link: #007AA0;
  --green: #42B72A;      /* indicator dots / icons only — not a text fill */
  --green-hover: #36A420;
  --danger: #F02849;     /* indicator dots only — not a text fill */
  --danger-hover: #D6203E;
  --danger-fill: #D6203E;       /* white text 5.08:1 */
  --danger-fill-hover: #B71C33; /* white text 6.51:1 */
  --danger-text: #C81D3A;       /* danger ink: ≥4.7:1 on card/hover/ghost */
  --text: #0B1F30;
  --text-2: #5C6B7A;
  --divider: #D5DCE3;
  --border: #E2E8EE;
  --hover: #EDF1F5;
  --ghost: #E6EBF0;
  --ghost-hover: #D9E1E8;
  --surface-2: #F6F8FA;   /* inset panels: howto, mini stats, notes */
  --surface-3: #EFF2F5;   /* snippets, hairline row separators, small chips */
  --input-bg: #FFFFFF;
  --dot-off: #BEC5CC;
  --cal-out: #FAFBFC;
  --press: rgba(0, 0, 0, .06);
  --tint-blue-bg: #E8F5FB;   --tint-blue-fg: #00688A;
  --tint-green-bg: #E5F2E9;  --tint-green-fg: #187435;
  --tint-orange-bg: #FCF2E3; --tint-orange-fg: #96540F;
  --tint-orange-hover: #F8E9CE; --tint-orange-border: #EFDFC4;
  --tint-red-bg: #FCE9E9;    --tint-red-fg: #C93A3B;
  --tint-teal-bg: #E1F2F7;   --tint-teal-fg: #00688A;
  --banner-bg: #E8F5FB; --banner-border: #C9E4F2; --banner-fg: #084C66;
  --toast-bg: #0A2740; --toast-fg: #E6EEF5;
  --overlay: rgba(244, 244, 244, .8);
  /* v9 glossy pass: softer, larger diffuse shadows instead of the hard FB line */
  --shadow-card: 0 1px 2px rgba(7, 41, 70, .05), 0 6px 20px rgba(7, 41, 70, .06);
  --shadow-modal: 0 12px 28px 0 rgba(0, 0, 0, .2), 0 2px 4px 0 rgba(0, 0, 0, .1);
  --ig-gradient: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
  /* chart series (v9) — theme-tuned so lines read on both card colors */
  --ch-1: #007AA0;   /* views */
  --ch-2: #E34647;   /* reach */
  --ch-3: #2E86C1;   /* followers */
  --radius: 14px;
  /* --font-ui / --font-display live in fonts.css (Thmanyah slots); fallback = same system stack */
  --font: var(--font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #051A2D;
  --card: #0A2740;
  --primary: #F0575A;
  --primary-hover: #FF6B6E;
  /* #F0575A stays for non-text accents (tab underline, seg text, rings);
     white-text fills drop to the deeper brand red for AA */
  --primary-fill: #CF3C3D;      /* white text 4.81:1 */
  --primary-fill-hover: #BC3536;/* white text 5.67:1 */
  --link: #76C7E5;
  --green: #45BD62;
  --green-hover: #3DA653;
  --danger: #F3425F;
  --danger-hover: #D63A54;
  --danger-fill: #D6203E;
  --danger-fill-hover: #B71C33;
  --danger-text: #FF7A8A;       /* 6.10:1 on --card */
  --text: #E6EEF5;
  --text-2: #9FB3C4;
  --divider: #1D4265;
  --border: #1D4265;
  --hover: #123A5C;
  --ghost: #123A5C;
  --ghost-hover: #1B4A70;
  --surface-2: #0E2E4B;
  --surface-3: #123A5C;
  --input-bg: #0E2E4B;
  --dot-off: #4C6A85;
  --cal-out: #04141F;
  --press: rgba(255, 255, 255, .12);
  --tint-blue-bg: #0E3A52;   --tint-blue-fg: #76C7E5;
  --tint-green-bg: #0F3A2B;  --tint-green-fg: #6BCF83;
  --tint-orange-bg: #3A3122; --tint-orange-fg: #F0B36A;
  --tint-orange-hover: #473B29; --tint-orange-border: #55462E;
  --tint-red-bg: #47232C;    --tint-red-fg: #FF8A8D;
  --tint-teal-bg: #0E3A52;   --tint-teal-fg: #76C7E5;
  --banner-bg: #0E3A52; --banner-border: #175070; --banner-fg: #BEE3F5;
  --toast-bg: #123A5C; --toast-fg: #E6EEF5;
  --overlay: rgba(2, 12, 22, .7);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 20px rgba(0, 0, 0, .32);
  --shadow-modal: 0 12px 28px 0 rgba(0, 0, 0, .55), 0 2px 4px 0 rgba(0, 0, 0, .35);
  --ch-1: #76C7E5;
  --ch-2: #F0575A;
  --ch-3: #6FB4E8;
}

/* theme-conditional inline icons (sun/moon toggle renders both) */
html[data-theme="dark"] .only-light { display: none; }
html:not([data-theme="dark"]) .only-dark { display: none; }
.only-light, .only-dark { display: inline-flex; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.34;
  min-height: 100vh;
  overflow-x: hidden;
}

button {
  font-family: var(--font);
  font-size: 15px;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input, select, textarea {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

svg { display: block; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--divider); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

.noscript {
  padding: 40px;
  text-align: center;
  color: var(--text-2);
}

/* ============================================================ Top bar
   Navy #072946 in BOTH themes — the brand anchor. Everything that sits
   on it is white / translucent-white; active tab gets the red underline. */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 58px;
  /* subtle navy sheen (v9 glossy pass) — anchored on brand #072946 */
  background: linear-gradient(180deg, #0B3459 0%, #072946 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 2px 12px rgba(2, 12, 22, .35);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
}

.topbar-left {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}
.logo-link:hover { text-decoration: none; }

/* full lockup logo (v8): the PNG carries its own navy ground, so it
   blends seamlessly with the navy topbar */
.logo-lockup-top {
  height: 38px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.topbar-tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  height: 58px;
  gap: 4px;
}

/* v9: outline icon + its label underneath (WhatsApp-style tab) */
.tab {
  width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgba(255, 255, 255, .62);
  border-bottom: 3px solid transparent;
  border-top: 3px solid transparent;
  border-radius: 0;
  position: relative;
}
.tab:hover { text-decoration: none; color: rgba(255, 255, 255, .85); }
.tab:hover::after {
  content: "";
  position: absolute;
  inset: 5px 3px;
  background: rgba(255, 255, 255, .1);
  border-radius: 10px;
  z-index: -1;
}
.tab.active {
  color: #fff;
  border-bottom-color: var(--primary);
}
.tab svg { width: 22px; height: 22px; }
.tab-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
  line-height: 1;
  white-space: nowrap;
}

.topbar-right {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  border-radius: 10px;
  padding: 0 12px;
  height: 36px;
  white-space: nowrap;
  transition: background .1s ease;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 16px; height: 16px; }

.btn-primary { background: var(--primary-fill); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-fill-hover); }

/* fixed deep green in both themes: white text 5.13:1 / 6.69:1 hover
   (--green stays for status dots, where it only needs indicator contrast) */
.btn-green { background: #1B7E3A; color: #fff; }
.btn-green:hover:not(:disabled) { background: #166A31; }

.btn-ghost { background: var(--ghost); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--ghost-hover); }

.btn-danger { background: var(--danger-fill); color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--danger-fill-hover); }

.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--ghost);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-icon:hover:not(:disabled) { background: var(--ghost-hover); }
.btn-icon svg { width: 18px; height: 18px; }

.btn-link {
  color: var(--link);
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
}
.btn-link:hover { background: var(--tint-blue-bg); text-decoration: none; }

.set-subtitle {
  font-size: 15px;
  font-weight: 700;
  margin: 18px 0 8px;
}

/* dry-run badge */

.dry-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--tint-orange-bg);
  color: var(--tint-orange-fg);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.dry-badge svg { width: 13px; height: 13px; flex-shrink: 0; }
.dry-badge:hover { background: var(--tint-orange-hover); text-decoration: none; }

/* account chip + menu */

.acct-wrap { position: relative; flex-shrink: 0; }

.account-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px 0 4px;
  border-radius: 999px;
  color: inherit;
  max-width: 220px;
}
.account-chip:hover { background: var(--hover); text-decoration: none; }

.chip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  padding: 2px;
  background: var(--ig-gradient);
  flex-shrink: 0;
}
.chip-avatar.off { background: var(--divider); }
.chip-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  overflow: hidden;
}
.chip-avatar-inner svg { width: 16px; height: 16px; }

.chip-name {
  font-size: 14px;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip-name.muted { color: var(--text-2); font-weight: 500; }

.chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot-off);
  flex-shrink: 0;
}
.chip-dot.on { background: var(--green); }

.acct-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 150;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-modal);
  padding: 8px;
  min-width: 240px;
}
.acct-user {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.acct-name { font-weight: 800; font-size: 15px; }
.acct-email { font-size: 13px; color: var(--text-2); word-break: break-all; }
.acct-role { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.acct-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  color: var(--text);
}
.acct-item:hover { background: var(--hover); text-decoration: none; }
.acct-item svg { width: 18px; height: 18px; color: var(--text-2); }
.acct-item.danger { color: var(--danger-text); }
.acct-item.danger svg { color: var(--danger-text); }

/* ---- everything that sits ON the navy topbar: white-on-navy ghosts.
   (The .acct-menu / .bdd-menu popovers float over the page, not the bar,
   so they keep their normal card surfaces.) */

.topbar .btn-ghost,
.topbar .btn-icon {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}
.topbar .btn-ghost:hover:not(:disabled),
.topbar .btn-icon:hover:not(:disabled) {
  background: rgba(255, 255, 255, .24);
}

/* dry-run badge on the bar joins the translucent-white family (the
   inline copy on overview cards keeps its orange tint) */
.topbar .dry-badge {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}
.topbar .dry-badge:hover { background: rgba(255, 255, 255, .24); }

/* brand dropdown trigger on the bar joins the translucent-white family */
.topbar .bdd-btn {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}
.topbar .bdd-btn:hover { background: rgba(255, 255, 255, .24); }

/* account chip */
.topbar .account-chip:hover { background: rgba(255, 255, 255, .12); }
.topbar .chip-name { color: #fff; }
.topbar .chip-name.muted { color: rgba(255, 255, 255, .75); }
.topbar .chip-avatar.off { background: rgba(255, 255, 255, .35); }
.topbar .chip-dot { background: rgba(255, 255, 255, .45); }
.topbar .chip-dot.on { background: var(--green); }

/* ============================================================ Brand avatars (v3) */

.b-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
  vertical-align: middle;
}
.b-avatar .b-ini { font-size: 12px; letter-spacing: .2px; line-height: 1; }
.b-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bav-16 { width: 16px; height: 16px; }
.bav-16 .b-ini { font-size: 7px; }
.bav-20 { width: 20px; height: 20px; }
.bav-20 .b-ini { font-size: 8px; }
.bav-28 { width: 28px; height: 28px; }
.bav-28 .b-ini { font-size: 10px; }
.bav-44 { width: 44px; height: 44px; border-radius: 12px; }
.bav-44 .b-ini { font-size: 16px; }
.bav-56 { width: 56px; height: 56px; }
.bav-56 .b-ini { font-size: 20px; }

/* ============================================================ Banner */

.banner {
  background: var(--banner-bg);
  border-bottom: 1px solid var(--banner-border);
  color: var(--banner-fg);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
}
.banner svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.banner a { font-weight: 700; color: inherit; }
.banner-close {
  margin-left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--banner-fg);
}
.banner-close:hover { background: var(--press); }
.banner-close svg { width: 14px; height: 14px; color: inherit; }

/* ============================================================ Layout */

.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* ============================================================ Stat cards */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 900px;
  margin: 0 auto 16px;
}

.stat-card {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.s-green { background: var(--tint-green-bg); color: var(--tint-green-fg); }
.stat-icon.s-blue { background: var(--tint-blue-bg); color: var(--tint-blue-fg); }
.stat-icon.s-orange { background: var(--tint-orange-bg); color: var(--tint-orange-fg); }
.stat-icon.s-red { background: var(--tint-red-bg); color: var(--tint-red-fg); }
.stat-icon.s-teal { background: var(--tint-teal-bg); color: var(--tint-teal-fg); }

.stat-value { font-size: 22px; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-2); font-weight: 600; }

/* ============================================================ Filter pills */

.filter-row {
  max-width: 680px;
  margin: 0 auto 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ghost);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pill:hover { background: var(--ghost-hover); }
.pill.active { background: var(--tint-blue-bg); color: var(--tint-blue-fg); }
.pill .pill-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}
.pill.active .pill-count { color: var(--tint-blue-fg); }

/* ============================================================ Feed cards */

.feed {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card { overflow: hidden; }

.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.kind-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.kind-avatar svg { width: 20px; height: 20px; }
.kind-avatar.k-post { background: var(--primary); }
.kind-avatar.k-story { background: var(--ig-gradient); }
.kind-avatar.k-reel { background: #DD2A7B; }

.post-head-text { min-width: 0; flex: 1; }
.post-title {
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-sub {
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-media {
  background: #000;
  line-height: 0;
}
/* contain is the rule for every creative: a 4:5 or 9:16 design loses its top
   and bottom to a crop, so the black ground letterboxes the spare space */
.post-media img {
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: contain;
  display: block;
  background: #000;
}
/* reels keep a fixed frame height so cards stay even down the feed */
.post-media video {
  width: 100%;
  height: 500px;
  object-fit: contain;
  display: block;
  background: #000;
}

.media-ph {
  height: 240px;
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 12px, var(--surface-3) 12px, var(--surface-3) 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.34;
}
.media-ph svg { width: 34px; height: 34px; opacity: .55; }

.post-caption { padding: 12px 16px 4px; }
.cap-en { margin: 0 0 8px; white-space: pre-wrap; }
.cap-ar {
  margin: 0 0 8px;
  text-align: right;
  white-space: pre-wrap;
}
.cap-tags {
  color: var(--link);
  font-size: 14px;
  margin: 0 0 8px;
  word-break: break-word;
}

.post-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}
.post-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* status chips */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.chip-published { background: var(--tint-green-bg); color: var(--tint-green-fg); }
.chip-scheduled { background: var(--tint-blue-bg); color: var(--tint-blue-fg); }
.chip-due { background: var(--tint-orange-bg); color: var(--tint-orange-fg); }
.chip-overdue { background: var(--tint-red-bg); color: var(--tint-red-fg); }
.chip-failed { background: var(--tint-red-bg); color: var(--tint-red-fg); }
.chip-muted { background: var(--ghost); color: var(--text-2); }
.chip-publishing { background: var(--tint-blue-bg); color: var(--tint-blue-fg); }

/* ============================================================ Empty states */

.empty {
  max-width: 680px;
  margin: 24px auto;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-2);
}
.empty svg { width: 48px; height: 48px; margin: 0 auto 12px; opacity: .4; }
.empty-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.empty p { margin: 0; font-size: 14px; }
.empty .btn { margin-top: 14px; }

/* ============================================================ Calendar */

.cal-card { padding: 16px; }

.cal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.cal-title { font-size: 20px; font-weight: 800; flex: 1; }
.cal-nav {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ghost);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-nav:hover { background: var(--ghost-hover); }
.cal-nav svg { width: 16px; height: 16px; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-dow {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.cal-dow .dow-1 { display: none; }

.cal-cell {
  min-height: 96px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--card);
  overflow: hidden;
}
.cal-cell.cal-out { background: var(--cal-out); }
.cal-cell.cal-out .cal-daynum { color: var(--text-2); }

.cal-daynum {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.cal-daynum.cal-today {
  background: var(--primary-fill);
  color: #fff;
  font-weight: 700;
}

.cal-pill {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  border-radius: 5px;
  padding: 2px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-pill.k-post { background: var(--primary-fill); }
.cal-pill.k-story { background: var(--ig-gradient); }
.cal-pill.k-reel { background: #DD2A7B; }
.cal-pill.is-published { opacity: .45; }
.cal-pill:hover { filter: brightness(1.08); }

/* mobile calendar dots + day sheet (v3) */

button.cal-cell { text-align: left; cursor: pointer; }
button.cal-cell:active { background: var(--hover); }

.cal-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  padding: 2px 1px;
}
.cdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cdot.is-published { opacity: .45; }
.cal-plus { font-size: 10px; font-weight: 800; color: var(--text-2); line-height: 10px; }

.day-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 8px;
  border-radius: 8px;
  text-align: left;
}
.day-row:hover { background: var(--hover); }
.day-row .kind-avatar { width: 36px; height: 36px; border-radius: 9px; }
.day-row-main { flex: 1; min-width: 0; }
.day-row-title {
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-row-sub {
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================ Activity */

.activity-card { max-width: 680px; margin: 0 auto; padding: 8px 0; }

.act-list { list-style: none; margin: 0; padding: 0; }
.act-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
}
.act-item + .act-item { border-top: 1px solid var(--surface-3); }

.act-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.act-dot.l-info { background: var(--primary); }
.act-dot.l-warn { background: #F7981D; }
.act-dot.l-error { background: var(--danger); }

.act-body { flex: 1; min-width: 0; }
.act-msg { font-size: 14px; word-break: break-word; }
.act-time { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ============================================================ Settings */

.settings-grid {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.set-card { padding: 20px; }
.set-title {
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
}
.set-title svg { width: 20px; height: 20px; color: var(--text-2); }
.set-desc { color: var(--text-2); font-size: 14px; margin: 0 0 14px; }

.howto {
  margin: 0 0 16px;
  padding: 12px 16px 12px 32px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
}
.howto li { margin: 6px 0; }
.howto code { background: var(--ghost); border-radius: 4px; padding: 1px 5px; font-size: 12px; }

.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 5px;
}
.field input[type="text"],
.field input[type="password"],
.field input[type="url"],
.field input[type="email"],
.field input[type="number"],
.field input[type="datetime-local"],
.field select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--divider);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  outline: none;
}
.field textarea {
  width: 100%;
  min-height: 88px;
  padding: 8px 12px;
  border: 1px solid var(--divider);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  resize: vertical;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--tint-blue-bg);
}
.field-hint { font-size: 12px; color: var(--text-2); margin-top: 4px; }
/* a hint that contradicts the neutral one above it (e.g. a past schedule) */
.warn-hint { color: var(--tint-orange-fg); font-weight: 500; }
.warn-hint[hidden] { display: none; }
.field input.input-warn { border-color: var(--tint-orange-fg); }

.set-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

.conn-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: none;
}
.conn-status.ok { display: block; background: var(--tint-green-bg); color: var(--tint-green-fg); }
.conn-status.err { display: block; background: var(--tint-red-bg); color: var(--tint-red-fg); }

.snippet {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 8px 8px 12px;
  margin: 8px 0 12px;
}
.snippet code {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--text);
  overflow-x: auto;
  white-space: nowrap;
}

/* FB-style toggle switch */

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.switch-label { font-weight: 700; }
.switch-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }

.switch {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--ghost-hover);
  transition: background .15s ease;
  flex-shrink: 0;
  padding: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: left .15s ease;
}
.switch.on { background: var(--primary); }
.switch.on::after { left: 23px; }
.switch:disabled { opacity: .6; }

.cap-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.cap-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* ============================================================ Modals */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  width: 100%;
  max-width: 548px;
  max-height: calc(100vh - 80px);
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal.modal-wide { max-width: 640px; }

.modal-head {
  position: relative;
  padding: 16px 48px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.modal-title { font-size: 18px; font-weight: 800; margin: 0; }
.modal-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }

.modal-x {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ghost);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
}
.modal-x:hover { background: var(--ghost-hover); }
.modal-x svg { width: 15px; height: 15px; }

.modal-body {
  padding: 16px;
  overflow-y: auto;
}

.modal-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.modal-foot .foot-note {
  flex: 1;
  font-size: 13px;
  color: var(--text-2);
  min-width: 160px;
}

.modal-loading {
  padding: 40px;
  text-align: center;
  color: var(--text-2);
  font-weight: 600;
}

.spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 3px solid var(--ghost);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* dry-run note inside modal */

.dry-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--tint-orange-bg);
  border: 1px solid var(--tint-orange-border);
  color: var(--tint-orange-fg);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}
.dry-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: var(--tint-orange-fg); }

/* publish-plan sections */

.pp-section { margin-bottom: 16px; }
.pp-section:last-child { margin-bottom: 0; }
.pp-section-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pp-section-title svg { width: 16px; height: 16px; flex-shrink: 0; }
.pp-section-title .n { color: var(--text-2); font-weight: 700; }
.pp-section-title.t-now { color: var(--tint-green-fg); }
.pp-section-title.t-later { color: var(--tint-blue-fg); }
.pp-section-title.t-skip { color: var(--text-2); }

.pp-rows {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.pp-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  font-size: 14px;
}
.pp-row + .pp-row { border-top: 1px solid var(--surface-3); }
.pp-code { font-weight: 800; white-space: nowrap; }
.pp-title-txt {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.pp-when, .pp-reason { color: var(--text-2); font-size: 13px; white-space: nowrap; }
.pp-empty { padding: 10px 12px; color: var(--text-2); font-size: 13px; }

/* detail modal */

.detail-media { border-radius: 8px; overflow: hidden; margin-bottom: 14px; background: #000; line-height: 0; }
.detail-media img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; display: block; }
.detail-media video { width: 100%; height: 380px; object-fit: contain; display: block; background: #000; }
.detail-media .media-ph { height: 180px; }

.detail-rows { display: flex; flex-direction: column; gap: 10px; }
.detail-row { font-size: 14px; }
.detail-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-2);
  margin-bottom: 2px;
}
.detail-val { white-space: pre-wrap; word-break: break-word; }
.detail-val.rtl { text-align: right; }
.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.err-box {
  background: var(--tint-red-bg);
  color: var(--tint-red-fg);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  word-break: break-word;
}

/* edit modal (v3) */

.ed-media-prev {
  margin-top: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  line-height: 0;
}
.ed-media-prev img { width: 100%; height: auto; max-height: 220px; object-fit: contain; display: block; }
.ed-media-prev .media-ph { height: 120px; }

.bs-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  margin-top: 4px;
}
.bs-details summary {
  cursor: pointer;
  font-weight: 700;
  padding: 10px 0;
  color: var(--text-2);
  font-size: 14px;
}
.bs-details .field:last-child { margin-bottom: 12px; }

/* ============================================================ Toasts */

.toast-root {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
}

.toast {
  background: var(--toast-bg);
  color: var(--toast-fg);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-modal);
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  animation: toast-in .18s ease;
  word-break: break-word;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.toast svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.toast.t-success svg { color: var(--green); }
.toast.t-error svg { color: #FF6B81; }
.toast.t-info svg { color: #4599FF; }
.toast.t-warn svg { color: #F7981D; }

/* ============================================================
   v2 — multi-brand additions
   ============================================================ */

/* display typography (Thmanyah Serif Display) */

.stat-value, .modal-title, .cal-title, .set-title,
.empty-title, .ov-name, .ov-mini-value, .ins-username, .ins-tile-v,
.invite-code-big, .login-title {
  font-family: var(--font-display, var(--font));
}

.muted { color: var(--text-2); }
.flex-spacer { flex: 1; }

/* soft-disabled buttons (still hoverable so the tooltip shows) */

.btn.is-disabled { opacity: .55; cursor: not-allowed; }
.btn.is-disabled:hover:not(:disabled) { background: var(--primary-fill); }

/* ------------------------- brand chips (Settings brand-row selector) */

.brand-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-left: 8px;
}

.bchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--ghost);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  max-width: 150px;
  min-width: 34px;
  flex-shrink: 1;
}
.bchip:hover { background: var(--ghost-hover); }
.bchip.active { background: var(--tint-blue-bg); color: var(--tint-blue-fg); }
.bchip svg { width: 14px; height: 14px; flex-shrink: 0; }

.bchip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.bdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.bchip .bdot { width: 14px; height: 14px; }

/* v8 — single brand dropdown (replaces the chip row in the topbar) */

.bdd-wrap {
  position: relative;
  min-width: 0;
  flex-shrink: 1;
  display: inline-flex;
}

.bdd-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  max-width: 240px;
  min-width: 0;
  font-weight: 600;
  font-size: 14px;
}

.bdd-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.bdd-caret { display: inline-flex; flex-shrink: 0; opacity: .8; }
.bdd-caret svg { width: 16px; height: 16px; }

/* "All brands" round icon — same footprint as a brand avatar */
.bdd-all-ic {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  flex-shrink: 0;
}
.bdd-all-ic svg { width: 12px; height: 12px; }

.bdd-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 150;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-modal);
  padding: 8px;
  min-width: 264px;
  max-width: min(320px, calc(100vw - 24px));
  max-height: min(480px, 70vh);
  overflow-y: auto;
  color: var(--text);
}
.bdd-menu .bdd-all-ic {
  width: 28px;
  height: 28px;
  background: var(--ghost);
  color: var(--text-2);
}
.bdd-menu .bdd-all-ic svg { width: 15px; height: 15px; }

.bdd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  color: var(--text);
}
.bdd-item:hover { background: var(--hover); }
.bdd-texts { flex: 1; min-width: 0; }
.bdd-item-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bdd-item-sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bdd-check { display: inline-flex; flex-shrink: 0; color: var(--primary); }
.bdd-check svg { width: 18px; height: 18px; }
.bdd-divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* small brand chip (feed cards, activity, detail modal) */

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px 0 2px;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  max-width: 170px;
  vertical-align: middle;
}
.brand-chip .bc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.brand-chip .bdot { margin-left: 6px; }

/* ---------------------------------------------- overview */

.ov-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.ov-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.ov-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.ov-head-text { min-width: 0; flex: 1; }

.ov-name {
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ov-name .ov-name-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dry-badge.dry-inline {
  height: 20px;
  padding: 0 8px;
  font-size: 11px;
  flex-shrink: 0;
}
.dry-badge.dry-inline:hover { background: var(--tint-orange-bg); }

.ov-user {
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  min-width: 0;
}
.ov-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-user .chip-dot { overflow: visible; }

.ov-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.ov-mini-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
}
.ov-mini-value { font-size: 18px; font-weight: 800; line-height: 1.15; }
.ov-mini-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-fail {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: var(--tint-red-bg);
  color: var(--tint-red-fg);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 10px;
  word-break: break-word;
}
.ov-fail svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }

.ov-next { flex: 1; }
.ov-next-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-2);
  margin-bottom: 4px;
}
.ov-next-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  padding: 3px 0;
}
.ov-next-empty { font-size: 13px; color: var(--text-2); padding: 3px 0; }

.ov-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.ov-add {
  border: 2px dashed var(--divider);
  border-radius: var(--radius);
  background: transparent;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-2);
  font-weight: 700;
  font-size: 15px;
  transition: border-color .1s ease, color .1s ease, background .1s ease;
}
.ov-add:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--hover);
}
.ov-add svg { width: 28px; height: 28px; }

.ov-activity { max-width: 680px; margin: 8px auto 0; padding: 8px 0; }
.ov-activity .ov-act-title {
  font-size: 15px;
  font-weight: 800;
  margin: 6px 16px 4px;
}

/* ---------------------------------------------- calendar (v2) */

.cal-pill {
  display: flex;
  align-items: center;
  gap: 5px;
}
.cal-pill .pdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  flex-shrink: 0;
}
.cal-pill-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.cal-more {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  padding: 2px 6px;
  border-radius: 5px;
}
.cal-more:hover { background: var(--hover); color: var(--text); }

/* ---------------------------------------------- activity (v2) */

.act-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
  flex-wrap: wrap;
}

/* ---------------------------------------------- settings (v2) */

.brand-row {
  max-width: 680px;
  margin: 0 auto 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.set-title .brand-chip { margin-left: 2px; }

/* color swatches */

.swatch-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 4px;
}

.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
  transition: transform .08s ease;
}
.swatch:hover { transform: scale(1.1); }
.swatch.sel { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--primary); }

/* v8: free brand color — native picker + hex input, synced with the swatches */
.color-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.color-custom input.cc-picker {
  width: 46px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--divider);
  border-radius: 6px;
  background: var(--input-bg);
  cursor: pointer;
}
.field .color-custom input.cc-hex {
  width: 120px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--divider);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  text-transform: uppercase;
  outline: none;
}
.field .color-custom input.cc-hex:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--tint-blue-bg);
}
.field .color-custom input.cc-hex.cc-bad {
  border-color: var(--danger);
  box-shadow: none;
}
.cc-prev {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
  flex-shrink: 0;
}

.field input[type="file"] {
  width: 100%;
  font-size: 13px;
  color: var(--text-2);
  padding: 6px 0;
}

/* ============================================================
   v3 — users & invitations
   ============================================================ */

.users-grid {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-row { padding: 14px 0; border-top: 1px solid var(--surface-3); }
.user-row:first-of-type { border-top: none; padding-top: 6px; }

.user-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.u-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ghost);
  color: var(--text-2);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-head-text { min-width: 0; flex: 1 1 180px; }
.user-name {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.user-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; word-break: break-all; }

.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.sel {
  height: 36px;
  border: 1px solid var(--divider);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  padding: 0 8px;
  font-weight: 600;
  font-size: 14px;
  outline: none;
}
.sel:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--tint-blue-bg); }

.user-brands {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.user-brands-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-2);
  margin-right: 2px;
}

.acc-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--ghost);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.acc-check:hover { background: var(--ghost-hover); }
.acc-check input { accent-color: var(--primary); margin: 0; cursor: pointer; }

/* v8: approve-request modal — who is being approved */
.ap-who {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.ap-who-text { min-width: 0; }
.ap-name { font-weight: 800; }
.ap-email { font-size: 13px; color: var(--text-2); word-break: break-all; }

/* invitations */

.inv-list { margin-top: 6px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.invite-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  flex-wrap: wrap;
}
.invite-row + .invite-row { border-top: 1px solid var(--surface-3); }
.inv-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
  letter-spacing: 1px;
  white-space: nowrap;
}
.inv-note { color: var(--text-2); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-meta { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.inv-empty { padding: 14px 12px; color: var(--text-2); font-size: 13px; }

.invite-code-big {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 6px;
  text-align: center;
  margin: 10px 0 16px;
  user-select: all;
  word-break: break-all;
}

.invite-share {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  margin-top: 14px;
}
.invite-share .share-txt { flex: 1; min-width: 0; word-break: break-word; }

/* ============================================================
   v3 — insights
   ============================================================ */

.ins-wrap { max-width: 900px; margin: 0 auto; }

.ins-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ins-user { min-width: 0; flex: 1; }
.ins-username { font-weight: 800; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-name { font-size: 13px; color: var(--text-2); }

.ins-tiles { display: flex; gap: 10px; flex-wrap: wrap; }
.ins-tile {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  text-align: center;
  min-width: 86px;
}
.ins-tile-v { font-size: 20px; font-weight: 800; line-height: 1.15; }
.ins-tile-l {
  font-size: 11px;
  color: var(--text-2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.ins-sec-title {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 10px;
}

.ins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ins-card { overflow: hidden; display: flex; flex-direction: column; }
.ins-thumb { height: 150px; background: #000; line-height: 0; position: relative; }
/* the grid is the one surface that may crop — a uniform square thumbnail is
   the point. A reel arrives as a <video> from the shared media helper, so it
   needs the same rule: unstyled it lays out at its intrinsic 1080x1920 and
   swallows the whole card. */
.ins-thumb img,
.ins-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ins-thumb .media-ph { height: 150px; }
.ins-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ins-code-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ins-code { font-weight: 800; font-size: 13px; }
.ins-date { color: var(--text-2); font-size: 12px; white-space: nowrap; }

.mets { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.met {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}
.met svg { width: 15px; height: 15px; }
.ins-note { font-size: 12px; color: var(--text-2); }
.ins-card .err-box { font-size: 12px; padding: 6px 10px; }

.ins-comments { padding: 12px 0 6px; }
.ins-comments .ins-sec-title { margin: 0 16px 4px; }
.cmt { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; }
.cmt + .cmt { border-top: 1px solid var(--surface-3); }
.cmt-head { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.cmt-user { font-weight: 800; }
.cmt-meta {
  color: var(--text-2);
  font-size: 12px;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.cmt-meta svg { width: 12px; height: 12px; }
.cmt-text { font-size: 14px; white-space: pre-wrap; word-break: break-word; }

/* v6 — comment moderation (super_admin): ghost actions + inline reply */
.cmt-is-hidden .cmt-text { color: var(--text-2); }
.cmt-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cmt-replybox { display: flex; gap: 6px; margin-top: 6px; }
.cmt-replybox[hidden] { display: none; }
.cmt-reply-input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--divider);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.cmt-reply-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--tint-blue-bg);
}
.cmt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 24px 16px 28px;
  color: var(--text-2);
}
.cmt-empty svg { width: 34px; height: 34px; opacity: .45; }
.cmt-empty-title { font-weight: 800; font-size: 15px; color: var(--text); }
.cmt-empty p { margin: 0; font-size: 13px; max-width: 420px; }

/* ============================================================
   v7 — recommendations (insights) — everything through palette
   vars so both themes read correctly
   ============================================================ */

.reco-wrap { margin-bottom: 16px; }

.reco-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--banner-bg);
  border: 1px solid var(--banner-border);
  color: var(--banner-fg);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}
.reco-banner svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

.reco-meta { font-size: 12px; color: var(--text-2); margin: -4px 0 10px; }

.reco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.reco-card { padding: 14px 16px; }
.reco-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}
.reco-card-title svg { width: 15px; height: 15px; color: var(--text-2); }
.reco-hint { font-size: 12px; color: var(--text-2); margin-top: 10px; }

.reco-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.reco-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--tint-blue-bg);
  color: var(--tint-blue-fg);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.reco-row { display: flex; align-items: baseline; gap: 8px; font-size: 13px; padding: 5px 0; }
.reco-row + .reco-row { border-top: 1px solid var(--surface-3); }
.reco-kind { font-weight: 800; min-width: 56px; }
.reco-mult { font-weight: 800; color: var(--tint-green-fg); }
.reco-mult-low { color: var(--text); }
.reco-samples { margin-left: auto; color: var(--text-2); font-size: 12px; white-space: nowrap; }

.reco-sugs { margin-bottom: 12px; }
.reco-sugs-hint { margin: 0 0 6px; }
.reco-sug { display: flex; align-items: center; gap: 10px; padding: 8px 0; flex-wrap: wrap; }
.reco-sug + .reco-sug { border-top: 1px solid var(--surface-3); }
.reco-sug-code { font-weight: 800; font-size: 13px; }
.reco-sug-when { font-size: 13px; color: var(--text-2); }
.reco-sug-try { font-weight: 700; color: var(--tint-green-fg); }
.reco-sug .btn { margin-left: auto; }

.reco-auto { margin-bottom: 0; }

/* ============================================================
   v3 — login page  (v5: pure brand page — full-bleed navy in ALL
   cases, no theme dependence, lockup.png above the form)
   ============================================================ */

body.login-page {
  background: #072946;
  color: #fff;
  color-scheme: dark;
}

.login-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* no white card — the form sits directly on navy */
.login-card {
  width: 100%;
  max-width: 400px;
  padding: 28px 24px 24px;
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.login-lockup {
  width: 320px;
  max-width: 80vw;
  height: auto;
  display: block;
}
.login-sub {
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  text-align: center;
  margin: 0 0 18px;
}

.login-page .field label { color: rgba(255, 255, 255, .85); }
.login-page .field input[type="text"],
.login-page .field input[type="password"],
.login-page .field input[type="email"] {
  background: #0A2740;
  border-color: #1D4265;
  color: #fff;
}
.login-page .field input:focus {
  border-color: #76C7E5;
  box-shadow: 0 0 0 2px rgba(118, 199, 229, .25);
}
.login-page .field-hint { color: rgba(255, 255, 255, .6); }
.login-page a { color: #76C7E5; }
.login-page .btn-primary { background: #E34647; }
.login-page .btn-primary:hover:not(:disabled) { background: #CF3C3D; }

.login-err {
  display: none;
  background: rgba(227, 70, 71, .14);
  color: #FF8A8D;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  word-break: break-word;
}
.login-err.show { display: block; }

/* v8: request-access confirmation (generic — never reveals whether the
   email already existed) */
.login-ok {
  background: rgba(69, 189, 98, .14);
  color: #7BE495;
  border-radius: 8px;
  padding: 16px;
  font-size: 14px;
  text-align: center;
}
.login-ok-title { font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.login-ok p { margin: 0; color: rgba(255, 255, 255, .85); line-height: 1.8; }
.login-ok .login-foot { margin-top: 12px; }

.login-foot { margin-top: 14px; text-align: center; font-size: 14px; }
.login-note { margin-top: 16px; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .6); }
.login-loading { text-align: center; color: rgba(255, 255, 255, .72); padding: 12px 0 4px; font-weight: 600; }
.login-page .spinner {
  border-color: rgba(255, 255, 255, .25);
  border-top-color: #E34647;
}

.btn-block { width: 100%; height: 44px; font-size: 16px; }

/* ============================================================
   v4 — create / delete plan items, video-aware media previews
   ============================================================ */

/* dashboard toolbar: Add post + Import build sheet travel together and stay
   right-aligned whether or not they wrap below the filter pills */
.filter-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* danger action that must not shout: ghost surface, danger ink */
.btn-danger-ghost { background: var(--ghost); color: var(--danger-text); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--tint-red-bg); color: var(--tint-red-fg); }
.btn-danger-ghost svg { color: currentColor; }

/* segmented control (kind picker) — Meta's pill-in-a-track pattern */
.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--ghost);
  border-radius: 8px;
}
.seg-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  transition: background .1s ease, color .1s ease;
}
.seg-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.seg-btn:hover:not(.active) { background: var(--ghost-hover); color: var(--text); }
.seg-btn.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow-card);
}

/* inline form error inside a modal body (400 / 409 from the API) */
.form-error { margin-bottom: 12px; font-weight: 600; }
.err-box[hidden] { display: none; }

/* media preview: <video> for reels, <img> for stills (same black letterbox) */
.ed-media-prev video {
  width: 100%;
  height: 220px;
  object-fit: contain;
  display: block;
  background: #000;
}

/* ============================================================ Responsive */

/* 7 tabs + super controls no longer fit with text labels below ~1560px:
   Sync / Publish plan collapse to icon buttons (Meta app pattern) */
@media (max-width: 1560px) {
  .topbar .btn-label { display: none; }
  .topbar .btn { padding: 0 10px; }
  .dry-badge { font-size: 0; gap: 0; padding: 5px 8px; }
  .dry-badge svg { width: 14px; height: 14px; }
}

@media (max-width: 1420px) {
  .tab { width: 64px; }
}

@media (max-width: 1300px) {
  .chip-name { display: none; }
  .account-chip { padding: 0 6px 0 4px; }
  .tab { width: 56px; }
  .bchip { max-width: 110px; }
}

@media (max-width: 900px) {
  .tab { width: 52px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .bchip { padding: 0 9px; }
  .bchip .bchip-name { display: none; }
}

/* 769–1024px (tablet landscape / small laptop): the single-row topbar is
   too tight for the super-admin control set — .topbar-right (flex:1,
   min-width:0) would spill its non-shrinkable icon buttons LEFT over the
   fixed-width tab row. Drop the duplicated controls (the theme toggle
   lives in the account menu; Add brand lives on Overview) and tighten the
   lockup + tabs so everything fits before the two-row wrap at ≤768px. */
@media (min-width: 769px) and (max-width: 1024px) {
  .topbar { padding: 0 10px; }
  .theme-btn-top { display: none; }  /* theme toggle in the account menu */
  .add-brand-btn { display: none; }  /* Add brand still on Overview */
  .logo-lockup-top { height: 30px; }
  .tab { width: 46px; }
}

/* ============================================================
   v3 — full mobile pass (test at 375×812)
   ============================================================ */

@media (max-width: 768px) {
  /* topbar wraps into two rows: brand row + tab bar */
  .topbar { flex-wrap: wrap; height: auto; padding: 0 8px; gap: 6px; }
  .topbar-left { height: 48px; flex: 1 1 0; min-width: 0; gap: 6px; }
  .topbar-right { height: 48px; flex: 0 0 auto; gap: 6px; }
  .topbar-tabs {
    order: 3;
    width: 100%;
    height: 44px;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, .18);
  }
  .tab { flex: 1 1 0; width: auto; }
  .tab svg { width: 24px; height: 24px; }

  /* brand dropdown: compact trigger; the menu becomes a full-width sheet */
  .brand-switcher { margin-left: 2px; }
  .bdd-btn { max-width: 44vw; }
  .bdd-menu {
    position: fixed;
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-width: none;
    max-height: 70dvh;
    border-radius: 14px;
    z-index: 300;
    animation: sheet-up .22s ease;
  }
  .bdd-item { padding: 11px 10px; }

  /* icon-only topbar buttons, avatar-only account chip */
  .btn-label { display: none; }
  .btn { padding: 0 10px; }
  .theme-btn-top { display: none; } /* theme toggle lives in the account menu */
  .add-brand-btn { display: none; } /* Add brand still available on Overview */
  .chip-name { display: none; }

  /* touch targets ≥ 40px */
  .btn, .btn-sm { height: 40px; }
  .btn-sm { font-size: 13px; }
  .pill { height: 40px; }
  .bchip { height: 40px; }
  .btn-icon { width: 40px; height: 40px; }
  .cal-nav { width: 40px; height: 40px; }
  .modal-x { width: 40px; height: 40px; }
  .acc-check { height: 40px; }
  .acct-item { padding: 11px 10px; }
  .banner-close { width: 40px; height: 40px; }
  .swatch { width: 40px; height: 40px; }
  .seg-btn { height: 40px; }

  /* layout: edge-to-edge cards, 8px gutters */
  .main { padding: 12px 8px 64px; }
  .feed { gap: 12px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ov-grid { grid-template-columns: 1fr; }
  .settings-grid { gap: 12px; }
  .filter-row { gap: 6px; }

  /* modals become full-screen slide-up sheets */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal, .modal.modal-wide {
    max-width: none;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    animation: sheet-up .22s ease;
  }
  .modal.modal-sheet {
    height: auto;
    max-height: 78dvh;
    border-radius: 16px 16px 0 0;
  }
  .modal-body { -webkit-overflow-scrolling: touch; }

  /* calendar: compact cells, single-letter weekdays, dot pills */
  .cal-card { padding: 12px 8px; }
  .cal-grid { gap: 3px; }
  .cal-cell { min-height: 56px; padding: 4px; gap: 2px; border-radius: 6px; }
  .cal-daynum { width: 22px; height: 22px; font-size: 12px; }
  .cal-dow { padding: 4px 0; }
  .cal-dow .dow-f { display: none; }
  .cal-dow .dow-1 { display: inline; }
  .cal-title { font-size: 17px; }

  /* overview cards: keep the mini grid + up-next rows inside 375px */
  .ov-mini { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .ov-mini-item { padding: 8px 2px; }
  .ov-mini-label { font-size: 9px; letter-spacing: .2px; }
  .ov-next-row { flex-wrap: wrap; }

  /* insights + users */
  .ins-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ins-head { gap: 10px; }
  .cmt-reply-input { height: 40px; } /* match the 40px touch-target rule */

  /* v7 recommendations at 375px: single-column cards, comfy chip targets,
     Apply stays right-aligned when a suggestion row wraps */
  .reco-grid { grid-template-columns: 1fr; }
  .reco-chip { height: 32px; }
  .reco-sug { row-gap: 6px; }
  .user-actions { margin-left: 0; width: 100%; }
  .invite-code-big { font-size: 32px; letter-spacing: 4px; }
}

@keyframes sheet-up {
  from { transform: translateY(48px); opacity: .6; }
  to { transform: none; opacity: 1; }
}

@media (max-width: 640px) {
  .cal-cell { min-height: 56px; }
}

/* v8: tightest phones — smaller lockup, avatar-only dropdown trigger */
@media (max-width: 600px) {
  .logo-lockup-top { height: 34px; }
  .bdd-name { display: none; }
  .bdd-btn { padding: 0 8px; max-width: none; }
}

/* ============================================================
   v9 — modern pass: labeled outline tabs, Iconosquare-style
   insights (stat cards + SVG charts), monthly client report,
   direct user creation, autopilot run-now
   ============================================================ */

/* --- insights controls (range pills + sync analytics) --- */

.ins-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.range-pills {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--ghost);
  border-radius: 999px;
}
.rpill {
  height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  transition: background .1s ease, color .1s ease;
}
.rpill:hover:not(.active) { color: var(--text); }
.rpill.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .14);
}

/* --- performance stat cards --- */

.ins-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.ins-stat {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ins-stat .stat-icon { width: 36px; height: 36px; }
.ins-stat .stat-icon svg { width: 18px; height: 18px; }
.ins-stat-v {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-display, var(--font));
}
.ins-stat-l { font-size: 12px; color: var(--text-2); font-weight: 600; }

.delta {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2px;
}
.delta.d-up { background: var(--tint-green-bg); color: var(--tint-green-fg); }
.delta.d-down { background: var(--tint-red-bg); color: var(--tint-red-fg); }

/* --- charts --- */

.ins-charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.chart-card { padding: 14px 16px 10px; }
.chart-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}
.chart-title svg { width: 15px; height: 15px; color: var(--text-2); }
.ins-chart { width: 100%; height: auto; display: block; }
.ch-grid { stroke: var(--border); stroke-width: 1; }
.ch-lab { fill: var(--text-2); font-size: 10px; font-family: var(--font); }
.ch-legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}
.ch-leg-item { display: inline-flex; align-items: center; gap: 5px; }
.ch-leg-dot { width: 8px; height: 8px; border-radius: 50%; }

/* --- monthly report --- */

.rep-card { margin-bottom: 16px; }
.rep-head { margin-bottom: 12px; }
.rep-month {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  outline: none;
}
.rep-month:focus { border-color: var(--primary); }
/* v9.1: screenshot-ready branded summary panel — always brand navy in
   BOTH themes so a screenshot looks identical wherever it's taken */

.sum-panel {
  background: linear-gradient(160deg, #0B3459 0%, #072946 62%, #06223B 100%);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 16px;
  padding: 20px 20px 12px;
  color: #fff;
}

.sum-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.sum-avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.sum-who { min-width: 0; flex: 1; }
.sum-brand {
  font-weight: 800;
  font-size: 17px;
  font-family: var(--font-display, var(--font));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sum-user {
  direction: ltr;
  text-align: right;
  font-size: 13px;
  color: rgba(255, 255, 255, .62);
}
.sum-month {
  background: #E34647;
  color: #fff;
  height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

.sum-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.sum-tile {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  padding: 14px 10px 12px;
  text-align: center;
  min-width: 0;
}
.sum-tile-v {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  font-family: var(--font-display, var(--font));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sum-tile-l {
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, .78);
  margin-top: 3px;
}
.sum-tile-s {
  font-size: 11px;
  color: rgba(255, 255, 255, .55);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sum-top-code { font-size: 20px; letter-spacing: .3px; }
.sum-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(69, 189, 98, .22);
  color: #7BE495;
  font-size: 12px;
  font-weight: 800;
}
.sum-chip-down { background: rgba(240, 40, 73, .22); color: #FF8A8D; }

.sum-foot {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  color: rgba(255, 255, 255, .4);
}

/* --- autopilot active row + chip --- */

.auto-chip {
  height: 20px;
  padding: 0 8px;
  font-size: 11px;
  margin-left: 8px;
  vertical-align: middle;
}
.auto-chip svg { width: 11px; height: 11px; }
.auto-active {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--tint-teal-bg);
  color: var(--tint-teal-fg);
  font-size: 13px;
  font-weight: 600;
}
.auto-active svg { width: 15px; height: 15px; flex-shrink: 0; }
.auto-active .btn { margin-left: auto; }

/* --- add user (direct creation) --- */

.pw-row { display: flex; gap: 8px; align-items: center; }
.pw-row input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pw-row .btn { flex-shrink: 0; }

.creds-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.creds-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
}
.creds-row + .creds-row { border-top: 1px solid var(--border); }
.creds-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-2);
  width: 76px;
  flex-shrink: 0;
}
.creds-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 600;
  word-break: break-all;
  user-select: all;
}

/* --- v9.2 responsive topbar: ONE row for as long as possible ---------
   The old rules wrapped the tab strip onto a second row at ≤768px, which
   at browser zoom (a zoomed page has a narrow *effective* viewport) read
   as "icons above AND below". Everything below shrinks the bar's own
   pieces instead — lockup → square mark, brand name hidden, tighter tabs
   — so the seven labeled tabs stay on the same line down to ~560px. */

.logo-mark-top { display: none; height: 34px; width: auto; flex-shrink: 0; }

@media (max-width: 1420px) {
  .tab { width: 64px; }
  .tab-label { font-size: 9px; }
}
@media (max-width: 1300px) {
  .tab { width: 58px; }
}
@media (max-width: 1100px) {
  .ins-stats { grid-template-columns: repeat(3, 1fr); }
  .rep-grid { grid-template-columns: repeat(3, 1fr); }
}

/* tablet / zoomed laptop: drop the duplicated controls, tighten the bar */
@media (max-width: 1024px) {
  .topbar { padding: 0 10px; gap: 6px; }
  .theme-btn-top { display: none; }  /* theme toggle lives in the account menu */
  .add-brand-btn { display: none; }  /* Add brand still on Overview */
  .logo-lockup-top { height: 30px; }
  .tab { width: 52px; }
  .tab-label { font-size: 8.5px; letter-spacing: .1px; }
}

/* narrow / heavily zoomed: square mark, avatar-only switcher — still one row */
@media (max-width: 860px) {
  .logo-lockup-top { display: none; }
  .logo-mark-top { display: block; height: 32px; }
  .bdd-name { display: none; }
  .bdd-btn { padding: 0 8px; max-width: none; }
  .chip-name { display: none; }
  .account-chip { padding: 0 6px 0 4px; }
  .tab { width: 48px; }
}

@media (max-width: 700px) {
  .topbar { padding: 0 6px; gap: 4px; }
  .logo-mark-top { height: 28px; }
  .tab { width: 44px; }
  .tab svg { width: 20px; height: 20px; }
  .tab-label { font-size: 8px; }
  .topbar .btn, .topbar .btn-icon { padding: 0 8px; }
}

/* below this the seven tabs genuinely cannot share the row — the tab strip
   becomes a deliberate full-width second row (a real nav bar, bordered) */
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 0 8px 0; }
  .topbar-left { height: 48px; flex: 1 1 0; min-width: 0; }
  .topbar-right { height: 48px; flex: 0 0 auto; }
  .topbar-tabs {
    order: 3;
    width: 100%;
    height: 50px;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, .18);
  }
  .tab { flex: 1 1 0; width: auto; }
  .tab svg { width: 21px; height: 21px; }
  .tab-label { font-size: 9px; }
}

@media (max-width: 768px) {
  .ins-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ins-charts { grid-template-columns: 1fr; }
  .rep-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sum-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .sum-tile-v { font-size: 22px; }
  .sum-month { height: 26px; padding: 0 12px; font-size: 12px; }
  .auto-active .btn { margin-left: 0; width: 100%; }
}

/* v8-era mobile block set these to wrap at 768; the v9.2 rules above own
   the topbar now, so neutralise the old wrap between 561 and 768px */
@media (min-width: 561px) and (max-width: 768px) {
  .topbar { flex-wrap: nowrap; height: 58px; }
  .topbar-tabs { order: 0; width: auto; height: 58px; border-top: none; }
  .tab { flex: 0 0 auto; }
}

/* the signed-in handle under a team member's name */
.u-handle {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
}

/* ============================================================
   v9.3 — "Send login": one button per teammate that ends with the
   full sign-in message on the clipboard
   ============================================================ */

.sl-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--tint-orange-border);
  background: var(--tint-orange-bg);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--tint-orange-fg);
}
.sl-check input {
  margin: 2px 0 0;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.sl-check-sub {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  opacity: .92;
}

.field textarea.sl-msg {
  width: 100%;
  min-height: 210px;
  padding: 12px 14px;
  border: 1px solid var(--divider);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.9;
  resize: vertical;
  outline: none;
}
.field textarea.sl-msg:focus { border-color: var(--primary); }

/* send-login warnings: your own row, a disabled account, a local-only link */
.sl-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--tint-red-bg);
  color: var(--tint-red-fg);
  border: 1px solid var(--tint-red-bg);
  font-size: 13px;
  line-height: 1.6;
}
.sl-warn svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

.sl-check-green {
  border-color: var(--tint-green-bg);
  background: var(--tint-green-bg);
  color: var(--tint-green-fg);
}
.sl-check-done { opacity: .6; cursor: default; }

/* ============================================================
   v10 — public landing page. A pure brand surface (full-bleed navy
   in ALL cases, like login — no theme dependence), Arabic-first RTL,
   with the interface itself rendered live in 3D rather than pasted
   in as flat screenshots: sharp at every density, always current,
   and it carries no customer data.
   ============================================================ */

body.landing-page {
  background: #072946;
  color: #fff;
  color-scheme: dark;
  /* depth behind everything: two soft brand lights on the navy */
  background-image:
    radial-gradient(900px 520px at 78% -8%, rgba(118, 199, 229, .16), transparent 62%),
    radial-gradient(760px 460px at 12% 4%, rgba(227, 70, 71, .14), transparent 60%);
  background-attachment: fixed;
}

.landing-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------------------------------------------------- hero */

.land-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 0 40px;
}
.land-lockup {
  width: 360px;
  max-width: 84vw;
  height: auto;
  display: block;
}
.land-tagline {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.85;
  color: rgba(255, 255, 255, .93);
  max-width: 700px;
  margin: 24px 0 28px;
}
.land-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.land-ctas-end { margin-top: 34px; }
.land-cta {
  height: 50px;
  padding: 0 32px;
  font-size: 16px;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(227, 70, 71, .34);
}
.landing-page .btn-primary { background: #E34647; color: #fff; }
.landing-page .btn-primary:hover { background: #CF3C3D; text-decoration: none; }
.btn-outline {
  border: 1.5px solid rgba(255, 255, 255, .45);
  color: #fff;
  background: transparent;
}
.btn-outline:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }

/* ---------------------------------------------------- 3D product scene */

.scene {
  position: relative;
  width: 100%;
  margin: 58px auto 0;
  padding-bottom: 30px;
}
.scene-glow {
  position: absolute;
  inset: 6% 10% 12%;
  background: radial-gradient(closest-side, rgba(118, 199, 229, .3), transparent 72%);
  filter: blur(46px);
  z-index: 0;
}

/* an app window: navy chrome bar + a light body, exactly like the product */
.mock {
  position: relative;
  z-index: 1;
  background: #F2F4F7;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow:
    0 2px 6px rgba(2, 12, 22, .34),
    0 22px 48px rgba(2, 12, 22, .46),
    0 48px 90px rgba(2, 12, 22, .38);
  text-align: initial;
}
/* the front plane: biggest, sharpest, heaviest shadow */
.mock-hero {
  max-width: 740px;
  margin: 0 auto;
  box-shadow:
    0 2px 8px rgba(2, 12, 22, .38),
    0 26px 56px rgba(2, 12, 22, .5),
    0 60px 110px rgba(2, 12, 22, .42);
}
.mock-bar {
  /* the product's own topbar is LTR (logo left, account right); the landing
     page is RTL, which would otherwise mirror the whole chrome */
  direction: ltr;
  height: 34px;
  background: linear-gradient(180deg, #0B3459 0%, #072946 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}
.mock-bar-sm { height: 24px; }
/* the actual AlPlanner mark — it ships on the same navy as the bar,
   so it seats into the chrome with no visible plate */
.mock-mark {
  width: 30px;
  height: auto;
  display: block;
  flex-shrink: 0;
  border-radius: 3px;
}
.mock-bar-sm .mock-mark { width: 23px; }
.mock-tabs { display: flex; gap: 12px; margin: 0 auto; }
.mock-tabs i {
  width: 16px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .3);
  display: block;
}
.mock-tabs i.on { background: #E34647; width: 20px; }
.mock-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .28);
  flex-shrink: 0;
}
.mock-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }

/* stat tiles */
.mk-row { display: flex; gap: 8px; }
.mk-stats > * { flex: 1 1 0; }
.mk-stat {
  background: #fff;
  border: 1px solid #E2E8EE;
  border-radius: 9px;
  padding: 9px 10px;
  min-width: 0;
}
.mk-stat b {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: #0B1F30;
  line-height: 1.1;
  font-family: var(--font-display, var(--font));
}
.mk-stat span { display: block; font-size: 9px; color: #5C6B7A; font-weight: 600; margin-top: 2px; }
.mk-stat em {
  display: inline-block;
  margin-top: 5px;
  font-size: 8.5px;
  font-weight: 800;
  font-style: normal;
  padding: 1px 6px;
  border-radius: 999px;
  background: #E5F2E9;
  color: #187435;
}

/* chart cards */
.mk-charts > * { flex: 1 1 0; }
.mk-card {
  background: #fff;
  border: 1px solid #E2E8EE;
  border-radius: 9px;
  padding: 9px 10px 6px;
  min-width: 0;
}
.mk-card-wide { width: 100%; }
.mk-card-t { font-size: 9px; font-weight: 800; color: #0B1F30; margin-bottom: 5px; }
.mk-card svg { width: 100%; height: 58px; display: block; }
.mk-card-wide svg { height: 86px; }
.mk-line { fill: none; stroke: #007AA0; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mk-line-2 { stroke: #E34647; }
.mk-area { fill: #007AA0; opacity: .12; stroke: none; }
.mk-tip { fill: #007AA0; }

/* calendar grid */
.mk-cal-t { font-size: 9px; font-weight: 800; color: #0B1F30; }
.mk-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.mk-cal-head b { font-size: 12px; color: #0B1F30; font-family: var(--font-display, var(--font)); }
.mk-pillbar { display: flex; gap: 4px; }
.mk-pillbar i { width: 22px; height: 8px; border-radius: 999px; background: #E6EBF0; display: block; }
.mk-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.mk-cal i {
  display: block;
  height: 15px;
  border-radius: 3px;
  background: #fff;
  border: 1px solid #E8EDF2;
}
.mk-cal-lg i { height: 24px; border-radius: 4px; }
.mk-cal i.p1 { background: #E34647; border-color: #E34647; }
.mk-cal i.p2 { background: #007AA0; border-color: #007AA0; }
.mk-cal i.p3 { background: #76C7E5; border-color: #76C7E5; }

/* post rows */
.mk-post {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid #E2E8EE;
  border-radius: 8px;
  padding: 6px 8px;
}
.mk-thumb {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: linear-gradient(135deg, #0B3459, #E34647);
  flex-shrink: 0;
}
.mk-thumb.t2 { background: linear-gradient(135deg, #072946, #76C7E5); }
.mk-thumb.t3 { background: linear-gradient(135deg, #103E60, #F98E78); }
.mk-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mk-lines i { height: 4px; border-radius: 2px; background: #D5DCE3; display: block; }
.mk-lines i.short { width: 55%; background: #E6EBF0; }
.mk-chip {
  font-size: 7.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: #E8F5FB;
  color: #00688A;
  white-space: nowrap;
  flex-shrink: 0;
}
.mk-chip.ok { background: #E5F2E9; color: #187435; }

/* floating side panels */
/* the back plane: smaller and softer, so it reads as further away */
.mock-side {
  position: absolute;
  width: 196px;
  z-index: 0;
  opacity: .96;
  box-shadow:
    0 2px 6px rgba(2, 12, 22, .3),
    0 16px 34px rgba(2, 12, 22, .42);
}
.mock-side-a { left: 0; top: 46%; animation: float-a 7s ease-in-out infinite; }
.mock-side-b { right: 0; top: 13%; animation: float-b 8s ease-in-out infinite; }

/* depth is vertical drift only — no rotation anywhere */
@keyframes float-a {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-13px); }
}
@keyframes float-b {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(11px); }
}

/* ---------------------------------------------------------- sections */

.land-sec { margin: 0 0 88px; }
.sec-eyebrow {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #76C7E5;
  margin-bottom: 10px;
}
.land-sec-title {
  font-size: 30px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 18px;
  line-height: 1.7;
  font-family: var(--font-display, var(--font));
}
.sec-lead {
  max-width: 660px;
  margin: 0 auto 36px;
  text-align: center;
  font-size: 16px;
  line-height: 2;
  color: rgba(255, 255, 255, .74);
}

/* vision pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.pillar {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 16px;
  padding: 26px 24px;
  position: relative;
  overflow: hidden;
}
.pillar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #E34647, #76C7E5);
  opacity: .8;
}
.pillar-n {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #76C7E5;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.pillar h3 { font-size: 18px; font-weight: 800; margin: 0 0 8px; line-height: 1.7; }
.pillar p { margin: 0; font-size: 14px; line-height: 1.95; color: rgba(255, 255, 255, .72); }

/* ---------------------------------------------------------- product tour */

.tour { display: flex; flex-direction: column; gap: 64px; }
.tour-row {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 34px;
  align-items: center;
}
.tour-rev .tour-txt { order: 2; }
.tour-rev .tour-shot { order: 1; }
.tour-txt h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 10px;
  line-height: 1.7;
  font-family: var(--font-display, var(--font));
}
.tour-txt p { margin: 0; font-size: 15px; line-height: 2; color: rgba(255, 255, 255, .74); }
/* elevation, not angle: the panel rises toward the reader on hover */
.mock-lift {
  transition: transform .35s ease, box-shadow .35s ease;
}
.mock-lift:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow:
    0 4px 12px rgba(2, 12, 22, .4),
    0 34px 70px rgba(2, 12, 22, .52),
    0 70px 120px rgba(2, 12, 22, .4);
}

/* the monthly-report card, as the product renders it */
.mk-rep {
  background: linear-gradient(160deg, #0B3459 0%, #072946 62%, #06223B 100%);
  border-radius: 10px;
  padding: 12px;
}
.mk-rep-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mk-rep-badge {
  background: #E34647;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}
.mk-rep-brand { font-size: 12px; font-weight: 800; color: #fff; }
.mk-rep-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mk-rep-grid span {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: 9px 6px;
  text-align: center;
}
.mk-rep-grid b {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-display, var(--font));
}
.mk-rep-grid i {
  display: block;
  font-style: normal;
  font-size: 9px;
  color: rgba(255, 255, 255, .66);
  margin-top: 2px;
}

/* ---------------------------------------------------------- differentiation */

.diff {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.diff-card {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  padding: 22px 24px;
}
.diff-vs, .diff-us {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .6px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.diff-vs { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .6); }
.diff-us { background: rgba(227, 70, 71, .2); color: #FF9A9B; margin-top: 14px; }
.diff-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.95;
  color: rgba(255, 255, 255, .6);
}
.diff-card .diff-us-p { color: rgba(255, 255, 255, .9); font-weight: 500; }

/* ---------------------------------------------------------- features */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feat-card {
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  padding: 24px 22px;
  transition: transform .25s ease, background .25s ease;
}
.feat-card:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .085); }
.feat-ic {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(118, 199, 229, .16);
  color: #76C7E5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.feat-ic svg { width: 23px; height: 23px; }
.feat-title { font-size: 16px; font-weight: 800; margin: 0 0 6px; line-height: 1.6; }
.feat-desc { font-size: 14px; color: rgba(255, 255, 255, .72); line-height: 1.9; margin: 0; }

/* ---------------------------------------------------------- how it works */

.how-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
}
.how-step {
  flex: 1 1 0;
  max-width: 300px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 18px;
}
.how-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #E34647;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.how-t { font-weight: 800; margin-bottom: 2px; }
.how-d { font-size: 13px; color: rgba(255, 255, 255, .72); line-height: 1.8; }
.how-arrow {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, .4);
  flex-shrink: 0;
}
.how-arrow svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------- strip + footer */

.tech-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  color: rgba(255, 255, 255, .6);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
  margin-bottom: 40px;
}
.ts-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
}

.land-foot {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 26px 0 34px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
}
.foot-brand { font-weight: 700; color: rgba(255, 255, 255, .8); }
.foot-by { margin-top: 7px; }
.foot-by a { color: #76C7E5; font-weight: 700; }
.foot-by a:hover { color: #A5DDF0; }

/* ---------------------------------------------------------- responsive */

@media (max-width: 980px) {
  .pillars { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .tour-row { grid-template-columns: 1fr; gap: 22px; }
  .tour-rev .tour-txt, .tour-rev .tour-shot { order: initial; }
  .mock-side { display: none; }   /* the floating panels need the width */
}

@media (max-width: 640px) {
  .land-hero { padding: 48px 0 28px; }
  .land-lockup { width: 290px; }
  .land-tagline { font-size: 19px; margin: 20px 0 24px; }
  .land-sec-title { font-size: 23px; }
  .sec-lead { font-size: 15px; }
  .features-grid, .diff { grid-template-columns: 1fr; gap: 12px; }
  .how-row { flex-direction: column; align-items: stretch; }
  .how-step { max-width: none; }
  .how-arrow { display: none; }
  .land-sec { margin-bottom: 60px; }
  .land-cta { flex: 1 1 100%; }
  .tour { gap: 44px; }
  .scene { margin-top: 40px; }
  .mock-lift:hover { transform: none; }   /* no hover state on touch */
}

/* honour the OS "reduce motion" setting: no floating, no tilt transitions */
@media (prefers-reduced-motion: reduce) {
  .mock-side-a, .mock-side-b { animation: none; }
  .mock-lift, .feat-card { transition: none; }
  .mock-lift:hover { transform: none; }
}
