/* TOC_ADMIN_WORKSPACE_V1 — uses the shop's existing neutral palette. */
body.toc-admin-loggedin .admincontainer{max-width:1650px;margin:20px auto;padding:0 26px}
body.toc-admin-loggedin .admincontainer>h1,body.toc-admin-loggedin .admincontainer>.eyebrow{display:none}
.toc-admin-layout{display:grid;grid-template-columns:236px minmax(0,1fr);align-items:start;gap:22px;min-height:66vh}
.toc-admin-sidebar{position:sticky;top:17px;align-self:start;border:1px solid var(--line);background:#f7f5f0;padding:20px 12px 24px;min-height:660px;max-height:calc(100vh - 35px);overflow:auto}
.toc-admin-sidebar-title{font-size:10px;letter-spacing:.18em;text-transform:uppercase;font-weight:700;margin:7px 10px 25px;color:#4e534c;line-height:1.7}
.toc-admin-sidebar-group{font-size:10px;color:var(--muted);letter-spacing:.1em;text-transform:uppercase;margin:23px 12px 8px;font-weight:700}
.toc-admin-side-nav{display:grid;gap:3px}
.toc-admin-side-nav button{font:inherit;font-size:13px;letter-spacing:0;text-align:left;width:100%;display:flex;align-items:center;gap:11px;padding:12px 12px;border:1px solid transparent;background:transparent;color:#42473e;min-height:42px;cursor:pointer;transition:background .15s ease}
.toc-admin-side-nav button:hover{background:#eae7df}
.toc-admin-side-nav button.active{background:#e2e0d7;border-color:#c9c8bd;color:#252c25;font-weight:700}
.toc-admin-side-nav button:focus-visible{outline:2px solid #474c40;outline-offset:2px}
.toc-admin-side-nav svg{width:17px;height:17px;flex-shrink:0;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.toc-admin-side-footer{border-top:1px solid var(--line);margin:24px 8px 0;padding:17px 4px 0;font-size:11px;color:var(--muted);line-height:1.7}
.toc-admin-side-footer a{text-decoration:underline;text-underline-offset:3px}
.toc-admin-stage{min-width:0}
.toc-admin-stage-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:16px 3px 8px;border-bottom:1px solid var(--line)}
.toc-admin-stage-header .toc-admin-breadcrumb{display:block;letter-spacing:.13em;text-transform:uppercase;font-size:10px;color:var(--muted);font-weight:700}
.toc-admin-section-context{display:block;margin:7px 0 5px;color:#656b61;font-size:12px}
.toc-admin-menu-toggle{display:none;align-items:center;gap:8px;border:1px solid var(--line);padding:9px 12px;min-height:41px;color:var(--ink);background:#f7f5f0;font-size:13px;cursor:pointer}
.toc-admin-backdrop{display:none}
.toc-admin-stage #setupStatus{margin:16px 0 20px}
.toc-admin-stage .panel{margin-top:0}
.toc-admin-stage .tab{min-width:0}
.toc-insight-pagehead{display:flex;gap:18px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:24px 0}
.toc-insight-pagehead h2{font:normal clamp(29px,3vw,42px)/1.2 var(--serif);letter-spacing:-.04em;margin:7px 0 10px}
.toc-insight-pagehead p{margin:0;color:var(--muted);font-size:13px;line-height:1.65}
.toc-insight-overline{font-size:10px!important;font-weight:700;letter-spacing:.16em;color:#646a5e!important}
.toc-insight-reload,.toc-insight-toolbar button,.toc-insight-pager button{background:#fff;border:1px solid var(--line);color:var(--ink);padding:10px 15px;min-height:40px;font-size:12px;cursor:pointer}
.toc-insight-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0}
.toc-insight-metric{background:#fff;border:1px solid #dedbd3;padding:20px;min-width:0}
.toc-insight-metric-label{font-size:12px;color:#63695d}
.toc-insight-metric-number{font:normal clamp(22px,2.3vw,33px)/1.2 var(--serif);margin:16px 0 10px;white-space:nowrap;font-variant-numeric:tabular-nums}
.toc-insight-metric p{font-size:11px;color:var(--muted);margin:0;line-height:1.5}
.toc-insight-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:13px 0}
.toc-insight-panel{border:1px solid #dedbd3;background:#fff;padding:23px;min-width:0}
.toc-insight-panel h3{font:normal 22px/1.3 var(--serif);margin:0 0 16px}
.toc-insight-list{display:grid;gap:0}
.toc-insight-list-row{border-bottom:1px solid #ede9e2;padding:12px 0;display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:13px}
.toc-insight-list-row strong{font-variant-numeric:tabular-nums;font-size:12px;text-align:right}
.toc-insight-total{font-weight:700;border-bottom:0}
.toc-insight-attention{font:normal 22px/1.4 var(--serif);margin:12px 0}
.toc-insight-link{padding:0;border:0;border-bottom:1px solid #7a8076;background:transparent;font-size:12px;cursor:pointer;color:#29352b;margin:14px 0 0;min-height:24px}
.toc-insight-link span{font-size:13px}
.toc-insight-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.toc-insight-shortcuts button{font:inherit;color:#384038;background:#f8f7f3;border:1px solid #dfddd5;padding:12px;text-align:left;cursor:pointer;font-size:12px}
.toc-insight-footnote,.toc-insight-note{font-size:11px;line-height:1.7;color:#777b70;margin:16px 0}
.toc-insight-note{margin-bottom:0}
.toc-insight-empty{color:var(--muted);font-size:12px}
.toc-insight-loading,.toc-insight-error{padding:25px;background:#fff;border:1px solid var(--line);font-size:13px}
.toc-insight-error{color:#a34336}
.toc-insight-error button{margin-left:12px}
.toc-insight-period{display:flex;flex-wrap:wrap;border:1px solid var(--line);background:#fff}
.toc-insight-period button{border:0;border-right:1px solid var(--line);padding:10px 12px;background:transparent;font-size:12px;cursor:pointer;white-space:nowrap;color:#424640}
.toc-insight-period button:last-child{border:0}
.toc-insight-period button.active{background:#333b32;color:#fff}
.toc-insight-chart{height:242px;display:flex;align-items:flex-end;gap:3px;padding:16px 6px 4px;border-bottom:1px solid #e6e2da;overflow-x:auto}
.toc-insight-barcol{height:100%;display:flex;flex:1 0 8px;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px;min-width:8px}
.toc-insight-barwrap{display:flex;align-items:flex-end;height:190px;width:100%;min-width:6px}
.toc-insight-bar{background:#788575;width:100%;min-height:2px;transition:height .2s ease}
.toc-insight-barcol:hover .toc-insight-bar{background:#354b3c}
.toc-insight-barcol small{font-size:9px;color:#888d83;white-space:nowrap;writing-mode:vertical-rl;display:none}
.toc-insight-barcol:nth-child(5n + 1) small,.toc-insight-barcol:first-child small,.toc-insight-barcol:last-child small{display:block;max-height:42px;overflow:hidden}
.toc-insight-toolbar{display:flex;gap:10px;margin:20px 0}
.toc-insight-toolbar input{flex:1;min-width:0;background:#fff;border:1px solid var(--line);min-height:43px;padding:9px 12px;font:inherit;font-size:13px}
.toc-insight-tablewrap{overflow:auto;background:#fff;border:1px solid var(--line)}
.toc-insight-table{border-collapse:collapse;width:100%;min-width:680px;text-align:left;font-size:12px}
.toc-insight-table th{background:#f8f6f2;font-weight:700;white-space:nowrap;color:#5c625b}
.toc-insight-table td,.toc-insight-table th{padding:15px 13px;border-bottom:1px solid #eeeae3}
.toc-insight-table td a{text-decoration:underline;text-underline-offset:3px}
.toc-insight-pager{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:15px;font-size:12px;color:var(--muted)}
.toc-insight-pager button:disabled{opacity:.4;cursor:default}
@media(max-width:1200px){.toc-admin-layout{grid-template-columns:210px minmax(0,1fr);gap:16px}.toc-insight-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){
 body.toc-admin-loggedin .admincontainer{margin:10px 0 24px;padding:0 14px}
 .toc-admin-layout{display:block}
 .toc-admin-menu-toggle{display:flex}
 .toc-admin-sidebar{position:fixed;top:0;left:0;width:min(300px,84vw);height:100dvh;max-height:100dvh;z-index:1002;transform:translateX(-105%);transition:transform .2s ease;overflow-y:auto;box-shadow:0 6px 32px #1c24152b;min-height:0}
 body.toc-admin-menu-open .toc-admin-sidebar{transform:translateX(0)}
 body.toc-admin-menu-open .toc-admin-backdrop{display:block;position:fixed;inset:0;background:#151a14a6;border:0;z-index:1001;width:100%;height:100%;cursor:pointer}
 .toc-insight-two{grid-template-columns:1fr}
}
@media(max-width:520px){.toc-insight-metrics{gap:8px}.toc-insight-metric{padding:15px 12px}.toc-insight-metric-number{font-size:23px;white-space:normal;overflow-wrap:anywhere}.toc-insight-panel{padding:16px}.toc-insight-pagehead{margin:17px 0}.toc-insight-shortcuts{grid-template-columns:1fr}.toc-insight-period{width:100%}.toc-insight-period button{flex:1}.toc-insight-chart{height:200px}.toc-insight-barwrap{height:145px}}
@media(prefers-reduced-motion:reduce){.toc-admin-sidebar,.toc-insight-bar{transition:none}}

/* TOC_ANALYTICS_SHOPIFY_V2 — uses existing neutral/olive palette. */
.toc-analytics-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:27px 0 15px;flex-wrap:wrap}
.toc-analytics-head h2{font:normal clamp(31px,3.1vw,44px)/1.15 var(--serif);margin:6px 0 10px;letter-spacing:-.035em}
.toc-analytics-head p{color:var(--muted);font-size:13px;margin:0}
.toc-analytics-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.toc-analytics-actions button,.toc-analytics-customize button{font:inherit;background:#fff;color:#333d33;font-size:12px;border:1px solid #dadbd3;padding:10px 14px;cursor:pointer;min-height:41px}
.toc-analytics-actions button:hover,.toc-analytics-customize button:hover{background:#eaece6}
.toc-analytics-filters{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;background:#f9f8f4;border:1px solid #e2e0d8;padding:13px 15px;margin:13px 0 19px}
.toc-analytics-filters label{display:flex;flex-direction:column;gap:5px;font-size:11px;color:#687064;font-weight:600}
.toc-analytics-filters select{min-width:148px;max-width:260px;border:1px solid #d5d8ce;background:#fff;border-radius:5px;color:#2b362c;font:inherit;font-size:13px;padding:10px 32px 10px 11px;min-height:41px;cursor:pointer}
.toc-analytics-currency{font-size:11px;color:#687064;display:flex;flex-direction:column;gap:5px}
.toc-analytics-currency b{font-size:13px;border:1px solid #d5d8ce;background:#fff;min-height:41px;display:flex;align-items:center;padding:0 13px;color:#363d35;border-radius:5px;font-weight:500}
.toc-analytics-tz{font-size:11px;color:#74796c;margin-left:auto;padding:14px 3px 4px}
.toc-analytics-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:12px}
.toc-analytics-kpi{background:#fff;border:1px solid #dfdfd8;border-radius:9px;padding:18px 18px 17px;min-width:0;min-height:166px}
.toc-analytics-kpi-heading{font-size:12px;font-weight:650;color:#444d42;line-height:1.4;min-height:33px;display:flex;justify-content:space-between;gap:8px}
.toc-help{font-size:14px;cursor:help;color:#8a9385;flex-shrink:0}
.toc-analytics-kpi strong{display:block;font:normal clamp(23px,2.4vw,34px)/1.18 var(--serif);margin:11px 0 10px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.toc-analytics-kpi small{display:block;font-size:11px;color:#7d8078;line-height:1.55}
.toc-analytics-compare{font-size:11px;color:#54654d;display:block;margin-top:8px}
.toc-analytics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
.toc-analytics-card{border:1px solid #dedfd6;background:#fff;border-radius:10px;padding:22px;min-width:0}
.toc-analytics-card-wide{grid-column:span 2}
.toc-analytics-card h3{margin:0 0 18px;font-size:15px;color:#303b32;font-weight:650;letter-spacing:-.01em}
.toc-analytics-card-big{font:normal 30px/1.1 var(--serif);font-variant-numeric:tabular-nums;margin:7px 0 4px}
.toc-analytics-plot{width:100%;overflow:hidden;margin:0 0 8px}
.toc-analytics-plot svg{width:100%;height:auto;max-height:280px;display:block}
.toc-analytics-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:11px;color:#747b70;align-items:center}
.toc-analytics-legend span{display:inline-flex;gap:7px;align-items:center}
.toc-dot{display:inline-block;height:9px;width:9px;border-radius:50%}
.toc-dot.collected{background:#b5c2ae}.toc-dot.refunded{background:#ded4c5}.toc-dot.net{background:#3b4d3d}
.toc-analytics-caption{font-size:11px;line-height:1.6;color:#84877e;margin:14px 0 0}
.toc-analytics-breakdown{display:grid;gap:0}
.toc-analytics-breakdown>div{padding:11px 0;border-bottom:1px solid #f0eee8;display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:12px}
.toc-analytics-breakdown>div:last-child{border-bottom:0}
.toc-analytics-breakdown span{color:#656c62}.toc-analytics-breakdown b{font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap;font-weight:600}
.toc-analytics-breakdown>div.total{border-top:1px solid #b7c0b2;border-bottom:0;font-weight:700;padding-top:15px;font-size:14px}
.toc-analytics-breakdown>div.total span{color:#27372a}
.toc-analytics-context,.toc-analytics-alert{padding:12px 15px;background:#f1f3eb;border:1px solid #d1d9c9;color:#4b5d4e;font-size:12px;line-height:1.6;margin:0 0 13px}
.toc-analytics-alert{background:#fff5ed;border-color:#eccbb5;color:#7c4e35;margin:13px 0 0}
.toc-analytics-untracked{padding:14px;background:#f8f8f5;color:#636c63;font-size:12px;line-height:1.7}
.toc-analytics-untracked p{margin:6px 0 0}
.toc-analytics-customize{padding:16px;border:1px solid #dcded5;background:#fff;margin-bottom:14px;font-size:13px}
.toc-analytics-customize strong{display:block;margin-bottom:12px}
.toc-analytics-customize>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;margin-bottom:14px}
.toc-analytics-customize label{display:flex;align-items:center;gap:8px;font-size:12px;line-height:1.5}
.toc-analytics-customize input{accent-color:#425540}
@media(max-width:1150px){.toc-analytics-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:730px){.toc-analytics-grid{grid-template-columns:1fr}.toc-analytics-card-wide{grid-column:span 1}.toc-analytics-tz{margin-left:0}.toc-analytics-filters{align-items:stretch}.toc-analytics-filters label{flex:1 1 140px}.toc-analytics-filters select{max-width:none;width:100%}.toc-analytics-customize>div{grid-template-columns:1fr}}
@media(max-width:480px){.toc-analytics-kpis{gap:8px}.toc-analytics-kpi{padding:14px 12px;min-height:150px}.toc-analytics-kpi strong{font-size:24px}.toc-analytics-card{padding:16px}.toc-analytics-actions{width:100%}.toc-analytics-actions button{flex:1}.toc-analytics-filters{padding:10px}.toc-analytics-currency{flex:1}.toc-analytics-tz{width:100%;padding:0}}


/* TOC_ADMIN_SELECT_INSET_ARROWS_V1
   Draw our own chevron rather than relying on native select arrows.
   Keeps the exact current input colours, sizes and focus styles.
   Applies to ordinary dropdowns across the admin, including Analytics,
   Shipping, Discounts and order tools; not multi-select lists.
*/
body.toc-admin-loggedin .toc-admin-stage select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233a473a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px 16px;
  background-position: right 19px center;
  padding-right: 49px;
}
body.toc-admin-loggedin .toc-admin-stage select:not([multiple]):not([size]):focus-visible {
  outline: 2px solid #49574a;
  outline-offset: 2px;
}
