/* Buyer demo V2. Self-contained: no font, image, or network dependencies. */
:root {
  font-family: 'Segoe UI', Inter, Arial, sans-serif;
  color: #283448;
  background: #f5f6f8;
  font-synthesis: none;
  --ink: #253248;
  --muted: #697487;
  --blue: #285fbb;
  --google-blue: #4285F4;
  --google-red: #EA4335;
  --google-yellow: #FBBC05;
  --google-green: #34A853;
  --border: #e6e9ef;
  --sidebar: 244px;
  --radius: 20px;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
a, button { transition: background-color .18s, color .18s, box-shadow .18s, transform .18s; }
a:hover { color: #1048ab; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #2668db; outline-offset: 4px; }
svg.icon { height: 20px; width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.skip { position: fixed; top: -80px; left: 16px; background: white; padding: 12px; z-index: 20; border-radius: 8px; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sidebar { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff; z-index: 5; border-bottom: 1px solid var(--border); padding: 20px; }
.sidebar.open { display: block; }
.brand, .workspace, .nav-label, .sidebar-foot { display: none; }
.nav-link { display: flex; gap: 13px; align-items: center; color: #647084; font-size: 13px; font-weight: 500; padding: 14px 16px; border-radius: 12px; margin: 6px 0; }
.nav-link.active { color: #285fbb; background: #edf3ff; font-weight: 650; }
.nav-link:hover { color: #285fbb; background: #f0f4fb; }
.nav-link.active:after { content: ''; margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: #4285F4; }
.layout { min-width: 0; }
.topbar { height: 72px; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-bottom: 1px solid var(--border); background: #fff; }
.top-title { font-size: 12px; color: var(--muted); flex: 1; }
.top-title strong { color: #344159; font-weight: 550; }
.top-divider { margin: 0 10px; color: #c8ced8; }
.account { display: flex; align-items: center; gap: 12px; }
.account-name, .account-divider { display: none; }
.avatar, .workspace-avatar { display: grid; place-items: center; color: #355c92; background: #eaf0ff; border: 3px solid #fff; box-shadow: 0 0 0 1px #e0e6f1; width: 36px; height: 36px; border-radius: 50%; font-size: 11px; font-weight: 650; }
.demo-pill { padding: 6px 10px; background: #f0f2f7; color: #56647b; border-radius: 7px; font-size: 11px; letter-spacing: .8px; font-weight: 650; white-space: nowrap; }
.mobile-menu { border: 1px solid var(--border); padding: 8px; display: flex; background: white; border-radius: 10px; color: #4c5e7a; }
.mobile-brand { display: none; }
.content { max-width: 1530px; margin: auto; padding: 24px 20px; }
.page-heading { position: relative; display: flex; align-items: flex-start; flex-direction: column; gap: 17px; padding: 25px; margin-bottom: 18px; border-radius: 22px; background: linear-gradient(115deg, #eaf2ff, #f5f5fc 62%, #fff4e9); overflow: hidden; isolation: isolate; }
.page-heading > div:first-child { position: relative; z-index: 1; max-width: 540px; }
.eyebrow { font-size: 11px; letter-spacing: 1.1px; font-weight: 650; color: #566d98; margin: 0 0 11px; }
h1 { color: var(--ink); font-size: clamp(28px, 2.3vw, 34px); line-height: 1.2; letter-spacing: -1.4px; font-weight: 600; margin: 0 0 14px; max-width: 500px; }
.heading-dot { color: #4285F4; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -.35px; margin: 0; }
h3 { margin: 0; font-weight: 600; }
.subtitle { color: #5d6b81; line-height: 1.8; font-size: 14px; margin: 0; max-width: 470px; }
.page-heading > .btn { position: relative; z-index: 1; }
.page-heading > .btn.primary { background: #285fbb; border-color: #285fbb; }
.page-heading > .btn.primary:hover { background: #1c4e9e; border-color: #1c4e9e; }
.hero-art { display: none; }
.notice { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid #e2e8f2; border-radius: 12px; background: #f2f5fc; color: #566781; font-size: 11px; line-height: 1.7; margin-bottom: 22px; }
.demo-notice { background: transparent; border: 0; padding: 0 4px; gap: 10px; align-items: flex-start; }
.demo-label { font-size: 11px; letter-spacing: .7px; white-space: nowrap; font-weight: 700; color: #536781; background: #e8edf6; padding: 4px 7px; border-radius: 5px; }
.demo-notice > span:nth-child(2) { flex: 1; }
.demo-notice > .icon { display: none; }
.stats { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 24px; }
.stat { position: relative; overflow: hidden; padding: 24px; border-radius: var(--radius); background: linear-gradient(120deg, #285fbb, var(--google-blue)); color: #fff; min-width: 0; }
.stat:nth-child(2) { background: linear-gradient(120deg, #b62d32, var(--google-red)); }
.stat:nth-child(3) { background: linear-gradient(120deg, var(--google-yellow), #ffdc72); color: #493b12; }
.stat:after { content: ''; position: absolute; width: 175px; height: 175px; border: 26px solid #ffffff12; border-radius: 50%; right: -75px; top: 15px; pointer-events: none; }
.stat-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 500; position: relative; z-index: 1; }
.icon-box { display: grid; place-items: center; height: 35px; width: 35px; color: #3e66a1; background: #eef4ff; border-radius: 11px; }
.stat .icon-box { background: #ffffff20; color: inherit; width: 32px; height: 32px; border-radius: 9px; }
.stat:nth-child(3) .icon-box { background: #ffffff50; }
.metric-body { display: flex; align-items: center; justify-content: space-between; margin: 17px 0 20px; }
.stat-value { font-size: 43px; letter-spacing: -1.8px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric-index { width: 50px; height: 38px; position: relative; z-index: 1; }
.metric-index .icon { width: 48px; height: 38px; stroke-width: 1; opacity: .4; }
.stat-caption { display: flex; align-items: center; gap: 7px; padding-top: 14px; border-top: 1px solid #ffffff38; font-size: 11px; position: relative; z-index: 1; }
.stat:nth-child(3) .stat-caption { border-color: #634e1526; }
.metric-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.metric-demo { margin-left: auto; font-size: 11px; letter-spacing: 1px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 23px 24px; border-bottom: 1px solid #f0f2f0; }
.panel-head p { font-size: 11px; margin: 7px 0 0; color: var(--muted); line-height: 1.6; }
.panel-head > .icon { color: #8a9c90; }
.section-gap { margin-top: 24px; }
.dashboard-overview { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; }
.chart-wrap { padding: 22px 24px 18px; }
.chart-summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.overline { font-size: 11px; letter-spacing: 1px; color: #637086; }
.chart-summary strong { display: block; font-size: 31px; letter-spacing: -1px; font-weight: 600; margin-top: 6px; }
.chart-summary strong small { font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 9px; }
.chart-legend { display: flex; align-items: center; gap: 6px; color: #5f6e84; font-size: 11px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 50%; background: #3778ed; }
.chart { display: block; width: 100%; height: auto; }
.chart text { font-family: inherit; fill: #68758a; font-size: 12px; }
.chart-note { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; border-top: 1px solid #edf0ed; padding-top: 14px; margin: 12px 0 0; font-size: 11px; color: #68758a; line-height: 1.7; }
.overview-count { display: grid; place-items: center; height: 29px; width: 29px; background: #eef2f9; border-radius: 50%; font-size: 12px; }
.workspace-list { padding: 8px 20px; }
.workspace-item { display: flex; align-items: center; gap: 11px; padding: 13px 0; color: var(--ink); border-bottom: 1px solid #edf0f5; }
.workspace-item:last-child { border: 0; }
.workspace-item > span:nth-child(2) { flex: 1; min-width: 0; }
.workspace-item strong { display: block; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.workspace-item small { display: block; font-size: 11px; color: #68758a; margin-top: 5px; }
.workspace-item > .icon { width: 14px; height: 14px; color: #748197; }
.workspace-item:hover strong { color: var(--blue); }
.workspace-item .business-avatar { width: 36px; height: 36px; border-radius: 11px; }
.workspace-tip { display: flex; gap: 10px; padding: 15px; margin: 0 20px; background: #edf8f0; color: #28633a; border-radius: 12px; }
.workspace-tip > .icon { width: 17px; height: 17px; margin-top: 2px; }
.workspace-tip p { font-size: 11px; line-height: 1.7; margin: 0; }
.workspace-tip strong { display: block; font-weight: 600; margin-bottom: 3px; }
.overview-link { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; color: #285fbb; font-weight: 600; font-size: 11px; }
.overview-link .icon { width: 16px; height: 16px; }
.toolbar { display: flex; gap: 12px; padding: 18px 24px; flex-wrap: wrap; }
.field-control { width: 100%; padding: 12px 14px; border: 1px solid #dde3ed; border-radius: 10px; background: white; color: #344258; font-size: 13px; line-height: 1.5; min-height: 44px; }
.field-control::placeholder { color: #6e7d93; }
.field-control:hover { border-color: #aebed6; }
.field-control:focus { border-color: #4285F4; outline: 2px solid #e7efff; outline-offset: 0; }
.search { flex: 1; min-width: 160px; background: #f7f9fc; }
.toolbar select { width: 155px; }
.card-grid { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 2px 24px 24px; }
.buyer-card { border: 1px solid #e2e8f1; border-radius: 16px; overflow: hidden; min-width: 0; background: #fff; transition: box-shadow .18s, border-color .18s; }
.buyer-card:hover { border-color: #a9bde1; box-shadow: 0 6px 20px #183f2310; }
.card-top { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; background: #f5f8fe; }
.card-type { display: flex; gap: 7px; align-items: center; color: #526b92; font-size: 11px; letter-spacing: 1px; font-weight: 600; }
.card-type .icon { width: 15px; height: 15px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 6px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.badge:before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.active { color: #217745; background: #e8f3e9; }
.badge.pending { color: #8c6420; background: #fff2d9; }
.business-identity { display: flex; gap: 12px; align-items: center; padding: 24px 18px; }
.business-avatar { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; flex-shrink: 0; background: #fcebe7; color: #b55a47; }
.business-demo-102 { background: #eaf0ff; color: #5275b5; }
.business-demo-103 { background: #fff3d8; color: #a27a2a; }
.business-identity > div { min-width: 0; }
.card-name { font-size: 14px; letter-spacing: -.3px; overflow-wrap: anywhere; line-height: 1.5; }
.code { font-size: 11px; color: #66758a; letter-spacing: .2px; }
.business-identity .code { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.card-metrics { display: flex; gap: 28px; margin: 0 18px; padding: 16px 0; border-top: 1px solid #edf0f5; border-bottom: 1px solid #edf0f5; }
.card-metrics > div { display: flex; flex-direction: column; gap: 7px; }
.card-metrics > div > span { color: #647389; font-size: 11px; }
.card-metrics strong { font-size: 21px; font-weight: 600; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.card-period { margin-left: auto; color: #68778b; font-size: 11px; line-height: 1.8; text-align: right; align-self: center; }
.card-actions { padding: 17px 18px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #dde3ed; border-radius: 9px; padding: 10px 14px; background: white; color: #465d7d; font-size: 11px; line-height: 1.5; font-weight: 600; min-height: 42px; white-space: nowrap; }
.btn .icon { width: 15px; height: 15px; }
.btn:hover { background: #f0f4fb; color: #285fbb; border-color: #b5c7e7; }
.btn.primary { background: #2867cf; border-color: #2867cf; color: white; }
.btn.primary:hover { background: #1c51ac; border-color: #1c51ac; }
.btn.activate { background: #fff2d9; border-color: #f3e5c4; color: #79551d; }
.btn.activate:hover { background: #f9e6bb; }
.btn.text { background: transparent; border-color: transparent; color: #526783; }
.pending-card .card-top { background: #fffbf2; }
.pending-hint { padding: 0 18px 14px; margin: 0; color: #8d784d; font-size: 11px; line-height: 1.6; }
.no-results { padding: 20px; }
.demo-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; padding: 18px 0; border-top: 1px dashed #d6dfd8; font-size: 11px; color: #5d6e87; }
.demo-tools .field-control { width: auto; font-size: 11px; padding: 8px 11px; }
.demo-tools .btn { font-size: 11px; }
.demo-tools > span { font-size: 11px; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 11px; color: #68768b; margin: 18px 0 6px; }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; }
.panel-body { padding: 24px; }
.form-field { margin-bottom: 24px; }
.form-field label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 600; color: #465b7a; }
.hint { font-size: 11px; line-height: 1.8; color: #66758b; margin: 8px 0 0; }
.readonly { background: #f5f7fb; color: #66758b; font-family: ui-monospace, monospace; }
.form-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 20px; border-top: 1px solid var(--border); }
#edit-form > label.hint { display: flex; align-items: center; gap: 7px; margin-top: 20px; }
input[type=checkbox] { accent-color: #247c47; }
.message { font-size: 12px; padding: 12px; border-radius: 9px; line-height: 1.7; margin-top: 16px; }
.message:empty { display: none; }
.message.success { color: #26774f; background: #edf8f0; border: 1px solid #d7eddf; }
.message.error { color: #a14040; background: #fff3f3; border: 1px solid #f6dddd; }
.details-list { margin: 24px 0 0; }
.details-list dt { font-size: 11px; color: #66758a; margin-top: 19px; }
.details-list dd { font-size: 12px; color: #435a79; line-height: 1.8; overflow-wrap: anywhere; margin: 6px 0 0; }
.details-list code { font-size: 11px; background: #f1f4fa; padding: 5px 8px; border-radius: 6px; display: inline-block; }
.detail-summary { padding: 19px; background: #eef4ff; border-radius: 12px; margin-top: 24px; }
.detail-summary span { font-size: 11px; color: #486b9e; }
.detail-summary strong { display: block; font-size: 30px; font-weight: 600; letter-spacing: -1px; margin: 9px 0; }
.physical-card { position: relative; background: linear-gradient(115deg,#285fbb,var(--google-blue)); border-radius: 15px; padding: 22px; color: white; aspect-ratio: 1.7; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; box-shadow: 0 12px 24px #184f3320; }
.physical-top { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 650; letter-spacing: -.6px; }
.physical-top > span > span { font-weight: 400; color: #dae8ff; }
.physical-top .icon { color: #dae8ff; }
.physical-name { font-size: 17px; letter-spacing: -.3px; overflow-wrap: anywhere; line-height: 1.4; }
.physical-bottom { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; letter-spacing: 1px; color: #dae8ff; }
.physical-pending { background: linear-gradient(115deg,#f0e3bc,#faf0d6); color: #6a5727; box-shadow: none; }
.physical-pending .physical-top > span > span, .physical-pending .physical-bottom, .physical-pending .icon { color: #806d3d; }
.breadcrumb { display: flex; align-items: center; gap: 7px; color: #697b94; font-size: 11px; margin-bottom: 18px; }
.breadcrumb a { color: #42689f; }
.breadcrumb .icon { width: 11px; height: 11px; }
.empty { text-align: center; padding: 60px 24px; }
.empty > .icon-box { margin: 0 auto 20px; height: 48px; width: 48px; }
.empty p { max-width: 380px; margin: 12px auto 22px; color: #66768e; font-size: 13px; line-height: 1.8; }
.loading-block { height: 110px; background: #f1f4fa; border-radius: 12px; margin: 20px; }
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .stat { padding: 22px 18px; }
  .metric-index { display: none; }
  .stat-value { font-size: 39px; }
  .stat-caption { font-size: 11px; gap: 5px; }
  .metric-demo { display: none; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .account-name { display: block; color: #3e5746; font-size: 11px; font-weight: 600; }
  .account-name small { display: block; color: #79897e; font-size: 11px; font-weight: 400; margin-top: 4px; }
  .page-heading { padding: 28px 32px; }
  .page-heading > div:first-child { max-width: 65%; }
  .hero-art { display: block; position: absolute; right: 20px; top: 16px; width: 210px; height: 190px; z-index: -1; }
  .hero-orbit { position: absolute; width: 240px; height: 240px; right: -30px; top: -20px; border-radius: 50%; border: 1px solid #c1cfe650; box-shadow: 0 0 0 25px #ffffff25, 0 0 0 50px #ffffff18; }
  .hero-card { position: absolute; width: 170px; height: 110px; border-radius: 12px; right: 10px; top: 35px; }
  .hero-card-back { transform: rotate(15deg); background: var(--google-yellow); top: 26px; right: 5px; }
  .hero-card-front { display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(120deg,#258040,var(--google-green)); color: #fff; transform: rotate(-9deg); padding: 16px; box-shadow: 0 18px 22px #275c3d25; }
  .hero-card-front > span { display: flex; align-items: center; font-size: 10px; letter-spacing: -.3px; }
  .hero-card-front b { font-weight: 400; color: #c3dfc7; }
  .hero-card-front .icon { width: 17px; height: 17px; margin-left: auto; }
  .hero-card-front strong { font-size: 13px; font-weight: 500; line-height: 1.3; }
  .hero-card-front small { display: flex; justify-content: space-between; font-size: 8px; letter-spacing: 1px; color: #d5edda; }
  .hero-card-front i { font-size: 11px; line-height: .5; color: #f5cb49; font-style: normal; }
  .hero-star { position: absolute; color: var(--google-red); font-size: 40px; right: -4px; top: 126px; }
  .demo-notice > .icon { display: block; width: 13px; height: 13px; align-self: center; color: #697b94; }
}
@media (min-width: 960px) {
  .sidebar { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 30px 18px 20px; border-right: 1px solid var(--border); border-bottom: 0; overflow-y: auto; }
  .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; color: #283953; letter-spacing: -.7px; font-size: 20px; font-weight: 750; }
  .brand-light { font-weight: 400; margin-left: 2px; }
  .brand-mark { display: grid; place-items: center; width: 34px; height: 37px; border-radius: 11px; background: conic-gradient(var(--google-blue) 0 25%, var(--google-red) 25% 50%, var(--google-yellow) 50% 75%, var(--google-green) 75%); color: white; box-shadow: 0 3px 9px #344c7420; }
  .brand-mark .icon { width: 23px; height: 23px; }
  .brand small { display: block; font-size: 9px; font-weight: 600; letter-spacing: 1.8px; color: #6a7b92; margin-top: 7px; }
  .workspace { display: flex; align-items: center; gap: 10px; padding: 14px 10px; border: 1px solid #e5e9f1; border-radius: 12px; margin: 36px 3px 30px; font-size: 11px; font-weight: 600; color: #49607e; }
  .workspace-avatar { width: 29px; height: 29px; border-radius: 8px; font-size: 11px; }
  .workspace small { display: block; color: #6d7c91; font-size: 11px; font-weight: 400; margin-top: 5px; }
  .workspace-dot { width: 5px; height: 5px; background: #4285F4; border-radius: 50%; margin-left: auto; }
  .nav-label { display: block; font-size: 11px; letter-spacing: 1.5px; color: #6d7c91; padding: 0 16px; margin: 0 0 12px; }
  .sidebar-foot { display: block; margin-top: auto; padding-top: 40px; }
  .sidebar-note { position: relative; background: #fff8e2; border-radius: 14px; padding: 20px; margin: 0 3px 22px; }
  .sidebar-note > .icon { color: #b47c0a; margin-bottom: 12px; }
  .sidebar-note strong { display: block; color: #765619; font-size: 14px; font-weight: 550; line-height: 1.6; letter-spacing: -.2px; }
  .sidebar-note p { font-size: 11px; line-height: 1.8; color: #7c6943; margin: 10px 0 0; }
  .sidebar-version { display: flex; align-items: center; gap: 6px; padding: 16px 10px 0; border-top: 1px solid var(--border); font-size: 11px; color: #6a7b92; }
  .sidebar-version > span:last-child { margin-left: auto; font-size: 11px; letter-spacing: .7px; }
  .status-dot { height: 5px; width: 5px; background: #34A853; border-radius: 50%; }
  .layout { margin-left: var(--sidebar); }
  .mobile-menu { display: none; }
  .topbar { padding: 0 32px; }
  .account-divider { display: block; width: 1px; height: 24px; background: var(--border); margin: 0 3px; }
  .content { padding: 30px 32px; }
  .detail-grid { grid-template-columns: minmax(0,1.4fr) minmax(270px,1fr); }
  .hero-art { right: 30px; }
}
@media (min-width: 1200px) {
  .content { padding: 32px 38px; }
  .topbar { padding: 0 38px; }
  .page-heading { padding: 27px 32px; min-height: 205px; }
  .page-heading > div:first-child { max-width: 68%; }
  .hero-art { right: 40px; top: 10px; transform: scale(1.05); transform-origin: right center; }
  .stats { gap: 20px; }
  .stat { padding: 24px; }
  .metric-index { display: block; }
  .metric-demo { display: block; }
  .dashboard-overview { grid-template-columns: minmax(0,1.7fr) minmax(280px,1fr); }
  .card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 639px) {
  .topbar { padding: 0 16px; }
  .top-title { font-size: 11px; }
  .top-divider { margin: 0 5px; }
  .demo-pill { font-size: 11px; padding: 5px 7px; }
  .account { gap: 8px; }
  .avatar { width: 29px; height: 29px; font-size: 11px; }
  .content { padding: 20px 16px; }
  .page-heading { gap: 20px; padding: 23px 24px; }
  .page-heading.buyer-greeting { padding: 14px 16px; min-height: 0; gap: 8px; }
  .buyer-greeting .eyebrow { margin-bottom: 6px; }
  .buyer-greeting h1 { margin-bottom: 8px; }
  .eyebrow { font-size: 11px; letter-spacing: 1.4px; }
  .page-heading > .btn { min-height: 44px; }
  .demo-notice { font-size: 11px; flex-wrap: wrap; }
  .demo-notice > span:nth-child(2) { min-width: 190px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .stat { padding: 18px 16px; border-radius: 16px; }
  .stat-top { font-size: 11px; gap: 8px; }
  .stat .icon-box { width: 27px; height: 27px; }
  .stat .icon-box .icon { width: 16px; height: 16px; }
  .stat-value { font-size: 36px; }
  .metric-index, .metric-demo { display: none; }
  .stat-caption { font-size: 11px; }
  .stat:last-child { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .stat:last-child .metric-body { justify-content: flex-end; margin: 0; }
  .stat:last-child .stat-caption { grid-column: 1/-1; margin-top: 16px; }
  .panel-head { padding: 20px; }
  .chart-wrap { padding: 20px 16px; }
  .chart-summary strong small { display: block; margin: 5px 0 0; }
  .chart-summary { align-items: flex-start; }
  .chart-legend { font-size: 11px; }
  .chart text { font-size: 15px; }
  .toolbar { padding: 18px; }
  .toolbar select { width: 100%; }
  .card-grid { padding: 0 18px 18px; }
  .card-actions .btn { flex: 1; }
  .panel-body { padding: 20px; }
  .form-bottom { align-items: flex-start; flex-direction: column; }
  .form-bottom > .btn { width: 100%; }
  .physical-card { max-width: 400px; margin: auto; }
}
/* Match the hidden-sidebar breakpoint; keep the desktop header unchanged. */
@media (max-width: 959px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar .top-title, .topbar .account-name { display: none; }
  .topbar .mobile-menu { flex: 0 0 40px; width: 40px; height: 44px; align-items: center; justify-content: center; padding: 0; }
  .mobile-brand { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 44px; margin-right: auto; color: #283953; }
  .mobile-brand:hover { color: #283953; }
  .mobile-brand-mark { display: grid; place-items: center; width: 28px; height: 31px; flex-shrink: 0; border-radius: 9px; background: conic-gradient(var(--google-blue) 0 25%, var(--google-red) 25% 50%, var(--google-yellow) 50% 75%, var(--google-green) 75%); color: white; }
  .mobile-brand-mark .icon { width: 20px; height: 20px; }
  .mobile-brand-name { font-size: 14px; font-weight: 750; letter-spacing: -.6px; white-space: nowrap; }
  .mobile-brand-name > span { margin-left: 2px; font-weight: 400; }
  .topbar .account { flex-shrink: 0; gap: 7px; }
  .topbar .demo-pill { padding: 5px 6px; font-size: 9px; }
  .topbar .avatar { width: 28px; height: 28px; font-size: 10px; }
}
/* Supplied R multicolor artwork: preserve its full aspect ratio and colors. */
.rr-logo { display: block; width: 72px; height: 48px; object-fit: contain; flex-shrink: 0; border-radius: 8px; }
.brand .brand-mark, .mobile-brand .mobile-brand-mark { width: auto; height: auto; background: none; box-shadow: none; border-radius: 0; }
.physical-top .rr-logo { width: 54px; height: 36px; }
.hero-card-front .rr-logo { display: inline-block; vertical-align: middle; width: 42px; height: 28px; margin-right: 5px; }
@media (max-width: 959px) {
  .mobile-brand { gap: 6px; }
  .mobile-brand .rr-logo { width: 51px; height: 34px; }
  .mobile-brand-name { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}


/* ==========================================================================
   V2 BUYER DASHBOARD REFINEMENTS & MOBILE-FIRST POLISH
   ========================================================================== */

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

/* User Card in Sidebar */
.workspace-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f8fafd;
  border: 1px solid #e3e8f0;
  border-radius: 14px;
  margin: 20px 0 24px;
}
.avatar-circle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4, #1a73e8);
  color: white;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(66, 133, 244, 0.25);
}
.avatar-circle.small { width: 30px; height: 30px; font-size: 11px; }
.user-meta { min-width: 0; }
.user-meta strong { display: block; font-size: 13px; color: #202124; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { display: block; font-size: 11px; color: #5f6368; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* Color Stripes */
.color-stripe { display: flex; height: 4px; border-radius: 2px; overflow: hidden; margin-bottom: 12px; }
.color-stripe i { flex: 1; }
.color-stripe i:nth-child(1) { background: #4285F4; }
.color-stripe i:nth-child(2) { background: #EA4335; }
.color-stripe i:nth-child(3) { background: #FBBC05; }
.color-stripe i:nth-child(4) { background: #34A853; }

/* Topbar Account */
.account-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.account-badge { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 5px; background: #f1f3f4; border-radius: 20px; font-size: 12px; color: #3c4043; font-weight: 500; }
.account-name-text { max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-logout { background: #fff; border: 1px solid #dadce0; color: #d93025; font-weight: 600; justify-content: center; }
.btn-logout:hover { background: #fce8e6; border-color: #f28b82; color: #c5221f; }
.btn-logout-top { color: #5f6368; padding: 6px 10px; }
.btn-logout-top:hover { color: #d93025; background: #fce8e6; }
.full { width: 100%; }

/* Google Policy Alert Banner */
.google-alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fef7e0;
  border: 1px solid #f9ab00;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 24px;
  color: #5c3800;
  font-size: 13px;
  line-height: 1.6;
}
.google-alert-banner.small { padding: 12px 14px; font-size: 12px; margin: 16px 0 0; }
.alert-icon { color: #e37400; flex-shrink: 0; margin-top: 1px; }
.alert-text strong { display: block; color: #3b2400; margin-bottom: 4px; }
.alert-text em { font-style: normal; font-weight: 600; text-decoration: underline; }

/* Metric Cards */
.stat-blue { background: linear-gradient(135deg, #1a73e8, #4285F4); color: #fff; }
.stat-green { background: linear-gradient(135deg, #137333, #34A853); color: #fff; }
.stat-yellow { background: linear-gradient(135deg, #e37400, #FBBC04); color: #fff; }
.stat-unit { font-size: 13px; font-weight: 500; opacity: 0.9; margin-left: 8px; }

/* Head Actions & Count Badge */
.head-actions { margin-left: auto; }
.count-badge { background: #e8f0fe; color: #1a73e8; font-weight: 700; margin-left: 6px; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 12px; }

/* Search & Filter Toolbar */
.toolbar { display: flex; gap: 12px; padding: 18px 24px; border-bottom: 1px solid #f1f3f4; background: #fafbfc; }
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #80868b; pointer-events: none; display: flex; }
.search-box .search { padding-left: 38px; }
.filter-select { width: 220px; flex-shrink: 0; }

/* Cards Grid Layout */
.cards-container { padding: 24px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }

.card-item {
  border: 1px solid #dadce0;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.card-item:hover {
  border-color: #4285F4;
  box-shadow: 0 8px 24px rgba(66, 133, 244, 0.12);
}

.card-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #f8fafd;
  border-bottom: 1px solid #edf2f7;
}
.card-code-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1a73e8;
  letter-spacing: .5px;
}
.card-code-pill .icon { width: 16px; height: 16px; }

.card-item-body { padding: 20px 18px; flex: 1; display: flex; flex-direction: column; gap: 16px; }

.business-row { display: flex; gap: 12px; align-items: center; }
.business-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e8f0fe;
  color: #1a73e8;
  flex-shrink: 0;
}
.business-info { min-width: 0; }
.business-title { font-size: 16px; font-weight: 600; color: #202124; margin: 0; overflow-wrap: anywhere; line-height: 1.4; }
.card-meta { font-size: 11px; color: #70757a; display: block; margin-top: 3px; }

.info-block {
  background: #f8fafd;
  border: 1px solid #edf0f5;
  border-radius: 10px;
  padding: 12px 14px;
}
.info-label { font-size: 10px; font-weight: 700; color: #5f6368; letter-spacing: 0.8px; margin-bottom: 6px; }
.url-copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.url-text { font-size: 12px; color: #1a73e8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #3c4043;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-copy:hover { background: #e8f0fe; border-color: #4285F4; color: #1a73e8; }
.btn-copy.copied { background: #e6f4ea; border-color: #34A853; color: #137333; }

.review-target-box { min-height: 24px; }
.review-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #3c4043;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.review-link:hover { color: #1a73e8; }
.review-link .icon { width: 14px; height: 14px; color: #1a73e8; flex-shrink: 0; }
.review-empty { font-size: 12px; color: #9aa0a6; font-style: italic; }

.card-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid #f1f3f4;
  background: #fafbfc;
  flex-wrap: wrap;
}
.card-item-actions .btn { flex: 1; min-height: 38px; }

/* Modal & Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(32, 33, 36, 0.6);
  backdrop-filter: blur(2px);
  z-index: 100;
}
.modal-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 560px);
  max-height: 90vh;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
  z-index: 101;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #edf0f5;
}
.modal-head h2 { font-size: 18px; font-weight: 700; color: #202124; margin: 0; }
.modal-head p { font-size: 13px; color: #5f6368; margin: 4px 0 0; }
.icon-btn-close {
  background: transparent;
  border: 0;
  color: #5f6368;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
}
.icon-btn-close:hover { background: #f1f3f4; color: #202124; }
.modal-body { padding: 22px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.modal-dialog { max-height: calc(100dvh - 24px); }
.modal-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.modal-head, .modal-foot { flex: 0 0 auto; }
.modal-body { flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: #3c4043; }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.btn-text-link { font-size: 12px; color: #1a73e8; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.btn-text-link:hover { text-decoration: underline; }
.field-help { font-size: 11px; color: #70757a; line-height: 1.5; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #edf0f5;
  background: #fafbfc;
}

/* Inline Alerts */
.inline-error {
  background: #fce8e6;
  border: 1px solid #f28b82;
  color: #c5221f;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}
.inline-success {
  background: #e6f4ea;
  border: 1px solid #81c995;
  color: #137333;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}

/* Floating Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #202124;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  z-index: 200;
  pointer-events: none;
}
.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Loading & Empty States */
.loading-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 24px; }
.skeleton-card {
  height: 220px;
  background: linear-gradient(90deg, #f1f3f4 25%, #e8eaed 50%, #f1f3f4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 16px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Scan Analytics & Chart Controls */
.filter-pills { display: inline-flex; background: #eef2f8; padding: 4px; border-radius: 12px; gap: 4px; }
.pill-btn { border: 0; background: transparent; padding: 6px 14px; font-size: 12px; font-weight: 600; color: #5c6c82; border-radius: 8px; cursor: pointer; transition: all .18s; }
.pill-btn:hover { color: var(--blue); }
.pill-btn.active { background: #fff; color: var(--blue); box-shadow: 0 1px 4px rgba(40,95,187,0.15); }
.chart-container { width: 100%; overflow-x: auto; padding: 16px 20px 8px; }
.chart-svg { display: block; width: 100%; height: auto; min-width: 320px; max-height: 260px; }
.chart-bar { transition: fill .18s; cursor: pointer; }
.chart-bar:hover { fill: #1a56be; }
.chart-empty-state { text-align: center; padding: 36px 20px; color: var(--muted); }
.chart-empty-state .icon-circle { margin: 0 auto 12px; width: 44px; height: 44px; border-radius: 50%; background: #edf2f9; display: grid; place-items: center; color: var(--blue); }
.chart-empty-state .icon-circle.small { width: 44px; height: 44px; }
.chart-empty-state strong { display: block; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.chart-empty-state .subtitle { font-size: 13px; max-width: 420px; margin: 0 auto; color: var(--muted); }
.card-scan-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; background: #eef4ff; color: #285fbb; padding: 4px 10px; border-radius: 8px; }
.card-scan-badge .icon { width: 13px; height: 13px; }
.card-top-badges { display: flex; align-items: center; gap: 8px; }
.card-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

.empty-state { text-align: center; padding: 50px 24px; }
.icon-circle {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e8f0fe;
  color: #1a73e8;
  margin: 0 auto 16px;
}
.icon-circle.error { background: #fce8e6; color: #d93025; }
.empty-state h2 { font-size: 18px; color: #202124; margin: 0 0 8px; }
.empty-state p { font-size: 13px; color: #5f6368; max-width: 420px; margin: 0 auto 20px; line-height: 1.6; }
.action-row { display: flex; justify-content: center; gap: 12px; }

/* Responsive adjustments for phones (< 640px) */
@media (max-width: 639px) {
  .cards-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; padding: 16px; }
  .search-box, .filter-select { width: 100%; }
  .cards-container { padding: 16px; }
  .card-item-actions { flex-direction: column; }
  .card-item-actions .btn { width: 100%; }
  .modal-dialog { width: 95vw; border-radius: 16px; }
  .modal-head, .modal-body, .modal-foot { padding: 16px; }
  .google-alert-banner { flex-direction: column; gap: 8px; padding: 14px; }
  .account-name-text { display: none; }
  .topbar { padding: 0 12px; }
  .logout-label { display: none; }
  .topbar .account-badge { display: none; }
  .topbar .account-actions { flex: 0 0 auto; gap: 2px; margin-left: 0; }
  .topbar .mobile-brand { flex: 1 1 auto; }
  .topbar .mobile-brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .topbar .btn-logout-top .logout-label { display: inline; }
  .topbar .btn-logout-top, .topbar .btn-pw-top { min-height: 44px; padding: 6px; }
}

@media (max-width: 959px) {
 .sidebar.open { max-height: calc(100dvh - 72px); overflow-y: auto; }
 .sidebar.open .sidebar-foot { display: block; padding-top: 16px; }
}
.page-heading.buyer-greeting { min-height: 0; padding: 16px 24px; gap: 8px; }
.buyer-greeting .eyebrow { margin-bottom: 6px; }
.buyer-greeting h1 { margin-bottom: 8px; overflow-wrap: anywhere; }
.greeting-shamrock { display: inline-block; width: 1em; height: 1em; vertical-align: -.12em; }
@media (max-width: 639px) { .page-heading.buyer-greeting { padding: 12px 16px; } }
.dashboard-access { position: relative; overflow: hidden; margin-bottom: 20px; padding: 12px 18px 16px; border: 1px solid #e2e7ee; border-radius: 12px; background: white; color: #10243E; }
.dashboard-access::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: linear-gradient(to right,#4285F4 0 25%,#EA4335 25% 50%,#FBBC05 50% 75%,#34A853 75% 100%); }
.dashboard-access-heading { display: flex; align-items: flex-start; gap: 12px; }
.dashboard-access-heading > div { min-width: 0; }
.dashboard-link-icon { display: inline-flex; flex-shrink: 0; padding: 9px; border-radius: 10px; background: #EAF2FF; color: #4285F4; }
.dashboard-access strong { color: #10243E; }
.dashboard-access p { margin: 4px 0 8px; color: #475569; font-size: 12px; line-height: 1.6; }
.dashboard-link-label { display: block; margin-bottom: 6px; color: #244b82; font-size: 10px; font-weight: 700; letter-spacing: .07em; }
.dashboard-copy-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dashboard-copy-row input { flex: 1 1 180px; min-width: 0; width: 100%; padding: 10px; border: 1px solid #dce7fb; border-radius: 8px; background: #EAF2FF; color: #10243E; text-overflow: ellipsis; }
.dashboard-access #copy-dashboard-link { background: #4285F4; color: white; border-color: #4285F4; white-space: normal; }
.dashboard-access #copy-dashboard-link:hover { background: #336fce; }
.google-alert-banner.buyer-card-info { flex-direction: row; align-items: flex-start; gap: 10px; padding: 12px 14px; background: #f1f6ff; border: 1px solid #dce7fb; color: #475569; }
.buyer-card-info .alert-icon { color: #4285F4; flex-shrink: 0; }
.buyer-card-info .alert-icon .icon { width: 18px; height: 18px; }
.buyer-card-info .alert-text { font-size: 12px; line-height: 1.5; }
.buyer-card-info .alert-text strong { color: #10243E; margin-bottom: 2px; }
.daily-scan-report { padding: 16px 20px; border-top: 1px solid var(--border); }
.daily-report-scroll { max-height: 280px; overflow: auto; }
.daily-report-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.daily-report-table caption { text-align: left; font-weight: 600; padding-bottom: 10px; }
.daily-report-table th, .daily-report-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); }
.daily-report-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.daily-report-pagination .btn { min-height: 40px; padding: 8px 10px; font-size: 12px; }
.daily-report-pagination .btn:disabled { opacity: .45; cursor: default; }
.daily-report-pagination span { font-size: 12px; white-space: nowrap; color: var(--muted); }

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.password-wrap input {
  width: 100%;
  padding-right: 44px !important;
}
.btn-toggle-pw {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  padding: 6px 8px;
  cursor: pointer;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s;
}
.btn-toggle-pw:hover {
  color: #1e293b;
}
.btn-pw-top {
  margin-right: 4px;
}

/* Mobile responsive stability & touch optimizations */
#analytics-card-filter {
  max-width: 100%;
  text-overflow: ellipsis;
}
.chart-container {
  overflow-x: hidden;
  touch-action: pan-y;
}
@media (max-width: 480px) {
  .analytics-filter-bar {
    width: 100%;
  }
  .analytics-card-selector {
    width: 100%;
  }
  .analytics-card-selector select {
    flex: 1;
    min-width: 0;
  }
  .filter-pills {
    width: 100%;
    justify-content: stretch;
  }
  .filter-pills .pill-btn {
    flex: 1;
    text-align: center;
  }
}
