:root{
  --primary:#ff7720;
  --primary-dark:#e0650f;
  --primary-soft:rgba(255,119,32,0.12);
  --navy:#0c1f3d;
  --navy-2:#132a4f;
  --navy-soft:rgba(12,31,61,0.06);
  --ink:#0c1f3d;
  --muted:#5b6b85;
  --paper:#f5f7fb;
  --white:#ffffff;
  --border:rgba(12,31,61,0.12);
  --green:#1f8a5c;
  --green-soft:rgba(31,138,92,0.1);
  --red:#d1483a;
  --red-soft:rgba(209,72,58,0.1);
  --gold:#f2b33d;
}
[hidden]{ display:none !important; }
*{ box-sizing:border-box; margin:0; padding:0; }
@media (prefers-reduced-motion: reduce){ *{ animation-duration:0.001ms !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; } }
html{ scroll-behavior:smooth; }
body{ font-family:'Poppins', 'Segoe UI', sans-serif; color:var(--ink); background:var(--paper); line-height:1.55; min-height:100vh; }
a{ color:inherit; }
button{ font-family:inherit; }
.wrap{ max-width:1000px; margin:0 auto; padding:0 28px; }
.mono{ font-family:'Poppins',sans-serif; letter-spacing:0.04em; }
.seed{ width:7px; height:9px; border-radius:50% 50% 50% 50% / 60% 60% 40% 40%; display:inline-block; flex-shrink:0; }
.seed--primary{ background:var(--primary); }
.seed--navy{ background:var(--navy); }
.seed--gold{ background:var(--gold); }

