:root {
  font: 100%/1.45 "Inter", "Segoe UI", sans-serif;
  color: #1c3034;
  background: #f3f6f6;
  --ink: #173a40;
  --teal: #14675e;
  --line: #d3dddc;
  --muted: #4f6668;
}
* { box-sizing: border-box; }
body, p, h1, h2 { margin: 0; }
[hidden] { display: none !important; }
.masthead { background: var(--ink); color: white; border-bottom: 3px solid #83c9b6; }
.mast-inner, main { max-width: 1256px; padding-inline: clamp(16px, 4.5vw, 64px); margin: auto; }
.mast-inner { height: 66px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; font-size: 1.45rem; font-weight: 720; letter-spacing: -.07em; }
.brand-cfo { color: #b0d9cc; font-weight: 450; margin-left: 5px; letter-spacing: -.04em; }
.brand-mark { display: inline-flex; align-items: end; gap: 3px; height: 22px; margin-right: 12px; transform: skew(-10deg); }
.brand-mark i { width: 5px; height: 45%; background: #9bd5c1; }
.brand-mark i:nth-child(2) { height: 72%; }
.brand-mark i:nth-child(3) { height: 100%; }
.workspace { font-size: .875rem; color: #d1e4df; }
.workspace { display: flex; align-items: center; gap: 16px; }
.workspace a, .workspace button { color: white; font: inherit; }
.workspace button, .text-button { border: 0; background: none; padding: 0; text-decoration: underline; }
.auth { max-width: 415px; margin: clamp(36px, 8vh, 100px) auto; padding: 30px; }
.auth h1 { font-size: 2rem; }
.auth p { color: var(--muted); margin: 12px 0; }
.auth label { margin: 18px 0; }
.auth input { display: block; width: 100%; min-height: 44px; border: 1px solid #a8bab9; border-radius: 6px; padding: 8px 12px; margin-top: 5px; }
.auth .primary { width: 100%; }
.auth p[role=alert] { color: #9d342f; }
.auth .qr { display: block; width: 180px; height: 180px; margin: 12px auto; }
.auth details code { display: block; overflow-wrap: anywhere; margin: 10px 0; }
.text-button { color: var(--teal); }
@media (max-width: 560px) { .workspace > span { display: none; } }
.page-heading, .result-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.page-heading { margin: 36px 0 24px; }
.report-subheading { margin: 0 0 12px; }
.source-label { color: var(--teal); font-size: .82rem; font-weight: 680; margin-bottom: 3px; }
h1 { font-size: clamp(2rem, 3.5vw, 2.65rem); line-height: 1.15; font-weight: 650; letter-spacing: -.05em; }
h2 { font-size: 1.15rem; font-weight: 650; letter-spacing: -.025em; color: var(--ink); }
.sample { color: #315952; font-size: .875rem; background: #e3edeb; border: 1px solid #cbded7; border-radius: 20px; padding: 4px 12px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 4px #233c3806; }
.filters { padding: 20px 24px 24px; margin-bottom: 22px; }
.controls { display: grid; grid-template-columns: 1fr 1.15fr 1fr auto; gap: 16px; align-items: end; margin-top: 14px; }
label, .label { display: block; font-size: .875rem; font-weight: 600; }
button, select, input { font: inherit; }
button, select, input[type=checkbox] { cursor: pointer; }
button, select, input[type=date] { min-height: 42px; border-radius: 6px; }
select, .select-button, input[type=date] { width: 100%; padding: 8px 13px; color: var(--ink); font-weight: 450; font-size: .9375rem; border: 1px solid #b9c9c8; background-color: white; margin-top: 5px; }
select, .select-button { appearance: none; text-align: left; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, #526b69 50%), linear-gradient(135deg, #526b69 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
button:focus-visible, select:focus-visible, input:focus-visible, .table-wrap:focus-visible { outline: 3px solid #318f87; outline-offset: 3px; }
.primary, .secondary { font-weight: 650; padding: 8px 20px; font-size: .9375rem; }
.primary { color: white; background: var(--teal); border: 1px solid var(--teal); }
.primary:hover { background: #0f514b; }
.secondary { border: 1px solid var(--line); color: var(--ink); background: white; }
.secondary:hover, .select-button:hover, select:hover { background-color: #f3f8f7; }
.license-control { position: relative; }
.sandbox-client, .sandbox-dates { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.report-pickers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 16px; }
.report-picker { min-width: 0; }
.report-picker button { margin-top: 8px; }
.wholesale-detail { margin-top: 16px; }
.wholesale-detail summary { padding: 15px 24px; color: var(--ink); font-weight: 600; cursor: pointer; }
.wholesale-subtotal { background: #f2f6f5; font-weight: 600; }
button:disabled { cursor: default; opacity: .6; }
.sandbox-client label { flex: 1; min-width: 180px; max-width: 420px; }
.sandbox-licenses { border: 0; margin: 16px 0; padding: 0; }
.sandbox-licenses legend, .sandbox-links { color: var(--muted); font-size: .875rem; }
.license-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.license-shortcuts .secondary { min-height: 36px; padding: 5px 12px; font-size: .875rem; }
.sales-license-refresh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 14px; }
.sales-report { font-family: "Segoe UI", system-ui, sans-serif; }
.sales-license-refresh p { color: var(--muted); font-size: .875rem; }
.license-shortcuts--types { gap: 8px 16px; margin: 8px 0 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: #f2f6f5; }
.license-shortcuts-label { color: var(--ink); font-size: .875rem; font-weight: 650; }
.license-type-options { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.license-type-options .license-type-option { min-height: 36px; padding: 4px 9px; border-radius: 4px; }
.sandbox-links { margin-top: 18px; }
.sandbox-links a { color: var(--teal); }
.connection-intro, .connection-profile p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.connection-notice { margin-bottom: 14px; color: var(--teal); }
.connection-profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; margin-top: 22px; }
.connection-profile { border-top: 1px solid var(--line); padding-top: 16px; }
.connection-profile h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.connection-profile label { margin-top: 14px; }
.connection-profile input[type=password] { display: block; width: 100%; margin: 5px 0 10px; min-height: 42px; padding: 8px 12px; border: 1px solid #b9c9c8; border-radius: 6px; }
@media (max-width: 720px) {
  .mast-inner { height: auto; min-height: 66px; flex-wrap: wrap; padding-block: 8px; gap: 6px; }
  .workspace { flex-wrap: wrap; gap: 10px; }
}
.menu { position: absolute; top: calc(100% + 5px); left: 0; width: max(100%, 245px); padding: 5px; z-index: 2; background: white; border: 1px solid var(--line); box-shadow: 0 8px 24px #173a4026; border-radius: 8px; max-height: 350px; overflow: auto; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px; font-weight: 500; }
.check:hover { background: #eef5f3; }
.check input { accent-color: var(--teal); width: 16px; height: 16px; }
.check small { display: block; font-size: .78rem; color: var(--muted); }
.check .sales-license-history { margin-top: 2px; font-size: .725rem; line-height: 1.45; font-weight: 400; }
.all { border-bottom: 1px solid var(--line); margin-bottom: 3px; }
.date-inputs { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.form-message, .empty { margin-top: 14px; color: #725019; font-size: .9375rem; }
.sales-report-alert { margin: 14px 0; padding: 10px 14px; border-inline-start: 3px solid #ab733e; border-radius: 3px; background: #faf4eb; color: #604629; font-size: .875rem; }
.sales-report-alert strong { display: block; margin-bottom: 2px; }
.result-header { padding: 21px 24px; }
.sales-results-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
.sales-results-context { grid-column: 1 / -1; }
#report-context { font-size: .875rem; color: var(--muted); margin-top: 3px; }
.table-wrap { overflow-x: auto; border-radius: 0 0 12px 12px; }
.wholesale-coverage { max-width: 28ch; white-space: normal; text-align: left; font-size: .875rem; }
.combined-sales .wholesale-coverage { text-align: start; }
.combined-sales .wholesale-empty { color: var(--muted); font-weight: 500; }
.combined-sales .wholesale-status { max-width: 32ch; }
.wholesale-status summary { color: #795222; font-weight: 600; cursor: pointer; }
.wholesale-status summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.wholesale-status p { margin-block-start: .4rem; color: var(--muted); font-weight: 400; }
.combined-sales th, .combined-sales td { padding-inline: clamp(6px, .7vw, 10px); }
.combined-sales th:first-child, .combined-sales td:first-child { padding-left: 14px; }
.combined-sales th:last-child, .combined-sales td:last-child { padding-right: 14px; }
.combined-sales thead th, .combined-sales th[scope=row], .combined-sales td[colspan], .combined-sales details { white-space: normal; }
.combined-sales tbody th[scope=row] { max-width: 16ch; overflow-wrap: anywhere; }
.combined-sales tbody details { min-width: 12ch; max-width: 24ch; }
.combined-sales .retail-columns { border-inline-end: 2px solid #a8beba; }
.combined-sales .sales-column-groups th { padding-block: 7px; background: #e8efee; color: var(--ink); font-size: .8rem; }
.combined-sales .sales-column-groups th:last-child { background: #dfede8; }
small.wholesale-coverage { display: block; margin-top: 3px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-variant-numeric: tabular-nums; }
th, td { padding: 13px 15px; text-align: left; }
th:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
thead th { color: #41595c; font-size: .875rem; font-weight: 600; background: #f2f6f5; border-block: 1px solid var(--line); }
tbody tr { border-bottom: 1px solid #e3eae9; }
tbody th { font-weight: 580; }
.license-id { color: var(--muted); font-size: .875rem; }
.amount, tfoot td { text-align: right; }
:where(table:not(.sales-by-license)) tbody td:last-child { font-weight: 600; }
.sales-by-license .retail-total { color: var(--ink); font-weight: 700; }
.sales-by-license tbody { font-size: .9375rem; }
.sales-by-license .sales-location { font-size: 1rem; font-weight: 600; color: var(--ink); }
.sales-report .sales-license-number { font: 600 .875rem/1.4 Consolas, ui-monospace, monospace; color: #304e54; }
.sales-by-license .metrc-license-heading { color: var(--ink); }
.sales-by-license .retail-not-applicable { font-size: .875rem; color: var(--muted); }
.sales-by-license .retail-coverage, .sales-by-license .retail-unavailable, .sales-by-license .sales-receipts { font-size: .875rem; color: var(--muted); }
.sales-by-license .retail-coverage { white-space: normal; }
.retail-coverage .retail-complete { color: #356355; }
.retail-coverage small { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; }
.retail-coverage summary { color: #795222; cursor: pointer; }
.retail-coverage summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.retail-coverage ul { padding-inline-start: 1.25rem; }
.sales-by-license tbody .retail-total { font-size: 1rem; background: #f0f6f4; }
tfoot { background: #e3f0ec; color: #184f46; font-weight: 700; }
tfoot th, tfoot td { padding-top: 16px; padding-bottom: 16px; }
.empty { padding: 0 24px 24px; }
footer { margin: 14px 0 30px; color: var(--muted); font-size: .8rem; }
footer span { padding: 0 4px; }
.sales-report-footer { margin: clamp(24px, 4vw, 48px) 0 0; border-top: 1px solid var(--line); padding: 14px 0 clamp(56px, 8vw, 96px); color: var(--muted); }
@media (max-width: 780px) {
  .controls { grid-template-columns: 1fr 1fr; }
  th, td { padding: 12px; }
}
@media (max-width: 500px) {
  .controls { grid-template-columns: 1fr; gap: 12px; }
  .license-type-options { flex-basis: 100%; }
  .license-type-options .license-shortcuts-label { flex-basis: 100%; }
  .license-type-options .license-type-option { position: relative; min-width: 54px; min-height: 44px; gap: 6px; padding-inline: 5px; }
  .license-type-option input { margin: 0; }
  .license-type-noun { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .page-heading { margin: 24px 0 16px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .result-header, .filters { padding: 16px; }
  .result-header { align-items: flex-start; flex-wrap: wrap; }
  .menu { width: 100%; }
}
