/* Miroma Social Tracker, styled to match the Miroma Group Brand Hub.
   Dark is the default (as on the Brand Hub); html[data-theme="light"] switches. */
:root, :root[data-theme="dark"] {
  --brand-yellow: #FFE255; --brand-blue: #3185FC; --brand-coral: #F15844; --brand-pink: #B8336A; --brand-purple: #38113E; --brand-grey: #C9C5BD;
  --bg: #0d0d0d;
  --surface: #141414;
  --surface-2: #1f1f1f;
  --card: #1a1a1a;
  --hover: #242424;
  --border: #2e2e2e;
  --border-soft: #232323;
  --text: #f2f2f2;
  --text-2: #b8b8b8;
  --text-3: #6a6a6a;
  --primary: #3185FC;
  --primary-hover: #1f6fd6;
  --primary-soft: rgba(49, 133, 252, .16);
  --danger: #F15844;
  --invert: #ffffff;
  --invert-text: #000000;
  --shadow: 0 16px 48px rgba(0, 0, 0, .6);
  --hero: linear-gradient(135deg, #38113E 0%, #000000 100%);
  --radius: 4px;
  --row-h: 38px;
  --font: 'Neue Montreal', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f7f7f7;
  --surface-2: #f0f0f0;
  --card: #ffffff;
  --hover: #ececec;
  --border: #e8e8e8;
  --border-soft: #efefef;
  --text: #000000;
  --text-2: #444444;
  --text-3: #888888;
  --primary-soft: rgba(49, 133, 252, .12);
  --invert: #000000;
  --invert-text: #ffffff;
  --shadow: 0 12px 36px rgba(0, 0, 0, .14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14.5px; font-weight: 500; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
a { color: var(--primary); }
.muted { color: var(--text-3); }
::selection { background: var(--brand-purple); color: #fff; }

/* ---------- Auth gate ---------- */
/* Matches the Miroma Brand Hub sign-in exactly */
html.auth-pending body > :not(#authOverlay) { visibility: hidden !important; pointer-events: none !important; }
#authOverlay { position: fixed; inset: 0; z-index: 99999; background: #f5f3ef; display: flex; align-items: center; justify-content: center; font-family: 'Neue Montreal', 'Helvetica Neue', Helvetica, Arial, sans-serif; color-scheme: light; }
#authOverlay * { font-family: inherit; font-weight: 500; }
#authOverlay svg { stroke: none; width: 18px; height: 18px; }
.auth-box { position: relative; width: 100%; max-width: 400px; margin: 20px; background: #f5f3ef; border-radius: 16px; box-shadow: rgba(0, 0, 0, .28) 0 24px 64px; padding: clamp(40px, 8vw, 56px) clamp(28px, 6vw, 44px); text-align: center; }
#authOverlay .auth-box__eyebrow { font-size: 13px; line-height: 1.5; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 10px; color: #888 !important; }
#authOverlay .auth-box__title { font-size: clamp(40px, 8vw, 64px); font-weight: 700 !important; line-height: 1; margin: 0 0 14px; color: #111 !important; }
#authOverlay .auth-box__sub { font-size: 16.5px; line-height: 1.6; margin: 0 0 36px; color: #666 !important; }
.auth-box__btns { display: flex; flex-direction: column; gap: 12px; }
.auth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 14px 20px; border-radius: 6px; border: 1.5px solid #ddd; background: #fff; color: #111; font-size: 15.5px; font-weight: 500; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.auth-btn:hover { border-color: #111; box-shadow: rgba(0, 0, 0, .08) 0 2px 8px; }
.auth-btn:disabled { cursor: not-allowed; }
.auth-box__error { font-size: 14.5px; color: #c0392b; margin: 16px 0 0; min-height: 18px; }


/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 244px 1fr; height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border-soft); padding: 20px 10px 14px; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand__mark { width: 24px; height: 24px; border-radius: 50%; background: var(--invert); color: var(--invert-text); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.brand__name { font-weight: 600; font-size: 14.5px; flex: 1; }
#notifSlot { display: inline-flex; }
.bell { position: relative; width: 30px; height: 30px; border: 0; background: none; border-radius: 6px; color: var(--text-2); display: grid; place-items: center; }
.bell:hover { background: var(--hover); color: var(--text); }
.bell__dot { position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--brand-coral); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.side-nav { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft); }
.side-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 4px; background: none; color: var(--text-2); font-size: 14.5px; font-weight: 500; text-decoration: none; text-align: left; }
.side-link svg { width: 16px; height: 16px; }
.side-link:hover { background: var(--hover); color: var(--text); }
.side-link.active { background: var(--invert); color: var(--invert-text); font-weight: 600; }
.side-link__txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link .count { font-size: 12px; color: var(--text-3); }
.side-link.active .count { color: inherit; opacity: .6; }
.badge { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--brand-coral); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.side-section { margin-top: 6px; }
.side-label { display: flex; justify-content: space-between; align-items: center; padding: 16px 10px 6px; font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-3); }
.side-spacer { flex: 1; min-height: 16px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.icon-btn { width: 26px; height: 26px; border: 0; background: none; border-radius: 4px; color: var(--text-2); font-size: 18px; line-height: 1; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.ws-picker { position: relative; padding: 0 4px; }
.ws-picker__btn { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--card); text-align: left; font-weight: 600; }
.ws-picker__btn:hover { border-color: var(--text-3); }
.ws-badge { width: 20px; height: 20px; border-radius: 4px; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none; }
.ws-picker__btn .chev { margin-left: auto; color: var(--text-3); }
.theme-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; margin: 0 6px; border-radius: 100px; background: var(--card); border: 1px solid var(--border-soft); }
.theme-switch button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 28px; border: 0; border-radius: 100px; background: none; color: var(--text-3); font-size: 13px; }
.theme-switch button svg { width: 14px; height: 14px; }
.theme-switch button.on { background: var(--invert); color: var(--invert-text); }
.side-user { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px; border: 0; border-top: 1px solid var(--border-soft); background: none; text-align: left; color: var(--text-2); width: 100%; }
.side-user:hover { color: var(--text); }
.side-user__txt { flex: 1; min-width: 0; display: grid; }
.side-user__txt b { font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.side-user__txt small { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user svg { width: 16px; height: 16px; }
.main { background: var(--bg); overflow: auto; min-width: 0; }
.page { padding: 28px 32px 70px; min-width: 0; max-width: 1500px; }
.page--narrow { max-width: 980px; }

/* ---------- Brand Hub hero + page headings ---------- */
.hero { background: var(--hero); color: #fff; border-radius: 6px; padding: 36px 44px; margin-bottom: 26px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 120% at 85% 10%, rgba(184, 51, 106, .25), transparent 60%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero__logo { height: 22px; width: auto; display: block; margin-bottom: 16px; }
.hero__eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; opacity: .85; margin-bottom: 14px; }
.hero__title { font-size: clamp(22px, 3vw, 30px); font-weight: 600; margin: 0 0 8px; letter-spacing: -.01em; }
.hero__sub { margin: 0 0 20px; font-size: 15.5px; opacity: .85; max-width: 620px; line-height: 1.5; }
.hero__stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 4px; }
.hero__stats div { display: grid; }
.hero__stats b { font-size: 26px; font-weight: 600; }
.hero__stats span { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; opacity: .75; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.page-title { font-size: clamp(26px, 3.2vw, 34px); font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; }
.page-sub { color: var(--text-2); margin: 0 0 18px; line-height: 1.55; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 10px; gap: 10px; }
.section-label { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-2); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.section-head .section-label { margin: 0; }
.section-label span { color: var(--text-3); }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; font-size: 13px; margin-bottom: 14px; }
.back-link:hover { color: var(--text); }
.back-link svg { width: 15px; height: 15px; }
.link-btn { border: 0; background: none; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; padding: 0; }
.menu-btn { margin-bottom: 12px; }

/* ---------- Board header ---------- */
.board-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.board-title { font-size: 24px; font-weight: 600; margin: 0; padding: 2px 6px; border-radius: 4px; border: 1px solid transparent; outline: none; }
.board-title[contenteditable]:hover { border-color: var(--border); }
.board-title:focus { border-color: var(--primary); }
.board-desc { color: var(--text-2); font-size: 13px; margin: 2px 6px 0; }
.board-head__actions { margin-left: auto; display: flex; gap: 6px; }
.btn { height: 32px; padding: 0 12px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.btn:hover { background: var(--surface); }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--ghost { border-color: transparent; background: none; color: var(--text-2); }
.btn--ghost:hover { background: var(--hover); color: var(--text); }
.btn--ghost.on { background: var(--primary-soft); color: var(--text); }
.btn--danger { color: var(--danger); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-soft); margin: 12px 0 0; }
.tab { border: 0; background: none; padding: 8px 12px; border-radius: 4px 4px 0 0; color: var(--text-2); position: relative; display: flex; align-items: center; gap: 6px; }
.tab svg { width: 15px; height: 15px; }
.tab:hover { background: var(--surface); color: var(--text); }
.tab.active { color: var(--text); font-weight: 500; }
.tab.active::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--primary); }

.toolbar { display: flex; align-items: center; gap: 4px; padding: 12px 0; flex-wrap: wrap; position: sticky; top: 0; background: var(--bg); z-index: 6; }
.split-btn { display: inline-flex; }
.search-box { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border-radius: 4px; border: 1px solid transparent; color: var(--text-2); }
.search-box:focus-within { border-color: var(--primary); }
.search-box input { border: 0; outline: none; background: none; width: 140px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--primary-soft); font-size: 12px; }
.chip button { border: 0; background: none; padding: 0; font-size: 14px; line-height: 1; color: var(--text-2); }

/* ---------- Table ---------- */
.group { margin-top: 22px; }
.group-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; position: relative; }
.group-head .toggle { border: 0; background: none; padding: 2px; border-radius: 4px; color: var(--gc); }
.group-head .toggle:hover { background: var(--hover); }
.group-head .toggle svg { transition: transform .15s; }
.group.collapsed .toggle svg { transform: rotate(-90deg); }
.group-name { font-size: 18px; font-weight: 600; color: var(--gc); padding: 1px 6px; border-radius: 4px; border: 1px solid transparent; outline: none; }
.group-name:hover { border-color: var(--border); }
.group-name:focus { border-color: var(--primary); color: var(--text); }
.group-count { color: var(--text-3); font-size: 13px; }
.group-menu-btn { opacity: 0; }
.group-head:hover .group-menu-btn { opacity: 1; }

