/* Client portal styles. One file, no build step. Phone layout below 760px. */
:root {
  --ink: #15171C; --body: #3D424D; --muted: #5B616E; --faint: #9AA0AC; --line: #E3E5EA; --line-soft: #F0F1F4;
  --bg: #F4F5F7; --card: #FFFFFF; --accent: #2448C8; --accent-soft: #EEF2FD; --accent-line: #CFDAF8;
  --amber: #F2A33A; --amber-soft: #FFF4E3; --amber-ink: #7A4A06; --amber-line: #F5CF94;
  --green-soft: #E8F5EE; --green-ink: #14532D; --green: #15803D;
  --red-soft: #FDECEC; --red-ink: #7F1D1D; --red: #D92D20; --red-line: #F3C2C2;
  --purple-soft: #F3E8FF; --purple-ink: #5B21B6; --teal-soft: #E5F3EF; --teal-ink: #0F5E4C;
  --radius: 14px; --tabbar: 76px;
}

@media (max-width: 767px) {
  .task-view-switch { display: none !important; }
  .task-board-view { display: none !important; }
  .task-list-view.task-view-hidden { display: block !important; }
  .task-toolbar, .task-filters { align-items: stretch; flex-direction: column; }
  .task-filters .field { min-width: 0; width: 100%; }
  .task-row { flex-wrap: wrap; }
  .task-row > form:last-child { width: 100%; margin-left: 44px; }
  .task-row > form:last-child .btn { width: 100%; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
small, .small { font-size: 13px; }
.icon { flex: none; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 14px 0; }
.media-grid a { display: grid; gap: 6px; color: var(--ink); text-decoration: none; }
.media-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split > .main-col { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split > .side-col { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.inline { display: inline; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hide { display: none !important; }
.show-phone { display: none; }

/* ---------- pieces ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-grey { background: #EEF0F3; color: var(--body); }
.pill-green { background: var(--green-soft); color: var(--green-ink); }
.pill-amber { background: var(--amber-soft); color: var(--amber-ink); }
.amber { color: var(--amber-ink); }
.health-amber { color: var(--amber-ink); }
.health-red, .health-failed { color: var(--red); }
.pill-red { background: var(--red-soft); color: var(--red-ink); }
.pill-blue { background: var(--accent-soft); color: #1E3A8A; }
.pill-purple { background: var(--purple-soft); color: var(--purple-ink); }
.pill-dark { background: var(--ink); color: #fff; }
.source { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--amber); color: var(--ink); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; margin-left: auto; }
.avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.av-amber { background: var(--amber); color: var(--ink); } .av-purple { background: var(--purple-soft); color: var(--purple-ink); }
.av-green { background: var(--green-soft); color: var(--green-ink); } .av-blue { background: #E6ECFB; color: #1E3A8A; }
.av-pink { background: #FCE7F3; color: #9D174D; } .av-teal { background: var(--teal-soft); color: var(--teal-ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; border: 1px solid transparent; }
.btn-sm { min-height: 44px; padding: 0 12px; font-size: 14px; }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-secondary { background: #fff; color: var(--ink); border-color: #D3D6DD; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-soft { background: var(--accent-soft); color: #1E3A8A; border-color: var(--accent-line); }
.btn-danger { background: #fff; color: #B42318; border-color: var(--red-line); }
.btn-block { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .45; pointer-events: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card-head p { margin-top: 3px; font-size: 13px; }
.card-flat { background: #F7F8FA; border: 1px solid #EEF0F3; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.card-blue { background: var(--accent-soft); border-color: var(--accent-line); }
.card-amber { background: #FFF8EE; border-color: var(--amber-line); }
.card-turn { border: 2px solid var(--amber); }
.note { padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: #1E3A8A; font-size: 14px; }
.note-amber { background: #FFF8EE; border-color: var(--amber-line); color: var(--amber-ink); }
.note-red { background: var(--red-soft); border-color: var(--red-line); color: var(--red-ink); }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.flash { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.flash-ok { background: var(--green-soft); color: var(--green-ink); }
.flash-err { background: var(--red-soft); color: var(--red-ink); }
.dev-banner { background: #FFF4E3; color: var(--amber-ink); font-size: 12px; text-align: center; padding: 6px 12px; }
.progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.segbar { display: grid; gap: 4px; }
.segbar > span { height: 6px; border-radius: 999px; background: var(--line); }
.segbar > .done { background: var(--accent); } .segbar > .now { background: var(--amber); } .segbar > .late { background: var(--red); }
.kv { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 6px 14px; align-items: center; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.list-row:first-child { border-top: 0; }
.list-row .grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row strong { font-weight: 600; }
.tick { flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: #fff; border: 2px solid #C5C9D1; color: #fff; padding: 0; cursor: pointer; }
.tick.on { background: var(--accent); border-color: var(--accent); }
.tick[disabled] { cursor: default; }
button.tick { width: 44px; height: 44px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.check-row:first-child { border-top: 0; }
.check-row .who { font-size: 12px; color: var(--muted); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.table td { padding: 12px; border-top: 1px solid #EEF0F3; vertical-align: middle; }
.table-wrap { overflow-x: auto; margin: 0 -8px; }
.thumb { flex: none; width: 44px; height: 64px; border-radius: 8px; background: linear-gradient(160deg, #2A2F3A, #5B616E); display: grid; place-items: center; color: #fff; }
.platform-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; }
.pf-all { background: var(--ink); } .pf-instagram { background: linear-gradient(135deg, #F58529, #DD2A7B 55%, #8134AF); }
.pf-facebook { background: #1877F2; } .pf-tiktok { background: var(--ink); box-shadow: inset 2px 0 0 #25F4EE, inset -2px 0 0 #FE2C55; } .pf-linkedin { background: #0A66C2; }
.pf-youtube { background: #FF0000; } .pf-threads { background: #000; } .pf-x { background: #000; } .pf-pinterest { background: #E60023; }
.pf-bluesky { background: #0085FF; } .pf-google_business { background: #4285F4; } .pf-twitch { background: #9146FF; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; }
.hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #C5C9D1; border-radius: 10px; font: inherit; font-size: 15px; color: var(--ink); background: #fff; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid #9DB3F2; outline-offset: 1px; }
.switch { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 0; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); }
.switch-track { position: relative; width: 40px; height: 22px; border-radius: 999px; background: #C5C9D1; flex: none; }
.switch-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch-on .switch-track { background: var(--accent); } .switch-on .switch-knob { left: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid #D3D6DD; background: #fff; font: inherit; font-size: 14px; text-align: left; cursor: pointer; display: inline-flex; flex-direction: column; gap: 2px; color: var(--ink); }
.chip small { color: var(--muted); font-size: 12px; }
.chip.on { border: 2px solid var(--accent); background: var(--accent-soft); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.segmented { display: inline-flex; padding: 4px; gap: 4px; background: #E9EBEF; border-radius: 12px; }
.segmented a { min-height: 44px; padding: 0 16px; border-radius: 9px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.segmented a[aria-current] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(21, 23, 28, .12); }
.page-tabs { display:flex; gap:4px; overflow-x:auto; margin:0 -24px; padding:0 24px; border-bottom:1px solid var(--line); position:sticky; top:59px; z-index:19; background:var(--bg); }
.page-tabs a { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0 14px; border-bottom:3px solid transparent; color:var(--muted); font-size:14px; font-weight:600; text-decoration:none; white-space:nowrap; }
.page-tabs a[aria-current] { border-bottom-color:var(--accent); color:var(--ink); font-weight:700; }
.tab-count { min-width:20px; height:20px; padding:0 6px; border-radius:999px; display:inline-grid; place-items:center; background:var(--amber); color:var(--ink); font-size:12px; }
.pills-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.pills-nav a { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #D3D6DD; background: #fff; color: var(--ink); display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pills-nav a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- client layout ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: none; margin: 0; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--muted); font-size: 12px; }
.logo { width: 34px; height: 34px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.logo-light { background: #fff; color: var(--ink); }
.topbar-right { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.account { position: relative; }
.account summary, .switcher summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; justify-content: center; }
.account summary::-webkit-details-marker, .switcher summary::-webkit-details-marker { display: none; }
.account > div, .switcher > div { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-width: 240px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 8px 24px rgba(21,23,28,.12); z-index: 30; font-size: 14px; color: var(--ink); }
.account > div a, .switcher > div a { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; padding: 6px 0; }
.switcher { position: relative; font-size: 14px; color: var(--accent); }
.shell { max-width: none; margin: 0; display: flex; align-items: flex-start; }
.sidebar { flex: 0 0 260px; padding: 24px 12px 24px 24px; position: sticky; top: 59px; display: flex; flex-direction: column; gap: 12px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-item > span { display: flex; flex-direction: column; }
.nav-item small { font-size: 12px; font-weight: 400; color: var(--muted); }
.nav-item[aria-current] { background: var(--accent-soft); color: #1E3A8A; font-weight: 600; }
.nav-item:hover { background: #F4F5F7; }
.nav-locked { opacity: .5; }
.help-box { padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--body); display: flex; flex-direction: column; gap: 4px; }
.content { flex: 1 1 auto; min-width: 0; padding: 28px 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.page-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-title p { margin-top: 6px; color: var(--body); font-size: 16px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tabbar { display: none; }
.phone-back { display: none; }
.sticky-cta { display: none; }

/* journey */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.journey li { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 10px; background: #F7F8FA; border: 1px solid #EEF0F3; }
.journey li.now { background: var(--amber-soft); border: 2px solid var(--amber); }
.journey li.done { background: #fff; }
.journey a { color: inherit; text-decoration: none; }
.dot { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.dot-done { background: var(--accent); color: #fff; } .dot-now { background: var(--amber); color: var(--ink); } .dot-todo { background: #EEF0F3; color: var(--body); }
.turn-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; background: #FFF8EE; border: 1px solid var(--amber-line); }
.turn-card .grow { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.timeline-v { list-style: none; margin: 0; padding: 0; }
.timeline-v li { display: flex; gap: 12px; }
.timeline-v .rail { display: flex; flex-direction: column; align-items: center; }
.timeline-v .rail::after { content: ''; flex: 1 1 auto; width: 2px; min-height: 18px; background: var(--line); margin: 4px 0; }
.timeline-v li:last-child .rail::after { display: none; }
.timeline-v .txt { padding-bottom: 14px; }

/* hero result */
.hero { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.hero-big { font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.hero-text { font-size: 20px; font-weight: 600; color: var(--body); }
.hero-compare { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid #EEF0F3; font-size: 13px; font-weight: 600; }
.up { color: var(--green); } .down { color: #B45309; } .flat { color: var(--body); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi strong { font-size: 28px; line-height: 1.1; }
.kpi span:first-child { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi span:last-child { font-size: 13px; color: var(--body); }
.bars { position: relative; height: 220px; display: grid; gap: 12px; align-items: end; border-bottom: 1px solid #C5C9D1; padding: 28px 6px 0; }
.bars .bar { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bars .bar span.fill { display: block; width: 100%; max-width: 56px; border-radius: 4px 4px 0 0; }
.bars .bar .tip { position: absolute; left: 50%; transform: translateX(-50%); padding: 3px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; display: none; }
.bars .bar:hover .tip, .bars .bar:focus .tip, .bars .bar.show .tip { display: block; }
.bar-labels { display: grid; gap: 12px; padding: 0 6px; text-align: center; font-size: 12px; color: var(--muted); }
.fill-before { background: #B8BDC7; } .fill-with { background: var(--accent); } .fill-live { background: repeating-linear-gradient(135deg, var(--accent) 0 6px, #8FA3E6 6px 9px); }
.faded { opacity: .25; }
.platforms { display: grid; grid-template-columns: repeat(auto-fill, 76px); gap: 6px; flex: 1 1 auto; min-width: 0; }
.pf-name { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platforms a, .platforms span.pfx { position: relative; border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; font-size: 12px; font-weight: 600; color: var(--muted); }
.platforms a[aria-current] { background: #fff; box-shadow: 0 0 0 2px var(--ink); color: var(--ink); font-weight: 700; }
.platforms .off { filter: grayscale(1); opacity: .4; }
.platforms .alert { position: absolute; top: 4px; right: calc(50% - 28px); width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper a, .stepper span.disabled { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #D3D6DD; background: #fff; display: grid; place-items: center; color: var(--ink); }
.stepper span.disabled { opacity: .35; }
.stepper strong { min-width: 130px; text-align: center; font-size: 14px; }

/* calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head > span { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--muted); background: #F7F8FA; border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 104px; padding: 6px; border-right: 1px solid #EEF0F3; border-bottom: 1px solid #EEF0F3; display: flex; flex-direction: column; gap: 4px; min-width: 0; text-decoration: none; color: var(--ink); background: #fff; }
.cal-cell.blank { background: #FAFAFB; }
.cal-cell.sel { background: #F2F5FE; box-shadow: inset 0 0 0 2px var(--accent); }
.cal-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.cal-cell.today .cal-num { background: var(--accent); color: #fff; }
.cal-chip { display: block; padding: 3px 6px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-dots { display: none; gap: 3px; height: 5px; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; }
.k-you { background: var(--amber-soft); color: var(--amber-ink); } .k-team { background: var(--accent-soft); color: #1E3A8A; }
.k-call { background: var(--purple-soft); color: var(--purple-ink); } .k-post { background: var(--teal-soft); color: var(--teal-ink); } .k-internal { background: #EEF0F3; color: var(--body); }
.c-you { background: var(--amber); } .c-team { background: var(--accent); } .c-call { background: #7C3AED; } .c-post { background: #0F766E; } .c-internal { background: #9AA0AC; }
.gantt-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: center; min-height: 48px; border-bottom: 1px solid var(--line-soft); }
.gantt-track { position: relative; height: 48px; }
.gantt-track .bar { position: absolute; top: 14px; height: 20px; border-radius: 6px; }
.gantt-track .ms { position: absolute; top: 17px; width: 14px; height: 14px; margin-left: -7px; transform: rotate(45deg); border-radius: 2px; }
.gantt-track .today, .gantt-head .today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); z-index: 1; }
.gantt-track .wk { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-soft); }
.gantt-head { position: relative; height: 34px; }
.gantt-head span { position: absolute; font-size: 11px; color: var(--muted); white-space: nowrap; padding-left: 4px; border-left: 1px solid #D3D6DD; bottom: 0; }
.gantt-head b { position: absolute; top: 0; font-size: 12px; }
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.board-col { background: #EDEFF2; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.board-col h3 { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px 2px; border-top: 3px solid transparent; font-size: 14px; }
.board-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.task-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.task-filters { display: flex; gap: 12px; align-items: end; }
.task-filters .field { min-width: 190px; }
.task-view-hidden { display: none; }
.task-row { gap: 12px; }
.task-row-link { min-width: 0; color: inherit; }
.task-row-link strong, .task-row-link span { display: block; }
.task-row .tick { cursor: pointer; color: transparent; }
.task-row .tick:hover, .task-row .tick:focus-visible { color: var(--accent); }
.task-add { position: relative; }
.task-add > summary { list-style: none; cursor: pointer; }
.task-add > summary::-webkit-details-marker { display: none; }
.task-add > form { position: absolute; z-index: 5; right: 0; width: min(340px, calc(100vw - 48px)); background: var(--surface); box-shadow: var(--shadow); }
.task-board { grid-template-columns: repeat(4, minmax(220px, 1fr)); overflow-x: auto; }
.task-board-column { min-height: 220px; }
.task-board-column.task-drop-active { outline: 2px solid var(--accent); outline-offset: 2px; }
.task-board-card[draggable="true"] { cursor: grab; }
.task-board-card.task-dragging { opacity: .45; }
.task-status-submit { margin-top: 8px; }

/* messages */
.thread { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; }
.msg.mine { flex-direction: row-reverse; }
.msg .bubble-wrap { max-width: 75%; display: flex; flex-direction: column; gap: 4px; }
.msg.mine .bubble-wrap { align-items: flex-end; }
.bubble { padding: 10px 14px; border-radius: 14px; background: #F4F5F7; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--ink); color: #fff; }
.msg.internal .bubble { background: #FFF8EE; border: 1px dashed var(--amber-line); color: var(--amber-ink); }
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr) 280px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-height: 640px; }
.inbox-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 80vh; }
.inbox-item { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); }
.inbox-item[aria-current] { background: var(--accent-soft); }
.inbox-main { display: flex; flex-direction: column; min-width: 0; }
.inbox-side { border-left: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; }

/* team layout */
.team-top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.wrap { max-width: none; margin: 0; padding: 0 24px; }
.team-top-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; }
.team-nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; }
.team-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; color: #C9CCD3; text-decoration: none; }
.team-nav a[aria-current] { background: #2B2E36; color: #fff; font-weight: 600; }
.team-nav .badge { margin-left: 2px; }
.team-shell { display:flex; align-items:flex-start; min-height:calc(100vh - 59px); }
.team-sidebar { flex:0 0 260px; min-height:calc(100vh - 59px); padding:20px 12px 24px 24px; position:sticky; top:59px; display:flex; flex-direction:column; gap:12px; background:#fff; border-right:1px solid var(--line); }
.team-side-nav { display:flex; flex-direction:column; gap:2px; }
.team-side-nav a { display:flex; align-items:center; gap:10px; min-height:44px; padding:8px 10px; border-radius:9px; color:var(--ink); text-decoration:none; font-size:14px; font-weight:600; }
.team-side-nav a[aria-current] { background:var(--accent-soft); color:#1E3A8A; }
.context-switch { position:relative; }
.context-switch summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:9px; min-height:48px; padding:7px 9px; border:1px solid var(--line); border-radius:10px; font-weight:700; }
.context-switch summary::-webkit-details-marker { display:none; }
.context-switch summary .icon { margin-left:auto; }
.context-menu { position:absolute; z-index:35; top:calc(100% + 8px); left:0; width:300px; max-height:min(480px,70vh); overflow:auto; padding:10px; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:0 12px 28px rgba(21,23,28,.18); }
.context-menu a { display:flex; align-items:center; gap:9px; padding:9px 8px; border-radius:8px; color:var(--ink); text-decoration:none; font-size:14px; }
.context-menu a:hover { background:#F4F5F7; }
.context-search { display:block; margin-bottom:6px; }
.context-search input { min-height:44px; }
.context-agency { font-weight:700; color:var(--accent, #3b3fb6); border-bottom:1px solid var(--line); margin-bottom:4px; padding-bottom:10px; }
.client-logo.sm { width:28px; height:28px; font-size:10px; }
.context-dot { width:8px; height:8px; margin-left:auto; border-radius:50%; }
.status-good { background:var(--green); }.status-waiting { background:var(--amber); }.status-overdue { background:var(--red); }
.team-main { flex:1 1 auto; min-width:0; padding:28px 32px 64px; }
.account-dark summary { color: #C9CCD3; font-size: 14px; }
.client-bar { background: #fff; border-bottom: 1px solid var(--line); }
.client-bar .wrap { padding-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.crumb { font-size: 13px; font-weight: 600; text-decoration: none; }
.client-bar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.client-id { display: flex; align-items: center; gap: 14px; }
.client-id h1 { font-size: 24px; }
.client-id p { font-size: 13px; margin-top: 2px; }
.client-logo { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: #1E3A8A; display: grid; place-items: center; font-weight: 800; }
.client-tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: -1px; }
.client-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; text-decoration: none; font-size: 14px; white-space: nowrap; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; }
.client-tabs a[aria-current] { border-bottom-color: var(--accent); color: var(--ink); font-weight: 700; }
.team-main { padding-top: 24px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 20px; }
.step-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.step-card.current { border: 2px solid var(--amber); }
.legend { display: flex; flex-wrap: wrap; gap: 18px; }

/* auth */
.auth-body { background: var(--bg); }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.code-input { letter-spacing: .4em; font-size: 24px !important; text-align: center; font-weight: 700; }

/* questionnaire */
.q-block { display: flex; flex-direction: column; gap: 10px; padding-bottom: 22px; border-bottom: 1px solid var(--line-soft); }
.q-block:last-of-type { border-bottom: 0; }
.q-title { font-size: 16px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.scale { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.scale .chip { width: 48px; height: 48px; border-radius: 50%; align-items: center; justify-content: center; padding: 0; font-weight: 600; }
.q-error { color: var(--red-ink); font-size: 13px; font-weight: 600; }
.q-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 8px; }
.q-nav.show-phone { display: none; }

@media print {
  .topbar, .sidebar, .tabbar, .dev-banner, .no-print, .team-top, .client-bar { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; }
  .card, .kpi, .hero { break-inside: avoid; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .page-tabs { margin:0 -16px; padding:0 16px; top:60px; background:var(--bg); }
  body { font-size: 15px; }
  h1 { font-size: 23px; }
  .hide-phone { display: none !important; }
  .show-phone { display: initial; }
  .topbar-inner { padding: 10px 12px 10px 16px; min-height: 60px; }
  .brand .logo { display: none; }
  .phone-back { display: grid; place-items: center; width: 40px; height: 44px; margin-left: -8px; color: var(--ink); }
  .brand-text strong { font-size: 16px; }
  .shell { display: block; }
  .sidebar { display: none; }
  .content { padding: 16px 16px calc(var(--tabbar) + 28px); gap: 14px; }
  body.has-sticky .content { padding-bottom: calc(var(--tabbar) + 100px); }
  .page-title p { font-size: 15px; }
  body.dup .page-title h1 { display: none; }
  .card { padding: 16px; border-radius: 16px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabbar); padding: 6px 4px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); z-index: 25; }
  .tabbar-team { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; font-size: 11px; font-weight: 600; color: var(--muted); }
  .tabbar a[aria-current] { color: var(--accent); }
  .tab-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--amber); color: var(--ink); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
  .sticky-cta { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: var(--tabbar); padding: 12px 16px; background: #fff; border-top: 1px solid var(--line); z-index: 24; }
  .sticky-cta .btn { flex: 1 1 auto; min-height: 52px; font-size: 16px; }
  .sticky-cta .btn-icon { flex: none; width: 52px; padding: 0; }
  .btn { min-height: 48px; }
  .journey { grid-template-columns: 1fr; }
  .turn-card .btn { width: 100%; }
  .kv { grid-template-columns: 1fr; }
  .check-row { flex-wrap: wrap; }
  .check-row > .btn, .check-row > form { margin-left: 32px; }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi strong { font-size: 22px; }
  .hero { padding: 16px; }
  .hero-big { font-size: 40px; }
  .hero-text { font-size: 16px; }
  .bars { height: 150px; gap: 5px; }
  .bar-labels { gap: 5px; font-size: 11px; }
  .platforms { grid-template-columns: repeat(6, minmax(0, 1fr)); background: #fff; border-radius: 16px; padding: 8px 6px; }
  .platforms .platform-badge { width: 40px; height: 40px; font-size: 12px; }
  .pf-name { font-size: 11px; max-width: 54px; }
  .pills-nav { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; }
  .segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .segmented a { justify-content: center; padding: 0 8px; }
  .cal-head > span { text-align: center; padding: 4px 0; background: none; border: 0; }
  .cal-cell { min-height: 50px; padding: 2px; align-items: center; justify-content: center; border: 0; background: none; }
  .cal-cell.blank { background: none; }
  .cal-cell.sel { box-shadow: none; background: none; }
  .cal-cell.sel .cal-num { background: var(--ink); color: #fff; }
  .cal-cell.today:not(.sel) .cal-num { background: none; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
  .cal-num { width: 34px; height: 34px; font-size: 15px; font-weight: 500; }
  .cal-chip, .cal-more { display: none !important; }
  .cal-dots { display: flex; }
  .gantt-row { grid-template-columns: 1fr; padding: 8px 0; }
  .gantt-track { height: 18px; background: #F7F8FA; border-radius: 4px; }
  .gantt-track .bar { top: 3px; height: 12px; }
  .gantt-track .ms { top: 4px; width: 10px; height: 10px; margin-left: -5px; }
  .gantt-head span:nth-of-type(even) { display: none; }
  .board { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 8px; }
  .board-col { flex: none; width: 300px; scroll-snap-align: start; }
  .inbox { grid-template-columns: 1fr; min-height: 0; }
  .inbox-list { border-right: 0; max-height: none; }
  .inbox.has-thread .inbox-list { display: none; }
  .inbox:not(.has-thread) .inbox-main, .inbox:not(.has-thread) .inbox-side { display: none; }
  .inbox-side { border-left: 0; border-top: 1px solid var(--line); }
  .team-top-inner { padding: 10px 16px; }
  .team-nav { display: none; }
  .team-shell { display:block; }
  .team-sidebar { position:static; min-height:0; padding:10px 16px; border-right:0; border-bottom:1px solid var(--line); }
  .team-side-nav { display:none; }
  .team-side-nav:target { display:flex; margin-top:8px; }
  .team-side-nav:target a { min-height:48px; font-size:16px; }
  .context-switch summary { background:#fff; }
  .context-menu { position:fixed; top:64px; left:12px; right:12px; width:auto; max-height:calc(100vh - 160px); }
  .team-main { padding:16px 16px calc(var(--tabbar) + 28px); }
  .wrap { padding: 0 16px; }
  .team-main { padding-bottom: calc(var(--tabbar) + 28px); }
  .client-bar-row .row { display: none; }
  .split > .main-col, .split > .side-col { flex-basis: 100%; }
  .table-wrap { margin: 0 -16px; padding: 0 8px; }
  .msg .bubble-wrap { max-width: 85%; }
  .q-nav { position: fixed; left: 0; right: 0; bottom: var(--tabbar); background: #fff; border-top: 1px solid var(--line); padding: 12px 16px; z-index: 24; }
  .q-nav.show-phone { display: flex; }
  .q-nav .btn { flex: 1 1 0; }
  .q-phone-one .q-block { display: none !important; }
  .q-phone-one .q-block.active { display: flex !important; }
  .q-phone-one .q-block.active { display: flex; border: 0; }
  .q-phone-one .chips { flex-direction: column; }
  .q-phone-one .chips .chip { width: 100%; min-height: 56px; }
  .q-phone-one .q-title { font-size: 21px; }
}

/* ---------- Record tab ---------- */
.tabbar a.tab-record { color: var(--ink); }
.tabbar a.tab-record .record-dot { width: 52px; height: 52px; margin-top: -22px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(217, 45, 32, .35); border: 4px solid #fff; }
.tabbar a.tab-record[aria-current] .record-dot { background: #B42318; }

/* ---------- Recorder (full screen) ---------- */
.rec-body { background: #000; color: #fff; overscroll-behavior: none; }
.rec { position: fixed; inset: 0; overflow: hidden; background: #000; font-family: Inter, "Segoe UI", system-ui, sans-serif; }
.rec-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #111; }
.rec-preview.mirror { transform: scaleX(-1); }
.rec-voice-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, #2B2F3A, #000 70%); }
.rec-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 10px 10px; background: linear-gradient(rgba(0,0,0,.6), transparent); z-index: 3; }
.rec-icon { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.35); border: 0; border-radius: 50%; cursor: pointer; text-decoration: none; }
.rec-title { flex: 1 1 auto; min-width: 0; text-align: center; display: flex; flex-direction: column; }
.rec-title strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-title span { font-size: 12px; color: #C9CCD3; }
.prompter { position: absolute; top: calc(64px + env(safe-area-inset-top)); left: 0; right: 0; height: 36vh; overflow: hidden; z-index: 2; background: linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,.45)); cursor: pointer;
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.prompter-text { padding: 18px 22px 40vh; font-size: 30px; line-height: 1.35; font-weight: 700; text-align: center; will-change: transform; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.prompter-text p { margin: 0 0 .6em; }
.rec-tip { position: absolute; top: calc(76px + env(safe-area-inset-top)); left: 16px; right: 16px; z-index: 2; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.55); font-size: 15px; text-align: center; }
.rec-countdown { position: absolute; inset: 0; display: grid; place-items: center; font-size: 120px; font-weight: 800; z-index: 5; background: rgba(0,0,0,.25); }
.rec-panel { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.75) 35%); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.rec-adjust { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #C9CCD3; }
.rec-adjust button { min-width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.35); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.rec-adjust b { min-width: 18px; text-align: center; color: #fff; }
.rec-adjust span:nth-of-type(2) { margin-left: 10px; }
.rec-row { width: 100%; max-width: 420px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; }
.rec-btn { width: 78px; height: 78px; border-radius: 50%; border: 5px solid #fff; background: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; }
.rec-btn span { width: 60px; height: 60px; border-radius: 50%; background: var(--red); transition: all .15s; }
.rec.is-recording .rec-btn span { width: 30px; height: 30px; border-radius: 8px; }
.rec.is-recording .rec-time:first-child { color: #FF6B60; }
.rec.is-recording .rec-adjust { opacity: .85; }
.rec-hint { margin: 0; font-size: 13px; color: #C9CCD3; text-align: center; }
.rec-review { position: absolute; inset: 0; z-index: 6; background: #000; display: flex; flex-direction: column; }
.rec-review video { flex: 1 1 auto; min-height: 0; width: 100%; object-fit: contain; background: #000; }
.rec-review-bar { padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; align-items: center; background: #15171C; }
.rec-review-bar .row { width: 100%; max-width: 480px; }
.rec-review-bar .btn { flex: 1 1 0; }
.rec-review-bar .progress { width: 100%; max-width: 480px; background: #3D424D; }
.rec-error { position: absolute; inset: 0; z-index: 7; background: #15171C; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.rec-error p { color: #C9CCD3; max-width: 420px; }
.rec-error .btn { width: 100%; max-width: 360px; }
.prompt-box { white-space:pre-wrap; overflow-wrap:anywhere; padding:16px; border-radius:10px; background:#F4F5F7; border:1px solid var(--line); font:14px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.dev-login-banner { min-height:44px; padding:9px 18px; display:flex; align-items:center; justify-content:center; gap:18px; position:relative; z-index:1000; color:#352900; background:#FFD84D; border-bottom:1px solid #D5AE13; font-size:14px; }
.dev-login-banner a { color:#352900; font-weight:700; }
.dev-page-card { max-width:760px; margin:0 auto; }
.dev-people-list, .dev-email-list { display:grid; gap:12px; margin:24px 0; }
.dev-person-row { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.dev-email h2 { margin-bottom:6px; font-size:18px; }
.dev-email pre { margin:12px 0 0; padding:14px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; border-radius:8px; background:#F4F5F7; font:13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.learning-mode { display:grid; grid-template-columns:minmax(0, 1.15fr) minmax(320px, .85fr); gap:20px; align-items:start; }
.learning-lesson { min-width:0; }
.learning-workspace { position:sticky; top:130px; min-width:0; }
.learning-workspace > summary { min-height:44px; display:flex; align-items:center; padding:10px 14px; border:1px solid var(--line); border-radius:10px; background:#fff; font-weight:700; cursor:pointer; }
.learning-workspace[open] > summary { margin-bottom:12px; }
@media (min-width: 761px) {
  .rec-preview { object-fit: contain; }
  .prompter { left: 50%; right: auto; width: 640px; transform: translateX(-50%); border-radius: 0 0 16px 16px; }
}
@media (max-width: 760px) {
  .dev-login-banner { justify-content:space-between; }
  .dev-person-row { align-items:flex-start; flex-direction:column; }
  .dev-person-row .btn { width:100%; }
  .learning-mode { display:block; }
  .learning-workspace { position:static; margin-top:16px; }
}
