:root {
  color-scheme:light; --ink:#242521; --muted:#61635c; --paper:#f7f7f4; --line:#e1e2dc;
  --accent:#ffcc00; --accent-pressed:#ffd600; --pale:#fff2cc; --cyan:#4285f4;
  --link:#414740; --table-head:#f2f3ef; --table-line:#d8dbd3;
  --chart-1:#eabb00; --chart-2:#4285f4; --chart-3:#171716; --chart-grid:#e4e4e1; --chart-text:#56565b;
  --good:#146343; --bad:#a42f20;
  font:16px/1.45 Inter,"Segoe UI",Arial,sans-serif; color:var(--ink); background:var(--paper);
}
* {box-sizing:border-box}
body {margin:0; min-width:300px}
h1,h2,h3,p {margin:0}
h1 {font-size:clamp(1.9rem,3vw,2.85rem); line-height:1.1; font-weight:700; letter-spacing:-.04em}
h2 {font-size:clamp(1.12rem,1.45vw,1.45rem); font-weight:650; line-height:1.3; letter-spacing:-.025em}
h3 {font-size:1rem}
button,input,select,textarea {font:inherit; color:inherit}
button,select {cursor:pointer}
button {display:inline-flex; align-items:center; justify-content:center; gap:.45rem; border:1px solid #cacac7; border-radius:.65rem; background:white; min-height:2.5rem; padding:.5rem .92rem; font-size:.875rem; font-weight:630}
button:hover {background:#f3f3f1; border-color:#8d8d88}
button.primary {color:#111; background:var(--accent); border-color:var(--accent)}
button.primary:hover {background:var(--accent-pressed)}
button.danger {color:var(--bad)}
button:disabled {opacity:.5; cursor:default}
:focus-visible {outline:3px solid #247ca8; outline-offset:3px}
input,select,textarea {width:100%; min-width:0; border:1px solid #c8c8c4; border-radius:.6rem; background:#fff; min-height:2.6rem; padding:.5rem .7rem}
textarea {resize:vertical; min-height:5.25rem}
select {appearance:none; padding-right:2rem; background-image:linear-gradient(45deg,transparent 50%,#565652 50%),linear-gradient(135deg,#565652 50%,transparent 50%); background-position:calc(100% - .96rem) 51%,calc(100% - .66rem) 51%; background-size:.3rem .3rem; background-repeat:no-repeat}
input[type=checkbox] {flex:none; width:1.1rem; height:1.1rem; min-height:0; accent-color:#222}
input[type=month],.budget-item strong,.chart-total,table {font-variant-numeric:tabular-nums}
small,.sub {color:var(--muted); font-size:.875rem}
.initial {padding:2rem}
.shell {display:grid; grid-template-columns:clamp(12rem,16vw,15rem) minmax(0,1fr); min-height:100vh}
.sidebar {position:sticky; top:0; height:100dvh; align-self:start; display:flex; flex-direction:column; gap:1.65rem; padding:1.65rem .95rem 1rem; border-right:1px solid var(--line); background:#fff; overflow:auto}
.brand {display:inline-flex; gap:.65rem; align-items:center; font-size:1.6rem; font-weight:850; letter-spacing:-.06em; line-height:1}
.sidebar .brand {padding-inline:.4rem; margin-bottom:.55rem}
.mark {display:inline-flex; align-items:flex-end; justify-content:center; gap:2px; width:2.15rem; height:2.15rem; border-radius:.64rem; color:#111; background:var(--accent); padding:.48rem .36rem; flex-shrink:0}
.mark i {width:.24rem; background:currentColor; transform:skewY(-10deg); height:42%}
.mark i:nth-child(2) {height:70%} .mark i:nth-child(3) {height:100%}
.side-label,.overline {font-size:.78rem; font-weight:730; color:var(--muted)}
.side-label {margin:0 0 .4rem .3rem}
.side-field select {font-size:.9rem; font-weight:600}
.project-picker {position:relative}
.project-picker summary {display:flex;align-items:center;justify-content:space-between;gap:.5rem;cursor:pointer;list-style:none;font-size:.9rem;font-weight:600;border:1px solid var(--line);border-radius:.6rem;background:#fff;padding:.6rem .75rem;overflow-wrap:anywhere}
.project-picker summary::-webkit-details-marker {display:none}
.project-picker summary::after {content:"";width:.45rem;height:.45rem;border:solid #66695e;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);flex:none}
.project-picker-menu {position:absolute;top:calc(100% + .25rem);left:0;right:0;z-index:6;padding:.45rem;background:#fff;border:1px solid var(--line);border-radius:.6rem;box-shadow:0 5px 20px #24252116}
.project-picker-menu input {min-height:2.1rem;font-size:.85rem}
.project-choices {max-height:min(32vh,19rem);overflow:auto}
.project-choices button {display:block;width:100%;text-align:left;min-height:2.1rem;padding:.35rem .45rem;border:0;font-weight:500;overflow-wrap:anywhere}
.project-choices button[aria-current] {background:#f1f2ed;font-weight:650}
.project-picker-menu>.link-button {margin:.3rem;font-size:.82rem}
.nav {display:grid; gap:.32rem}
.nav button {justify-content:flex-start; gap:.72rem; border-color:transparent; padding:.62rem .78rem; color:#4c4c4d}
.nav button.active {color:#423817; background:#fff2bf}
.nav button.active:hover {background:#f9e9a7}
.icon {width:1.1rem; text-align:center}
.account {display:grid; grid-template-columns:2rem minmax(0,1fr) auto; align-items:center; gap:.5rem; margin-top:auto; border-top:1px solid var(--line); padding-top:.9rem}
.avatar {width:2rem; height:2rem; display:grid; place-items:center; background:#111; color:#fff; border-radius:50%; font-weight:650}
.account strong,.account small {display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.8rem}
.account small {font-size:.76rem}
.account button {padding:.25rem .4rem; min-height:1.85rem; font-size:.77rem}
.main,.content,.panel {min-width:0}
.topbar,.sectionhead,.buttonrow,.tools,.scope-controls,.filter-bar,.pagehead,.selection-actions {display:flex; align-items:center; flex-wrap:wrap; gap:.7rem}
.topbar {min-height:3.35rem; padding:.6rem clamp(1rem,2.8vw,3rem); justify-content:space-between; border-bottom:1px solid var(--line); font-size:.86rem; color:var(--muted); background:#fff}
.crumb {min-width:0; display:flex; align-items:center; gap:.6rem}
.crumb strong {color:#191919; overflow-wrap:anywhere}
.management-switch {display:inline-flex;align-items:center;gap:.55rem;cursor:pointer;color:var(--ink);font-weight:650;min-height:2rem}
.topbar .crumb {margin-right:auto}
.layout-link {color:var(--muted);font-size:.82rem;text-decoration:underline;text-underline-offset:.2em}
.layout-link:hover {color:var(--ink)}
.management-switch input[type=checkbox] {appearance:none;position:relative;width:2.45rem;height:1.4rem;margin:0;padding:0;border:1px solid #777;border-radius:1rem;background:#777;cursor:pointer}
.management-switch input::before {content:"";position:absolute;top:2px;left:2px;width:calc(1.4rem - 6px);height:calc(1.4rem - 6px);border-radius:50%;background:white}
.management-switch input:checked {border-color:#ac8700;background:var(--accent)}
.management-switch input:checked::before {left:auto;right:2px;background:var(--ink)}
@media(forced-colors:active) {
 .management-switch input[type=checkbox] {appearance:auto}
 .management-switch input::before {display:none}
}
.content {max-width:104rem; margin:auto; padding:1.75rem clamp(.9rem,2.7vw,3rem) 3rem; display:grid; grid-template-columns:minmax(0,1fr); align-content:start; gap:1.15rem}
.overline {margin-bottom:.48rem; letter-spacing:.025em}
.pagehead,.sectionhead {justify-content:space-between}
.tools,.filter-bar {align-items:flex-end}
.filter-bar {justify-content:space-between; row-gap:.75rem}
.tools label {min-width:8.8rem; max-width:19rem}
.vat-switch {min-width:0;margin:0;padding:0;border:0}
.vat-switch legend {padding:0;margin:0 0 .28rem;font-size:.82rem;font-weight:650}
.vat-options {display:inline-flex;padding:3px;gap:2px;border:1px solid #c8c8c4;background:white;border-radius:.6rem}
.tools .vat-options label {position:relative;min-width:0;white-space:nowrap;cursor:pointer}
.vat-options input {position:absolute;opacity:0;inset:0;min-height:0;margin:0;cursor:pointer}
.vat-options span {display:grid;place-items:center;min-height:2.1rem;padding:0 .8rem;border-radius:.4rem;font-size:.875rem}
.vat-options input:checked+span {background:var(--accent);font-weight:650}
.vat-options input:focus-visible+span {outline:3px solid #247ca8;outline-offset:1px}
label.field {display:grid; gap:.28rem; font-size:.82rem; font-weight:650}
label.field input,label.field select {font-weight:480; font-size:.91rem}
label.check {display:flex; align-items:center; gap:.64rem; min-width:0; font-size:.9rem; line-height:1.35}
.scope-controls {gap:.55rem; align-self:flex-end}
.scope-controls .sub {font-size:.8rem}
.scope-button {border-color:#a6a6a0}
.link-button,.direction-jump {display:inline; padding:.12rem 0; min-height:1.6rem; border:0; background:transparent; color:var(--link); text-align:left; font-weight:650}
.link-button:hover,.direction-jump:hover {background:transparent; text-decoration:underline}
.panel {background:#fff; border:1px solid var(--line); border-radius:1rem; padding:1.15rem clamp(.9rem,1.5vw,1.45rem)}
.budget-panel {background:#fffefb; border:1px solid var(--line); padding:1rem 1.22rem .85rem}
.budget-main {display:flex; align-items:center; justify-content:space-between; gap:1rem 1.5rem; flex-wrap:wrap}
.budget-title h2 {font-size:1.16rem}
.budget-title small {display:block; margin-top:.22rem; font-size:.82rem; color:#68624a}
.budget-figures,.budget-outcomes,.outcome-figure {display:flex; align-items:baseline; flex-wrap:wrap}
.budget-figures {gap:.6rem 2rem}
.budget-item {display:grid; gap:.1rem}
.budget-item .sub {font-size:.8rem; color:#635d48}
.budget-item strong {font-size:clamp(1.2rem,1.8vw,1.72rem); line-height:1.15; letter-spacing:-.04em}
.budget-outcomes {gap:.35rem 1.25rem; margin-top:.7rem; padding-top:.55rem; border-top:1px solid #e8dfb5}
.outcome-figure {gap:.36rem; font-size:.85rem}
.outcome-figure span {color:#5d594d}
.charts-grid {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.8rem}
.chart-card {display:flex; flex-direction:column; min-width:0; gap:.44rem; padding:1.08rem; border-radius:.95rem}
.chart-head {display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.4rem; min-height:2rem}
.chart-head h2 {font-size:1rem; font-weight:720; letter-spacing:-.025em}
.chart-head small,.chart-interval {font-size:.77rem}
.chart-head select {width:100%; max-width:100%; min-height:2rem; padding-block:.17rem; font-size:.9rem; font-weight:650; text-overflow:ellipsis}
.chart-kpi {display:flex; flex-direction:column; gap:.22rem}
.chart-target {font-size:.78rem}
.plan-extra summary {cursor:pointer;font-weight:650}
.plan-extra[open] summary {margin-bottom:.65rem}
.chart-plan-legend::before {content:"";display:inline-block;width:1.3rem;height:3px;margin-right:.4rem;vertical-align:middle;background:var(--good);border-radius:2px}
.chart-total {font-size:clamp(1.45rem,2.35vw,2.4rem); line-height:1.06; letter-spacing:-.055em; font-weight:800; margin-top:.12rem}
.chart-plot {position:relative; height:9.8rem; margin-top:auto; width:100%; min-width:0}
.chart-plot canvas {display:block; width:100%; height:100%; touch-action:pan-y}
.chart-value {font-size:.8rem; line-height:1.3; min-height:1.3em; color:var(--muted); font-variant-numeric:tabular-nums}
.chart-foot {display:flex; align-items:baseline; flex-wrap:wrap; gap:.25rem .55rem; border-top:1px solid var(--line); padding-top:.55rem}
.chart-change {font-size:.86rem; font-weight:700}
.tablebox {overflow:auto; max-width:100%; margin-top:.95rem; overscroll-behavior-x:contain}
table {width:100%; border-collapse:separate; border-spacing:0; font-size:.88rem}
th,td {padding:.62rem .72rem; text-align:right; line-height:1.38; border-bottom:1px solid #e7e7e4; vertical-align:middle}
thead th {color:#54584f; background:var(--table-head); font-size:.82rem; font-weight:600; border-bottom:1px solid var(--table-line)}
th:first-child,td:first-child {text-align:left}
tbody th {font-weight:570}
tbody tr {--row-bg:#fff;--plan-bg:#f8f6ee}
tbody tr:nth-child(even) {--row-bg:#f7f8f5;--plan-bg:#f2f0e8}
tbody tr>:is(th,td) {background:var(--row-bg)}
thead .plan-detail {background:#eeece2;color:#575546}
tbody .plan-detail {background:var(--plan-bg)}
tbody tr:focus-within {--row-bg:#fff1cb;--plan-bg:#f6e7be}
@media(hover:hover) {
  tbody tr:hover {--row-bg:#fff1cb;--plan-bg:#f6e7be}
}
tbody tr:last-child>* {border-bottom:0}
.sectionhead small {display:block; margin-top:.12rem}
.direction-compare {table-layout:fixed}
.direction-compare th:first-child {width:36%}
.direction-compare :is(th,td) {overflow-wrap:anywhere}
.direction-compare tbody tr {cursor:pointer}
.direction-jump {color:var(--ink);font-weight:520;line-height:1.4}
.direction-jump:hover,.direction-jump:focus-visible {text-decoration:underline;text-underline-offset:.2em}
.compare-result small {display:block; font-size:.77rem}
.goals-panel .sub {margin-top:.4rem}
.goals-table tr>*:not(:first-child),.history-table tr>* {white-space:nowrap}
.goals-table th:first-child {min-width:10rem}
.goal-status {font-size:.78rem; font-weight:600; display:inline-block; border-radius:.32rem; padding:.18rem .47rem; background:#f0f0ee; color:var(--muted)}
.goal-status.on-plan {background:#e8f4e9; color:var(--good)}
.goal-status.off-plan {background:#ffe9e2; color:var(--bad)}
.goals-table .plan-percent {font-weight:720}
.goals-table .plan-state {text-align:center;font-weight:600;font-size:.82rem}
.goals-table .plan-state.on-plan {background:#dfefe3;color:#255338}
.goals-table .plan-state.off-plan {background:#f8e3df;color:#863d32}
.goals-table .plan-state.pending {color:var(--muted)}
.history-table tr>*:first-child {position:sticky; left:0; border-right:1px solid var(--line); min-width:5rem; z-index:1}
.history-table thead tr>*:first-child {background:var(--table-head)}
.sort-heading {min-height:2rem; padding:.12rem .15rem; border:none; background:transparent; color:inherit; font:inherit;gap:.3rem}
.sort-heading:hover {background:#e5e7df}
.sort-arrow {color:#74796c}
th[aria-sort] .sort-arrow {color:var(--link);font-weight:800}
.history-scroll {max-height:34rem}
.history-table thead th {position:sticky; top:0; z-index:2}
.history-table thead th:first-child {z-index:3}
.history-table tfoot tr>* {font-weight:720; background:var(--pale); border-top:1px solid #efd35a}
.history-table tfoot tr>*:first-child {background:var(--pale)}
.period-partial {color:#785218; margin-left:.22rem}
.empty {min-height:6rem; display:grid; gap:.65rem; place-content:center; justify-items:center; padding:1rem; text-align:center; color:var(--muted)}
.warning,.failure {padding:.68rem .85rem; border-radius:.5rem; font-size:.88rem}
.warning {background:#ffefbb; color:#684716}
.failure {background:#ffebe6; color:var(--bad)}
.item {display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.85rem; padding:.82rem 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere}
.item:last-child {border-bottom:0}
.project-list {list-style:none; margin:0; padding:0}
.project-list .item {padding:.95rem .1rem}
.project-name {border:0; padding:0; min-height:1.7rem; background:transparent; font-size:1.05rem; font-weight:720; text-align:left; overflow-wrap:anywhere}
.project-name:hover {background:transparent; text-decoration:underline}
.project-delete {padding-top:.5rem}
.item .actions,.buttonrow {display:flex; flex-wrap:wrap; gap:.4rem}
.item small {display:block}
.itemhead {font-weight:650}
dialog {width:min(32rem,calc(100% - 1.5rem)); max-height:88dvh; color:var(--ink); border:1px solid var(--line); padding:1.4rem; border-radius:1rem; box-shadow:0 22px 88px #0a0a0a30}
dialog::backdrop {background:#0a0a0a66}
.form,.formgrid,.scope-options,.column-options {display:grid; gap:.82rem}
.form .buttonrow {justify-content:flex-end}
.manual-conversions {display:grid;gap:.3rem}
.item.manual-day-line {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem}
.manual-day-line>strong {max-width:26ch;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.manual-day-metrics {white-space:nowrap;overflow-x:auto;color:var(--muted);font-variant-numeric:tabular-nums}
@media(max-width:600px){.item.manual-day-line{gap:.4rem}.manual-day-line>strong{max-width:13ch}}
.form [hidden] {display:none}
.goal-provider {display:flex;flex-wrap:wrap;gap:.5rem;min-width:0;margin:0;padding:0;border:0}
.goal-provider legend {padding:0 0 .4rem;font-size:.9rem;font-weight:650}
.goal-provider label {display:flex;flex:1 1 9rem;align-items:center;gap:.5rem;padding:.6rem .8rem;border:1px solid var(--line);border-radius:.65rem;cursor:pointer}
.goal-provider label:has(input:checked) {border-color:var(--accent-pressed);background:var(--pale);font-weight:650}
.goal-provider input {width:1rem;height:1rem;min-height:0;margin:0;padding:0;accent-color:var(--ink)}
.campaign-tag {display:flex;gap:.5rem}
.campaign-tag input {flex:1;min-width:0}
.form .failure:empty {display:none}
.scope-options,.column-options {grid-template-columns:repeat(auto-fit,minmax(10rem,1fr)); max-height:45vh; overflow:auto; padding:.3rem .16rem}
.grant-project-list {display:grid;gap:.55rem;max-height:28vh;overflow:auto}
.grant-project-list>.field[hidden] {display:none}
.scope-default {border-top:1px solid var(--line); padding-top:.82rem}
.target-options {display:grid; grid-template-columns:repeat(auto-fit,minmax(11rem,1fr)); gap:.7rem; max-height:52dvh; overflow:auto; padding:.25rem}
.metrika-goal-picker,.goal-choices {display:grid; gap:.55rem}
.goal-reference {display:block; font-size:.78rem}
.goal-manual summary {cursor:pointer; color:#205a78; font-size:.87rem}
.goal-manual[open] summary {margin-bottom:.5rem}
.metrika-goals-table tr>*:not(:first-child) {white-space:nowrap}
.purchase-pagination {display:flex; flex-wrap:wrap; align-items:center; gap:.65rem; margin-top:.8rem}
.purchase-table tr>* {white-space:nowrap}
.selection-actions {gap:1rem}
.auth {--accent:#ffd600;--accent-pressed:#edc600; display:grid; grid-template-columns:minmax(0,1.12fr) minmax(0,1fr); min-height:100dvh; background:#f8f8f6}
.authside {color:#f8f8f6; background:#171716; padding:clamp(2rem,5vw,6rem); display:grid; align-content:space-between; gap:clamp(2rem,5vh,4rem)}
.authside .brand {justify-self:start; color:inherit; text-decoration:none; letter-spacing:-.025em; font-size:clamp(1rem,1.45vw,1.45rem); line-height:1.1}
.authside .brand:hover span {text-decoration:underline; text-underline-offset:.18em}
.authside .brand .mark {width:2.65rem;height:2.65rem}
.authside h1 {max-width:13ch; margin:0; font-size:clamp(3.05rem,5.4vw,6.35rem); font-weight:780; line-height:.99; letter-spacing:-.032em}
.pattern {display:flex; align-items:flex-end; gap:clamp(.35rem,1vw,.9rem); height:clamp(5.5rem,17vh,11rem); border-bottom:1px solid #595747; background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),#34332c calc(25% - 1px),#34332c 25%)}
.pattern i {flex:1; background:var(--accent); height:24%; border-radius:.24rem .24rem 0 0}
.pattern i:nth-child(2n) {height:43%} .pattern i:nth-child(3n) {height:60%} .pattern i:nth-child(5n) {height:88%}
.pattern i:nth-child(-n+5) {background:#8b7a2b}
.authmain {display:grid; place-items:center; padding:3rem clamp(1.5rem,5vw,5rem)}
.authform {width:min(26rem,100%)} .authform h2 {margin:0 0 1.6rem; font-size:clamp(2.2rem,3.4vw,3.45rem);letter-spacing:-.055em}
#notice {position:fixed; bottom:1rem; right:1rem; max-width:calc(100vw - 2rem); z-index:4; color:white; background:#111; padding:.7rem 1rem; border-radius:.6rem}
@media(max-width:1150px) {
 .charts-grid {gap:.6rem}
 .chart-card {padding:.85rem}
 .budget-figures {gap:1.2rem}
}
@media(max-width:850px) {
 .shell {grid-template-columns:11rem minmax(0,1fr)}
 .charts-grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))}
 .account {grid-template-columns:minmax(0,1fr) auto}.account .avatar {display:none}
}
@media(max-width:730px) {
 .shell {display:block}
 .sidebar {position:static; height:auto; flex-direction:row; flex-wrap:wrap; align-items:center; gap:.5rem .75rem; padding:.75rem .9rem; border-right:0; border-bottom:1px solid var(--line)}
 .sidebar .brand {margin:0;padding:0;font-size:1.25rem}
 .side-field {max-width:65%; margin-left:auto}
 .side-label,.account .avatar,.account div,.nav .icon {display:none}
 .nav {display:flex;flex-wrap:wrap} .nav button {min-height:2rem;padding:.3rem .5rem}
 .account {display:flex; border:0;padding:0;margin:0 0 0 auto}
 .topbar {min-height:2.5rem;font-size:.78rem}
 .content {padding-top:1.2rem;gap:.85rem}
 .tools {flex:1; flex-wrap:wrap}
 .tools label {flex:1;min-width:7.5rem}
 .auth {display:flex;flex-direction:column}
 .authside {padding:1.6rem 1.2rem 2rem;gap:1.55rem}
 .authside h1 {font-size:clamp(2.4rem,10vw,4rem)}
 .authside .brand .mark {width:2.2rem;height:2.2rem}
 .authside .pattern {display:none}
 .authmain {flex:1;padding:2.25rem 1.2rem;align-items:start}
}
@media(max-width:530px) {
 .charts-grid {grid-template-columns:minmax(0,1fr)}
 .chart-plot {height:8rem}
 .budget-figures {width:100%;justify-content:space-between}
 .scope-controls {flex-wrap:wrap}
 .direction-compare {min-width:28rem}
 .direction-compare th:first-child {width:31%}
 .direction-compare th,.direction-compare td {padding:.5rem .27rem}
}
@media(prefers-reduced-motion:reduce) { * {scroll-behavior:auto!important} }

.sync-head {min-height:2.8rem}
.sync-head strong {font-size:.94rem;line-height:1.25}
.sync-badge {margin-left:auto;display:inline-flex;align-items:center;gap:.4rem;border-radius:1rem;padding:.2rem .6rem;
  font-size:.8rem;font-weight:650;line-height:1.25;font-variant-numeric:tabular-nums;background:#efefec;color:var(--muted)}
.sync-badge::before {content:"";width:.42rem;height:.42rem;flex:none;border-radius:50%;background:currentColor}
.sync-panel[data-tone=complete] .sync-badge {color:var(--good);background:#e8f4ed}
.sync-panel[data-tone=pending] .sync-badge {color:#674600;background:#fff1ba}
.sync-panel[data-tone=error] .sync-badge {color:var(--bad);background:#fdece7}
.sync-head .notification-chevron {flex:none}
.sync-body {min-width:0;padding:.75rem 1rem;border-top:1px solid var(--line)}
.sync-body>.failure:empty,.sync-body>small:empty {display:none}
.sync-toolbar {display:flex;align-items:center;justify-content:space-between;gap:.4rem 1rem;flex-wrap:wrap}
.sync-summary {font-size:.9rem;font-weight:600}
.sync-panel progress:not([hidden]) {display:block;width:100%;height:.45rem;margin:.45rem 0;accent-color:#bd9300}
.sync-activity {margin:.25rem 0 .5rem;color:var(--muted);font-size:.86rem}
.sync-sources {display:grid;max-height:min(50vh,23rem);overflow:auto;font-size:.88rem}
.sync-row {display:grid;gap:.25rem;padding:.65rem 0;border-top:1px solid var(--line);overflow-wrap:anywhere}
.sync-row-head {display:flex;align-items:center;flex-wrap:wrap;gap:.4rem .6rem}
.sync-count {margin-left:auto;color:var(--muted);font-variant-numeric:tabular-nums}
.sync-tag {padding:.1rem .5rem;border-radius:1rem;background:#f0f0ed;color:#57584f;font-size:.76rem;font-weight:650}
.sync-row[data-status=loading] .sync-tag,.sync-row[data-status=waiting] .sync-tag {background:#fff1ba;color:#674600}
.sync-row[data-status=complete] .sync-tag {background:#e8f4ed;color:var(--good)}
.sync-row[data-status=error] .sync-tag,.sync-row[data-status=blocked] .sync-tag {background:#fdece7;color:var(--bad)}
.sync-panel[hidden],button[hidden] {display:none}
.period-picker {justify-content:space-between;gap:.85rem;text-align:left;font-variant-numeric:tabular-nums}
.period-picker::after {content:"▾";font-size:.8em;color:var(--muted)}
.calendar-dates {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}
.calendar-dates input,.calendar-nav input {width:100%;min-width:0}
.calendar-nav {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.55rem}
.calendar-nav button {font-size:1.35rem;line-height:1}
.calendar-grid {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.18rem}
.calendar-weekday {text-align:center;font-size:.8rem;color:var(--muted);padding:.3rem 0}
.calendar-day {padding:.38rem .05rem;min-height:2.35rem;border-color:transparent;border-radius:.5rem;font-variant-numeric:tabular-nums}
.calendar-day.within {background:#fff3bc}
.calendar-day.boundary {background:var(--accent);color:var(--ink);font-weight:750}
.calendar-presets {display:flex;flex-wrap:wrap;gap:.5rem}
.calendar-hint {min-height:1.4em}
.campaign-list {margin-top:.45rem;font-size:.9rem}
.campaign-list summary {cursor:pointer}
.campaign-list ul {max-height:12rem;overflow:auto;padding-left:1.35rem;overflow-wrap:anywhere}
.campaign-preview ul {list-style:none;padding:0;margin:.35rem 0}
.campaign-preview li small {display:block}
.campaign-preview .link-button {max-width:100%;overflow-wrap:anywhere}
.campaign-term-hint {color:#674600;background:var(--pale);padding:.4rem .65rem;border-radius:.4rem}
.notification-center {min-width:0;border:1px solid var(--line);border-radius:1rem;background:#fff;box-shadow:0 2px 5px #18181309}
.notification-center.has-alerts {border-color:#dac66d;box-shadow:0 3px 0 -1px #fff6c9,0 4px 0 -1px #dece8c}
.notification-head {display:flex;align-items:center;gap:.75rem;padding:.7rem 1rem;cursor:pointer;list-style:none;border-radius:inherit}
.notification-head::-webkit-details-marker {display:none}
.notification-head:hover {background:#f8f8f5}
.has-alerts>.notification-head {background:#fff9df}
.notification-icon {width:2.2rem;height:2.2rem;display:grid;place-items:center;flex:none;background:#efefec;border-radius:.75rem;color:#4b4c48}
.has-alerts .notification-icon {background:var(--accent);color:var(--ink)}
.notification-icon svg {width:1.25rem;height:1.25rem}
.notification-title {min-width:0;display:grid;gap:.05rem}
.notification-title small {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.notification-count {margin-left:auto;font-size:.8rem;color:var(--muted)}
.has-alerts .notification-count {background:#25251d;color:white;font-weight:700;border-radius:2rem;min-width:1.55rem;padding:.1rem .44rem;text-align:center}
.notification-chevron {width:.55rem;height:.55rem;border:solid currentColor;border-width:0 1.7px 1.7px 0;transform:rotate(45deg);margin:0 .3rem .2rem .25rem}
.notification-center[open] .notification-chevron {transform:rotate(225deg);margin-bottom:-.2rem}
.notification-center[open]>.notification-head {border-radius:1rem 1rem 0 0}
.notification-body {display:grid;gap:.7rem;border-top:1px solid var(--line);padding:.85rem 1rem}
.notification-body>.link-button {justify-self:start}
.notification-group {min-width:0}
.notification-list {list-style:none;padding:0;margin:.35rem 0;max-height:22rem;overflow:auto}
.notification-list li {display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.6rem 0;border-bottom:1px solid var(--line)}
.notification-list li>div {min-width:0;overflow-wrap:anywhere}
.notification-list li strong,.notification-list li small {display:block}
.notification-list li strong {font-size:.92rem;font-weight:650}
.notification-list button {flex:none}
@media(max-width:480px){.notification-head{gap:.5rem;padding:.65rem .75rem}.notification-list li{flex-wrap:wrap}.notification-body{padding:.75rem}}
.balance-line {display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.55rem 0;border-bottom:1px solid var(--line)}
.balance-line:last-child {border:0}
.balance-line small {display:block}
.balance-line b {white-space:nowrap}
.telegram-preview {white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;padding:1rem;background:var(--paper);font-size:.9rem;line-height:1.5}
.goals-table th {white-space:normal}

.brand img.mark,.alt-identity img.mark {display:block;padding:0;border-radius:0;object-fit:contain}
.legacy-report {display:inline-flex;align-items:center;justify-content:center;min-height:2.5rem;padding:.5rem .9rem;border:1px solid var(--line);border-radius:.65rem;background:white;color:var(--ink);font-size:.875rem;font-weight:630;text-decoration:none;white-space:nowrap}
.legacy-report:hover {background:#f3f3f1;border-color:#8d8d88}

.sales-table {width:max-content;min-width:100%}
.sales-table thead th {max-width:10rem;white-space:normal}
.sales-table tr>:first-child {position:sticky;left:0;z-index:1;background:var(--surface,#fff);border-right:1px solid var(--line);text-align:left}
.sales-table td {white-space:nowrap}