.table-wrap { overflow-x: auto; padding-bottom: 4px; }
.tbl { border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.tbl th, .tbl td { height: var(--row-h); border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); padding: 0; font-weight: 400; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--bg); }
.tbl thead th { color: var(--text-2); font-size: 13px; border-top: 1px solid var(--border-soft); padding: 0 8px; position: relative; }
.tbl thead th.sortable { cursor: pointer; }
.tbl thead th.sortable:hover { background: var(--surface); }
.tbl th:first-child, .tbl td:first-child { border-left: 6px solid var(--gc); }
.tbl thead th:first-child { border-top-left-radius: 6px; }
.tbl tr.add-row td:first-child { border-bottom-left-radius: 6px; }
.tbl .c-check { width: 38px; }
.tbl .c-name { width: 340px; text-align: left; position: sticky; left: 0; z-index: 2; }
.tbl thead .c-name { padding-left: 46px; }
.tbl tbody tr:hover td { background: var(--surface); }
.tbl tbody tr.selected td { background: var(--primary-soft); }
.cell-name { display: flex; align-items: center; height: 100%; gap: 6px; padding: 0 6px 0 4px; }
.cell-name input[type=checkbox] { margin: 0 6px 0 4px; }
.cell-name .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 2px 4px; border: 1px solid transparent; border-radius: 3px; outline: none; }
.cell-name .name:hover { border-color: var(--border); }
.cell-name .name:focus { border-color: var(--primary); background: var(--bg); text-overflow: clip; }
.open-btn { border: 0; background: none; color: var(--text-3); display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 4px; font-size: 12px; opacity: 0; }
tr:hover .open-btn { opacity: 1; }
.open-btn:hover { background: var(--hover); color: var(--text); }
.updates-dot { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: var(--primary); }