/* ---------- top nav ---------- */
.topbar{ background:var(--navy); color:#fff; position:sticky; top:0; z-index:50; }
.topbar-inner{ max-width:1100px; margin:0 auto; padding:16px 28px 0; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:700; font-size:16px; }
.brand-mark{ width:auto; height:30px; flex-shrink:0; display:block; }
.topbar .brand-seeds{ fill:#fff; }  /* black seeds vanish on the navy bar */
.topbar-actions{ display:flex; align-items:center; gap:10px; }
.brand small{ display:block; font-size:10.5px; font-weight:500; letter-spacing:0.08em; text-transform:uppercase; color:rgba(255,255,255,0.55); margin-top:1px; }
.member-badge{ font-size:11.5px; font-weight:600; letter-spacing:0.05em; text-transform:uppercase; background:rgba(255,119,32,0.18); color:#ffb27a; padding:6px 12px; border-radius:20px; border:1px solid rgba(255,119,32,0.35); }

.nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px;
  width:40px; height:36px; padding:0 9px; border-radius:10px;
  background:transparent; border:1px solid rgba(255,255,255,0.28); cursor:pointer;
}
.nav-toggle span{ display:block; height:2px; border-radius:2px; background:#fff; transition:transform .18s ease, opacity .18s ease; }
.nav-open .nav-toggle span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2){ opacity:0; }
.nav-open .nav-toggle span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* Wrapping, never a hidden horizontal scroll: every tab stays reachable at any width. */
.tabs{ display:flex; flex-wrap:wrap; gap:0 4px; margin-top:14px; padding-bottom:0; }
.tab-btn{
  background:transparent; border:none; color:rgba(255,255,255,0.62); cursor:pointer; padding:24px 12px 14px;  /* one baseline for every tab, labeled group or not */
  font-size:13.5px; font-weight:600; border-bottom:3px solid transparent; white-space:nowrap; display:flex; flex-direction:column; gap:2px; align-items:flex-start;
  text-decoration:none;
  transition:color .15s ease, border-color .15s ease;
}
.tab-btn .tab-time{ font-size:10.5px; font-weight:500; color:rgba(255,255,255,0.4); letter-spacing:0.03em; }
.tab-btn:hover{ color:#fff; }
.tab-btn.active{ color:#fff; border-bottom-color:var(--primary); }
.tab-btn.active .tab-time{ color:#ffb27a; }
.tab-group{ display:flex; position:relative; flex-shrink:0; }
.tab-group--labeled{ margin-left:10px; padding-left:8px; border-left:1px solid rgba(255,255,255,0.14); }
.tab-group-label{
  position:absolute; top:7px; left:20px; pointer-events:none;
  font-size:9.5px; font-weight:700; letter-spacing:0.1em; text-transform:uppercase; color:rgba(255,255,255,0.42);
}

main{ padding-bottom:60px; }
.view{ display:none; animation:fadeIn .25s ease; }
.view.active{ display:block; }
@keyframes fadeIn{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:translateY(0); } }

/* ---------- hero (welcome) ---------- */
.hero{ background:linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color:#fff; padding:40px 0 34px; }
.eyebrow{ font-size:11.5px; font-weight:700; letter-spacing:0.1em; text-transform:uppercase; color:var(--primary); display:flex; align-items:center; gap:8px; margin-bottom:14px; }
.eyebrow .seed{ background:var(--primary); }
.hero h1{ font-size:clamp(28px,4.2vw,42px); font-weight:800; letter-spacing:-0.02em; margin-bottom:12px; line-height:1.12; color:#fff; }
.hero h1 span{ color:var(--primary); }
.hero p,
.hero .hero-body{ font-size:15.5px; color:rgba(255,255,255,0.72); max-width:620px; }
.hero .hero-body p{ margin-bottom:8px; }
.hero .hero-body p:last-child{ margin-bottom:0; }

section.block{ padding:44px 0; border-bottom:1px solid var(--border); }
section.block:last-of-type{ border-bottom:none; }
.h2{ font-size:24px; font-weight:700; letter-spacing:-0.01em; margin-bottom:6px; color:var(--navy); }
.h2-sub{ font-size:14px; color:var(--muted); margin-bottom:26px; max-width:620px; }
.kicker{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--primary); margin-bottom:8px; display:block; }

.mission-callout{ background:var(--navy-soft); border-left:3px solid var(--primary); border-radius:0 12px 12px 0; padding:16px 20px; margin-bottom:28px; max-width:700px; }
.mission-callout > span{ font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--primary); display:block; margin-bottom:6px; }
.mission-callout p{ font-weight:500; font-size:15px; line-height:1.5; color:var(--navy); }

.rhythm-grid{ display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:26px; }
.card{ background:var(--white); border:1px solid var(--border); border-radius:16px; padding:22px 22px 20px; }
.rhythm-card-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.rhythm-card-head h3{ font-size:16.5px; font-weight:700; color:var(--navy); }
.rhythm-steps{ list-style:none; counter-reset:step; display:flex; flex-direction:column; gap:12px; }
.rhythm-steps li{ display:flex; gap:12px; font-size:13.5px; line-height:1.5; }
.rhythm-steps li::before{ counter-increment:step; content:counter(step); flex-shrink:0; width:20px; height:20px; border-radius:50%; background:var(--primary-soft); color:var(--primary-dark); font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center; margin-top:1px; }

.kpi-row{ display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 14px; }
.kpi-pill{ font-size:13px; font-weight:500; padding:7px 14px; border-radius:16px; background:var(--white); border:1px solid var(--border); }
.legend-row{ display:flex; gap:10px; flex-wrap:wrap; }
.legend-chip{ font-size:12px; font-weight:600; padding:5px 12px; border-radius:14px; }
.legend-chip.green{ background:var(--green-soft); color:var(--green); }
.legend-chip.yellow{ background:rgba(242,179,61,0.2); color:#8a6415; }
.legend-chip.red{ background:var(--red-soft); color:var(--red); }

.week-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.week-card{ background:var(--white); border:1px solid var(--border); border-radius:14px; padding:16px 15px; }
.week-card h4{ font-size:11px; text-transform:uppercase; letter-spacing:0.05em; color:var(--primary-dark); margin-bottom:10px; font-weight:700; }
.week-card ul{ list-style:none; display:flex; flex-direction:column; gap:6px; font-size:12.5px; }
.week-card ul li{ padding-left:12px; position:relative; }
.week-card ul li::before{ content:'—'; position:absolute; left:0; color:var(--muted); }

.pill-label{ font-size:11.5px; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); font-weight:600; display:block; margin-bottom:8px; }

/* welcome communication flow (one card per district) */
.flow-grid{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.flow-card{ display:flex; flex-direction:column; }
.flow-title{ font-size:18px; font-weight:800; letter-spacing:-0.01em; color:var(--navy); margin-bottom:2px; }
.flow-sub{ font-size:13px; color:var(--muted); margin-bottom:18px; }
.flow-steps{ list-style:none; position:relative; padding-left:48px; display:flex; flex-direction:column; gap:14px; margin-bottom:18px; }
.flow-steps::before{ content:''; position:absolute; left:17px; top:18px; bottom:18px; width:2px; background:var(--border); }
.flow-step{ position:relative; }
.flow-num{ position:absolute; left:-48px; top:0; width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:15px; color:#fff; box-shadow:0 4px 10px rgba(12,31,61,0.15); }
.flow-num--green{ background:var(--green); }
.flow-num--blue{ background:#2f6fd6; }
.flow-body{ background:var(--paper); border:1px solid var(--border); border-radius:12px; padding:14px 16px; }
.flow-body h4{ font-size:15px; font-weight:700; color:var(--navy); margin-bottom:2px; }
.flow-role{ font-size:12.5px; color:var(--muted); margin-bottom:8px; }
.flow-body ul{ list-style:none; display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--ink); margin-bottom:10px; }
.flow-body ul li{ padding-left:12px; position:relative; }
.flow-body ul li::before{ content:'•'; position:absolute; left:0; color:var(--muted); }
.flow-tag{ display:inline-block; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; padding:4px 10px; border-radius:10px; }
.flow-tag--green{ background:var(--green-soft); color:var(--green); }
.flow-tag--blue{ background:rgba(47,111,214,0.12); color:#2f6fd6; }
.flow-gate{ margin:-4px 0; }
.flow-gate span{ display:inline-block; font-size:12px; font-style:italic; font-weight:600; color:#8a6415; background:rgba(242,179,61,0.14); border:1px solid var(--gold); border-radius:10px; padding:5px 12px; }
.flow-note{ margin-top:auto; background:var(--navy); color:#e8eef8; border-radius:12px; padding:14px 18px; font-size:13px; line-height:1.5; }
.flow-note strong{ color:#fff; }
html[data-theme='dark'] .flow-note{ background:var(--navy-2); }
html[data-theme='dark'] .flow-body{ background:rgba(255,255,255,0.04); }
html[data-theme='dark'] .flow-tag--blue{ color:#8fb4f0; }
@media (max-width:900px){ .flow-grid{ grid-template-columns:1fr; } }

/* welcome nav-cards to other tabs */
.nav-card-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:16px; margin-top:8px; }
.nav-card{ background:var(--white); border:1px solid var(--border); border-radius:16px; padding:20px; cursor:pointer; text-align:left; display:flex; flex-direction:column; gap:8px; text-decoration:none; transition:transform .12s ease, box-shadow .12s ease; }
.nav-card:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(12,31,61,0.1); border-color:var(--primary); }
.nav-card-top{ display:flex; align-items:center; justify-content:space-between; }
.nav-card-title{ font-size:16px; font-weight:700; color:var(--navy); }
.nav-card-time{ font-size:11px; font-weight:600; color:var(--primary-dark); background:var(--primary-soft); padding:4px 10px; border-radius:12px; flex-shrink:0; }
.nav-card-desc{ font-size:13px; color:var(--muted); line-height:1.5; }
@media (max-width:700px){ .nav-card-grid{ grid-template-columns:1fr; } .rhythm-grid{ grid-template-columns:1fr; } .week-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:480px){ .week-grid{ grid-template-columns:1fr; } }

/* ---------- yes/no ---------- */
.yesno-grid{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.yesno-card{ border-radius:16px; padding:24px 22px; }
.yesno-card--yes{ background:var(--green-soft); border:1.5px solid rgba(31,138,92,0.22); }
.yesno-card--no{ background:var(--red-soft); border:1.5px solid rgba(209,72,58,0.22); }
.yesno-title{ font-size:18px; font-weight:700; margin-bottom:16px; }
.yesno-card--yes .yesno-title{ color:var(--green); }
.yesno-card--no .yesno-title{ color:var(--red); }
.yesno-list{ list-style:none; display:flex; flex-direction:column; gap:11px; }
.yesno-list li{ display:flex; align-items:flex-start; gap:10px; font-size:14px; }
.yesno-list li .seed{ margin-top:6px; }
@media (max-width:700px){ .yesno-grid{ grid-template-columns:1fr; } }

.list{ list-style:none; display:flex; flex-direction:column; gap:14px; }
.list li{ display:flex; gap:14px; align-items:flex-start; font-size:14.5px; background:var(--white); border:1px solid var(--border); border-radius:12px; padding:14px 18px; }
.list li .seed{ margin-top:6px; }
.list strong{ font-weight:700; color:var(--navy); }

.sandra{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.sandra-col h3{ font-size:13.5px; text-transform:uppercase; letter-spacing:0.06em; margin-bottom:14px; font-weight:700; }
.sandra-col--do h3{ color:var(--green); }
.sandra-col--dont h3{ color:var(--red); }
.sandra-col ul{ list-style:none; display:flex; flex-direction:column; gap:10px; }
.sandra-col li{ font-size:14px; display:flex; gap:9px; align-items:flex-start; }
.sandra-col li .seed{ margin-top:6px; }
@media (max-width:700px){ .sandra{ grid-template-columns:1fr; } }

/* ---------- self training sub-nav ---------- */
.subnav{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:30px; }
.subnav-btn{ font-size:13px; font-weight:600; padding:9px 16px; border-radius:20px; border:1.5px solid var(--border); background:var(--white); cursor:pointer; color:var(--muted); }
.subnav-btn.active{ background:var(--navy); color:#fff; border-color:var(--navy); }
a.subnav-btn{ text-decoration:none; display:inline-flex; align-items:center; }
.subnav-btn--add{ border-style:dashed; color:var(--primary-dark); background:var(--primary-soft); }
.subnav-btn--add:hover{ border-color:var(--primary); }
.subnav-add{ display:inline-flex; gap:6px; align-items:center; flex-wrap:wrap; }
.subnav-add .input{ width:220px; padding:8px 12px; font-size:13px; }
.subnav-add .btn{ padding:8px 14px; font-size:13px; }
.blk-admin-row{ display:flex; justify-content:flex-end; gap:8px; margin-bottom:10px; }
.blk-admin-row .btn{ padding:7px 14px; font-size:12.5px; }
.hs-subnav{ margin-bottom:18px; }
.subview{ display:none; }
.subview.active{ display:block; }

.link-card{ background:var(--white); border:1px solid var(--border); border-radius:16px; padding:22px; display:flex; align-items:center; gap:16px; margin-bottom:14px; text-decoration:none; transition:box-shadow .12s ease, border-color .12s ease; }
.link-card:hover{ box-shadow:0 10px 24px rgba(12,31,61,0.08); border-color:var(--primary); }
.link-card-icon{ width:44px; height:44px; border-radius:12px; background:var(--primary-soft); color:var(--primary-dark); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.link-card-main{ flex:1; }
.link-card-title{ font-size:15px; font-weight:700; color:var(--navy); margin-bottom:3px; }
.link-card-desc{ font-size:13px; color:var(--muted); }
.link-card-arrow{ color:var(--muted); flex-shrink:0; }

.embed-frame{ position:relative; width:100%; padding-top:60%; border-radius:16px; overflow:hidden; border:1px solid var(--border); background:var(--white); box-shadow:0 6px 18px rgba(12,31,61,0.06); margin-bottom:12px; }
.embed-frame iframe{ position:absolute; inset:0; width:100%; height:100%; border:none; }
.embed-fallback{ display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--primary-dark); text-decoration:none; }
.embed-fallback:hover{ text-decoration:underline; }

/* ---------- forms (shared) ---------- */
.panel-form{ background:var(--white); border:1px solid var(--border); border-radius:16px; padding:22px; margin-bottom:22px; }
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px; }
.field label{ font-size:11.5px; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); font-weight:600; display:block; margin-bottom:6px; }
.field{ margin-bottom:0; }
.input, .select, .textarea{ width:100%; font-family:'Poppins',sans-serif; font-size:14px; padding:10px 12px; border-radius:8px; border:1.5px solid var(--border); background:var(--paper); color:var(--ink); outline:none; }
.textarea{ min-height:70px; resize:vertical; }
.input:focus, .select:focus, .textarea:focus{ border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
.form-error{ font-size:12.5px; color:var(--red); font-weight:600; min-height:16px; margin-bottom:8px; }
.btn{ display:inline-flex; align-items:center; gap:8px; font-size:14px; font-weight:600; padding:11px 22px; border-radius:24px; border:none; cursor:pointer; background:var(--primary); color:#fff; transition:transform .12s ease, background .15s ease; }
.btn:hover{ transform:translateY(-1px); background:var(--primary-dark); }
.btn:disabled{ opacity:.5; cursor:not-allowed; transform:none; }
.btn-ghost{ background:transparent; color:var(--muted); border:1.5px solid var(--border); }
.btn-ghost:hover{ background:var(--navy-soft); transform:none; color:var(--navy); }

.filter-row{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:22px; }
.filter-pill{ font-size:13px; font-weight:600; padding:8px 16px; border-radius:20px; border:1.5px solid var(--border); background:var(--white); cursor:pointer; color:var(--muted); }
.filter-pill.active{ background:var(--navy); color:#fff; border-color:var(--navy); }

.week-label{ font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); margin:22px 0 12px; }
.week-label:first-child{ margin-top:0; }
.entries{ display:flex; flex-direction:column; gap:12px; }
.lesson-card{ background:var(--white); border:1px solid var(--border); border-radius:12px; padding:16px 18px; border-left:3px solid var(--gold); }
.lesson-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; flex-wrap:wrap; }
.lesson-area{ font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(--primary-dark); }
.lesson-meta{ font-size:11.5px; color:var(--muted); }
.lesson-text{ font-size:14.5px; color:#26364f; }
.empty-panel{ text-align:center; padding:40px 10px; color:var(--muted); font-size:14px; background:var(--white); border:1px dashed var(--border); border-radius:14px; }
.empty-panel strong{ display:block; font-size:16px; color:var(--navy); margin-bottom:4px; }

.leaderboard{ background:var(--navy); color:#fff; border-radius:16px; padding:22px; margin-bottom:24px; }
.leaderboard-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; flex-wrap:wrap; gap:10px; }
.leaderboard-title{ font-size:16px; font-weight:700; display:flex; align-items:center; gap:8px; }
.lb-toggle{ display:flex; gap:6px; }
.lb-toggle button{ font-size:11.5px; font-weight:600; padding:6px 13px; border-radius:14px; border:1px solid rgba(255,255,255,0.28); background:transparent; color:rgba(255,255,255,0.8); cursor:pointer; }
.lb-toggle button.active{ background:var(--primary); color:#fff; border-color:var(--primary); }
.lb-row{ display:flex; align-items:center; gap:12px; padding:9px 0; border-top:1px solid rgba(255,255,255,0.1); }
.lb-row:first-child{ border-top:none; }
.lb-rank{ width:24px; height:24px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11.5px; font-weight:700; background:rgba(255,255,255,0.12); flex-shrink:0; }
.lb-rank.gold{ background:var(--gold); color:var(--navy); }
.lb-rank.silver{ background:#cdd6d3; color:var(--navy); }
.lb-rank.bronze{ background:#d99a6c; color:var(--navy); }
.lb-name{ flex:1; font-size:14px; font-weight:500; }
.lb-count{ font-size:13px; color:var(--primary); display:flex; align-items:center; gap:5px; font-weight:600; }
.lb-empty{ font-size:13.5px; color:rgba(255,255,255,0.65); padding:6px 0; }

/* ---------- meeting log ---------- */
.meeting-list{ display:flex; flex-direction:column; gap:10px; }
.meeting-card{ background:var(--white); border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.meeting-card summary{ list-style:none; cursor:pointer; padding:15px 18px; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.meeting-card summary::-webkit-details-marker{ display:none; }
.meeting-summary-left{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.meeting-title{ font-weight:700; font-size:14.5px; color:var(--navy); }
.meeting-date{ font-size:11.5px; color:var(--muted); }
.meeting-summary-right{ display:flex; align-items:center; gap:10px; }
.meeting-count{ font-size:11.5px; color:var(--muted); }
.meeting-caret{ color:var(--muted); font-size:12px; transition:transform .15s ease; }
.meeting-card[open] .meeting-caret{ transform:rotate(180deg); }
.meeting-body{ padding:0 18px 18px; }
.meeting-attendees{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.meeting-chip{ font-size:12px; padding:4px 10px; border-radius:12px; background:var(--primary-soft); color:var(--primary-dark); font-weight:600; }
.meeting-link{ display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--primary-dark); background:var(--primary-soft); padding:7px 13px; border-radius:14px; text-decoration:none; margin-bottom:12px; }
.meeting-link:hover{ background:var(--primary); color:#fff; }
.meeting-notes{ font-size:14px; white-space:pre-wrap; color:#26364f; line-height:1.6; }

/* ---------- doc index ---------- */
.doc-toolbar{ display:flex; gap:12px; margin-bottom:20px; flex-wrap:wrap; }
.doc-search{ flex:1; position:relative; display:flex; align-items:center; min-width:220px; }
.doc-search svg{ position:absolute; left:14px; color:var(--muted); }
.doc-search input{ width:100%; height:46px; font-family:'Poppins',sans-serif; font-size:14px; padding:0 14px 0 40px; border-radius:12px; border:1.5px solid var(--border); background:var(--white); color:var(--ink); }
.doc-search input:focus{ outline:none; border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
.results-count{ font-size:11.5px; font-weight:700; letter-spacing:0.05em; text-transform:uppercase; color:var(--muted); margin-bottom:14px; }
.doc-list{ display:flex; flex-direction:column; gap:12px; }
.doc-row{ background:var(--white); border:1px solid var(--border); border-radius:14px; padding:16px 18px; cursor:pointer; display:flex; align-items:flex-start; gap:14px; transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.doc-row:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(12,31,61,0.08); border-color:var(--primary); }
.doc-row-icon{ width:38px; height:38px; border-radius:10px; background:var(--primary-soft); color:var(--primary-dark); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.doc-row-main{ flex:1; min-width:0; }
.doc-title{ margin:0 0 8px; font-size:15.5px; font-weight:600; line-height:1.35; color:var(--navy); }
.doc-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:7px; font-size:12.5px; color:var(--muted); }
.doc-meta-sep{ color:var(--border); }
.doc-pill{ padding:3px 10px; border-radius:999px; font-weight:600; font-size:11.5px; color:#fff; line-height:1.5; }
.doc-row-link{ color:var(--muted); flex-shrink:0; margin-top:2px; }
.doc-empty{ text-align:center; padding:60px 20px; color:var(--muted); }
.doc-empty svg{ margin-bottom:14px; color:var(--primary-soft); }
.doc-empty h3{ margin:0 0 6px; color:var(--navy); font-size:17px; font-weight:700; }
.doc-empty p{ margin:0 0 18px; font-size:14px; }

/* ---------- doc category folders ---------- */
.cat-filter{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:24px; }
.cat-pill{ font-size:13px; font-weight:600; padding:9px 16px; border-radius:20px; border:1.5px solid var(--border); background:var(--white); cursor:pointer; color:var(--muted); display:flex; align-items:center; gap:8px; transition:all .12s ease; }
.cat-pill .count{ font-size:10.5px; font-weight:700; background:var(--navy-soft); color:var(--navy); padding:2px 7px; border-radius:10px; }
.cat-pill.active{ background:var(--navy); color:#fff; border-color:var(--navy); }
.cat-pill.active .count{ background:rgba(255,255,255,0.18); color:#fff; }
.cat-pill:hover:not(.active){ border-color:var(--primary); color:var(--navy); }
.cat-section{ margin-bottom:40px; }
.cat-section:last-child{ margin-bottom:0; }
.cat-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:4px; flex-wrap:wrap; }
.cat-title{ font-size:21px; font-weight:700; color:var(--navy); display:flex; align-items:center; gap:10px; }
.cat-folder{ width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; color:#fff; font-size:15px; }
.cat-count-label{ font-size:12px; font-weight:600; color:var(--muted); }
.cat-desc{ font-size:13.5px; color:var(--muted); margin:6px 0 18px; max-width:680px; }
.doc-sub-tag{ padding:3px 10px; border-radius:999px; font-weight:600; font-size:11px; background:var(--navy-soft); color:var(--navy); }
.empty-note{ text-align:center; padding:30px 10px; color:var(--muted); font-size:13.5px; background:var(--white); border:1px dashed var(--border); border-radius:14px; }
a.doc-row{ text-decoration:none; }

.modal-backdrop{ position:fixed; inset:0; background:rgba(12,31,61,0.55); backdrop-filter:blur(2px); display:flex; align-items:center; justify-content:center; padding:20px; z-index:80; }
.modal{ background:#fff; border-radius:16px; width:100%; max-width:460px; max-height:90vh; overflow-y:auto; padding:24px 26px 26px; box-shadow:0 24px 60px rgba(12,31,61,0.3); }
.modal-header{ display:flex; align-items:center; justify-content:space-between; }
.modal-header h2,
.modal-header h3{ margin:0; font-size:19px; font-weight:700; color:var(--navy); }
.modal-subtitle{ margin:6px 0 18px; font-size:13px; color:var(--muted); }
.icon-btn{ background:none; border:none; font-size:15px; color:var(--muted); cursor:pointer; padding:4px 8px; border-radius:6px; }
.icon-btn:hover{ background:var(--navy-soft); }
.form{ display:flex; flex-direction:column; gap:14px; }
.dup-warning{ background:rgba(255,119,32,0.1); border:1px solid rgba(255,119,32,0.35); border-radius:10px; padding:12px 14px; font-size:13px; }
.dup-warning-head{ display:flex; align-items:center; gap:8px; font-weight:700; color:var(--primary-dark); margin-bottom:8px; }
.dup-dot{ width:8px; height:8px; border-radius:50%; background:var(--primary); box-shadow:0 0 0 3px rgba(255,119,32,0.22); flex-shrink:0; }
.dup-warning ul{ margin:0; padding-left:18px; display:flex; flex-direction:column; gap:4px; }
.dup-warning a{ font-weight:700; color:var(--primary-dark); text-decoration:underline; }
.dup-reason{ color:var(--muted); }
.dup-hint{ margin-top:8px; color:var(--muted); font-size:12px; }
.modal-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:4px; }

/* ---------- toast ---------- */
.toast{ position:fixed; bottom:22px; right:22px; background:var(--navy); color:#fff; padding:12px 18px; border-radius:10px; font-size:13px; font-weight:600; box-shadow:0 10px 24px rgba(0,0,0,0.25); transform:translateY(16px); opacity:0; transition:all .2s ease; z-index:90; border-left:4px solid var(--primary); }
.toast.show{ transform:translateY(0); opacity:1; }

.footer{ padding:36px 0 60px; text-align:center; }
.footer p{ font-size:12.5px; color:var(--muted); }

a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible{ outline:2.5px solid var(--primary); outline-offset:2px; }

@media (max-width:640px){ .form-row{ grid-template-columns:1fr; } section.block{ padding:34px 0; } .doc-toolbar{ flex-direction:column; } }

.member-badge--user{ display:inline-flex; align-items:center; gap:9px; text-transform:none; letter-spacing:0; padding:5px 14px 5px 6px; }
.badge-avatar{ width:26px; height:26px; border-radius:50%; display:block; flex-shrink:0; }
.badge-info{ display:flex; flex-direction:column; line-height:1.3; text-align:left; }
.badge-name{ font-size:12px; font-weight:600; color:#fff; }
.badge-position{ font-size:10px; font-weight:500; color:rgba(255,255,255,0.6); }

.btn-logout{ font-size:11.5px; font-weight:600; letter-spacing:0.05em; text-transform:uppercase; background:transparent; color:rgba(255,255,255,0.7); padding:6px 12px; border-radius:20px; border:1px solid rgba(255,255,255,0.28); cursor:pointer; transition:color .15s ease, border-color .15s ease; }
.btn-logout:hover{ color:#fff; border-color:rgba(255,255,255,0.6); }

/* ---------- markdown slots ---------- */
.rhythm-md ol{ list-style:none; counter-reset:step; display:flex; flex-direction:column; gap:12px; }
.rhythm-md ol li{ display:flex; gap:12px; font-size:13.5px; line-height:1.5; }
.rhythm-md ol li::before{ counter-increment:step; content:counter(step); flex-shrink:0; width:20px; height:20px; border-radius:50%; background:var(--primary-soft); color:var(--primary-dark); font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center; margin-top:1px; }
.rhythm-md li > *{ display:inline; }
.kpi-md ul{ list-style:none; display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 14px; }
.kpi-md ul li{ font-size:13px; font-weight:500; padding:7px 14px; border-radius:16px; background:var(--white); border:1px solid var(--border); }
.md-list ul{ list-style:none; display:flex; flex-direction:column; gap:14px; }
.md-list ul li{ display:flex; gap:14px; align-items:flex-start; font-size:14.5px; background:var(--white); border:1px solid var(--border); border-radius:12px; padding:14px 18px; }
.md-list ul li::before{ content:''; width:7px; height:9px; border-radius:50% 50% 50% 50% / 60% 60% 40% 40%; background:var(--gold); flex-shrink:0; margin-top:6px; }
.md-list strong{ font-weight:700; color:var(--navy); }
.md-seeds ul{ list-style:none; display:flex; flex-direction:column; gap:11px; }
.md-seeds ul li{ display:flex; align-items:flex-start; gap:10px; font-size:14px; }
.md-seeds ul li::before{ content:''; width:7px; height:9px; border-radius:50% 50% 50% 50% / 60% 60% 40% 40%; flex-shrink:0; margin-top:6px; background:var(--navy); }
.md-seeds--red ul li::before{ background:var(--primary); }

/* ---------- login ---------- */
.login-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; background:linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); padding:20px; }
.login-card{ background:var(--white); border-radius:20px; padding:36px 32px; width:100%; max-width:400px; box-shadow:0 24px 60px rgba(0,0,0,0.3); }
.login-card h1{ font-size:22px; font-weight:800; color:var(--navy); margin-bottom:4px; }
.login-card .login-sub{ font-size:13.5px; color:var(--muted); margin-bottom:22px; }
.btn-google{ width:100%; justify-content:center; background:var(--navy); margin-bottom:14px; }
.btn-google:hover{ background:var(--navy-2); }
.login-divider{ display:flex; align-items:center; gap:10px; color:var(--muted); font-size:12px; margin:16px 0; }
.login-divider::before, .login-divider::after{ content:''; flex:1; height:1px; background:var(--border); }
.login-form .field{ margin-bottom:12px; }
.login-form .btn{ width:100%; justify-content:center; }
.login-links{ display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-top:12px; }
.link-btn{ background:none; border:none; padding:0; font:inherit; font-size:13px; font-weight:600; color:var(--primary-dark); cursor:pointer; }
.link-btn:hover{ text-decoration:underline; }
.form-note{ margin-top:10px; font-size:13px; color:var(--green); min-height:1em; }

/* ---------- admin ---------- */
.admin-grid{ display:flex; flex-direction:column; gap:12px; }
.admin-actions{ display:flex; gap:8px; margin-top:12px; justify-content:flex-end; flex-wrap:wrap; }
.btn-danger{ color:var(--red); border-color:var(--red); }
.btn-danger:hover{ background:var(--red-soft); color:var(--red); }

/* --- people: one compact row each, expanding to a settings panel --- */
.pl-list{ background:var(--white); border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.pl-item{ border-bottom:1px solid var(--border); }
.pl-item:last-child{ border-bottom:none; }
.pl-row{
  width:100%; display:flex; align-items:center; gap:13px; padding:13px 16px;
  background:transparent; border:none; cursor:pointer; text-align:left; font-family:'Poppins',sans-serif;
}
.pl-row:hover{ background:var(--navy-soft); }
.pl-item--open > .pl-row{ background:var(--navy-soft); }
.pl-av{
  border-radius:50%; flex-shrink:0; object-fit:cover;
  background:var(--primary-soft); color:var(--primary-dark);
  font-weight:700; font-size:15px; display:flex; align-items:center; justify-content:center;
}
.pl-id{ display:flex; flex-direction:column; min-width:0; flex:1; }
.pl-name{ font-weight:600; font-size:14px; color:var(--navy); display:flex; align-items:center; gap:7px; }
.pl-mail{ font-size:11.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.person-you{
  font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em;
  background:var(--primary-soft); color:var(--primary-dark); padding:2px 7px; border-radius:999px;
}
.pl-role{
  font-size:12px; font-weight:600; padding:5px 12px; border-radius:999px; white-space:nowrap;
  background:var(--navy-soft); color:var(--navy); flex-shrink:0;
}
.pl-role--empty{ color:var(--muted); font-style:italic; background:transparent; border:1.5px dashed var(--border); }
.pl-admin{
  font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; white-space:nowrap;
  padding:4px 9px; border-radius:999px; background:var(--primary-soft); color:var(--primary-dark); flex-shrink:0;
}
.pl-admin--member{ background:transparent; color:var(--muted); border:1px solid var(--border); }
.pl-caret{ color:var(--muted); font-size:12px; flex-shrink:0; transition:transform .15s ease; }
.pl-item--open .pl-caret{ transform:rotate(180deg); }
.pl-panel{ padding:4px 16px 16px; background:var(--paper); border-top:1px solid var(--border); }
.pl-roles{ margin-bottom:0; gap:6px; }
.pl-roles .filter-pill{ font-size:12px; padding:6px 13px; }
.filter-pill--clear{ color:var(--red); border-style:dashed; }
.pl-note{ font-size:11.5px; color:var(--muted); margin-top:8px; font-style:italic; }

.role-toggle{ display:inline-flex; background:var(--white); border:1.5px solid var(--border); border-radius:999px; padding:3px; }
.role-pill{
  font-family:'Poppins',sans-serif; font-size:12px; font-weight:600; text-transform:lowercase;
  padding:5px 16px; border-radius:999px; border:none; background:transparent; color:var(--muted); cursor:pointer;
}
.role-pill.active{ background:var(--navy); color:#fff; }
.role-pill.active[data-set-role='admin']{ background:var(--primary); }
.role-toggle--locked{ opacity:.7; }
.role-toggle--locked .role-pill{ cursor:not-allowed; }

/* --- resources: a plain list, edited in a modal --- */
.rl{ background:var(--white); border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.rl-row{ display:flex; align-items:center; gap:12px; padding:13px 16px; border-bottom:1px solid var(--border); }
.rl-row:last-child{ border-bottom:none; }
.rl-row:hover{ background:var(--navy-soft); }
.rl-kind{
  font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em;
  padding:4px 8px; border-radius:6px; background:var(--navy-soft); color:var(--navy);
  flex-shrink:0; width:54px; text-align:center;
}
.rl-kind--slides{ background:rgba(255,119,32,0.16); color:var(--primary-dark); }
.rl-kind--pdf{ background:rgba(209,72,58,0.12); color:var(--red); }
.rl-kind--form{ background:rgba(31,138,92,0.14); color:var(--green); }
.rl-kind--video{ background:rgba(90,80,200,0.14); color:#5a50c8; }
.rl-kind--image{ background:rgba(242,179,61,0.24); color:#8a6415; }
.rl-main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.rl-title{ font-weight:600; font-size:13.5px; color:var(--navy); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rl-meta{ font-size:11px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rl-acts{ display:flex; gap:2px; flex-shrink:0; align-items:center; }
.rl-acts .icon-btn{ text-decoration:none; line-height:1; }
.icon-btn:hover{ background:var(--navy-soft); color:var(--navy); }
.icon-btn--danger:hover{ background:var(--red-soft); color:var(--red); }
.icon-btn--armed{ background:var(--red); color:#fff; }
.icon-btn--armed:hover{ background:var(--red); color:#fff; }

/* ---------- language switch ---------- */
.lang-switch{ display:inline-flex; gap:4px; border:1px solid rgba(255,255,255,0.28); border-radius:20px; padding:3px; }
.lang-btn{ font-size:14px; line-height:1; padding:4px 9px; border:none; border-radius:16px; background:transparent; cursor:pointer; opacity:.55; transition:opacity .12s ease, background .12s ease; }
.lang-btn:hover{ opacity:1; }
.lang-btn.active{ background:rgba(255,255,255,0.16); opacity:1; }
.login-card .lang-switch{ border-color:var(--border); }
.login-card .lang-btn.active{ background:var(--navy-soft); }


/* count bubble inside a filter pill (meetings tag filters) */
.filter-pill .count{
  font-size:10.5px; font-weight:700; background:var(--navy-soft);
  border-radius:10px; padding:2px 7px; margin-left:7px;
}
.filter-pill.active .count{ background:rgba(255,255,255,0.18); }

/* ---------- inline block editing (admins) ---------- */
/* The Edit button sits on its own row under the block, so it never covers content. */
.editable-block{ display:flex; flex-direction:column; }
.editable-block > [data-block-id]{ min-width:0; }
.blk-edit{
  align-self:flex-end; margin-top:8px;
  display:inline-flex; align-items:center; height:26px; padding:0 11px; border-radius:13px;
  border:1.5px solid var(--border); background:var(--white); color:var(--navy);
  font-family:'Poppins',sans-serif; font-size:11.5px; font-weight:700; line-height:1; cursor:pointer;
  box-shadow:0 4px 12px rgba(12,31,61,0.12);
  transition:color .12s ease, border-color .12s ease, background .12s ease;
}
.blk-edit:hover{ color:var(--primary); border-color:var(--primary); background:var(--primary-soft); }
.editable-block--editing .blk-edit{ display:none; }
.editable-block--saving{ opacity:.6; pointer-events:none; }

.rt-editing{
  outline:2px solid var(--primary); outline-offset:6px; border-radius:8px;
  background:var(--primary-soft); padding:4px; min-height:40px;
}
.rt-editing:focus{ outline-color:var(--primary); }

.rt-toolbar{
  display:flex; flex-wrap:wrap; align-items:center; gap:4px;
  background:var(--white); border:1px solid var(--border); border-radius:12px;
  padding:7px 9px; margin-bottom:12px;
  box-shadow:0 8px 22px rgba(12,31,61,0.12);
  position:sticky; top:8px; z-index:20;
}
.rt-btn{
  min-width:28px; height:28px; padding:0 7px; border-radius:7px;
  border:1px solid transparent; background:transparent; color:var(--ink);
  font-size:13px; font-weight:600; line-height:1; cursor:pointer;
}
.rt-btn:hover{ background:var(--navy-soft); border-color:var(--border); }
.rt-btn--bold{ font-weight:800; }
.rt-btn--italic{ font-style:italic; }
.rt-sep{ width:1px; align-self:stretch; background:var(--border); margin:0 4px; }
.rt-link{ display:inline-flex; gap:4px; align-items:center; }
.rt-link-input{
  width:150px; font-family:'Poppins',sans-serif; font-size:12.5px; padding:5px 9px;
  border-radius:7px; border:1.5px solid var(--border); background:var(--paper); color:var(--ink); outline:none;
}
.rt-link-input:focus{ border-color:var(--primary); }
.rt-link-input--bad{ border-color:var(--red); }
.rt-actions{ display:inline-flex; gap:8px; margin-left:auto; }
.rt-action-btn{ padding:7px 16px; font-size:13px; border-radius:18px; }

/* rich content produced by the editor */
[data-block-format='html'] h1,
[data-block-format='html'] h2,
[data-block-format='html'] h3{ font-size:16px; font-weight:700; color:var(--navy); margin:10px 0 6px; }
[data-block-format='html'] p{ margin-bottom:8px; line-height:1.55; }
[data-block-format='html'] p:last-child{ margin-bottom:0; }
[data-block-format='html'] a{ color:var(--primary-dark); text-decoration:underline; }
[data-block-format='html'] blockquote{
  border-left:3px solid var(--primary); padding:4px 0 4px 14px; margin:10px 0; color:var(--muted); font-style:italic;
}
[data-block-format='html'] u{ text-decoration:underline; }

/* ---------- enrollment ---------- */
.enroll-modal{ max-width:520px; }
.enroll-roles{ margin-top:2px; }
.member-badge--clickable{ cursor:pointer; }
.member-badge--clickable:hover{ border-color:rgba(255,119,32,0.7); }

/* ---------- meetings: tags ---------- */
.meeting-tag{
  font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em;
  padding:3px 9px; border-radius:999px; background:var(--navy-soft); color:var(--navy);
  flex-shrink:0;
}
.meeting-tag[data-tag='Team']{ background:rgba(255,119,32,0.16); color:var(--primary-dark); }
.meeting-tag[data-tag='Business']{ background:rgba(12,31,61,0.1); color:var(--navy); }
.meeting-tag[data-tag='Ops']{ background:rgba(31,138,92,0.14); color:var(--green); }
.meeting-tag[data-tag='Sales']{ background:rgba(242,179,61,0.24); color:#8a6415; }
.meeting-tag[data-tag='Academics']{ background:rgba(90,80,200,0.14); color:#5a50c8; }
.meeting-tag[data-tag='Client']{ background:rgba(209,72,58,0.12); color:var(--red); }
.meeting-haslink{ font-size:12px; opacity:.7; }

/* ---------- meetings v2: form ---------- */
.editing-banner{ font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--primary-dark); margin-bottom:10px; }
.panel-form.is-editing{ border:1.5px solid var(--primary); box-shadow:0 0 0 4px var(--primary-soft); }
.form-actions{ display:flex; gap:10px; align-items:center; }
.field-hint{ display:block; margin-top:6px; font-size:12px; color:var(--muted); }
.filter-pill--other{ border-style:dashed; }
.input--tag{ max-width:220px; padding:8px 12px; font-size:13px; }

.chip-input{ position:relative; display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding:6px 8px; border:1.5px solid var(--border); border-radius:12px; background:var(--white); }
.chip-input:focus-within{ border-color:var(--primary); }
.chip-input-chips{ display:contents; }
.chip{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; padding:4px 8px 4px 10px; border-radius:12px; background:var(--navy-soft); color:var(--navy); }
.chip--linked{ background:var(--primary-soft); color:var(--primary-dark); }
.chip--linked::before{ content:'✓'; font-size:11px; }
.chip-x{ background:none; border:none; cursor:pointer; color:inherit; opacity:.6; font-size:13px; line-height:1; padding:0 2px; }
.chip-x:hover{ opacity:1; }
.chip-input-field{ flex:1; min-width:160px; border:none; outline:none; background:transparent; font:inherit; font-size:14px; padding:6px 4px; color:inherit; }

.notes-wrap{ position:relative; }
.suggest{ position:absolute; left:0; top:calc(100% + 4px); z-index:20; min-width:240px; max-width:100%; background:var(--white); border:1px solid var(--border); border-radius:12px; box-shadow:0 14px 34px rgba(12,31,61,.18); overflow:hidden; }
.suggest-item{ display:flex; align-items:center; gap:10px; padding:9px 12px; cursor:pointer; font-size:13.5px; color:var(--navy); }
.suggest-item.active, .suggest-item:hover{ background:var(--primary-soft); }
.suggest-avatar{ width:24px; height:24px; border-radius:50%; flex-shrink:0; background:var(--navy-soft); display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:var(--navy); overflow:hidden; }
.suggest-avatar img{ width:100%; height:100%; display:block; }
.suggest-email{ margin-left:auto; font-size:11.5px; color:var(--muted); }

/* ---------- meetings v2: cards ---------- */
.meeting-actions{ display:inline-flex; gap:2px; }
.meeting-edited{ font-size:11px; color:var(--muted); font-style:italic; }
.meeting-chip--linked::before{ content:'✓ '; }
.mention{ color:var(--primary-dark); font-weight:600; background:var(--primary-soft); border-radius:4px; padding:0 3px; }
html[data-theme='dark'] .chip-input, html[data-theme='dark'] .suggest{ background:var(--navy-2); border-color:rgba(255,255,255,.14); }
html[data-theme='dark'] .chip, html[data-theme='dark'] .suggest-item, html[data-theme='dark'] .suggest-avatar{ color:#e6ecf7; }

/* ---------- notifications bell ---------- */
.notif{ position:relative; }
.notif-bell{ position:relative; padding:5px 10px; font-size:14px; line-height:1; }
.notif-count{ position:absolute; top:-6px; right:-6px; min-width:17px; height:17px; padding:0 4px; border-radius:999px; background:var(--primary); color:#fff; font-size:10px; font-weight:800; display:inline-flex; align-items:center; justify-content:center; letter-spacing:0; }
.notif-panel{ position:absolute; right:0; top:calc(100% + 8px); width:340px; max-width:calc(100vw - 32px); background:var(--white); color:var(--navy); border:1px solid var(--border); border-radius:14px; box-shadow:0 18px 44px rgba(12,31,61,.28); z-index:90; overflow:hidden; text-transform:none; letter-spacing:0; }
.notif-head{ display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid var(--border); font-weight:700; font-size:13.5px; }
.notif-markall{ background:none; border:none; cursor:pointer; color:var(--primary-dark); font-size:12px; font-weight:600; }
.notif-list{ max-height:360px; overflow-y:auto; }
.notif-item{ display:block; width:100%; text-align:left; background:none; border:none; border-bottom:1px solid var(--border); padding:11px 14px; cursor:pointer; font:inherit; font-size:13px; color:var(--navy); line-height:1.45; }
.notif-item:last-child{ border-bottom:none; }
.notif-item:hover{ background:var(--navy-soft); }
.notif-item.unread{ background:var(--primary-soft); }
.notif-time{ display:block; margin-top:3px; font-size:11.5px; color:var(--muted); }
.notif-empty{ padding:22px 14px; text-align:center; font-size:13px; color:var(--muted); }
html[data-theme='dark'] .notif-panel{ background:var(--navy-2); color:#e6ecf7; border-color:rgba(255,255,255,.14); }
html[data-theme='dark'] .notif-item{ color:#e6ecf7; }

/* ---------- apps launcher (external Papaya apps, top bar) ---------- */
.apps{ position:relative; }
.apps-btn{ padding:5px 10px; font-size:11.5px; }
.apps-panel{ position:absolute; right:0; top:calc(100% + 8px); width:360px; max-width:calc(100vw - 32px); background:var(--white); color:var(--navy); border:1px solid var(--border); border-radius:14px; box-shadow:0 18px 44px rgba(12,31,61,.28); z-index:90; overflow:hidden; text-transform:none; letter-spacing:0; }
.apps-head{ display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid var(--border); font-weight:700; font-size:13.5px; }
.apps-all{ font-size:12px; font-weight:600; color:var(--primary-dark); text-decoration:none; }
.apps-item{ display:flex; gap:12px; align-items:flex-start; padding:11px 14px; border-bottom:1px solid var(--border); text-decoration:none; color:var(--navy); }
.apps-item:last-child{ border-bottom:none; }
.apps-item:hover{ background:var(--navy-soft); }
.apps-icon{ font-size:20px; line-height:1.2; flex-shrink:0; }
.apps-text{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.apps-name{ font-size:13.5px; font-weight:700; }
.apps-what{ font-size:12px; color:var(--muted); line-height:1.4; }
html[data-theme='dark'] .apps-panel{ background:var(--navy-2); color:#e6ecf7; border-color:rgba(255,255,255,.14); }
html[data-theme='dark'] .apps-item, html[data-theme='dark'] .apps-name{ color:#e6ecf7; }

/* ---------- lessons: authors, stars, weekly best ---------- */
.author-avatar{ border-radius:50%; display:inline-block; flex-shrink:0; object-fit:cover; }
.author-avatar--fallback{
  background:var(--primary-soft); color:var(--primary-dark);
  font-size:11px; font-weight:700; display:inline-flex; align-items:center; justify-content:center;
}
.posting-as{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  margin:2px 0 14px; padding:9px 12px;
  background:var(--navy-soft); border-radius:10px;
}
.posting-as-label{ font-size:11px; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); font-weight:600; }
.posting-as-name{ font-size:13.5px; font-weight:600; color:var(--navy); }
.posting-as-role{
  font-size:11px; font-weight:600; color:var(--primary-dark);
  background:var(--primary-soft); padding:2px 9px; border-radius:999px;
}
.lesson-foot{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-top:12px; padding-top:11px; border-top:1px solid var(--border);
}
.lesson-author{ display:inline-flex; align-items:center; gap:8px; min-width:0; }
.lesson-author-name{ font-size:12.5px; font-weight:600; color:var(--navy); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lesson-author-role{ font-size:10.5px; font-weight:600; color:var(--muted); background:var(--navy-soft); padding:2px 8px; border-radius:999px; white-space:nowrap; }
.like-btn{
  display:inline-flex; align-items:center; gap:6px; flex-shrink:0;
  font-family:'Poppins',sans-serif; font-size:13px; font-weight:700;
  padding:5px 13px; border-radius:999px;
  border:1.5px solid var(--border); background:var(--white); color:var(--muted); cursor:pointer;
  transition:border-color .12s ease, color .12s ease, background .12s ease;
}
.like-btn:hover:not(:disabled){ border-color:var(--gold); color:#8a6415; background:rgba(242,179,61,0.12); }
.like-btn--on{ border-color:var(--gold); background:rgba(242,179,61,0.18); color:#8a6415; }
.like-btn:disabled{ cursor:not-allowed; opacity:.55; }
.like-btn--own{ opacity:.45; }
.like-icon{ font-size:14px; line-height:1; }
.like-count{ min-width:8px; text-align:center; }

.weekly-best{
  background:linear-gradient(135deg, rgba(242,179,61,0.18) 0%, rgba(255,119,32,0.12) 100%);
  border:1px solid rgba(242,179,61,0.5); border-radius:16px;
  padding:16px 20px; margin-bottom:18px;
}
.weekly-best-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.weekly-best-title{ font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:0.06em; color:#8a6415; }
.weekly-best-count{ font-size:12px; font-weight:700; color:#8a6415; }
.weekly-best-body .lesson-area{ margin-bottom:6px; display:inline-block; }
.weekly-best-text{ font-size:14.5px; line-height:1.5; color:var(--ink); margin:4px 0 12px; }

/* ---------- dark mode ---------- */
html[data-theme='dark']{
  --primary-soft:rgba(255,119,32,0.18);
  --navy:#dbe6f6;            /* used as heading/text color across components */
  --navy-2:#132a4f;
  --navy-soft:rgba(255,255,255,0.08);
  --ink:#e8eef8;
  --muted:#93a4c0;
  --paper:#0a1526;
  --white:#122340;           /* card surfaces */
  --border:rgba(255,255,255,0.13);
}
html[data-theme='dark'] .topbar,
html[data-theme='dark'] .toast,
html[data-theme='dark'] .leaderboard,
html[data-theme='dark'] .btn-google{ background:#0d1b31; }
html[data-theme='dark'] .btn-google:hover{ background:#16294a; }
html[data-theme='dark'] .hero,
html[data-theme='dark'] .login-wrap{ background:linear-gradient(160deg, #0d1b31 0%, #132a4f 100%); }
html[data-theme='dark'] .subnav-btn.active,
html[data-theme='dark'] .filter-pill.active,
html[data-theme='dark'] .cat-pill.active{ background:#24406b; border-color:#24406b; color:#fff; }
html[data-theme='dark'] .cat-pill .count,
html[data-theme='dark'] .filter-pill .count{ background:rgba(255,255,255,0.1); color:var(--navy); }
html[data-theme='dark'] .sd-tab.active{ background:#24406b; border-color:#24406b; color:#fff; }
html[data-theme='dark'] .sl-chip--new_request{ background:rgba(255,255,255,0.1); color:#e6ecf7; }
html[data-theme='dark'] .sd-feed-item--incoming,
html[data-theme='dark'] .sd-feed-item--email-incoming{ background:#0d1627; border-color:#1e293b; border-left-color:#38bdf8; }
html[data-theme='dark'] .sd-feed-item--outgoing,
html[data-theme='dark'] .sd-feed-item--email-outgoing{ background:#0e1a34; border-color:#1e3a8a; border-right-color:#60a5fa; }
html[data-theme='dark'] .sd-feed-item--update{ background:#221309; border-color:#57220b; border-right-color:var(--primary); }
html[data-theme='dark'] .sd-feed-item--meeting{ background:#201905; border-color:#4d3d0c; border-left-color:#eab308; }
html[data-theme='dark'] .sd-feed-item--note{ background:#0d1627; border-color:#1e293b; border-left-color:#64748b; }
html[data-theme='dark'] .sd-feed-kind--incoming{ background:#082f49; color:#38bdf8; border-color:rgba(56,189,248,0.25); }
html[data-theme='dark'] .sd-feed-kind--outgoing{ background:#172554; color:#93c5fd; border-color:rgba(96,165,250,0.25); }
html[data-theme='dark'] .sd-feed-kind--meeting{ background:#422006; color:#fde047; }
html[data-theme='dark'] .sd-feed-kind--note{ background:#1e293b; color:#cbd5e1; }
html[data-theme='dark'] .sd-feed-filter-btn{ background:#0d1627; border-color:#1e293b; color:#94a3b8; }
html[data-theme='dark'] .sd-feed-filter-btn:hover{ background:#1e293b; color:#f1f5f9; border-color:#334155; }
html[data-theme='dark'] .sd-feed-filter-btn.active{ background:#2563eb; color:#fff; border-color:#2563eb; }
html[data-theme='dark'] .sd-feed-filter-count{ background:rgba(255,255,255,0.08); color:#cbd5e1; }
html[data-theme='dark'] .sd-feed-filter-btn.active .sd-feed-filter-count{ background:rgba(255,255,255,0.25); color:#fff; }
html[data-theme='dark'] .sd-feed-date-divider::before{ background:#1e293b; }
html[data-theme='dark'] .sd-feed-date-divider span{ background:#0b1322; border-color:#1e293b; color:#94a3b8; }
html[data-theme='dark'] .sd-feed-drive-badge{ background:#082f49; color:#38bdf8; border-color:#0369a1; }
html[data-theme='dark'] .sd-feed-date-filter-wrap{ background:#0d1627; border-color:#1e293b; }
html[data-theme='dark'] .sd-feed-date-input{ color:#e2e8f0; color-scheme:dark; }
html[data-theme='dark'] .sd-feed-empty-filter{ background:#0d1627; border-color:#1e293b; }
html[data-theme='dark'] .sd-feed-meta-val{ background:rgba(255,255,255,0.08); }
html[data-theme='dark'] .sd-feed-modal-content{ background:#0d1627; border-color:#1e293b; color:#e2e8f0; }
html[data-theme='dark'] .sd-step-select{ background:#0d1b31; color:#e6ecf7; border-color:rgba(255,255,255,.18); }
html[data-theme='dark'] .sd-rejected{ color:#ff8a7a; }
html[data-theme='dark'] .modal,
html[data-theme='dark'] .login-card{ background:var(--white); }
html[data-theme='dark'] .brand-seeds{ fill:#fff; }
html[data-theme='dark'] .lesson-text,
html[data-theme='dark'] .meeting-notes{ color:#c8d4e8; }
html[data-theme='dark'] .legend-chip.yellow{ color:#e8c069; }
html[data-theme='dark'] .lb-rank.silver{ color:#0c1f3d; }
html[data-theme='dark'] .doc-row:hover,
html[data-theme='dark'] .nav-card:hover,
html[data-theme='dark'] .link-card:hover{ box-shadow:0 10px 24px rgba(0,0,0,0.4); }
html[data-theme='dark'] .modal-backdrop{ background:rgba(2,8,18,0.65); }

html[data-theme='dark'] .rt-toolbar,
html[data-theme='dark'] .blk-edit,
html[data-theme='dark'] .like-btn{ background:#0d1b31; }
html[data-theme='dark'] .rt-editing{ background:rgba(255,119,32,0.1); }
html[data-theme='dark'] .weekly-best{
  background:linear-gradient(135deg, rgba(242,179,61,0.14) 0%, rgba(255,119,32,0.1) 100%);
  border-color:rgba(242,179,61,0.35);
}
html[data-theme='dark'] .weekly-best-title,
html[data-theme='dark'] .weekly-best-count,
html[data-theme='dark'] .like-btn--on{ color:#e8c069; }
html[data-theme='dark'] .posting-as-role{ color:#ffb27a; }
html[data-theme='dark'] .meeting-tag[data-tag='Sales']{ color:#e8c069; }
html[data-theme='dark'] [data-block-format='html'] a{ color:#ffb27a; }


/* ============================================================================
   RESPONSIVE
   Breakpoints: 900px (small laptop / tablet), 640px (phone landscape),
   420px (small phone). Rules live here, at the end, so they always win.
   ========================================================================= */

/* Nothing may push the page sideways. */
img, iframe, video, canvas, svg{ max-width:100%; }
.input, .select, .textarea{ max-width:100%; }
.rt-link, .rt-link-input, .doc-search,
.pl-id, .rl-main, .lesson-author, .meeting-summary-left{ min-width:0; }

@media (max-width:900px){
  .wrap{ padding:0 22px; }
  .topbar-inner{ padding:14px 22px 0; }
  /* Tablet: the header controls take their own full row so the badge, Apps, bell and switches never squeeze. */
  .topbar-actions{ width:100%; justify-content:flex-end; flex-wrap:wrap; row-gap:8px; }
  .rhythm-grid, .yesno-grid, .sandra{ grid-template-columns:1fr; }
}

@media (max-width:760px){
  /* The header stacks: brand on its own line, controls below it. */
  .topbar-inner{ gap:10px; }
  .topbar-actions{ width:100%; justify-content:space-between; }
  .member-badge--user{ max-width:60vw; }
  .badge-name, .badge-position{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .week-grid{ grid-template-columns:1fr 1fr; }

  /* Hamburger: the tabs row is hidden and opens as a vertical panel that
     bleeds to the page edges. --gutter tracks .topbar-inner's side padding. */
  .topbar{ --gutter:22px; }
  .nav-toggle{ display:flex; margin-left:auto; }
  .tabs-row{ display:none; }
  .nav-open .tabs-row{ display:flex; }
  .nav-open .tabs{ max-height:calc(100vh - 130px); max-height:calc(100dvh - 130px); overflow-y:auto; }
  .tabs{ flex-direction:column; gap:0; margin:8px calc(-1 * var(--gutter)) 0; padding:6px 0 10px; width:calc(100% + 2 * var(--gutter)); overflow:visible; border-top:1px solid rgba(255,255,255,0.1); }
  .tab-group{ flex-direction:column; }
  .tab-group--labeled{ margin:6px 0 0; padding:8px 0 0; border-left:none; border-top:1px solid rgba(255,255,255,0.1); }
  .tab-group-label{ position:static; padding:4px var(--gutter) 2px; }
  .tab-btn, .tab-group--labeled .tab-btn{ flex-direction:row; align-items:baseline; gap:10px; padding:11px var(--gutter); border-bottom:none; border-left:3px solid transparent; }
  .tab-btn.active{ border-left-color:var(--primary); background:rgba(255,255,255,0.05); }
}

@media (max-width:640px){
  .wrap{ padding:0 16px; }
  .topbar-inner{ padding:12px 16px 0; }
  .topbar{ --gutter:16px; }
  section.block{ padding:30px 0; }

  .form-row{ grid-template-columns:1fr; }
  .panel-form{ padding:16px; border-radius:14px; }
  .doc-toolbar{ flex-direction:column; }
  .btn{ padding:11px 18px; }

  /* Meetings: title and metadata stack instead of squeezing into one line. */
  .meeting-card summary{ padding:13px 15px; align-items:flex-start; }
  .meeting-summary-left{ flex:1 1 100%; gap:8px; }
  .meeting-summary-right{ flex:1 1 100%; justify-content:flex-start; gap:8px; }
  .meeting-title{ flex:1 1 100%; }
  .meeting-body{ padding:0 15px 15px; }

  /* Lessons: author and star sit on separate lines when space runs out. */
  .lesson-card{ padding:14px 15px; }
  .lesson-foot{ flex-wrap:wrap; gap:10px; }
  .lesson-author{ flex:1 1 auto; }
  .weekly-best{ padding:14px 16px; }
  .weekly-best-head{ flex-wrap:wrap; }
  .leaderboard-head{ flex-wrap:wrap; }
  .posting-as{ padding:8px 10px; }

  /* Admin: the row keeps name + role, and the access chip moves to the panel. */
  .pl-row{ padding:12px 14px; gap:11px; flex-wrap:wrap; }
  .pl-id{ flex:1 1 calc(100% - 100px); }
  .pl-role{ font-size:11.5px; padding:4px 10px; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
  .pl-admin{ margin-left:auto; }
  .pl-panel{ padding:4px 14px 14px; }
  .role-toggle{ width:100%; }
  .role-pill{ flex:1; text-align:center; }
  .rl-row{ padding:12px 14px; gap:10px; }
  .rl-kind{ width:auto; min-width:44px; }
  .admin-actions .btn{ flex:1; justify-content:center; }

  /* Docs */
  .doc-row{ padding:14px 15px; gap:11px; }
  .doc-search{ width:100%; }

  /* Modals fill more of the screen and never get cut off. */
  .modal-backdrop{ padding:12px; align-items:flex-end; }
  .modal{ max-width:100%; max-height:88vh; padding:20px 18px 22px; border-radius:16px; }
  .enroll-modal{ max-width:100%; }

  /* Rich-text toolbar: wraps, and the actions get their own full-width row. */
  .rt-toolbar{ position:static; padding:8px; gap:3px; }
  .rt-actions{ margin-left:0; width:100%; }
  .rt-action-btn{ flex:1; justify-content:center; }
  .rt-link-input{ width:110px; }

  .embed-frame{ padding-top:66%; }
}

@media (max-width:480px){
  .topbar-actions{ flex-wrap:wrap; row-gap:8px; }
  .member-badge--user{ flex:1 1 100%; max-width:100%; order:-1; }
  .lang-switch{ margin-left:auto; }
}

@media (max-width:420px){
  .wrap{ padding:0 13px; }
  .topbar-inner{ padding:11px 13px 0; }
  .topbar{ --gutter:13px; }
  .brand{ font-size:14.5px; }
  .brand small{ font-size:9.5px; }
  .week-grid{ grid-template-columns:1fr; }
  .h2{ font-size:21px; }
  .person-roles .filter-pill,
  .filter-pill{ font-size:12px; padding:7px 12px; }
  .lb-toggle button{ padding:5px 10px; }
  .rt-link{ flex:1 1 100%; }
  .rt-link-input{ flex:1 1 0; width:auto; }
}

/* ---------- QA E2E Tracker ---------- */
.qa-summary{ display:grid; gap:16px; margin-bottom:26px; }
.qa-summary-row{ display:grid; grid-template-columns:1.5fr 1fr; gap:16px; }
.qa-card-title{ font-size:15px; font-weight:700; margin-bottom:10px; }
.qa-progress-head{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:10px; }
.qa-progress-head h3{ font-size:15px; font-weight:700; }
.qa-progress-pct{ font-size:22px; font-weight:800; }
.qa-progress-pct small{ font-size:12px; font-weight:500; color:var(--muted); margin-left:8px; }
.qa-bar{ height:10px; border-radius:999px; background:var(--navy-soft); overflow:hidden; }
.qa-bar--lg{ height:14px; }
.qa-bar-fill{ height:100%; border-radius:999px; width:0; transition:width .4s ease; }
.qa-bar-fill.red{ background:var(--red); }
.qa-bar-fill.gold{ background:var(--gold); }
.qa-bar-fill.green{ background:var(--green); }
.qa-counters{ display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.qa-chip{ font-size:12px; font-weight:600; padding:6px 12px; border-radius:14px; }
.qa-chip.total{ background:var(--navy-soft); color:var(--ink); }
.qa-chip.pass{ background:var(--green-soft); color:var(--green); }
.qa-chip.fail{ background:var(--red-soft); color:var(--red); }
.qa-chip.pending{ background:var(--navy-soft); color:var(--muted); }
.qa-chip.tickets{ background:var(--primary-soft); color:var(--primary-dark); }
.qa-chart-empty{ padding:34px 16px; text-align:center; font-size:13px; color:var(--muted); background:var(--navy-soft); border-radius:12px; }
#qaChart svg{ width:100%; height:auto; display:block; }
.qa-grid{ stroke:var(--border); stroke-width:1; }
.qa-axis{ font-size:9.5px; fill:var(--muted); }
.qa-line{ fill:none; stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round; }
.qa-line.done{ stroke:var(--navy-2); }
.qa-line.pass{ stroke:var(--green); }
.qa-line.fail{ stroke:var(--red); }
html[data-theme='dark'] .qa-line.done{ stroke:#7da2d6; }
.qa-legend{ display:flex; gap:14px; font-size:11.5px; color:var(--muted); margin-top:8px; flex-wrap:wrap; }
.qa-dot{ width:8px; height:8px; border-radius:50%; display:inline-block; margin-right:5px; }
.qa-gonogo-btns{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:12px 0; }
.qa-gonogo-btn{ border:2px solid; border-radius:14px; padding:14px 8px; font-size:17px; font-weight:800; cursor:pointer; transition:transform .1s ease; }
.qa-gonogo-btn:hover{ transform:translateY(-1px); }
.qa-gonogo-btn.go{ border-color:var(--green); color:var(--green); background:var(--green-soft); }
.qa-gonogo-btn.go.active{ background:var(--green); color:#fff; }
.qa-gonogo-btn.nogo{ border-color:var(--red); color:var(--red); background:var(--red-soft); }
.qa-gonogo-btn.nogo.active{ background:var(--red); color:#fff; }
.qa-gonogo-note{ font-size:11.5px; color:var(--muted); text-align:center; margin-top:6px; }
.qa-gonogo-result{ border-radius:14px; padding:14px; text-align:center; margin:12px 0; }
.qa-gonogo-result.win-go{ background:var(--green-soft); color:var(--green); }
.qa-gonogo-result.win-nogo{ background:var(--red-soft); color:var(--red); }
.qa-gonogo-result.win-tie{ background:var(--primary-soft); color:var(--primary-dark); }
.qa-gonogo-result .big{ font-size:26px; font-weight:800; }
.qa-tally{ display:flex; height:10px; border-radius:999px; overflow:hidden; background:var(--navy-soft); margin-top:6px; }
.qa-tally .go{ background:var(--green); transition:width .4s ease; }
.qa-tally .nogo{ background:var(--red); transition:width .4s ease; }
.qa-tally-labels{ display:flex; justify-content:space-between; font-size:11px; font-weight:700; margin-top:12px; }
.qa-reset-link{ background:none; border:none; cursor:pointer; font-size:11.5px; color:var(--muted); text-decoration:underline; text-underline-offset:2px; }
.qa-reset-link:hover{ color:var(--red); }
.qa-banner{ background:var(--white); border:1px solid var(--border); border-radius:14px; padding:14px 18px; margin-bottom:18px; font-size:13.5px; }
.qa-banner.owner{ border-color:var(--primary); background:var(--primary-soft); font-weight:600; }
.qa-banner.readonly{ background:var(--navy-soft); color:var(--muted); }
.qa-banner.pick{ padding:20px; }
.qa-table{ background:var(--white); border:1px solid var(--border); border-radius:16px; overflow:hidden; margin-bottom:18px; }
.qa-table-head{ display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 18px; border-bottom:1px solid var(--border); background:var(--navy-soft); }
.qa-table-head h3{ font-size:14px; font-weight:700; }
.qa-table-head h3 small{ font-weight:500; color:var(--muted); margin-left:6px; }
.qa-add-btn{ padding:6px 12px; font-size:12px; }
.qa-row{ display:grid; grid-template-columns:52px 1.1fr 1.1fr minmax(300px, 1fr); gap:12px; padding:14px 18px; border-bottom:1px solid var(--border); align-items:center; }
.qa-row:last-child{ border-bottom:none; }
.qa-row.pass{ background:var(--green-soft); }
.qa-row.fail{ background:var(--red-soft); }
.qa-code{ font-size:11px; font-weight:800; padding:4px 8px; border-radius:8px; background:var(--navy-soft); color:var(--ink); width:max-content; }
.qa-code.failure{ background:var(--primary-soft); color:var(--primary-dark); }
.qa-action{ font-size:13.5px; font-weight:600; }
.qa-expected{ font-size:12.5px; color:var(--muted); }
.qa-controls{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.qa-pf{ display:flex; border:1px solid var(--border); border-radius:10px; overflow:hidden; flex-shrink:0; }
.qa-pf button{ padding:6px 12px; font-size:12px; font-weight:700; background:var(--white); border:none; cursor:pointer; }
.qa-pf button.pass{ color:var(--green); }
.qa-pf button.pass.active{ background:var(--green); color:#fff; }
.qa-pf button.fail{ color:var(--red); border-left:1px solid var(--border); }
.qa-pf button.fail.active{ background:var(--red); color:#fff; }
.qa-pf button:disabled{ opacity:.35; cursor:not-allowed; }
.qa-ticket-select{ font-size:12px; font-family:'Poppins',sans-serif; padding:6px 8px; border-radius:10px; border:1.5px solid var(--border); background:var(--white); color:var(--ink); }
.qa-ticket-select:disabled, .qa-link-input:disabled{ opacity:.4; }
.qa-link-input{ font-size:12px; font-family:'Poppins',sans-serif; padding:6px 10px; border-radius:10px; border:1.5px solid var(--border); background:var(--white); color:var(--ink); flex:1; min-width:120px; }
.qa-link-input:focus, .qa-ticket-select:focus{ outline:none; border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
.qa-open-link{ font-size:14px; text-decoration:none; color:var(--primary-dark); flex-shrink:0; }
.qa-admin-btns{ display:flex; gap:2px; flex-shrink:0; }
.qa-author{ font-size:10.5px; color:var(--muted); width:100%; }
.qa-empty{ padding:20px; font-size:13px; color:var(--muted); }
html[data-theme='dark'] .qa-banner,
html[data-theme='dark'] .qa-table{ background:var(--white); }
html[data-theme='dark'] .qa-pf button,
html[data-theme='dark'] .qa-ticket-select,
html[data-theme='dark'] .qa-link-input{ background:var(--paper); }
@media (max-width: 860px){
  .qa-summary-row{ grid-template-columns:1fr; }
  .qa-row{ grid-template-columns:1fr; gap:8px; }
}

/* ---- QA Tracker: owners + attendance ---- */
.qa-section-title{ font-size:17px; font-weight:800; margin:26px 0 10px; }
.qa-owner-bar{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; border-radius:14px; border:1px solid var(--border); background:var(--white); padding:10px 16px; margin-bottom:12px; font-size:13px; }
.qa-owner-bar.attended{ border-color:var(--green); background:var(--green-soft); }
.qa-owner-bar.absent{ border-color:var(--gold); background:rgba(242,179,61,0.12); }
.qa-owner-bar.unset{ border-style:dashed; }
.qa-owner-label{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); }
.qa-owner-name{ font-family:inherit; font-size:13px; font-weight:700; color:var(--ink); background:var(--white); border:1.5px solid var(--border); border-radius:999px; padding:4px 12px; cursor:pointer; transition:border-color .12s ease, transform .12s ease; }
.qa-owner-name:hover{ border-color:var(--primary); transform:translateY(-1px); }
.qa-owner-name.readonly{ cursor:default; }
.qa-owner-name.readonly:hover{ border-color:var(--border); transform:none; }
.qa-owner-state{ color:var(--muted); }
.qa-gonogo-actions{ display:flex; gap:12px; }
html[data-theme='dark'] .qa-owner-bar{ background:var(--white); }
html[data-theme='dark'] .qa-owner-bar.attended{ background:var(--green-soft); }
html[data-theme='dark'] .qa-owner-name{ background:var(--paper); }

/* ---- QA Tracker v4: sheet-mirroring fields ---- */
.qa-toolbar{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.qa-id-cell{ display:flex; flex-direction:column; gap:4px; align-items:flex-start; }
.qa-feature{ font-size:10px; font-weight:600; color:var(--muted); background:var(--navy-soft); border-radius:6px; padding:2px 6px; max-width:110px; }
.qa-status-select{ font-size:12px; font-weight:700; font-family:'Poppins',sans-serif; padding:6px 8px; border-radius:10px; border:1.5px solid var(--border); background:var(--white); color:var(--ink); max-width:150px; }
.qa-status-select.pass{ background:var(--green-soft); color:var(--green); border-color:var(--green); }
.qa-status-select.fail{ background:var(--red-soft); color:var(--red); border-color:var(--red); }
.qa-status-select.partial{ background:rgba(242,179,61,0.15); color:#8a6415; border-color:var(--gold); }
.qa-status-select.blocked{ background:var(--navy-soft); color:var(--navy-2); border-color:var(--navy-2); }
.qa-status-select:disabled{ opacity:.4; }
.qa-status-select:focus{ outline:none; border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
.qa-row.partial{ background:rgba(242,179,61,0.08); }
.qa-row.blocked{ background:var(--navy-soft); }
.qa-note-input{ min-width:110px; }
.qa-chip.partial{ background:rgba(242,179,61,0.15); color:#8a6415; }
.qa-chip.blocked{ background:var(--navy-soft); color:var(--navy-2); }
html[data-theme='dark'] .qa-status-select{ background:var(--paper); }
html[data-theme='dark'] .qa-status-select.partial{ color:var(--gold); }
html[data-theme='dark'] .qa-status-select.blocked{ color:#9db8dd; }
html[data-theme='dark'] .qa-chip.partial{ color:var(--gold); }
html[data-theme='dark'] .qa-chip.blocked{ color:#9db8dd; }

/* ---- QA Tracker v5: vote popup, read-only rows, filters ---- */
.qa-row{ grid-template-columns:120px 1.1fr 1.1fr minmax(260px, 1fr); }
.qa-id-cell{ min-width:0; }
.qa-id-cell .qa-code{ white-space:nowrap; }
.qa-feature{ max-width:116px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qa-toolbar-actions{ display:flex; gap:8px; align-items:center; }
.qa-vote-btn{ padding:6px 16px; font-size:12px; }
.qa-chip.nottested{ background:var(--navy-soft); color:var(--muted); }
.qa-row.nottested{ background:transparent; }
.qa-note-view{ font-size:11.5px; color:var(--muted); max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qa-pick-row{ margin-bottom:2px; }
.qa-pick{ font-family:'Poppins',sans-serif; font-size:12.5px; font-weight:600; padding:7px 14px; border-radius:16px; border:1.5px solid var(--border); background:var(--white); color:var(--ink); cursor:pointer; transition:transform .1s ease, border-color .1s ease; }
.qa-pick:hover{ transform:translateY(-1px); border-color:var(--primary); }
.qa-pick.pass{ color:var(--green); }
.qa-pick.pass.active{ background:var(--green); border-color:var(--green); color:#fff; }
.qa-pick.fail{ color:var(--red); }
.qa-pick.fail.active{ background:var(--red); border-color:var(--red); color:#fff; }
.qa-pick.partial{ color:#8a6415; }
.qa-pick.partial.active{ background:var(--gold); border-color:var(--gold); color:#fff; }
.qa-pick.blocked{ color:var(--navy-2); }
.qa-pick.blocked.active{ background:var(--navy-2); border-color:var(--navy-2); color:#fff; }
.qa-pick.nottested{ color:var(--muted); }
.qa-pick.nottested.active{ background:var(--muted); border-color:var(--muted); color:#fff; }
.qa-vote-modal .qa-code{ font-size:12px; }
.qa-confirm-msg{ font-size:14px; margin:4px 0 6px; line-height:1.5; }
html[data-theme='dark'] .qa-pick{ background:var(--paper); }
html[data-theme='dark'] .qa-pick.partial{ color:var(--gold); }
html[data-theme='dark'] .qa-pick.blocked{ color:#9db8dd; }
@media (max-width: 800px){ .qa-row{ grid-template-columns:1fr; } }

/* ---- Lessons & Wins: admin delete ---- */
.lesson-del{ margin-left:10px; opacity:.45; font-size:13px; }
.lesson-del:hover{ opacity:1; }

/* ---------- HubSpot Tickets panel ---------- */
.hs-title-row{ display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:22px; flex-wrap:wrap; }
.hs-actions{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; flex-shrink:0; }
.hs-actions .btn{ padding:9px 16px; font-size:13px; }
.hs-banner{ margin-bottom:18px; }
.hs-kpis{ display:grid; grid-template-columns:repeat(6, 1fr); gap:12px; margin-bottom:16px; }
.hs-kpi{ background:var(--white); border:1px solid var(--border); border-radius:14px; padding:14px 16px; display:flex; flex-direction:column; gap:2px; position:relative; overflow:hidden; }
.hs-kpi::before{ content:''; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--border); }
.hs-kpi.open::before{ background:var(--primary); }
.hs-kpi.urgent::before{ background:var(--red); }
.hs-kpi.warn::before{ background:var(--gold); }
.hs-kpi.good::before{ background:var(--green); }
.hs-kpi-icon{ font-size:15px; line-height:1; margin-bottom:6px; }
.hs-kpi-value{ font-size:24px; font-weight:800; color:var(--navy); line-height:1.1; }
.hs-kpi.urgent .hs-kpi-value{ color:var(--red); }
.hs-kpi-label{ font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:0.05em; color:var(--muted); }
.hs-kpi-note{ grid-column:1 / -1; font-size:11.5px; color:var(--muted); margin:-4px 0 0 2px; }
.hs-charts{ display:grid; grid-template-columns:1.5fr 1fr; gap:16px; margin-bottom:18px; }
.hs-bars{ display:flex; flex-direction:column; gap:6px; }
.hs-bar-row{ display:grid; grid-template-columns:minmax(120px, 34%) 1fr 34px; gap:10px; align-items:center; background:none; border:none; padding:5px 6px; border-radius:8px; cursor:pointer; text-align:left; font-family:inherit; color:var(--ink); }
.hs-bar-row:hover{ background:var(--navy-soft); }
.hs-bar-label{ font-size:12.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hs-bar-track{ height:10px; border-radius:999px; background:var(--navy-soft); overflow:hidden; }
.hs-bar-fill{ display:block; height:100%; border-radius:999px; background:var(--primary); transition:width .4s ease; }
.hs-bar-fill.closed{ background:var(--green); }
.hs-bar-count{ font-size:12.5px; font-weight:800; text-align:right; }
.hs-prio-bar{ display:flex; height:12px; border-radius:999px; overflow:hidden; background:var(--navy-soft); gap:2px; }
.hs-prio-seg{ display:block; min-width:4px; }
.hs-prio-seg--urgent{ background:var(--red); }
.hs-prio-seg--high{ background:var(--primary); }
.hs-prio-seg--medium{ background:var(--gold); }
.hs-prio-seg--low{ background:var(--green); }
.hs-prio-seg--none{ background:#a9b6cc; }
.hs-prio-legend{ display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:10px; font-size:12px; color:var(--muted); }
.hs-prio-legend b{ color:var(--ink); }
.hs-dot{ width:9px; height:9px; border-radius:50%; display:inline-block; margin-right:6px; vertical-align:-1px; }
.hs-owners{ display:flex; flex-direction:column; gap:4px; }
.hs-owner-row{ display:flex; justify-content:space-between; align-items:center; gap:10px; background:none; border:none; padding:5px 6px; border-radius:8px; cursor:pointer; font-family:inherit; color:var(--ink); font-size:13px; }
.hs-owner-row:hover{ background:var(--navy-soft); }
.hs-owner{ display:inline-flex; align-items:center; gap:7px; font-size:12.5px; font-weight:600; color:var(--ink); min-width:0; }
.hs-owner-av{ width:22px; height:22px; border-radius:50%; background:var(--primary-soft); color:var(--primary-dark); font-size:11px; font-weight:800; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
.hs-owner--none{ color:var(--muted); font-weight:500; font-style:italic; }
.hs-filters{ padding:16px 18px; margin-bottom:16px; display:flex; flex-direction:column; gap:12px; }
.hs-search{ position:relative; display:flex; align-items:center; }
.hs-search svg{ position:absolute; left:13px; color:var(--muted); pointer-events:none; }
.hs-search .input{ padding-left:38px; height:44px; background:var(--white); }
.hs-filter-grid{ display:grid; grid-template-columns:repeat(4, 1fr); gap:10px; }
.hs-filter-grid .select{ background:var(--white); }
.hs-toggle{ display:inline-flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:var(--muted); cursor:pointer; user-select:none; }
.hs-toggle input{ width:16px; height:16px; accent-color:var(--primary); }
.hs-toggle:has(input:disabled){ opacity:.5; cursor:not-allowed; }
.hs-filter-dates{ border-top:1px solid var(--border); padding-top:12px; }
.hs-filter-foot{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.hs-toggle-note{ font-size:11.5px; color:var(--muted); font-style:italic; }
.hs-reset-link{ margin-left:auto; background:none; border:none; cursor:pointer; font-family:inherit; font-size:12px; font-weight:600; color:var(--muted); text-decoration:underline; text-underline-offset:2px; }
.hs-reset-link:hover{ color:var(--red); }
.hs-chips{ display:flex; flex-wrap:wrap; gap:6px; }
.hs-chips:empty{ display:none; }
.hs-chip-filter{ display:inline-flex; align-items:center; gap:7px; font-size:11.5px; font-weight:600; padding:4px 6px 4px 11px; border-radius:999px; background:var(--primary-soft); color:var(--primary-dark); max-width:100%; }
.hs-chip-filter span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hs-chip-filter button{ background:none; border:none; cursor:pointer; color:inherit; font-size:11px; line-height:1; padding:2px 4px; border-radius:50%; opacity:.75; }
.hs-chip-filter button:hover{ opacity:1; background:rgba(255,119,32,0.25); }
.hs-chips-none{ font-size:11.5px; color:var(--muted); font-style:italic; }
.hs-table{ background:var(--white); border:1px solid var(--border); border-radius:16px; overflow:hidden; }
.hs-thead, .hs-row{ display:grid; grid-template-columns:minmax(0, 2.4fr) 1.1fr 0.8fr 1.1fr 0.7fr 0.7fr; gap:12px; align-items:center; padding:12px 18px; }
.hs-thead{ background:var(--navy-soft); border-bottom:1px solid var(--border); }
.hs-th{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); text-align:left; }
.hs-th-sort{ background:none; border:none; padding:0; cursor:pointer; font-family:inherit; }
.hs-th-sort:hover, .hs-th-sort.active{ color:var(--primary-dark); }
.hs-row{ width:100%; background:none; border:none; border-bottom:1px solid var(--border); cursor:pointer; text-align:left; font-family:inherit; color:var(--ink); transition:background .12s ease; }
.hs-row:last-child{ border-bottom:none; }
.hs-row:hover{ background:var(--navy-soft); }
.hs-cell{ min-width:0; font-size:13px; }
.hs-cell-subject{ display:flex; flex-direction:column; gap:2px; }
.hs-subject{ font-weight:700; font-size:14px; color:var(--navy); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hs-id{ font-size:11.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hs-cell-date{ font-size:12px; color:var(--muted); }
.hs-stage{ display:inline-block; font-size:11.5px; font-weight:700; padding:4px 10px; border-radius:999px; background:var(--primary-soft); color:var(--primary-dark); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hs-stage--closed{ background:var(--green-soft); color:var(--green); }
.hs-prio{ display:inline-block; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.04em; padding:3px 9px; border-radius:999px; }
.hs-prio--urgent{ background:var(--red-soft); color:var(--red); }
.hs-prio--high{ background:var(--primary-soft); color:var(--primary-dark); }
.hs-prio--medium{ background:rgba(242,179,61,0.2); color:#8a6415; }
.hs-prio--low{ background:var(--green-soft); color:var(--green); }
.hs-prio--none{ background:var(--navy-soft); color:var(--muted); }
.hs-more{ display:flex; flex-direction:column; align-items:center; gap:8px; margin-top:16px; }

/* view options above the list */
.hs-list-bar{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.hs-view-opts{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.hs-view-opts label{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); }
.hs-view-opts .select{ width:auto; padding:7px 10px; font-size:12.5px; background:var(--white); }

/* grouped sections */
.hs-group{ border-bottom:1px solid var(--border); }
.hs-group:last-child{ border-bottom:none; }
.hs-group-head{ width:100%; display:flex; align-items:center; gap:10px; padding:10px 18px; background:var(--navy-soft); border:none; border-bottom:1px solid var(--border); cursor:pointer; font-family:inherit; text-align:left; color:var(--ink); }
.hs-group-head:hover{ background:var(--primary-soft); }
.hs-group-caret{ font-size:11px; color:var(--muted); transition:transform .15s ease; }
.hs-group--closed .hs-group-caret{ transform:rotate(-90deg); }
.hs-group-title{ font-size:13px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hs-group-count{ font-size:11px; font-weight:700; background:var(--white); border:1px solid var(--border); border-radius:999px; padding:1px 9px; color:var(--muted); }
.hs-group--closed .hs-group-body{ display:none; }

/* pager */
.hs-pager{ display:flex; align-items:center; gap:4px; flex-wrap:wrap; justify-content:center; }
.hs-page-btn{ min-width:34px; padding:7px 10px; border-radius:9px; border:1.5px solid var(--border); background:var(--white); color:var(--ink); font-family:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.hs-page-btn:hover:not(:disabled){ border-color:var(--primary); color:var(--primary-dark); }
.hs-page-btn.active{ background:var(--navy); border-color:var(--navy); color:#fff; }
.hs-page-btn:disabled{ opacity:.4; cursor:not-allowed; }
.hs-page-gap{ padding:0 4px; color:var(--muted); font-size:13px; }
.hs-pager-meta{ font-size:12px; color:var(--muted); }
.hs-pager-cap{ font-size:11.5px; color:var(--muted); font-style:italic; text-align:center; max-width:520px; }
html[data-theme='dark'] .hs-view-opts .select,
html[data-theme='dark'] .hs-page-btn,
html[data-theme='dark'] .hs-group-count{ background:var(--paper); }
html[data-theme='dark'] .hs-page-btn.active{ background:#24406b; border-color:#24406b; color:#fff; }
.hs-modal--wide{ max-width:760px; }
.hs-detail-head h3{ font-size:18px; line-height:1.3; }
.hs-detail-meta a{ color:var(--primary-dark); font-weight:600; text-decoration:none; }
.hs-detail-meta a:hover{ text-decoration:underline; }
.hs-detail-grid{ display:grid; grid-template-columns:repeat(4, 1fr); gap:10px; }
.hs-detail-save{ display:flex; justify-content:flex-end; align-items:center; gap:12px; margin:10px 0 4px; }
.hs-detail-save .form-error{ margin:0; flex:1; }
.hs-detail-save .btn{ padding:8px 18px; font-size:13px; }
.hs-h4{ font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); margin:18px 0 8px; }
.hs-h4 small{ font-weight:600; background:var(--navy-soft); border-radius:10px; padding:1px 7px; margin-left:4px; }
.hs-desc{ font-size:13.5px; line-height:1.6; white-space:pre-wrap; background:var(--paper); border:1px solid var(--border); border-radius:10px; padding:12px 14px; max-height:220px; overflow:auto; }
.hs-muted{ color:var(--muted); font-size:13px; font-style:italic; }
.hs-detail-cols{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.hs-list{ list-style:none; display:flex; flex-direction:column; gap:6px; }
.hs-list li{ background:var(--paper); border:1px solid var(--border); border-radius:10px; padding:8px 12px; font-size:12.5px; display:flex; flex-direction:column; gap:1px; }
.hs-list li b{ font-size:13px; color:var(--navy); }
.hs-list li span{ color:var(--muted); }
.hs-note-form{ display:flex; gap:10px; align-items:flex-start; margin-bottom:12px; }
.hs-note-form .textarea{ flex:1; min-height:56px; }
.hs-note-form .btn{ padding:9px 16px; font-size:13px; white-space:nowrap; }
.hs-notes{ display:flex; flex-direction:column; gap:8px; max-height:320px; overflow:auto; }
.hs-note{ border-left:3px solid var(--gold); background:var(--paper); border-radius:0 10px 10px 0; padding:9px 12px; }
.hs-note-meta{ font-size:11px; color:var(--muted); margin-bottom:3px; }
.hs-note-body{ font-size:13px; white-space:pre-wrap; line-height:1.5; }
.hs-creator{ margin:0 0 14px; }
.hs-creator-ok{ font-size:12px; font-weight:600; color:var(--green); }
.hs-creator-new{ font-size:12px; font-weight:600; color:var(--primary-dark); flex:1 1 100%; }
.hs-contact-results{ display:flex; flex-direction:column; gap:4px; margin-top:6px; }
.hs-contact-opt{ display:flex; flex-wrap:wrap; gap:4px 10px; align-items:baseline; background:var(--paper); border:1px solid var(--border); border-radius:10px; padding:8px 12px; cursor:pointer; font-family:inherit; font-size:12.5px; color:var(--ink); text-align:left; }
.hs-contact-opt:hover{ border-color:var(--primary); }
.hs-contact-opt b{ font-size:13px; }
.hs-contact-opt span{ color:var(--muted); }
.hs-contact-picked{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.hs-chip{ display:inline-flex; align-items:center; gap:6px; }
.hs-chip-x{ background:none; border:none; cursor:pointer; color:inherit; font-size:11px; padding:0 2px; opacity:.7; }
.hs-chip-x:hover{ opacity:1; }
html[data-theme='dark'] .hs-search .input,
html[data-theme='dark'] .hs-filter-grid .input,
html[data-theme='dark'] .hs-filter-grid .select{ background:var(--paper); }
html[data-theme='dark'] .hs-prio--medium{ color:#e8c069; }
html[data-theme='dark'] .hs-prio-seg--none{ background:#4a5b78; }
@media (max-width:900px){
  .hs-kpis{ grid-template-columns:repeat(3, 1fr); }
  .hs-charts{ grid-template-columns:1fr; }
  .hs-filter-grid{ grid-template-columns:1fr 1fr; }
  .hs-thead{ display:none; }
  .hs-row{ grid-template-columns:1fr 1fr; gap:8px; padding:12px 16px; }
  .hs-cell-subject{ grid-column:1 / -1; }
  .hs-detail-grid{ grid-template-columns:1fr 1fr; }
}
@media (max-width:640px){
  .hs-kpis{ grid-template-columns:1fr 1fr; }
  .hs-list-bar{ align-items:flex-start; flex-direction:column; gap:8px; }
  .hs-view-opts{ width:100%; }
  .hs-view-opts .select{ flex:1; }
  .hs-filter-grid{ grid-template-columns:1fr; }
  .hs-detail-cols{ grid-template-columns:1fr; }
  .hs-note-form{ flex-direction:column; }
  .hs-note-form .btn{ align-self:flex-end; }
  .hs-actions{ width:100%; }
  .hs-actions .btn{ flex:1 1 auto; justify-content:center; white-space:nowrap; }
}

/* ---------------- Schools (onboarding tracker) ---------------- */
.sc-kpis{ grid-template-columns:repeat(4, 1fr); }
.sc-filter-grid{ grid-template-columns:1fr 1fr auto; align-items:end; }
.sc-empty{ grid-column:1 / -1; padding:24px; text-align:center; }
.sc-pct{ font-size:20px; font-weight:800; color:var(--navy); line-height:1; }
.sc-steps{ grid-column:2; font-size:11.5px; color:var(--muted); }

/* ---- Schools list (dense) ---- */
.hs-kpi--active{ border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
button.hs-kpi{ font-family:inherit; text-align:left; cursor:pointer; }
.sl-toggle{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--muted); padding-bottom:10px; white-space:nowrap; }
.sl-table{ background:var(--white); border:1px solid var(--border); border-radius:16px; overflow:hidden; }
.sl-head, .sl-row{ display:grid; grid-template-columns:minmax(0, 1.8fr) 1.4fr 1.2fr 1fr 0.9fr 0.9fr; gap:12px; align-items:center; padding:12px 18px; }
.sl-head{ background:var(--navy-soft); border-bottom:1px solid var(--border); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); }
.sl-row{ text-decoration:none; color:var(--ink); border-bottom:1px solid var(--border); font-size:13px; transition:background .12s ease; }
.sl-row:last-child{ border-bottom:0; }
.sl-row:hover{ background:var(--primary-soft); }
.sl-school{ display:flex; flex-direction:column; min-width:0; }
.sl-school b{ color:var(--navy); font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sl-school span{ font-size:11.5px; color:var(--muted); }
.sl-stage{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.sl-stage span{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sl-stage small{ color:var(--muted); font-weight:700; }
.sl-contact{ color:var(--muted); font-size:12.5px; white-space:nowrap; }
.sl-chip{ display:inline-block; font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:0.05em; padding:4px 9px; border-radius:999px; background:var(--navy-soft); color:var(--muted); white-space:nowrap; }
.sl-chip--waiting_school{ background:var(--primary-soft); color:var(--primary-dark); }
.sl-chip--new_request{ background:var(--navy-soft); color:var(--navy); }
.sl-chip--at_risk{ background:var(--red-soft); color:var(--red); }
.sl-chip--launching, .sl-chip--ready_ops{ background:var(--green-soft); color:var(--green); }
.sl-chip--none{ background:transparent; }
.sl-unread{ display:inline-block; margin-left:6px; font-size:10.5px; font-weight:800; padding:2px 7px; border-radius:999px; background:var(--primary); color:#fff; }
/* mini rail: 12 segments */
.jr-mini{ display:flex; gap:3px; align-items:center; height:12px; }
.jr-mini-seg{ flex:1; height:5px; border-radius:3px; background:var(--border); }
.jr-mini-seg--done{ background:var(--primary); }
.jr-mini-seg--current{ background:var(--primary); height:10px; box-shadow:0 0 0 2px var(--primary-soft); }
.jr-mini-seg--current.jr-mini-seg--alert{ background:var(--red); box-shadow:0 0 0 2px var(--red-soft); }
.jr-mini-seg--future.jr-mini-seg--alert{ background:repeating-linear-gradient(90deg, var(--border) 0 2px, transparent 2px 4px); }
@media (max-width: 900px){
  .sl-head{ display:none; }
  .sl-row{ grid-template-columns:1fr 1fr; grid-template-rows:auto auto auto; padding:12px 14px; }
  .sl-row > :nth-child(1){ grid-column:1 / -1; }
  .sl-row > :nth-child(2){ grid-column:1 / -1; }
  .sc-kpis{ grid-template-columns:repeat(2, 1fr); }
  .sc-filter-grid{ grid-template-columns:1fr; }
}

.sc-facts{ display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; }
.sc-fact{ background:var(--paper); border:1px solid var(--border); border-radius:10px; padding:8px 11px; display:flex; flex-direction:column; gap:2px; min-width:0; }
.sc-fact span{ font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(--muted); }
.sc-fact b{ font-size:13px; color:var(--navy); overflow:hidden; text-overflow:ellipsis; }
.sc-fact a{ color:var(--primary-dark); text-decoration:none; }
.sc-fact a:hover{ text-decoration:underline; }
.sc-next{ font-size:13.5px; line-height:1.5; background:var(--primary-soft); color:var(--primary-dark); border-radius:10px; padding:10px 14px; margin-bottom:10px; }
.sc-next span{ display:block; font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:0.06em; margin-bottom:2px; }
.sc-pending{ list-style:none; display:flex; flex-direction:column; gap:5px; }
.sc-pending li{ display:grid; grid-template-columns:auto 1fr; gap:2px 10px; align-items:center; background:var(--paper); border:1px solid var(--border); border-radius:10px; padding:7px 12px; font-size:12.5px; }
.sc-pending li b{ color:var(--navy); font-size:13px; }
.sc-pending li .sc-pending-owner{ grid-column:2; color:var(--muted); font-size:11.5px; }
.sc-phases{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.sc-phase{ background:var(--paper); border:1px solid var(--border); border-radius:12px; padding:10px 12px; }
.sc-phase-head{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-bottom:6px; }
.sc-phase-head b{ font-size:11.5px; font-weight:800; text-transform:uppercase; letter-spacing:0.05em; color:var(--navy); }
.sc-phase-head span{ font-size:11.5px; font-weight:700; color:var(--muted); }
.sc-steps-list{ list-style:none; display:flex; flex-direction:column; gap:3px; }
.sc-step{ display:grid; grid-template-columns:auto 1fr auto; gap:8px; align-items:center; font-size:12.5px; padding:3px 0; }
.sc-step-name{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:help; transition:color 0.12s ease; }
.sc-step:hover .sc-step-name{ color:var(--primary-dark); }
.sc-step-val{ font-size:11px; font-weight:700; color:var(--muted); white-space:nowrap; }
.sc-step-dot{ width:10px; height:10px; border-radius:50%; background:#a9b6cc; flex-shrink:0; display:inline-block; }
.sc-step--done .sc-step-dot{ background:var(--green); }
.sc-step--progress .sc-step-dot{ background:var(--gold); }
.sc-step--blocked .sc-step-dot{ background:var(--red); }
.sc-step--todo .sc-step-dot{ background:transparent; border:2px solid #a9b6cc; width:6px; height:6px; }
.sc-step--na .sc-step-dot{ background:var(--border); }
.sc-step--info .sc-step-dot{ background:var(--primary); }
.sc-step--blocked .sc-step-val{ color:var(--red); }
.sc-step--done .sc-step-val{ color:var(--green); }
.sc-step--na{ opacity:.55; }
.sc-tl-title{ font-size:13px; font-weight:700; color:var(--navy); margin-bottom:2px; }
html[data-theme='dark'] .sc-step-dot{ background:#4a5b78; }
html[data-theme='dark'] .sc-step--todo .sc-step-dot{ border-color:#4a5b78; }
@media (max-width:1000px){
  .sc-facts{ grid-template-columns:1fr 1fr; }
  .sc-phases{ grid-template-columns:1fr; }
}
@media (max-width:640px){
  .sc-kpis{ grid-template-columns:1fr 1fr; }
  .sc-filter-grid{ grid-template-columns:1fr; }
}

/* QA trackers: extra sheet columns shown as chips under the expected result (Littera) */
.qa-meta-chips{ display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
.qa-meta-chips .qa-chip{ font-size:10.5px; padding:2px 8px; }

/* ---- School detail ---- */
.sd-back{ display:inline-block; font-size:13px; font-weight:600; color:var(--muted); text-decoration:none; margin-bottom:14px; }
.sd-back:hover{ color:var(--navy); }
.sd-header{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; margin-bottom:10px; }
.sd-header .h2-sub{ margin-bottom:8px; }
.sd-badges{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.sd-badges .sc-pct{ font-size:16px; }
.sd-tabs{ display:flex; gap:6px; flex-wrap:wrap; margin:18px 0 12px; }
.sd-tab{ font-family:inherit; font-size:13px; font-weight:600; padding:8px 14px; border-radius:20px; border:1.5px solid var(--border); background:var(--white); color:var(--muted); cursor:pointer; }
.sd-tab.active{ background:var(--navy); color:#fff; border-color:var(--navy); }
.sd-panel{ padding:18px 22px 22px; }
.sd-panel .hs-h4:first-child{ margin-top:0; }
.sd-phases{ grid-template-columns:repeat(3, 1fr); }
.sd-owner-tag{ font-style:normal; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(--primary-dark); background:var(--primary-soft); border-radius:6px; padding:1px 6px; margin-left:6px; }
.sd-step-select{ width:auto; font-size:11.5px; padding:3px 24px 3px 8px; border-radius:6px; }
/* full rail: 12 stops */
.jr-rail{ position:relative; display:flex; justify-content:space-between; align-items:flex-start; padding:10px 6px 0; margin:6px 0 4px; }
.jr-rail-track{ position:absolute; left:14px; right:14px; top:17px; height:4px; background:var(--border); border-radius:2px; }
.jr-rail-fill{ display:block; height:100%; background:var(--primary); border-radius:2px; transition:width .4s ease; }
.jr-stop{ position:relative; flex:1; min-width:0; text-align:center; font-size:10.5px; color:var(--muted); }
.jr-stop-dot{ display:flex; align-items:center; justify-content:center; width:14px; height:14px; border-radius:50%; background:var(--white); border:3px solid var(--border); margin:1px auto 6px; font-size:9px; font-style:normal; }
.jr-stop--done .jr-stop-dot{ background:var(--primary); border-color:var(--primary); }
.jr-stop--current{ color:var(--navy); font-weight:700; }
.jr-stop--current .jr-stop-dot{ width:20px; height:20px; margin-top:-2px; margin-bottom:3px; border:4px solid var(--primary); box-shadow:0 0 0 5px var(--primary-soft); }
.jr-stop--alert .jr-stop-dot{ border-style:dashed; border-color:rgba(209,72,58,0.5); }
.jr-stop--alert.jr-stop--current .jr-stop-dot{ border-style:solid; border-color:var(--red); box-shadow:0 0 0 5px var(--red-soft); }
.jr-stop--alert.jr-stop--current{ color:var(--red); }
.jr-stop--launch .jr-stop-dot{ font-size:10px; }
.jr-stop-label{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:0 2px; }
@media (max-width: 900px){
  .jr-stop-label{ display:none; }
  .jr-stop--current .jr-stop-label{ display:block; white-space:normal; }
  .sd-phases{ grid-template-columns:1fr; }
}

.sd-update-form{ display:flex; flex-direction:column; gap:8px; background:var(--paper); border:1px solid var(--border); border-radius:12px; padding:12px 14px; margin-bottom:6px; }
.sd-contact, .sd-access{ flex-direction:row !important; justify-content:space-between; align-items:center; gap:10px; }
.sd-contact > div, .sd-access > div{ display:flex; flex-direction:column; gap:1px; min-width:0; }
.sd-mini{ padding:6px 12px; font-size:12px; white-space:nowrap; }
.sd-feed-toolbar{ display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.sd-feed-filters{ display:flex; gap:6px; overflow-x:auto; padding:2px 2px 4px; scrollbar-width:none; flex:1; min-width:0; }
.sd-feed-filters::-webkit-scrollbar{ display:none; }
.sd-feed-filter-btn{ background:var(--white); border:1px solid var(--border); border-radius:20px; padding:4px 11px; font-size:11px; font-weight:600; color:var(--muted); cursor:pointer; display:inline-flex; align-items:center; gap:5px; transition:all 0.14s ease; white-space:nowrap; outline:none; }
.sd-feed-filter-btn:hover{ background:var(--navy-soft); color:var(--navy); border-color:rgba(12,31,61,0.2); }
.sd-feed-filter-btn.active{ background:var(--navy); color:#fff; border-color:var(--navy); }
.sd-feed-filter-count{ font-size:9.5px; font-weight:700; background:rgba(12,31,61,0.06); padding:1px 5px; border-radius:10px; }
.sd-feed-filter-btn.active .sd-feed-filter-count{ background:rgba(255,255,255,0.22); color:#fff; }

.sd-feed-date-filter-wrap{ display:inline-flex; align-items:center; gap:5px; background:var(--white); border:1px solid var(--border); border-radius:20px; padding:2px 8px 2px 10px; font-size:11px; color:var(--muted); transition:border-color 0.14s ease; flex-shrink:0; }
.sd-feed-date-filter-wrap:focus-within{ border-color:var(--primary); }
.sd-feed-date-icon{ font-size:11px; opacity:.8; }
.sd-feed-date-input{ border:none; background:transparent; font-family:inherit; font-size:11px; color:var(--ink); outline:none; cursor:pointer; padding:2px 0; }
.sd-feed-date-clear-btn{ background:none; border:none; font-size:11px; color:var(--muted); cursor:pointer; padding:2px 4px; border-radius:50%; line-height:1; display:inline-flex; align-items:center; justify-content:center; }
.sd-feed-date-clear-btn:hover{ color:var(--red); }

.sd-feed-empty-filter{ text-align:center; padding:20px 12px; background:var(--paper); border:1px dashed var(--border); border-radius:12px; margin-top:8px; font-size:12.5px; }

.sd-feed-date-divider{ display:flex; align-items:center; justify-content:center; margin:10px 0 4px; position:relative; width:100%; }
.sd-feed-date-divider::before{ content:''; position:absolute; left:0; right:0; height:1px; background:var(--border); z-index:1; }
.sd-feed-date-divider span{ position:relative; z-index:2; background:var(--paper); border:1px solid var(--border); border-radius:20px; padding:2px 10px; font-size:10px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }

.sd-feed{ display:flex; flex-direction:column; gap:8px; margin-top:6px; width:100%; }
.sd-feed-row{ display:flex; align-items:flex-end; gap:6px; width:100%; }
.sd-feed-row--incoming{ justify-content:flex-start; }
.sd-feed-row--outgoing{ justify-content:flex-end; }
.sd-feed-row--centered{ justify-content:center; }


.sd-feed-item{ position:relative; width:fit-content; max-width:min(640px, 84%); background:var(--white); border:1px solid var(--border); border-radius:12px; padding:8px 12px 9px; box-shadow:0 1px 2px rgba(12,31,61,0.03); cursor:pointer; transition:transform 0.12s cubic-bezier(0.16,1,0.3,1), box-shadow 0.12s ease, border-color 0.12s ease; outline:none; }
.sd-feed-item:hover, .sd-feed-item:focus-visible{ transform:translateY(-1.5px); box-shadow:0 4px 14px rgba(12,31,61,0.08); }
.sd-feed-item:focus-visible{ border-color:var(--primary); }
.sd-feed-item--incoming{ align-self:flex-start; border-radius:12px 12px 12px 2px; background:#ffffff; border-color:#e2e8f0; border-left:3.5px solid #0284c7; }
.sd-feed-item--outgoing{ align-self:flex-end; border-radius:12px 12px 2px 12px; background:#f7faff; border-color:#dbeafe; border-right:3.5px solid #2563eb; }
.sd-feed-item--centered{ align-self:center; max-width:min(640px, 92%); width:auto; border-radius:12px; }
.sd-feed-item--email-incoming{ background:#ffffff; border-color:#e0f2fe; border-left:3.5px solid #0284c7; }
.sd-feed-item--email-outgoing{ background:#f6f9ff; border-color:#dbeafe; border-right:3.5px solid #3b82f6; }
.sd-feed-item--update{ border-right:3.5px solid var(--primary); background:#fffcf8; border-color:#fed7aa; }
.sd-feed-item--meeting{ border-left:3.5px solid var(--gold); background:#fefce8; border-color:#fef08a; }
.sd-feed-item--note{ border-left:3.5px solid var(--muted); background:var(--paper); border:1px dashed var(--border); border-left:3.5px solid var(--muted); }
.sd-feed-item .hs-note-meta{ display:flex; align-items:center; gap:5px; flex-wrap:wrap; margin-bottom:2px; font-size:10.5px; color:var(--muted); line-height:1.2; }
.sd-feed-time{ font-size:10.5px; color:var(--muted); font-weight:500; }
.sd-feed-kind{ font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding:1.5px 6px; border-radius:10px; background:var(--navy-soft); color:var(--muted); display:inline-flex; align-items:center; gap:3px; line-height:1.2; }
.sd-feed-kind--incoming{ background:#f0f9ff; color:#0284c7; border:1px solid rgba(2,132,199,0.18); }
.sd-feed-kind--outgoing{ background:#eff6ff; color:#1d4ed8; border:1px solid rgba(37,99,235,0.18); }
.sd-feed-kind--update{ background:var(--primary-soft); color:var(--primary-dark); border:1px solid rgba(255,119,32,0.25); }
.sd-feed-kind--meeting{ background:#fef9c3; color:#854d0e; }
.sd-feed-kind--note{ background:var(--navy-soft); color:var(--navy); }
.sd-feed-meta-val{ font-size:9.5px; background:rgba(0,0,0,0.04); padding:1px 5px; border-radius:4px; font-family:monospace; }
.sd-feed-view-hint{ margin-left:auto; font-size:10px; font-weight:600; color:var(--muted); opacity:0.6; transition:opacity 0.12s ease, color 0.12s ease; white-space:nowrap; }
.sd-feed-item:hover .sd-feed-view-hint{ opacity:1; color:var(--primary); }
.sd-feed-item .sc-tl-title{ font-weight:600; font-size:12.5px; color:var(--navy); margin-bottom:2px; line-height:1.35; }
.sd-feed-item .hs-note-body{ white-space:pre-wrap; font-size:12px; line-height:1.45; color:var(--ink); overflow-wrap:anywhere; }
.sd-feed-drive-badge{ display:inline-flex; align-items:center; gap:4px; margin-top:5px; font-size:11px; font-weight:600; color:#0369a1; background:#f0f9ff; border:1px solid #bae6fd; border-radius:6px; padding:2px 7px; text-decoration:none; transition:background 0.12s ease; }
.sd-feed-drive-badge:hover{ background:#e0f2fe; text-decoration:underline; }
.sd-feed-more{ margin-top:4px; background:none; border:none; padding:0; color:var(--primary-dark); font:inherit; font-size:11.5px; font-weight:600; cursor:pointer; display:inline-block; }
.sd-feed-more:hover{ text-decoration:underline; }
.sd-feed-modal{ max-width:640px; width:95%; display:flex; flex-direction:column; gap:10px; padding:18px 22px 20px; border-radius:16px; }
.sd-feed-modal-header{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.sd-feed-modal-meta{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.sd-feed-modal-meta-tag{ font-size:11.5px; color:var(--muted); font-weight:500; }
.sd-feed-modal-title{ margin:0; font-size:16px; font-weight:700; color:var(--navy); line-height:1.35; border-bottom:1px solid var(--border); padding-bottom:8px; }
.sd-feed-modal-body{ max-height:55vh; overflow-y:auto; padding-right:2px; }
.sd-feed-modal-content{ font-family:inherit; font-size:13px; line-height:1.55; color:var(--ink); white-space:pre-wrap; word-break:break-word; background:var(--navy-soft); border:1px solid var(--border); border-radius:8px; padding:12px 14px; margin:0; }
.sd-feed-modal-actions{ margin-top:6px; border-top:1px solid var(--border); padding-top:10px; }
@media (max-width: 640px){ .sd-feed-filters{ gap:4px; } .sd-feed-item{ max-width:88%; padding:7px 10px; } .sd-feed-avatar{ width:22px; height:22px; font-size:9px; } .sd-feed-item--centered{ max-width:96%; } .sd-feed-item .sc-tl-title{ font-size:12px; } .sd-feed-item .hs-note-body{ font-size:11.5px; } .sd-feed-modal{ padding:14px 16px 16px; } .sd-feed-modal-title{ font-size:15px; } }
.sd-preview-toggle{ display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--muted); padding:8px 12px; border:1.5px solid var(--border); border-radius:24px; cursor:pointer; }
.sd-act-wrap{ grid-column:1 / -1; display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:4px; }
.sd-act[disabled]{ opacity:.55; cursor:not-allowed; }
.sd-rejected{ font-size:12px; color:var(--red); }
.sd-dialog .h3{ margin:0 0 12px; }
.sd-dialog-body{ display:flex; flex-direction:column; gap:10px; }
.sd-dialog-field{ display:flex; flex-direction:column; gap:4px; font-size:12.5px; }
.sd-dialog-field > span{ font-weight:700; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.05em; }
.sd-dialog-field input[type="file"]{ font-size:12.5px; }
.sd-tab-actions{ display:flex; justify-content:flex-end; margin-bottom:10px; }
.sd-file, .sd-ticket{ flex-direction:row !important; justify-content:space-between; align-items:center; gap:10px; }
.sd-file > div:first-child, .sd-ticket > div:first-child{ display:flex; flex-direction:column; gap:1px; min-width:0; }
.sd-file .sd-act-wrap, .sd-ticket .sd-act-wrap{ margin-top:0; justify-content:flex-end; }
.sd-ticket--closed b{ color:var(--muted) !important; }
.sd-ticket-body{ font-size:12px; white-space:pre-wrap; }
@media (max-width: 640px){ .sd-file, .sd-ticket{ flex-direction:column !important; align-items:stretch; } .sd-file .sd-act-wrap, .sd-ticket .sd-act-wrap{ justify-content:flex-start; } }
.sd-req{ flex-direction:row !important; justify-content:space-between; align-items:center; gap:10px; } .sd-req > div:first-child{ display:flex; flex-direction:column; gap:1px; min-width:0; } .sd-req .sd-act-wrap{ margin-top:0; }

/* ---------- Onboarding phases: batch save bar & modified select ---------- */
.sd-phases-save-bar{
  position:fixed; bottom:28px; left:50%; transform:translateX(-50%); z-index:95;
  display:inline-flex; align-items:center; gap:16px; background:var(--white);
  border:1.5px solid var(--primary); border-radius:14px; padding:10px 20px;
  box-shadow:0 12px 36px rgba(12,31,61,0.25), 0 0 0 1px rgba(255,119,32,0.15);
  animation:sdSlideUp 0.22s cubic-bezier(0.16,1,0.3,1); max-width:calc(100vw - 32px);
}
@keyframes sdSlideUp{ from{ opacity:0; transform:translate(-50%, 16px); } to{ opacity:1; transform:translate(-50%, 0); } }
.sd-phases-save-info{ display:flex; align-items:center; gap:8px; font-size:13px; font-weight:700; color:var(--primary-dark); white-space:nowrap; }
.sd-phases-save-dot{ width:8px; height:8px; border-radius:50%; background:var(--primary); display:inline-block; animation:sdPulse 1.5s infinite; flex-shrink:0; }
@keyframes sdPulse{ 0%{ transform:scale(0.9); opacity:0.7; } 50%{ transform:scale(1.3); opacity:1; } 100%{ transform:scale(0.9); opacity:0.7; } }
.sd-phases-save-actions{ display:flex; align-items:center; gap:8px; flex-shrink:0; }
.sd-step-select--modified{
  border-color:var(--primary) !important;
  background-color:rgba(255,119,32,0.08) !important;
  box-shadow:0 0 0 2px rgba(255,119,32,0.22);
  font-weight:700 !important;
  color:var(--primary-dark) !important;
  transition:all 0.15s ease;
}

/* ---------- Files tab: Papaya resources vs School uploads ---------- */
.sd-files-section{ margin-bottom:28px; }
.sd-files-section-header{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.sd-files-section-header .hs-h4{ margin:0 0 2px; }
.sd-files-section-sub{ font-size:12.5px; margin:0; }
.sd-files-papaya-card{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  background:var(--white); border:1px solid var(--border); border-radius:14px;
  padding:14px 18px; box-shadow:0 2px 8px rgba(12,31,61,0.04);
}
.sd-files-papaya-info{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.sd-files-papaya-info b{ font-size:13.5px; color:var(--navy); word-break:break-all; }
.sd-files-papaya-info span{ font-size:12px; color:var(--muted); }
.sd-files-papaya-act{ flex-shrink:0; }
.sd-files-empty{ padding:20px; text-align:center; background:var(--white); border:1px dashed var(--border); border-radius:12px; margin-top:8px; }
html[data-theme='dark'] .sd-phases-save-bar{ background:var(--navy-2); border-color:var(--primary); }
html[data-theme='dark'] .sd-files-papaya-card{ background:var(--navy-2); border-color:rgba(255,255,255,0.12); }
html[data-theme='dark'] .sd-files-papaya-info b{ color:#f8fafc; }
html[data-theme='dark'] .sd-files-empty{ background:var(--navy-2); border-color:rgba(255,255,255,0.12); }

/* ---------- Logs tab: Activity & Audit Trail ---------- */
.sd-logs-wrap{ display:flex; flex-direction:column; gap:14px; }
.sd-logs-header{ margin-bottom:4px; }
.sd-logs-header .hs-h4{ margin:0 0 2px; }
.sd-logs-toolbar{ margin-bottom:12px; }
.sd-logs-filters{ display:flex; flex-wrap:wrap; gap:6px; }
.sd-log-filter-btn{ background:var(--white); border:1px solid var(--border); border-radius:20px; padding:4px 11px; font-size:11px; font-weight:600; color:var(--muted); cursor:pointer; display:inline-flex; align-items:center; gap:5px; transition:all 0.14s ease; white-space:nowrap; outline:none; }
.sd-log-filter-btn:hover{ background:var(--navy-soft); color:var(--navy); border-color:rgba(12,31,61,0.2); }
.sd-log-filter-btn.active{ background:var(--navy); color:#fff; border-color:var(--navy); }
.sd-log-filter-count{ font-size:9.5px; font-weight:700; background:rgba(12,31,61,0.06); padding:1px 5px; border-radius:10px; }
.sd-log-filter-btn.active .sd-log-filter-count{ background:rgba(255,255,255,0.22); color:#fff; }
.sd-logs-list{ display:flex; flex-direction:column; gap:8px; list-style:none; padding:0; margin:0; }
.sd-log-item{
  background:var(--white); border:1px solid var(--border); border-radius:12px;
  padding:12px 16px; box-shadow:0 1px 3px rgba(12,31,61,0.03); transition:transform 0.12s ease, box-shadow 0.12s ease;
}
.sd-log-item:hover{ transform:translateY(-1px); box-shadow:0 4px 12px rgba(12,31,61,0.06); }
.sd-log-main{ display:flex; flex-direction:column; gap:4px; }
.sd-log-header{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.sd-log-badge{
  font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.04em;
  padding:2px 8px; border-radius:10px; background:var(--navy-soft); color:var(--navy);
  display:inline-flex; align-items:center; gap:4px; line-height:1.2;
}
.sd-log-badge--step{ background:rgba(255,119,32,0.12); color:var(--primary-dark); border:1px solid rgba(255,119,32,0.25); }
.sd-log-badge--update{ background:rgba(37,99,235,0.1); color:#2563eb; border:1px solid rgba(37,99,235,0.2); }
.sd-log-badge--file, .sd-log-badge--request{ background:rgba(2,132,199,0.1); color:#0284c7; border:1px solid rgba(2,132,199,0.2); }
.sd-log-badge--ticket{ background:rgba(209,72,58,0.1); color:var(--red); border:1px solid rgba(209,72,58,0.2); }
.sd-log-badge--meeting{ background:rgba(242,179,61,0.18); color:#854d0e; border:1px solid rgba(242,179,61,0.3); }
.sd-log-badge--field{ background:rgba(12,31,61,0.08); color:var(--navy); border:1px solid rgba(12,31,61,0.15); }
.sd-log-actor{ font-size:12px; color:var(--ink); }
.sd-log-time{ margin-left:auto; font-size:11.5px; color:var(--muted); font-weight:500; }
.sd-log-title{ font-size:13.5px; font-weight:600; color:var(--navy); line-height:1.4; }
.sd-log-details{ font-size:12px; color:var(--muted); white-space:pre-wrap; background:var(--navy-soft); border-radius:6px; padding:6px 10px; margin-top:2px; word-break:break-word; }
.sd-logs-empty{ padding:28px 16px; text-align:center; background:var(--white); border:1px dashed var(--border); border-radius:12px; }
html[data-theme='dark'] .sd-log-item{ background:var(--navy-2); border-color:rgba(255,255,255,0.12); }
html[data-theme='dark'] .sd-log-title{ color:#f8fafc; }
html[data-theme='dark'] .sd-log-details{ background:rgba(0,0,0,0.25); color:#94a3b8; }
html[data-theme='dark'] .sd-logs-empty{ background:var(--navy-2); border-color:rgba(255,255,255,0.12); }

.sd-log-badge--stage{ background:rgba(31,138,92,0.1); color:var(--green); border:1px solid rgba(31,138,92,0.2); }
.sd-log-badge--request_resolved{ background:rgba(2,132,199,0.1); color:#0284c7; border:1px solid rgba(2,132,199,0.2); }

/* ---------- FastAPI hub additions (2026-09-21): external Apps tabs, quick access cards, school chrome ---------- */
.quick-grid .quick-card{ display:flex; flex-direction:column; gap:6px; }
.quick-card .quick-who{ font-size:12.5px; }
.quick-card .quick-url{ font-size:11px; color:var(--muted); word-break:break-all; }
.pl-admin--school{ background:rgba(31,138,92,0.12); color:var(--green); }
.modal--wide{ max-width:720px; }
body.school-mode .topbar .brand small{ color:var(--primary); }
.doc-row-wrap{ position:relative; }
.doc-row-wrap .doc-del{ position:absolute; right:44px; top:50%; transform:translateY(-50%); opacity:0; }
.doc-row-wrap:hover .doc-del, .doc-row-wrap:focus-within .doc-del{ opacity:1; }
.meeting-by{ margin-top:10px; font-size:11.5px; color:var(--muted); }
body.school-mode .hs-subnav a[href="/hubspot"]{ display:none; }

/* ---------- KPIs (docs/kpi/HANDOFF-kpi-poc.md) ---------- */
.kpi-toolbar{ display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:8px; }
.kpi-legend{ display:flex; gap:6px; flex-wrap:wrap; }
.kpi-period{ font-size:12.5px; color:var(--muted); margin:0 0 18px; }
.kpi-badge{ display:inline-flex; align-items:center; font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; padding:4px 9px; border-radius:999px; white-space:nowrap; background:var(--navy-soft); color:var(--muted); }
.kpi-badge--sm{ font-size:9.5px; padding:2px 7px; }
.kpi-badge.dnm{ background:var(--red-soft); color:var(--red); }
.kpi-badge.app{ background:rgba(242,179,61,0.22); color:#8a6415; }
.kpi-badge.meets{ background:var(--green-soft); color:var(--green); }
.kpi-badge.masters{ background:rgba(49,94,251,0.12); color:#2a4fd6; }
.kpi-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; margin-bottom:26px; }
.kpi-card{ font-family:inherit; text-align:left; cursor:pointer; background:var(--white); border:1px solid var(--border); border-radius:14px; padding:16px 16px 14px; display:flex; flex-direction:column; gap:8px; position:relative; overflow:hidden; color:var(--ink); }
.kpi-card::before{ content:''; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--border); }
.kpi-card--dnm::before{ background:var(--red); }
.kpi-card--app::before{ background:var(--gold); }
.kpi-card--meets::before{ background:var(--green); }
.kpi-card--masters::before{ background:#2a4fd6; }
.kpi-card:hover{ border-color:var(--primary); }
.kpi-card--active{ border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft); }
.kpi-card-top{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.kpi-card-name{ font-size:15px; font-weight:700; color:var(--navy); }
.kpi-sheet{ font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); font-weight:600; }
.kpi-card-owner{ font-size:12.5px; color:var(--muted); }
.kpi-card-foot{ display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; font-size:12px; margin-top:auto; }
.kpi-ok{ color:var(--green); font-weight:600; }
.kpi-warn{ color:#8a6415; font-weight:600; }
.kpi-muted{ color:var(--muted); }
.kpi-dash{ color:var(--muted); opacity:.6; }
.kpi-scorecard{ margin-bottom:8px; }
.kpi-sc-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; margin-bottom:14px; }
.kpi-sc-title{ margin:0 0 4px; font-size:20px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; color:var(--navy); }
.kpi-sc-att{ font-size:13px; padding-top:22px; }
.kpi-table-wrap{ overflow:auto; border:1px solid var(--border); border-radius:12px; }
.kpi-table{ width:100%; border-collapse:collapse; font-size:12.5px; }
.kpi-table th{ font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); background:var(--paper); text-align:left; padding:9px 10px; border-bottom:1px solid var(--border); white-space:nowrap; }
.kpi-table td{ padding:9px 10px; border-bottom:1px solid var(--border); vertical-align:top; line-height:1.4; min-width:120px; }
.kpi-table tr:last-child td{ border-bottom:none; }
.kpi-table td.kpi-name{ font-weight:600; color:var(--navy); min-width:170px; }
.kpi-table td.kpi-actual{ white-space:nowrap; }
.kpi-when{ display:block; font-size:11px; color:var(--muted); font-weight:400; }
.kpi-demo{ font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--primary-dark); background:var(--primary-soft); padding:1px 6px; border-radius:999px; vertical-align:middle; }
.kpi-row--dnm td.kpi-name{ box-shadow:inset 3px 0 0 var(--red); }
.kpi-row--app td.kpi-name{ box-shadow:inset 3px 0 0 var(--gold); }
.kpi-history{ font-weight:400; font-size:11.5px; color:var(--muted); margin-top:4px; }
.kpi-history summary{ cursor:pointer; }
.kpi-history ul{ margin:6px 0 0; padding-left:16px; }
.kpi-table--compact th, .kpi-table--compact td{ padding:6px 8px; font-size:11.5px; }
.kpi-fw-role{ background:var(--paper); min-width:150px; }
.kpi-fw-role span{ display:block; font-size:11px; }
.kpi-alerts{ display:flex; flex-direction:column; gap:8px; margin-bottom:14px; }
.kpi-alert{ padding:10px 12px; border-left:4px solid var(--red); border-radius:8px; background:var(--paper); font-size:13px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.kpi-alert--app{ border-left-color:var(--gold); }
.kpi-alert-target{ font-size:12px; color:var(--muted); flex-basis:100%; }
.kpi-sources{ font-size:12.5px; color:var(--muted); margin-bottom:16px; }
.kpi-form{ border-top:1px dashed var(--border); padding-top:16px; }
.kpi-form-grid{ display:grid; grid-template-columns:2fr 1fr 1fr; gap:12px; margin-bottom:10px; }
.kpi-form-note{ grid-column:1 / -1; }
.kpi-readonly{ border-top:1px dashed var(--border); padding-top:14px; margin:0; font-size:12.5px; }
.kpi-questions{ margin-top:34px; padding:18px 22px; border:1px dashed var(--border); border-radius:14px; background:var(--white); font-size:13.5px; }
.kpi-questions ol{ margin:8px 0 0; padding-left:20px; }
.kpi-questions li{ margin-bottom:6px; }
html[data-theme='dark'] .kpi-badge.app, html[data-theme='dark'] .kpi-warn{ color:#e8c069; }
html[data-theme='dark'] .kpi-badge.masters{ color:#8fb4f0; background:rgba(143,180,240,0.16); }
html[data-theme='dark'] .kpi-card--masters::before{ background:#8fb4f0; }
html[data-theme='dark'] .kpi-table th, html[data-theme='dark'] .kpi-fw-role, html[data-theme='dark'] .kpi-alert{ background:rgba(255,255,255,0.04); }
@media (max-width: 900px){
  .kpi-grid{ grid-template-columns:1fr 1fr; }
  .kpi-form-grid{ grid-template-columns:1fr 1fr; }
}
@media (max-width: 600px){
  .kpi-grid{ grid-template-columns:1fr; }
  .kpi-form-grid{ grid-template-columns:1fr; }
  .kpi-sc-att{ padding-top:0; }
}
