@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@500;600;700;800&family=Caveat:wght@700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #2f252c;
  --muted: #6f5e68;
  --paper: #fffefa;
  --sidebar: 222px;
  --shadow: 0 7px 18px #57333509;
  --panel-radius: 20px;
  --accent: #963957;
  --accent-dark: #73314e;
  --primary: #813657;
  --border: #eedfdf;
  --bg: #fbf6f1;
  --soft: #f9eeeb;
  --shell: #fffbf7;
  --selected: #f5e6f0;
  --gradient-start: #f7d6dd;
  --gradient-end: #fae7cb;
  --focus: #bd6b9b;
  --accent-border: color-mix(in srgb, var(--gradient-start) 73%, var(--accent));
  --accent-wash: color-mix(in srgb, var(--gradient-start) 45%, white);
}
:root[data-theme="lavender"] {
  --accent: #6b48a0;
  --accent-dark: #523379;
  --primary: #684398;
  --border: #e7def4;
  --bg: #f8f6fc;
  --soft: #f2ecfa;
  --shell: #fefcff;
  --selected: #ede4fa;
  --gradient-start: #e5d6fa;
  --gradient-end: #ede6ff;
  --focus: #8b69b7;
}
:root[data-theme="ocean"] {
  --accent: #236887;
  --accent-dark: #244d67;
  --primary: #246383;
  --border: #d8e7ef;
  --bg: #f3f8fc;
  --soft: #e9f3fa;
  --shell: #fbfdff;
  --selected: #deedf7;
  --gradient-start: #d1e7f7;
  --gradient-end: #e3ecff;
  --focus: #3a7fa3;
}
:root[data-theme="sage"] {
  --accent: #40715c;
  --accent-dark: #345643;
  --primary: #39644e;
  --border: #dce9df;
  --bg: #f4f8f3;
  --soft: #edf4e9;
  --shell: #fcfefa;
  --selected: #e3efe2;
  --gradient-start: #d2e8d5;
  --gradient-end: #e2eedc;
  --focus: #57896a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 400 1rem/1.5 'DM Sans', system-ui, sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a { color: var(--accent-dark); text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .brand, .metric-value { font-family: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif; }
h1 { margin: .18rem 0 .42rem; font-size: clamp(2.3rem, 4.1vw, 3.65rem); letter-spacing: -.054em; line-height: 1.03; font-weight: 800; }
h2 { font-size: 1.26rem; font-weight: 800; letter-spacing: -.026em; }
h3 { font-size: 1rem; font-weight: 800; }
p, .muted { color: var(--muted); }
svg { width: 1.12em; height: 1.12em; display: block; }
[data-icon] { display: inline-grid; flex-shrink: 0; place-items: center; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 9; padding: .5rem 1rem; background: white; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.layout { min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; background: var(--shell); border-right: 1px solid var(--border); padding: 27px 19px 18px; height: 100dvh; position: sticky; top: 0; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 1.1rem; font-weight: 800; letter-spacing: -.045em; line-height: 1.28; }
.sidebar .brand { margin: 0 6px 40px; }
.brand small, .signature { color: var(--accent-dark); font: 700 1.13rem/.95 Caveat, 'DM Sans', sans-serif; letter-spacing: 0; text-transform: none; }
.brand small { display: block; margin-top: 2px; white-space: nowrap; }
.brand-mark { width: 43px; height: 43px; border-radius: 15px 15px 15px 7px; background: linear-gradient(145deg,var(--gradient-start),var(--gradient-end)); color: var(--accent-dark); border: 1px solid var(--border); font-size: 1.2rem; }
.nav { display: grid; gap: 4px; }
.nav-heading { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .13em; margin: 0 12px 6px; }
.nav-group { margin-top: 23px; }
.nav-link { display: flex; gap: 11px; align-items: center; width: 100%; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 12px; padding: 10px 12px; color: #5e5063; font-weight: 600; font-size: .9rem; min-height: 43px; }
.nav-link:hover { background: var(--soft); }
.nav-link.selected { background: var(--selected); color: var(--accent-dark); border-color: var(--border); font-weight: 700; }
.nav-link [data-icon] { font-size: 1rem; }
.sidebar-foot { margin-top: auto; padding-top: 1rem; }
.workspace-card { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding: 15px 1px 0; }
.workspace-card > span:last-child { min-width: 0; }
.workspace-card strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .85rem; }
.workspace-card small { display: block; color: var(--muted); font-size: .75rem; }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 35px; height: 35px; border-radius: 11px; font-weight: 800; font-size: .78rem; background: var(--selected); color: var(--accent-dark); }
.owner-link { display: inline-block; margin: 14px 0 0 2px; color: #725b77; font-size: .78rem; text-decoration: underline; text-underline-offset: 3px; }
.main-column { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 72px; background: var(--shell); padding: 10px clamp(21px, 4vw, 55px); border-bottom: 1px solid var(--border); }
.crumb { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.crumb strong { color: var(--ink); }
.crumb-divider { color: #907c94; padding: 0 2px; }
.mobile-brand { display: none; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.sync { white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--border); background: var(--soft); color: var(--accent-dark); border-radius: 999px; padding: 4px 9px; font-weight: 700; font-size: .73rem; }
.sync > span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.sync.connected { color: #21604c; background: #edf9f3; border-color: #d5eee3; }
.sync.connected > span { background: #35a17a; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; min-height: 41px; border-radius: 10px; border: 1px solid var(--border); background: var(--paper); color: var(--ink); font-size: .89rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.btn:hover, .icon-btn:hover { filter: brightness(.97); }
.btn:active { transform: translateY(1px); }
.btn-primary { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: 0 2px 5px color-mix(in srgb, var(--primary) 14%, transparent); }
.btn-subtle { color: var(--accent-dark); }
.btn-danger { color: #a62748; }
main { width: min(100%, 1220px); margin: 0 auto; padding: 28px clamp(21px, 3.6vw, 49px) 38px; outline: none; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 25px; }
.page-heading p { font-size: .99rem; }
.eyebrow { display: flex; align-items: center; gap: 7px; color: var(--accent-dark); font-weight: 800; font-size: .73rem; letter-spacing: .12em; }
.eyebrow svg { font-size: .95rem; }
.today-chip { display: flex; gap: 6px; align-items: center; white-space: nowrap; border-radius: 999px; background: #fff9; border: 1px solid var(--accent-border); color: var(--accent-dark); padding: 7px 11px; font-size: .85rem; font-weight: 700; }
.today-chip [data-icon], .range-label [data-icon] { color: var(--accent); }
.panel { background: var(--paper); border: 1px solid var(--border); border-radius: var(--panel-radius); box-shadow: var(--shadow); }
.filters { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 13px; }
.segmented { display: flex; align-items: stretch; gap: 3px; border: 1px solid var(--border); border-radius: 11px; padding: 3px; background: var(--soft); }
.segmented button { min-width: 80px; padding: 7px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #6c5d72; font-size: .87rem; font-weight: 700; line-height: 1.2; }
.segmented button:hover { color: var(--accent-dark); }
.segmented button[aria-pressed="true"] { background: #fff; color: var(--accent-dark); border-color: var(--border); box-shadow: 0 1px 3px #6b3a5b0e; }
.filters .segmented button[aria-pressed="true"] { background: var(--paper); border-color: var(--accent-border); }
.range-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .86rem; font-weight: 600; }
.custom-range { display: flex; align-items: end; gap: 12px; flex: 1 1 100%; padding: 6px 0 2px; }
.custom-range label { width: min(34%, 190px); }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.metric { min-width: 0; display: grid; gap: 5px; padding: 15px 16px; border: 1px solid var(--border); border-radius: var(--panel-radius); background: var(--paper); }
.metric.blue { background: #f6faff; border-color: #dbe8f8; }
.metric.lavender { background: #f9f5ff; border-color: #e8def7; }
.metric-top { display: flex; gap: 7px; align-items: center; color: var(--accent-dark); font-size: .88rem; font-weight: 750; }
.metric-top [data-icon] { font-size: .94rem; width: 29px; height: 29px; background: var(--soft); border-radius: 50%; }
.metric.blue .metric-top { color: #435f88; }
.metric.lavender .metric-top { color: #70538b; }
.metric-value { color: #322536; font-size: clamp(1.2rem, 2.7vw, 2.18rem); font-weight: 800; letter-spacing: -.055em; line-height: 1.2; overflow-wrap: anywhere; }
.metric small { color: var(--muted); font-size: .81rem; }
.export-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 10px; }
.export-row .btn { min-height: 42px; padding-inline: 5px; font-size: .83rem; gap: 5px; }
.export-pdf { color: var(--accent-dark); background: var(--selected); border-color: var(--accent-border); }
.export-csv { color: var(--accent-dark); background: var(--soft); }
.export-share { color: var(--accent-dark); background: #fff; }
.transactions { padding: 18px 20px 10px; min-width: 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-head p { font-size: .88rem; margin-top: 3px; }
.compact button { min-width: auto; padding: 6px 9px; font-size: .79rem; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .91rem; }
th { color: var(--accent-dark); font-size: .72rem; text-transform: uppercase; letter-spacing: .075em; text-align: left; padding: 9px 9px; border-bottom: 1px solid var(--border); }
td { padding: 12px 9px; border-bottom: 1px solid var(--soft); overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.numeric { text-align: right; white-space: nowrap; }
.quantity { color: var(--accent); }
.money { font-weight: 750; color: #2f405a; }
.item-detail { display: block; color: var(--muted); font-size: .8rem; }
.empty { text-align: center; color: var(--muted); padding: 22px 12px; }
.empty strong { color: var(--ink); display: block; margin-bottom: 3px; }
.empty [data-icon] { display: inline-grid; border-radius: 10px; background: var(--soft); color: var(--accent); width: 36px; height: 36px; margin-bottom: 8px; }
.footer { display: flex; justify-content: space-between; gap: 10px; width: min(100%, 1220px); margin: auto auto 0; padding: 0 clamp(21px, 4vw, 55px) 20px; color: #7e6b81; font-size: .75rem; }
.footer > span:first-child { display: inline-flex; gap: 5px; align-items: center; font-weight: 700; }
.content-panel { padding: 22px; margin-bottom: 18px; }
.narrow { max-width: 650px; }
.chart { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 10px; padding: 10px 0 0; }
.chart-col { min-width: 0; display: grid; gap: 6px; text-align: center; color: #685673; font-size: .8rem; }
.chart-val { font-size: .74rem; overflow-wrap: anywhere; }
.chart-slot { height: 145px; display: flex; justify-content: center; align-items: end; border-bottom: 1px solid var(--border); }
.chart-bar { display: block; width: min(70%,52px); min-height: 4px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg,var(--accent),var(--gradient-start)); }
.referral-code { border: 1px dashed var(--accent-border); background: linear-gradient(135deg,var(--accent-wash),var(--soft)); border-radius: 13px; padding: 16px; margin: 16px 0; }
.referral-code strong { display: block; overflow-wrap: anywhere; color: var(--accent-dark); font: 800 clamp(1.05rem, 4vw, 1.45rem)/1.4 'Bricolage Grotesque', sans-serif; letter-spacing: .045em; margin-top: 4px; }
.referral-code p { margin-top: 5px; font-size: .89rem; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.code-state { display: inline-block; color: #534065; background: #f2eaf7; border-radius: 999px; padding: 3px 8px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.code-state.active { color: #176049; background: #e7f7ee; }
.code-state.revoked { color: #9a2b46; background: #f9e8ed; }
label { display: grid; gap: 5px; font-size: .86rem; color: #5b475f; font-weight: 700; }
input, textarea, select { display: block; width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; color: var(--ink); background: #fff; font-size: 1rem; }
textarea { resize: vertical; }
.field-help { color: var(--muted); font-size: .79rem; font-weight: 400; }
.form-grid { display: grid; gap: 14px; margin-top: 17px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { font-size: .88rem; color: #a62c4c; }
.form-grid > .btn { justify-self: start; }
dialog { width: min(540px,calc(100% - 28px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--accent-border); border-radius: 19px; color: var(--ink); background: #fffdfd; box-shadow: 0 24px 80px #36213d38; }
dialog::backdrop { background: #33233670; backdrop-filter: blur(2px); }
.dialog-card { padding: 25px; position: relative; }
.dialog-card h2 { font-size: 1.5rem; margin: 5px 0; }
.dialog-card p { font-size: .94rem; }
.icon-btn { place-items: center; display: inline-grid; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: white; color: var(--accent-dark); }
.dialog-close { position: absolute; right: 14px; top: 14px; }
.toast { z-index: 10; position: fixed; bottom: 20px; right: 20px; max-width: min(400px,calc(100vw - 40px)); background: #38273e; color: #fff; font-size: .9rem; padding: 11px 15px; box-shadow: 0 6px 20px #38273e22; border-radius: 10px; }
@media (max-width: 1040px) {
  :root { --sidebar: 195px; }
  .sidebar { padding-inline: 12px; }
  .nav-heading { margin-inline: 9px; }
  .nav-link { padding-inline: 9px; }
  .topbar, main, .footer { padding-inline: 25px; }
  .metrics { gap: 8px; }
}
@media (max-width: 820px) {
  :root { --sidebar: 160px; }
  .sidebar .brand { margin-left: 1px; }
  .brand { gap: 7px; font-size: .99rem; }
  .brand small { font-size: .96rem; }
  .brand-mark { width: 35px; height: 35px; }
  .crumb > span { display: none; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric-value { font-size: 1.43rem; }
}
@media (max-width: 650px) {
  .layout { display: block; }
  .sidebar { display: contents; }
  .sidebar > .brand, .sidebar-foot, .nav-heading, .crumb, .top-actions .sync { display: none; }
  .mobile-brand { display: flex; white-space: nowrap; }
  .topbar { min-height: 62px; padding: 9px 13px; gap: 5px; }
  .top-actions { gap: 5px; }
  .top-actions .btn { gap: 4px; font-size: .76rem; padding: 7px; min-height: 36px; }
  .top-actions .btn [data-icon] { font-size: .86rem; }
  .mobile-brand .brand-mark { height: 30px; width: 30px; border-radius: 9px; font-size: .98rem; }
  .nav { z-index: 4; display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--shell); border-top: 1px solid var(--border); padding: 5px 4px max(5px, env(safe-area-inset-bottom)); box-shadow: 0 -3px 12px #5c2c4e0b; }
  .nav-link { flex: 1; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; min-height: 49px; padding: 4px 0; font-size: .67rem; text-align: center; line-height: 1.1; }
  .nav-link [data-icon] { font-size: 1rem; }
  main { padding: 24px 13px 19px; }
  .page-heading { margin-bottom: 17px; }
  .page-heading p { font-size: .91rem; }
  h1 { font-size: 2.38rem; }
  .filters { gap: 9px; margin-bottom: 10px; }
  .filters .segmented { width: 100%; }
  .filters .segmented button { flex: 1; min-width: 0; padding: 8px 5px; }
  .range-label { font-size: .82rem; }
  .metric { padding: 9px; }
  .metric-value { font-size: 1.28rem; }
  .transactions, .content-panel { padding: 11px 12px; }
  .section-head { gap: 6px; margin-bottom: 7px; }
  .section-head h2 { font-size: 1rem; }
  .section-head p { font-size: .76rem; }
  .compact button { font-size: .73rem; padding-inline: 5px; }
  .footer { padding: 0 13px calc(71px + env(safe-area-inset-bottom)); }
  .toast { bottom: 69px; }
  td, th { padding-inline: 6px; }
}
@media (max-width: 365px) {
  .mobile-brand { font-size: .87rem; }
  .mobile-brand small { font-size: .89rem; }
  .top-actions .btn [data-icon] { display: none; }
  .custom-range { flex-wrap: wrap; }
  .custom-range label { width: calc(50% - 6px); }
  .metric-value { font-size: 1.12rem; }
}
.form-grid-inline { margin-top: 14px; }

.theme-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.theme-field legend { padding: 0; color: var(--ink); font: 800 1rem/1.5 'Bricolage Grotesque', 'DM Sans', sans-serif; }
.theme-field p { margin: 3px 0 12px; }
.theme-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.theme-option { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--border); border-radius: 10px; min-height: 48px; color: var(--ink); background: var(--shell); position: relative; cursor: pointer; }
.theme-option:hover { background: var(--soft); }
.theme-option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--soft); }
.theme-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.theme-option input { width: 1px; height: 1px; padding: 0; margin: 0; position: absolute; opacity: 0; }
.theme-swatch { width: 26px; height: 26px; display: inline-block; border: 1px solid #0001; border-radius: 8px; background: linear-gradient(145deg, var(--swatch) 48%, var(--swatch-deep) 49%); }
[data-swatch="rose"] { --swatch: #f2c8dc; --swatch-deep: #963957; }
[data-swatch="lavender"] { --swatch: #d6c4f3; --swatch-deep: #6b48a0; }
[data-swatch="ocean"] { --swatch: #bddff1; --swatch-deep: #236887; }
[data-swatch="sage"] { --swatch: #c8e0c7; --swatch-deep: #40715c; }
@media (max-width: 480px) {
  .theme-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

:root[data-custom-accent] {
  --accent: var(--custom-ink);
  --accent-dark: var(--custom-ink);
  --primary: var(--custom-ink);
  --focus: var(--custom-ink);
  --bg: color-mix(in srgb, var(--custom-colour) 9%, #fffaf6);
  --soft: color-mix(in srgb, var(--custom-colour) 12%, #fffaf9);
  --shell: color-mix(in srgb, var(--custom-colour) 5%, white);
  --selected: color-mix(in srgb, var(--custom-colour) 24%, white);
  --border: color-mix(in srgb, var(--custom-ink) 18%, white);
  --gradient-start: color-mix(in srgb, var(--custom-colour) 32%, white);
  --gradient-end: color-mix(in srgb, var(--custom-colour) 12%, #ffecd2);
}
.sales-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(185px, 39%);
  align-items: center;
  min-height: 218px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 23px 32px;
  margin-bottom: 23px;
  border: 1px solid var(--accent-border);
  border-radius: 27px;
  background:
    radial-gradient(circle at 2px 2px, color-mix(in srgb, var(--accent) 17%, transparent) 1px, transparent 1.7px) 2px 0 / 18px 18px,
    linear-gradient(110deg, var(--gradient-start), var(--gradient-end));
}
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.hero-name { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--accent-dark); font-size: .86rem; font-weight: 800; overflow-wrap: anywhere; }
.hero-name > [data-icon] { font-size: 1.04rem; }
.sales-hero h1 { margin: 0; font-size: clamp(2.7rem, 5vw, 4.6rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 17px; }
.personalise { min-height: 35px; padding: 6px 10px; background: var(--paper); border-color: var(--accent-border); border-radius: 999px; font-size: .84rem; }
.hero-art { position: relative; align-self: stretch; min-width: 0; }
.hero-art::before { content: ''; position: absolute; inset: 4px 0; border: 1px dashed color-mix(in srgb, var(--accent) 31%, transparent); background: #fff4; border-radius: 55% 44% 51% 48%; transform: rotate(-6deg); }
.hero-art img { position: absolute; width: 100%; height: min(228px, 139%); object-fit: contain; inset: 50% auto auto 0; transform: translateY(-50%) rotate(-4deg); filter: drop-shadow(1px 6px 5px #6732501c); }
.report-label { display: grid; gap: 1px; }
.report-metrics { grid-template-columns: 1.15fr 1fr 1fr; margin-bottom: 15px; }
.report-metrics .metric { box-shadow: var(--shadow); }
.report-metrics .revenue-metric { background: var(--accent-wash); border-color: var(--accent-border); }
.revenue-metric .metric-top [data-icon] { background: var(--selected); }
.report-metrics .metric.lavender { background: color-mix(in srgb, var(--gradient-end) 27%, white); border-color: var(--border); }
.report-metrics .metric.lavender .metric-top { color: var(--accent-dark); }
.report-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, .48fr); gap: 14px; align-items: start; }
.report-tools { display: grid; gap: 14px; min-width: 0; }
.goal-card, .export-card { padding: 14px 16px; }
.goal-card h2 { display: flex; align-items: center; gap: 7px; }
.goal-card h2 [data-icon] { color: var(--accent); font-size: 1rem; }
.goal-numbers { display: flex; gap: 5px; align-items: baseline; margin-top: 6px; color: var(--muted); font-size: .88rem; }
.goal-numbers strong { color: var(--ink); font: 800 1.72rem/1.2 'Bricolage Grotesque', sans-serif; }
.goal-card progress { appearance: none; width: 100%; height: 10px; border: 0; border-radius: 999px; overflow: hidden; background: var(--soft); color: var(--accent); }
.goal-card progress::-webkit-progress-bar { background: var(--soft); border-radius: 999px; }
.goal-card progress::-webkit-progress-value { background: linear-gradient(90deg, var(--gradient-start), var(--accent)); border-radius: 999px; }
.goal-card progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.goal-caption { font-size: .83rem; color: var(--accent-dark); margin-top: 4px; }
.preferences-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(230px, 1fr); gap: 16px; align-items: start; }
.appearance-panel { max-width: 670px; }
.appearance-note { font-size: .9rem; margin: 3px 0 17px; }
.appearance-controls { display: grid; gap: 18px; }
.theme-field legend { margin-bottom: 8px; }
.accent-controls { display: grid; grid-template-columns: auto minmax(88px, 145px) auto; align-items: end; justify-content: start; gap: 10px; }
.accent-controls input[type="color"] { width: 76px; height: 43px; padding: 4px; cursor: pointer; }
.accent-controls input[name="accent_hex"] { font-family: ui-monospace, monospace; }
.style-options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; }
.style-option { position: relative; display: grid; gap: 5px; min-width: 0; padding: 9px; border: 1px solid var(--border); border-radius: 12px; background: var(--shell); cursor: pointer; }
.style-option:hover, .style-option:has(input:checked) { background: var(--soft); }
.style-option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.style-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.style-option input { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; opacity: 0; }
.style-option strong { color: var(--ink); }
.style-option small { color: var(--muted); font: 500 .78rem/1.25 'DM Sans', sans-serif; }
.style-preview { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 18px 9px; gap: 4px; align-items: end; min-width: 0; height: 45px; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); }
.style-preview::before { content: ''; grid-column: 1 / -1; width: 100%; height: 100%; background: var(--soft); border-radius: 3px; }
.style-preview[data-style="cozy"]::before { background: radial-gradient(circle at 78% 55%, var(--accent) 0 3px, transparent 3px), linear-gradient(110deg, var(--gradient-start), var(--gradient-end)); border-radius: 5px; }
.style-preview i { background: var(--soft); height: 100%; border-radius: 2px; }
.style-preview[data-style="cozy"] i { border-radius: 4px; }

:root[data-appearance="minimal"] { --shadow: none; --panel-radius: 10px; }
[data-appearance="minimal"] .sales-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-block: 20px; background: var(--shell); border-radius: var(--panel-radius); border-color: var(--border); }
[data-appearance="minimal"] .sales-hero h1 { font-size: clamp(2.05rem, 4vw, 3.2rem); }
[data-appearance="minimal"] .hero-art { display: none; }
[data-appearance="minimal"] .metric, [data-appearance="minimal"] .goal-card { background: var(--paper); border-color: var(--border); }
[data-appearance="minimal"] .metric-top [data-icon] { background: transparent; }
[data-appearance="minimal"] .brand-mark, [data-appearance="minimal"] .referral-code { background: var(--soft); }

@media (max-width: 1040px) {
  .preferences-grid { grid-template-columns: 1fr; }
  .preferences-grid > .panel { max-width: 670px; }
}
@media (max-width: 880px) {
  .report-grid { grid-template-columns: 1fr; }
  .report-tools { grid-template-columns: 1fr 1fr; }
  .sales-hero { min-height: 190px; padding: 19px 22px; }
  .theme-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  main { padding-top: 14px; }
  .sales-hero { grid-template-columns: minmax(0, 1fr) minmax(95px, 38%); min-height: 166px; margin-bottom: 17px; border-radius: 20px; padding: 15px; }
  .sales-hero h1 { font-size: clamp(2rem, 8.2vw, 2.9rem); }
  .hero-name { font-size: .79rem; margin-bottom: 5px; }
  .hero-actions { gap: 5px; margin-top: 9px; }
  .today-chip, .personalise { font-size: .75rem; min-height: 29px; padding: 5px 7px; }
  .hero-art::before { inset: 14% 0; }
  .hero-art img { height: 105%; width: 126%; inset-inline-start: -11%; }
  .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .report-metrics .revenue-metric { grid-column: 1 / -1; }
  .metric { padding: 10px 12px; }
  .revenue-metric .metric-value { font-size: 1.8rem; }
  .report-tools { grid-template-columns: 1fr; }
  .theme-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .style-option small { font-size: .75rem; }
}
@media (max-width: 350px) {
  .accent-controls { grid-template-columns: auto minmax(100px, 1fr); }
  .accent-controls button { justify-self: start; }
  .sales-hero { padding-inline: 11px; }
  .mobile-brand small { font-size: .86rem; }
}