.cell-btn { width: 100%; height: 100%; border: 0; background: none; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-btn:hover { outline: 1px solid var(--border); outline-offset: -1px; }
.pill { width: 100%; height: 100%; border: 0; color: #fff; font-size: 13px; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; }
.pill:hover::after { content: ''; position: absolute; top: 0; right: 0; border: 7px solid transparent; border-top-color: rgba(255,255,255,.7); border-right-color: rgba(255,255,255,.7); }
.pill.empty { background: #c4c4c4; }
.cell-text { width: 100%; height: 100%; border: 0; background: none; text-align: center; padding: 0 8px; outline: none; }
.cell-text:hover { outline: 1px solid var(--border); outline-offset: -1px; }
.cell-text:focus { outline: 1px solid var(--primary); outline-offset: -1px; background: var(--bg); }
.cell-date { display: flex; align-items: center; justify-content: center; gap: 5px; height: 100%; position: relative; cursor: pointer; }
.cell-date input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cell-date .ic { width: 16px; height: 16px; flex: none; }
.cell-date.overdue .ic { color: var(--danger); }
.cell-date.done .lbl { text-decoration: line-through; color: var(--text-3); }
.cell-date.done .ic { color: #00c875; }
.cell-date.soon .ic { color: #fdab3d; }
.avatar { width: 26px; height: 26px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }
.avatar.empty { background: none; border: 1.5px dashed var(--text-3); color: var(--text-3); }
.cell-owner { display: flex; align-items: center; justify-content: center; height: 100%; }
.cell-link { display: flex; align-items: center; justify-content: center; height: 100%; gap: 6px; padding: 0 8px; }
.cell-link a { overflow: hidden; text-overflow: ellipsis; }
.timeline-bar { display: inline-block; max-width: calc(100% - 12px); padding: 3px 10px; border-radius: 12px; color: #fff; font-size: 12px; background: var(--gc); overflow: hidden; text-overflow: ellipsis; }
.timeline-bar.empty { background: #c4c4c4; }
.updated { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); font-size: 12px; }
.updated .avatar { width: 22px; height: 22px; font-size: 10px; }
.tbl tr.add-row td { text-align: left; }
.add-row input { width: 100%; height: 100%; border: 0; background: none; padding: 0 12px 0 44px; outline: none; color: var(--text-2); }
.add-row input:focus { outline: 1px solid var(--primary); outline-offset: -1px; color: var(--text); }
.tbl tr.summary td { border: 0; background: none; }
.tbl tr.summary td.has-sum { border-bottom: 1px solid var(--border-soft); border-right: 1px solid var(--border-soft); }
.sum-bar { display: flex; height: 22px; margin: 6px; border-radius: 2px; overflow: hidden; }
.sum-bar span { display: block; height: 100%; }
.add-col { width: 44px; color: var(--text-3); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-2); }
.empty-state h3 { color: var(--text); margin: 0 0 8px; font-size: 18px; }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 20px; }
.k-col { width: 270px; flex: none; background: var(--surface); border-radius: 8px; display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.k-col__head { padding: 10px 12px; color: #fff; border-radius: 8px 8px 0 0; font-weight: 600; display: flex; justify-content: space-between; }
.k-col__body { padding: 8px; overflow-y: auto; display: grid; gap: 8px; min-height: 60px; }
.k-col__body.drop { outline: 2px dashed var(--primary); outline-offset: -4px; }
.k-card { background: var(--bg); border-radius: 6px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.12); cursor: grab; display: grid; gap: 8px; }
.k-card:hover { box-shadow: 0 3px 8px rgba(0,0,0,.16); }
.k-card.dragging { opacity: .4; }
.k-card__title { font-weight: 500; line-height: 1.35; }
.k-card__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--text-2); font-size: 12px; }
.tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 10px; font-size: 11px; color: #fff; }
.tag.soft { background: var(--surface-2); color: var(--text); }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-head h3 { margin: 0 8px; font-size: 18px; min-width: 170px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border-soft); border-left: 1px solid var(--border-soft); }
.cal__dow { padding: 6px 8px; font-size: 12px; color: var(--text-2); border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: var(--surface); }
.cal__day { min-height: 110px; border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal__day.other { background: var(--surface); }
.cal__day.drop { background: var(--primary-soft); }
.cal__num { font-size: 12px; color: var(--text-2); padding: 2px 4px; align-self: flex-start; border-radius: 10px; }
.cal__day.today .cal__num { background: var(--primary); color: #fff; }
.cal__item { border: 0; text-align: left; color: #fff; font-size: 12px; padding: 3px 6px; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.unscheduled { margin-top: 18px; }
.unscheduled h4 { margin: 0 0 8px; font-size: 14px; color: var(--text-2); font-weight: 500; }
.unscheduled__list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.widget { background: var(--bg); border: 1px solid var(--border-soft); border-radius: 8px; padding: 14px 16px; min-width: 0; }
.widget h4 { margin: 0 0 10px; font-size: 15px; font-weight: 500; display: flex; justify-content: space-between; }
.widget h4 small { color: var(--text-3); font-weight: 400; font-size: 12px; }
.kpi { grid-column: span 2; text-align: center; padding: 16px 10px; cursor: pointer; }
.kpi:hover { border-color: var(--border); }
.kpi__label { color: var(--text-2); font-size: 13px; }
.kpi__value { font-size: 34px; font-weight: 600; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kpi__hint { color: var(--text-3); font-size: 12px; }
.w-6 { grid-column: span 6; } .w-4 { grid-column: span 4; } .w-8 { grid-column: span 8; } .w-12 { grid-column: span 12; }
.chart-box { position: relative; height: 260px; }
.mini-list { display: grid; gap: 0; max-height: 300px; overflow-y: auto; }
.mini-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--border-soft); cursor: pointer; }
.mini-row:hover { background: var(--surface); }
.mini-row .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row .d { font-size: 12px; color: var(--text-2); }
.mini-row .d.over { color: var(--danger); font-weight: 500; }
.dash-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.select { height: 32px; border: 1px solid var(--border); border-radius: 4px; padding: 0 8px; background: var(--bg); }

/* Home */
.home-hero { padding: 24px 0 8px; }
.home-hero h1 { margin: 0; font-size: 26px; font-weight: 500; }
.home-hero p { color: var(--text-2); margin: 6px 0 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.board-card { border: 1px solid var(--border-soft); border-radius: 8px; padding: 14px; background: var(--bg); cursor: pointer; text-align: left; display: grid; gap: 8px; }
.board-card:hover { box-shadow: var(--shadow); }
.board-card__title { font-weight: 600; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.board-card__meta { color: var(--text-2); font-size: 12px; }
.section-title { font-size: 17px; font-weight: 600; margin: 28px 0 4px; }

/* ---------- Drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--bg); z-index: 41; box-shadow: -8px 0 30px rgba(0,0,0,.18); transform: translateX(100%); transition: transform .2s ease; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer__head { padding: 18px 22px 0; }
.drawer__top { display: flex; justify-content: space-between; align-items: center; color: var(--text-2); font-size: 13px; }
.drawer__title { font-size: 22px; font-weight: 600; margin: 10px 0 0; padding: 4px 6px; border: 1px solid transparent; border-radius: 4px; outline: none; }
.drawer__title:hover { border-color: var(--border); }
.drawer__title:focus { border-color: var(--primary); }
.drawer__body { flex: 1; overflow-y: auto; padding: 14px 22px 30px; }
.field-grid { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; align-items: center; }
.field-grid label { color: var(--text-2); font-size: 13px; }
.field-grid .val { min-height: 32px; display: flex; align-items: center; }
.field-grid .val .pill { height: 30px; border-radius: 4px; max-width: 220px; }
.field-grid .val input[type=text], .field-grid .val input[type=url], .field-grid .val input[type=date] { width: 100%; height: 32px; border: 1px solid transparent; border-radius: 4px; padding: 0 8px; background: none; outline: none; }
.field-grid .val input:hover { border-color: var(--border); }
.field-grid .val input:focus { border-color: var(--primary); }
.long-field { margin-top: 18px; }
.long-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.long-field textarea { width: 100%; min-height: 90px; border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; resize: vertical; background: var(--bg); line-height: 1.5; outline: none; }
.long-field textarea:focus { border-color: var(--primary); }
.linkified { font-size: 12px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.linkified a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.updates { margin-top: 10px; }
.update-composer textarea { width: 100%; min-height: 70px; border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; outline: none; resize: vertical; background: var(--bg); }
.update-composer textarea:focus { border-color: var(--primary); }
.update-composer .row { display: flex; justify-content: flex-end; margin-top: 6px; }
.update { border: 1px solid var(--border-soft); border-radius: 8px; padding: 12px 14px; margin-top: 10px; }
.update__head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.update__head .time { margin-left: auto; color: var(--text-3); font-size: 12px; }
.update__body { margin-top: 8px; white-space: pre-wrap; line-height: 1.5; }
.drawer .tabs { margin-top: 14px; }

/* ---------- Popover / menus / modal ---------- */
.popover, .menu { position: fixed; z-index: 60; background: var(--bg); border-radius: 8px; box-shadow: var(--shadow); padding: 8px; min-width: 200px; border: 1px solid var(--border-soft); }
.menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); }
.label-grid { display: grid; gap: 5px; width: 200px; }
.label-opt { height: 32px; border: 0; border-radius: 2px; color: #fff; font-size: 13px; }
.label-opt:hover { filter: brightness(.92); }
.label-opt.clear { background: var(--surface-2); color: var(--text-2); }
.pop-sep { height: 1px; background: var(--border-soft); margin: 6px 0; }
.menu-item { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0; background: none; border-radius: 4px; text-align: left; }
.menu-item:hover { background: var(--hover); }
.menu-item.danger { color: var(--danger); }
.menu-item svg { width: 16px; height: 16px; color: var(--text-2); }
.pop-input { width: 100%; height: 32px; border: 1px solid var(--border); border-radius: 4px; padding: 0 8px; outline: none; background: var(--bg); margin-bottom: 6px; }
.pop-input:focus { border-color: var(--primary); }
.people-list { max-height: 220px; overflow-y: auto; }
.color-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; }
.swatch.on { border-color: var(--text); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 70; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--bg); border-radius: 10px; width: min(520px, 100%); max-height: 90vh; overflow-y: auto; padding: 22px 24px; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.modal p { color: var(--text-2); margin: 0 0 14px; line-height: 1.5; }
.modal .field { margin-bottom: 12px; }
.modal .field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.modal .field input, .modal .field select, .modal .field textarea { width: 100%; height: 36px; border: 1px solid var(--border); border-radius: 4px; padding: 0 10px; background: var(--bg); outline: none; }
.modal .field textarea { height: 80px; padding: 8px 10px; }
.modal .field input:focus, .modal .field select:focus { border-color: var(--primary); }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.drop-zone { border: 2px dashed var(--border); border-radius: 8px; padding: 22px; text-align: center; color: var(--text-2); cursor: pointer; }
.drop-zone:hover, .drop-zone.over { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #323338; color: #fff; padding: 10px 18px; border-radius: 6px; z-index: 90; box-shadow: var(--shadow); font-size: 13px; }


/* =================================================================
   Brand Hub components (buttons, cards, forms, portal, ideas, schedule)
   ================================================================= */
.btn { height: 34px; padding: 0 14px; border-radius: 2px; border: 1px solid var(--border); background: var(--card); color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--text-3); background: var(--hover); }
.btn svg { width: 15px; height: 15px; }
.btn--primary, .btn--pill { background: var(--invert); border-color: var(--invert); color: var(--invert-text); border-radius: 100px; padding: 0 18px; }
.btn--primary:hover, .btn--pill:hover { background: var(--invert); opacity: .88; border-color: var(--invert); }
.hero .btn--pill { background: #fff; color: #000; border-color: #fff; }
.btn--ghost { border-color: transparent; background: none; color: var(--text-2); }
.btn--ghost:hover { background: var(--hover); color: var(--text); border-color: transparent; }
.btn--ghost.on { background: var(--primary-soft); color: var(--text); }
.btn--sm { height: 28px; padding: 0 12px; font-size: 12.5px; }
.btn--danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--approve { height: 46px; padding: 0 26px; border-radius: 100px; background: #00a86b; border-color: #00a86b; color: #fff; font-size: 15px; font-weight: 600; }
.btn--approve:hover { background: #00965f; border-color: #00965f; }
.btn--decline { height: 46px; padding: 0 26px; border-radius: 100px; background: none; border: 1.5px solid var(--brand-coral); color: var(--brand-coral); font-size: 15px; font-weight: 600; }
.btn--decline:hover { background: rgba(241, 88, 68, .1); border-color: var(--brand-coral); }
.tag, .stage-tag { --accent: #888; display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 100px; font-size: 11px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); white-space: nowrap; }
.status-dot { --accent: #888; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.status-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.avatar { width: 26px; height: 26px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 700; flex: none; letter-spacing: .02em; }
.empty-card, .form-card { background: var(--card); border: 1px solid var(--border); border-radius: 4px; padding: 20px 22px; margin-bottom: 16px; }
.empty-card { text-align: center; padding: 36px 22px; color: var(--text-2); }
.empty-card h3 { color: var(--text); margin: 0 0 8px; font-size: 17px; }
.empty-card .btn { margin-top: 12px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-2); }
.prose { white-space: pre-wrap; line-height: 1.6; color: var(--text); }
.note-card { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--brand-blue); border-radius: 4px; padding: 12px 16px; margin-bottom: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.note-card--ok { border-left-color: #00c875; }

/* Forms */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-2); margin-bottom: 7px; }
.field > label em { color: var(--brand-coral); font-style: normal; }
.field input:not([type=checkbox]):not([type=radio]), .field textarea, .field select, .select, .link-add input, .composer textarea, .decision textarea {
  width: 100%; min-height: 40px; border: 1px solid var(--border); border-radius: 2px; padding: 9px 12px; background: var(--bg); color: var(--text); outline: none; line-height: 1.5; }
.select { width: auto; min-height: 34px; padding: 4px 10px; }
.field textarea, .composer textarea, .decision textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .select:focus, .link-add input:focus, .composer textarea:focus, .decision textarea:focus { border-color: var(--text-2); }
.field input[readonly], .field textarea[readonly] { background: var(--surface); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip-opt span { display: inline-flex; padding: 6px 13px; border-radius: 100px; border: 1px solid var(--border); font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.chip-opt span:hover { border-color: var(--text-3); color: var(--text); }
.chip-opt input:checked + span { background: var(--invert); border-color: var(--invert); color: var(--invert-text); }
.chip-opt input:focus-visible + span { outline: 2px solid var(--primary); }
.route-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.route-opt { position: relative; }
.route-opt input { position: absolute; opacity: 0; }
.route-opt span { display: grid; gap: 4px; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 4px; cursor: pointer; height: 100%; }
.route-opt span small { color: var(--text-2); font-size: 13px; line-height: 1.45; }
.route-opt input:checked + span { border-color: var(--invert); background: var(--surface); box-shadow: inset 0 0 0 1px var(--invert); }
.route-opt input:focus-visible + span { outline: 2px solid var(--primary); }
.route-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; border: 1px dashed var(--border); border-radius: 4px; color: var(--text-2); }
.route-bar b { color: var(--text); }
.dropzone { display: flex; align-items: center; gap: 14px; padding: 20px; border: 1.5px dashed var(--border); border-radius: 4px; color: var(--text-2); cursor: pointer; }
.dropzone svg { width: 24px; height: 24px; }
.dropzone b { color: var(--text); }
.dropzone small { color: var(--text-3); }
.dropzone:hover, .dropzone.over { border-color: var(--text-2); background: var(--surface); }
.dropzone--small { padding: 12px 14px; margin-top: 10px; }
.link-add { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.link-add input { flex: 1; min-width: 180px; min-height: 34px; padding: 6px 10px; }
.res-list { display: grid; gap: 6px; margin-top: 10px; }
.res-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border-soft); border-radius: 2px; background: var(--surface); color: var(--text); text-decoration: none; min-width: 0; }
.res-item svg { width: 15px; height: 15px; color: var(--text-3); }
.res-item__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); text-decoration: none; }
a.res-item__name:hover, a.res-item:hover .res-item__name { text-decoration: underline; }
.res-item small { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.form-actions--left { justify-content: flex-start; }
.form-status { color: var(--text-2); font-size: 13px; margin: 8px 0 0; min-height: 1em; }
.form-actions .form-status { margin: 0 auto 0 0; }
.composer { display: grid; gap: 8px; margin-top: 12px; }
.composer .btn { justify-self: end; }
.update { border: 1px solid var(--border-soft); border-radius: 4px; padding: 12px 14px; margin-top: 10px; background: var(--surface); }
.update--approved { border-left: 3px solid #00c875; }
.update--declined { border-left: 3px solid var(--brand-coral); }
.update__head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.update__head .time { margin-left: auto; color: var(--text-3); font-size: 12px; }
.update__body { margin-top: 8px; white-space: pre-wrap; line-height: 1.55; word-break: break-word; }
.steps { color: var(--text-2); line-height: 1.7; padding-left: 20px; }

/* Portal overview */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.kpi-card { --accent: #888; text-align: left; display: grid; gap: 4px; padding: 16px 18px; border-radius: 4px; border: 1px solid var(--border); border-top: 3px solid var(--accent); background: var(--card); }
.kpi-card:hover, .kpi-card.on { border-color: var(--text-3); border-top-color: var(--accent); background: var(--hover); }
.kpi-card__label { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-2); }
.kpi-card__value { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-card__hint { font-size: 12.5px; color: var(--text-3); }
.req-list, .approve-list { display: grid; gap: 8px; }
.req-row, .approve-row { --accent: #888; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; gap: 16px; align-items: center; padding: 14px 18px; background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 4px; color: var(--text); text-decoration: none; text-align: left; width: 100%; }
.approve-row { grid-template-columns: auto minmax(0, 1fr) auto auto; border-left-width: 1px; }
.req-row:hover, .approve-row:hover { background: var(--hover); }
.req-row__main, .approve-row__main { display: grid; gap: 3px; min-width: 0; }
.req-row__main b, .approve-row__main b { font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.req-row__main small, .approve-row__main small { color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-row__meta, .approve-row__due { color: var(--text-2); font-size: 12.5px; white-space: nowrap; }
.req-row__meta.over { color: var(--brand-coral); font-weight: 600; }
.approve-row__thumb { width: 54px; height: 54px; border-radius: 4px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--text-3); }
.approve-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.new-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-coral); flex: none; }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 0; margin: 0 0 20px; }
.stepper li { --accent: #888; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 4px; background: var(--card); border: 1px solid var(--border); color: var(--text-3); font-size: 13px; }
.stepper .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border); font-size: 11px; flex: none; }
.stepper .dot svg { width: 12px; height: 12px; }
.stepper li.past { color: var(--text-2); }
.stepper li.past .dot { background: var(--accent); border-color: var(--accent); color: #000; }
.stepper li.now { color: var(--text); border-color: var(--accent); font-weight: 600; }
.stepper li.now .dot { border-color: var(--accent); color: var(--accent); }
.approve-card { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; padding: 18px 22px; margin-bottom: 18px; border-radius: 4px; background: var(--hero); color: #fff; }
.approve-card p { margin: 6px 0 0; opacity: .85; }
.approve-card--ok { background: color-mix(in srgb, #00c875 14%, var(--card)); color: var(--text); border: 1px solid #00c875; }
.approve-card--no { background: color-mix(in srgb, #F15844 12%, var(--card)); color: var(--text); border: 1px solid var(--brand-coral); display: block; }
.approve-card--ok svg { vertical-align: -3px; }
.proofs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.approve-card .proofs { margin: 12px 0 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.side-col { display: grid; gap: 0; }
.decision { display: grid; gap: 12px; padding: 18px; margin-bottom: 18px; border-radius: 4px; border: 1px solid var(--border); background: var(--card); }
.decision__btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.drawer .decision { margin: 0 0 16px; }

/* Media gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 14px; }
.gallery--big { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery figure { margin: 0; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.gallery img, .gallery video { width: 100%; display: block; max-height: 420px; object-fit: contain; background: #000; }
.gallery figcaption { font-size: 12px; color: var(--text-3); padding: 6px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ideas */
.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab-line { border: 0; background: none; padding: 10px 14px; color: var(--text-2); font-size: 13px; letter-spacing: .02em; position: relative; white-space: nowrap; }
.tab-line span { color: var(--text-3); margin-left: 4px; }
.tab-line:hover { color: var(--text); }
.tab-line.on { color: var(--text); font-weight: 600; }
.tab-line.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--invert); }
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.idea-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; color: var(--text); text-decoration: none; }
.idea-card:hover { border-color: var(--text-3); transform: translateY(-1px); transition: transform .15s; }
.idea-card__media { aspect-ratio: 16 / 10; background: var(--hero); display: grid; place-items: center; position: relative; overflow: hidden; }
.idea-card__media img, .idea-card__media video { width: 100%; height: 100%; object-fit: cover; }
.idea-card__ph svg { width: 34px; height: 34px; color: rgba(255, 255, 255, .7); }
.idea-card .play { position: absolute; width: 42px; height: 42px; border-radius: 50%; background: rgba(0, 0, 0, .6); display: grid; place-items: center; color: #fff; }
.idea-card .play svg { fill: #fff; stroke: none; }
.idea-card__body { padding: 14px 16px 16px; display: grid; gap: 8px; align-content: start; flex: 1; }
.idea-card__body .tag { justify-self: start; }
.idea-card__body b { font-size: 15px; }
.idea-card__body p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.idea-card__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); margin-top: 4px; }
.idea-card__meta .avatar { width: 22px; height: 22px; font-size: 9px; }
.idea-card__meta .right { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.idea-card__meta svg { width: 14px; height: 14px; }

/* Social schedule */
.sched-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.sched-week { margin-bottom: 18px; }
.sched-week.now .section-label { color: var(--text); }
.sched-week .section-label span { margin-left: auto; }
.sched-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto 120px auto; gap: 14px; align-items: center; padding: 11px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 4px; margin-bottom: 6px; }
.sched-row--await { border-left: 3px solid var(--brand-pink); }
.sched-row__date { font-size: 13px; color: var(--text-2); }
.sched-row__main { display: grid; min-width: 0; }
.sched-row__main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-row__main small { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-row__state { font-size: 12.5px; }
.sched-row__state .ok { color: #00c875; display: inline-flex; gap: 4px; align-items: center; }
.sched-row__state .ok svg { width: 14px; height: 14px; }
.sched-row__state .await { color: var(--brand-pink); font-weight: 600; }
.sched-row__state .no { color: var(--brand-coral); }
.sched-empty { padding: 4px 2px 8px; font-size: 13px; margin: 0; }
.sched-comments { position: sticky; top: 16px; max-height: calc(100vh - 40px); overflow-y: auto; }

/* Notifications panel */
.notif-panel { position: fixed; left: 254px; top: 14px; z-index: 80; width: min(380px, calc(100vw - 24px)); max-height: calc(100vh - 28px); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); }
.notif-panel__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
.notif-panel__head span { display: flex; gap: 8px; align-items: center; }
.notif-panel__list { overflow-y: auto; }
.notif { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--border-soft); background: none; text-align: left; color: var(--text-2); line-height: 1.45; font-size: 13.5px; }
.notif b { color: var(--text); }
.notif small { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; }
.notif:hover { background: var(--hover); }
.notif.unread { background: color-mix(in srgb, var(--brand-blue) 8%, transparent); }
.notif.unread::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-blue); margin-top: 9px; flex: none; }

/* Admin */
.team-list { display: grid; gap: 6px; }
.team-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 4px; background: var(--surface); }
.team-row__main { flex: 1; display: grid; min-width: 0; }
.team-row__main small { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.role-key { margin-top: 14px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.role-key p { margin: 4px 0; }

/* Board pages restyle */
.board-title { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.tab.active::after { background: var(--invert); }
.tbl th, .tbl td { background: var(--bg); border-color: var(--border-soft); }
.tbl thead th { color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; }
.tbl tbody tr:hover td { background: var(--surface); }
.group-name { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.widget { background: var(--card); border-color: var(--border); border-radius: 4px; }
.widget h4 { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-2); }
.kpi__value { font-weight: 700; }
.board-card { background: var(--card); border-color: var(--border); border-radius: 4px; }
.section-title { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-2); }
.k-col { background: var(--surface); border-radius: 4px; }
.k-card { background: var(--card); border: 1px solid var(--border); box-shadow: none; }
.drawer { background: var(--bg); border-left: 1px solid var(--border); }
.popover, .menu, .modal { background: var(--card); border-color: var(--border); }
.modal { border-radius: 6px; }
.toast { background: var(--invert); color: var(--invert-text); border-radius: 100px; font-weight: 600; }
.cal__day { background: var(--bg); }

/* Mobile */
.mobile-only { display: none; }
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sched-layout, .detail-grid { grid-template-columns: 1fr; }
  .sched-comments { position: static; max-height: none; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .app.sidebar-open .sidebar { transform: none; }
  .mobile-only { display: inline-flex; }
  .page { padding: 16px 16px 60px; }
  .hero { padding: 26px 22px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row, .route-pick { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: 1fr; }
  .req-row, .approve-row { grid-template-columns: minmax(0, 1fr) auto; }
  .req-row > :nth-child(n+4), .approve-row__due { display: none; }
  .approve-row__thumb { display: none; }
  .sched-row { grid-template-columns: minmax(0, 1fr) auto; }
  .sched-row__date, .sched-row__state { display: none; }
  .notif-panel { left: 12px; }
  .decision__btns .btn { flex: 1; }
}
@media (max-width: 1100px) { .kpi { grid-column: span 4; } .w-6, .w-4, .w-8 { grid-column: span 12; } }
@media (max-width: 820px) { .kpi { grid-column: span 6; } .board-head__actions { margin-left: 0; } .field-grid { grid-template-columns: 110px 1fr; } .search-box input { width: 100px; } }
.tag.soft { --accent: var(--text-2); }
.pill.empty { background: var(--surface-2); }
.timeline-bar.empty { background: var(--surface-2); color: var(--text-3); }
.embed { position: relative; aspect-ratio: 16 / 9; background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.file-loading { opacity: .5; }
img.file-loading { min-height: 120px; background: var(--surface-2); }

/* Admin "View as" preview banner */
.preview-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 95; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; background: var(--brand-yellow); color: #000; font-size: 13.5px; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.preview-bar b { font-weight: 700; }
.preview-bar .btn--pill { background: #000; border-color: #000; color: #fff; }
html.has-preview .app { height: calc(100vh - 44px); margin-top: 44px; }
@media (max-width: 820px) { .preview-bar { font-size: 12px; } html.has-preview .app { height: calc(100vh - 64px); margin-top: 64px; } }

/* Official Miroma Group brand marks (from the Brand Hub SharePoint) */
.brand__mono { width: 26px; height: 26px; display: block; flex: none; }
.brand__mono--light { display: none; }
:root[data-theme="light"] .brand__mono--dark { display: none; }
:root[data-theme="light"] .brand__mono--light { display: block; }
#authOverlay .auth-box__eyebrow { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-box__wordmark { height: 13px; width: auto; display: block; opacity: .55; }
.hero__logo { height: 22px; }
