:root {
  --ink: #16332a;
  --muted: #6d7d76;
  --green-900: #123d2f;
  --green-800: #18513d;
  --green-700: #1f6f54;
  --green-600: #2d8462;
  --green-500: #43a477;
  --green-100: #e7f4ed;
  --green-50: #f3f9f6;
  --orange: #e9873d;
  --orange-100: #fff0e2;
  --blue: #3f7fb3;
  --blue-100: #e8f2fb;
  --purple: #765ea9;
  --purple-100: #f0ecfa;
  --sand: #f7f2e8;
  --surface: #ffffff;
  --canvas: #f4f6f3;
  --line: #dce5df;
  --shadow: 0 14px 40px rgba(24, 65, 50, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(67, 164, 119, .28); outline-offset: 2px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 266px; display: flex; flex-direction: column; padding: 24px 18px; background: var(--green-900); color: #fff; box-shadow: 12px 0 30px rgba(17, 52, 40, .12); }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 24px; }
.brand strong { display: block; font-family: Georgia, serif; font-size: 22px; letter-spacing: -.4px; }
.brand small { display: block; color: #b9d2c7; margin-top: 2px; }
.brand-mark { width: 42px; height: 42px; position: relative; border-radius: 13px; background: rgba(255,255,255,.1); overflow: hidden; }
.brand-mark span { position: absolute; bottom: 8px; width: 12px; height: 25px; border: 2px solid #9bd2b7; border-radius: 100% 0 100% 0; transform: rotate(-34deg); }
.brand-mark span:nth-child(1) { left: 8px; }
.brand-mark span:nth-child(2) { left: 16px; height: 30px; transform: rotate(0); }
.brand-mark span:nth-child(3) { right: 7px; transform: rotate(34deg) scaleX(-1); }

.role-card { position: relative; margin-bottom: 19px; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.06); }
.role-card > .eyebrow { color: #9fc5b4; padding-left: 3px; }
.role-switch { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 0 0; border: 0; background: none; text-align: left; cursor: pointer; }
.role-switch strong, .role-switch small { display: block; }
.role-switch small { margin-top: 3px; color: #b7cec4; font-size: 11px; }
.role-menu { position: absolute; z-index: 10; top: 92px; left: 0; right: 0; display: none; padding: 7px; background: #fff; color: var(--ink); border-radius: 13px; box-shadow: var(--shadow); }
.role-menu.open { display: grid; }
.role-menu button { padding: 10px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; }
.role-menu button:hover { background: var(--green-50); }
.avatar { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 0; border-radius: 12px; font-weight: 800; font-size: 12px; }
.avatar-green { background: #d9f2e6; color: var(--green-800); }
.avatar-sand { background: #f4ddbd; color: #79491f; cursor: pointer; }

.main-nav { display: grid; gap: 5px; }
.nav-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 12px 13px; border: 0; border-radius: 11px; color: #c4d9cf; background: none; text-align: left; cursor: pointer; transition: .2s ease; }
.nav-item > span { text-align: center; font-size: 18px; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { color: #fff; background: rgba(255,255,255,.13); box-shadow: inset 3px 0 #8ed0ad; }
.nav-count { min-width: 22px; padding: 3px 6px; border-radius: 999px; background: var(--orange); color: #fff; text-align: center; font-size: 10px; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 12px; }
.storefront-link { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; color: #fff; background: rgba(255,255,255,.06); text-decoration: none; }
.storefront-link > span:first-child { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.1); }
.storefront-link strong, .storefront-link small { display: block; }.storefront-link small { margin-top: 3px; color: #b8cec4; }
.assist-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; color: #fff; background: rgba(255,255,255,.06); text-align: left; cursor: pointer; }
.assist-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.1); }
.assist-card strong, .assist-card small { display: block; }
.assist-card small { margin-top: 3px; color: #b8cec4; }
.switch { width: 34px; height: 20px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.2); transition: .2s ease; }
.switch i { display: block; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .2s ease; }
.assist-card.active .switch { background: #68bd90; }
.assist-card.active .switch i { transform: translateX(14px); }
.research-badge { display: flex; gap: 9px; align-items: center; padding: 10px 12px; color: #a9c5b8; font-size: 11px; }
.research-badge strong, .research-badge small { display: block; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #68d39a; box-shadow: 0 0 0 5px rgba(104,211,154,.1); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(104,211,154,0); } }

.main-content { margin-left: 266px; min-height: 100vh; }
.topbar { position: sticky; z-index: 20; top: 0; height: 76px; display: flex; align-items: center; gap: 20px; padding: 0 34px; border-bottom: 1px solid rgba(220,229,223,.85); background: rgba(255,255,255,.92); backdrop-filter: blur(18px); }
.menu-button { display: none !important; }
.top-search { width: min(560px, 48vw); display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: #f8faf8; }
.top-search input, .search-inline input, .trace-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.top-search kbd { padding: 3px 6px; border: 1px solid #d9e1dc; border-radius: 5px; color: #84918b; background: #fff; font-size: 10px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-button { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.notification-button { position: relative; }
.notification-button span { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: var(--orange); }
.sync-pill { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: center; padding: 7px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.sync-pill small { grid-column: 2; color: var(--muted); font-size: 9px; }
.sync-dot { grid-row: span 2; width: 8px; height: 8px; border-radius: 50%; background: #46a878; }
.sync-pill.offline .sync-dot { background: var(--orange); }

.page { display: none; padding: 34px; animation: pageIn .24s ease; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(5px); } }
.page-heading { display: flex; justify-content: space-between; gap: 28px; align-items: flex-end; margin-bottom: 25px; }
.page-heading.compact { align-items: center; }
.page-heading h1 { margin: 5px 0 6px; font-family: Georgia, serif; font-size: clamp(28px, 3vw, 40px); line-height: 1.06; letter-spacing: -.8px; }
.page-heading p { margin: 0; color: var(--muted); max-width: 720px; }
.eyebrow { color: var(--green-700); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.heading-actions { display: flex; gap: 10px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; padding: 0 17px; border-radius: 11px; font-weight: 750; cursor: pointer; }
.button.primary { border: 1px solid var(--green-700); background: var(--green-700); color: #fff; box-shadow: 0 8px 18px rgba(31,111,84,.17); }
.button.primary:hover { background: var(--green-800); }
.button.secondary { border: 1px solid var(--line); background: #fff; }
.button.secondary:hover { background: var(--green-50); border-color: #c7ddd1; }
.button.full, .text-button.full { width: 100%; }
.text-button { border: 0; color: var(--green-700); background: none; font-weight: 800; cursor: pointer; }
.text-button.danger, .danger { color: #ad4e43; }

.alert-strip { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; margin-bottom: 20px; padding: 14px 16px; border: 1px solid #f2d0ad; border-radius: 14px; background: #fff8ef; }
.alert-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #f4a968; color: #fff; font-weight: 900; }
.alert-strip p { margin: 2px 0 0; color: #795a3c; font-size: 12px; }
.alert-strip button { border: 0; background: none; color: #a95f22; font-weight: 800; cursor: pointer; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 18px; }
.metric-card { position: relative; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 18px rgba(24,65,50,.035); }
.metric-card > span { display: block; color: var(--muted); font-size: 12px; }
.metric-card > strong { display: block; margin: 10px 0 5px; font-family: Georgia, serif; font-size: 27px; }
.metric-card > small { color: var(--muted); }
.metric-card > small.positive { color: var(--green-700); }
.metric-icon { position: absolute; top: 17px; right: 17px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; }
.metric-icon.green { color: var(--green-700); background: var(--green-100); }
.metric-icon.orange { color: #b76225; background: var(--orange-100); }
.metric-icon.blue { color: var(--blue); background: var(--blue-100); }
.metric-icon.purple { color: var(--purple); background: var(--purple-100); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 22px rgba(24,65,50,.045); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr); gap: 18px; margin-bottom: 18px; }
.bottom-grid { grid-template-columns: 1.35fr .75fr; }
.panel-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px 21px 14px; }
.panel-heading h2 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 20px; }
.panel-heading select, .market-toolbar select, .filter-panel select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
.demand-panel { padding-bottom: 15px; }
.chart-legend { display: flex; gap: 18px; padding: 0 21px; color: var(--muted); font-size: 11px; }
.chart-legend i { display: inline-block; width: 14px; height: 3px; margin: 0 6px 3px 0; border-radius: 4px; }
.legend-green { background: var(--green-500); }.legend-orange { background: var(--orange); }
.chart { position: relative; margin: 15px 21px 8px; padding-left: 34px; }
.chart svg { width: 100%; height: 205px; overflow: visible; }
.grid-lines line { stroke: #e8eeea; stroke-width: 1; }
.area-path { fill: url(#area); }
.demand-line, .price-line { fill: none; stroke-linecap: round; stroke-width: 3; }
.demand-line { stroke: var(--green-500); }.price-line { stroke: var(--orange); stroke-dasharray: 6 7; }
.y-labels { position: absolute; inset: -2px auto 17px 0; display: flex; flex-direction: column; justify-content: space-between; color: #96a19c; font-size: 9px; }
.x-labels { display: flex; justify-content: space-between; color: #96a19c; font-size: 9px; }
.chart-note { display: flex; gap: 8px; align-items: center; margin: 12px 21px 0; padding: 10px 12px; border-radius: 10px; background: var(--green-50); }
.chart-note p { margin: 0; font-size: 11px; flex: 1; }.chart-note button { border: 0; color: var(--green-700); background: none; font-weight: 800; cursor: pointer; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }.status-dot.success { background: var(--green-500); }
.action-list { padding: 0 12px 12px; }
.action-row { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 13px 8px; border: 0; border-bottom: 1px solid #edf1ee; background: none; text-align: left; cursor: pointer; }
.action-row:last-child { border-bottom: 0; }.action-row:hover { background: var(--green-50); }
.action-row strong, .action-row small { display: block; }.action-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.action-symbol { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; font-weight: 900; }.action-symbol.warning { color: #b66b31; background: var(--orange-100); }.action-symbol.blue { color: var(--blue); background: var(--blue-100); }.action-symbol.purple { color: var(--purple); background: var(--purple-100); }.action-symbol.green { color: var(--green-700); background: var(--green-100); }
.mini-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; padding: 0 20px 20px; }
.mini-product { padding: 12px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; transition: .2s ease; }.mini-product:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.produce-visual { height: 92px; display: grid; place-items: center; margin-bottom: 9px; border-radius: 10px; background: linear-gradient(140deg, #edf7ee, #e8f0df); font-size: 45px; overflow: hidden; }
.mini-product strong, .mini-product small { display: block; }.mini-product small { color: var(--muted); margin-top: 3px; }.mini-product b { display: block; margin-top: 8px; color: var(--green-700); }
.lot-summary { display: grid; grid-template-columns: 105px 1fr; gap: 15px; align-items: center; padding: 2px 21px 22px; }
.qr-mini, .qr-large { background-color: #fff; background-image: linear-gradient(90deg, #17392f 10%, transparent 10%, transparent 20%, #17392f 20%, #17392f 30%, transparent 30%, transparent 40%, #17392f 40%, #17392f 60%, transparent 60%), linear-gradient(#17392f 10%, transparent 10%, transparent 20%, #17392f 20%, #17392f 30%, transparent 30%, transparent 50%, #17392f 50%, #17392f 70%, transparent 70%); background-size: 28px 28px; border: 9px solid #fff; outline: 1px solid var(--line); }
.qr-mini { width: 100px; height: 100px; border-radius: 10px; }.lot-summary h3 { margin: 8px 0 3px; }.lot-summary p { margin: 0 0 11px; color: var(--muted); font-size: 11px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }.pill.verified, .pill.on-track { color: var(--green-800); background: var(--green-100); }.pill.neutral { color: #596a63; background: #edf1ef; }.pill.xai { color: var(--purple); background: var(--purple-100); }
.lot-progress { display: flex; gap: 4px; margin-bottom: 7px; }.lot-progress span { height: 4px; flex: 1; border-radius: 99px; background: #dde5e0; }.lot-progress span.done { background: var(--green-500); }

.market-layout { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
.filter-panel { position: sticky; top: 94px; padding: 18px; }
.filter-title { display: flex; justify-content: space-between; align-items: center; }.filter-title h2 { margin: 0; font-family: Georgia, serif; }.filter-title button { border: 0; color: var(--green-700); background: none; cursor: pointer; }
.filter-panel > label { display: grid; gap: 6px; margin-top: 18px; font-size: 11px; font-weight: 750; }.filter-panel fieldset { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; border: 0; }.filter-panel legend { margin-bottom: 8px; font-size: 11px; font-weight: 800; }.check { color: var(--muted); font-size: 11px; }.check input { accent-color: var(--green-700); }
.fair-filter { display: flex; gap: 9px; margin-top: 20px; padding: 11px; border-radius: 11px; background: var(--green-50); }.fair-filter strong, .fair-filter small { display: block; }.fair-filter small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.market-toolbar { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 14px; }.market-toolbar > div { display: flex; gap: 11px; align-items: center; }.market-toolbar span { color: var(--muted); font-size: 11px; }
.search-inline { min-width: min(370px, 42vw); display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.product-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; cursor: pointer; transition: .2s ease; }.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }.product-card .produce-visual { height: 155px; margin: 0; border-radius: 0; font-size: 65px; }.product-card-content { padding: 15px; }.product-card h3 { margin: 6px 0 3px; font-family: Georgia, serif; font-size: 17px; }.product-card p { margin: 0; color: var(--muted); font-size: 10px; }.product-price { display: flex; justify-content: space-between; gap: 10px; align-items: end; margin-top: 13px; }.product-price strong { color: var(--green-700); }.product-price small { color: var(--muted); }.match-badge { position: absolute; top: 11px; right: 11px; padding: 5px 8px; border-radius: 99px; background: rgba(255,255,255,.92); color: var(--green-700); font-size: 9px; font-weight: 900; box-shadow: 0 4px 14px rgba(0,0,0,.07); }.product-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }.product-meta span { padding: 4px 6px; border-radius: 6px; color: #557067; background: var(--green-50); font-size: 8px; }

.tab-bar { display: flex; gap: 5px; margin-bottom: 14px; padding: 5px; width: fit-content; border: 1px solid var(--line); border-radius: 12px; background: #fff; }.tab-bar button { padding: 8px 12px; border: 0; border-radius: 8px; background: none; cursor: pointer; }.tab-bar button.active { color: var(--green-800); background: var(--green-100); font-weight: 800; }.tab-bar span { margin-left: 5px; padding: 2px 5px; border-radius: 9px; background: rgba(255,255,255,.7); font-size: 9px; }
.order-table-wrap { overflow: auto; }.data-table { width: 100%; border-collapse: collapse; min-width: 850px; }.data-table th { padding: 12px 16px; color: var(--muted); background: #f8faf8; text-align: left; font-size: 10px; text-transform: uppercase; }.data-table td { padding: 14px 16px; border-top: 1px solid var(--line); font-size: 11px; }.data-table td strong, .data-table td small { display: block; }.data-table td small { margin-top: 3px; color: var(--muted); }.data-table button { border: 0; background: none; cursor: pointer; }.progress-inline { width: 100px; height: 5px; margin-top: 6px; border-radius: 9px; background: #e4ebe7; overflow: hidden; }.progress-inline i { display: block; height: 100%; background: var(--green-500); }
.order-detail-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin-top: 18px; }.route { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 5px 21px 20px; }.route-point { display: flex; align-items: center; gap: 8px; }.route-point i { width: 13px; height: 13px; border: 3px solid #d2ded7; border-radius: 50%; }.route-point.active i { border-color: var(--green-500); }.route-point strong, .route-point small { display: block; }.route-point small { color: var(--muted); font-size: 9px; }.route-line { position: relative; height: 5px; border-radius: 9px; background: #e3eae6; }.route-line span { display: block; height: 100%; border-radius: inherit; background: var(--green-500); }.route-line b { position: absolute; left: 51%; top: -28px; padding: 4px 6px; border-radius: 5px; color: var(--blue); background: var(--blue-100); font-size: 9px; }.sensor-grid, .grievance-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 21px 21px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }.sensor-grid div, .grievance-stats div { padding: 11px; border-right: 1px solid var(--line); }.sensor-grid div:last-child, .grievance-stats div:last-child { border: 0; }.sensor-grid span, .sensor-grid strong, .grievance-stats span, .grievance-stats strong { display: block; }.sensor-grid span, .grievance-stats span { color: var(--muted); font-size: 9px; }.sensor-grid strong, .grievance-stats strong { margin-top: 4px; }
.milestone { display: grid; grid-template-columns: repeat(3, 1fr); padding: 7px 21px 19px; }.milestone span { position: relative; display: grid; justify-items: center; text-align: center; }.milestone span:not(:last-child)::after { content: ""; position: absolute; z-index: 0; left: 64%; top: 12px; width: 72%; height: 2px; background: #dce5df; }.milestone i { z-index: 1; width: 25px; height: 25px; display: grid; place-items: center; border: 2px solid #dce5df; border-radius: 50%; background: #fff; font-style: normal; font-size: 9px; }.milestone .complete i { border-color: var(--green-500); color: #fff; background: var(--green-500); }.milestone b { margin-top: 7px; }.milestone small { color: var(--muted); font-size: 8px; }.milestone + .button { width: calc(100% - 42px); margin: 0 21px 21px; }

.trace-search { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-bottom: 18px; padding: 11px; }.trace-search > span { padding-left: 8px; font-size: 22px; }.trace-search input { font-weight: 800; letter-spacing: .5px; }
.trace-grid { display: grid; grid-template-columns: 270px minmax(400px, 1fr) 270px; gap: 18px; align-items: start; }.trace-identity { padding: 20px; text-align: center; }.qr-large { width: 170px; height: 170px; margin: 0 auto 17px; border-radius: 12px; }.trace-identity h2 { margin: 11px 0 4px; font-family: Georgia, serif; }.trace-identity > p { margin: 0 0 17px; color: var(--muted); }.trace-identity dl, .consent-detail dl { margin: 0 0 17px; text-align: left; }.trace-identity dl div, .consent-detail dl div { display: flex; justify-content: space-between; gap: 15px; padding: 9px 0; border-top: 1px solid var(--line); }.trace-identity dt, .consent-detail dt { color: var(--muted); font-size: 10px; }.trace-identity dd, .consent-detail dd { margin: 0; text-align: right; font-size: 10px; font-weight: 700; }.quality-score { color: var(--green-700); }.trace-timeline { min-height: 570px; }.timeline-item { position: relative; display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; padding: 9px 20px 17px; }.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 36px; top: 40px; bottom: -5px; width: 2px; background: #dce6e0; }.timeline-symbol { z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #bcd7c9; border-radius: 50%; color: var(--green-700); background: var(--green-50); }.timeline-item h3 { margin: 1px 0 4px; font-size: 12px; }.timeline-item p { margin: 0; color: var(--muted); font-size: 10px; }.timeline-item > small { color: var(--muted); font-size: 9px; }.evidence-chip { display: none; margin-top: 7px; padding: 6px 8px; border-radius: 7px; color: var(--blue); background: var(--blue-100); font-size: 9px; }.show-evidence .evidence-chip { display: inline-block; }
.visibility-list { padding: 3px 20px 18px; }.visibility-list div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 10px; }.visibility-list b { color: var(--green-700); }.visibility-list b.muted { color: #78847f; }.visibility-panel .button { width: calc(100% - 40px); margin: 0 20px 20px; }

.xai-layout { display: grid; grid-template-columns: 1.25fr .9fr .75fr; gap: 18px; align-items: start; }.recommendation-card { grid-row: span 2; padding: 23px; }.rec-top { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; }.rec-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 14px; color: var(--purple); background: var(--purple-100); font-size: 20px; }.rec-top h2 { margin: 4px 0 0; font-family: Georgia, serif; }.confidence { width: 68px; height: 68px; display: grid; place-content: center; border: 6px solid #d8efe3; border-top-color: var(--green-500); border-radius: 50%; text-align: center; }.confidence b, .confidence small { display: block; }.confidence small { color: var(--muted); font-size: 8px; }.recommendation-card > p { margin: 22px 0; color: var(--muted); line-height: 1.65; }.rec-summary { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }.rec-summary div { padding: 13px; border-right: 1px solid var(--line); }.rec-summary div:last-child { border: 0; }.rec-summary span, .rec-summary strong { display: block; }.rec-summary span { color: var(--muted); font-size: 9px; }.rec-summary strong { margin-top: 5px; }.rec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }.human-note { display: block; margin-top: 17px; color: var(--muted); line-height: 1.45; }.factor-list { padding: 0 21px 8px; }.factor { margin-bottom: 14px; }.factor label { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; }.factor i { display: block; height: 7px; margin-top: 6px; border-radius: 9px; background: #e4ebe7; overflow: hidden; }.factor i b { display: block; height: 100%; border-radius: inherit; background: var(--green-500); }.factor.negative i b { background: var(--orange); }.freshness { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin: 0 21px 21px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 9px; }.freshness div { height: 5px; border-radius: 7px; background: #e4ebe7; }.freshness i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }.alternative-card { padding-bottom: 13px; }.scenario { width: calc(100% - 28px); display: flex; justify-content: space-between; align-items: center; margin: 0 14px 8px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; text-align: left; cursor: pointer; }.scenario.active { border-color: #9bcdb4; background: var(--green-50); }.scenario strong, .scenario small { display: block; }.scenario small { margin-top: 3px; color: var(--muted); font-size: 9px; }.scenario b { color: var(--green-700); }.model-limit { margin: 14px; padding: 12px; border-radius: 11px; background: var(--orange-100); }.model-limit p { margin: 5px 0 0; color: #765338; font-size: 9px; line-height: 1.5; }.advisor-card { padding: 17px; }.advisor-card > div { display: flex; gap: 9px; align-items: center; }.advisor-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #7e5227; background: #f2d8b8; font-weight: 900; }.advisor-card strong, .advisor-card small { display: block; }.advisor-card small { color: var(--muted); }.advisor-card p { color: var(--muted); font-size: 10px; font-style: italic; line-height: 1.55; }

.consent-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }.warning-text { color: #a85d28 !important; }.consent-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: start; }.consent-list-panel { overflow: hidden; }.consent-item { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 16px 20px; border: 0; border-top: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; }.consent-item.active { background: var(--green-50); box-shadow: inset 3px 0 var(--green-500); }.consent-item:hover { background: #f7faf8; }.consent-item > span:first-child { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: var(--green-700); background: var(--green-100); }.consent-item strong, .consent-item small { display: block; }.consent-item small { margin-top: 3px; color: var(--muted); }.consent-item > b { color: var(--green-700); font-size: 10px; }.consent-detail { padding: 22px; position: sticky; top: 94px; }.consent-detail h2 { margin: 5px 0 8px; font-family: Georgia, serif; }.consent-detail > p { color: var(--muted); line-height: 1.6; }.consent-controls { display: grid; gap: 8px; }.toggle-row { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 11px; }.toggle-row strong, .toggle-row small { display: block; }.toggle-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }.toggle-row input { position: absolute; opacity: 0; }.toggle-row i { width: 38px; height: 22px; padding: 3px; border-radius: 20px; background: #cbd5cf; }.toggle-row i::before { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s ease; }.toggle-row input:checked + i { background: var(--green-500); }.toggle-row input:checked + i::before { transform: translateX(16px); }

.governance-status { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; padding: 16px 20px; }.governance-status > div { display: flex; align-items: center; gap: 11px; }.governance-score { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 14px; color: var(--green-800); background: var(--green-100); font-family: Georgia, serif; font-size: 20px; font-weight: 900; }.governance-status strong, .governance-status small { display: block; }.governance-status small { color: var(--muted); }.governance-tags { flex-wrap: wrap; }.governance-tags span { padding: 6px 8px; border-radius: 8px; color: var(--green-700); background: var(--green-50); font-size: 9px; }.governance-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }.bar-chart { display: grid; gap: 16px; padding: 5px 21px 18px; }.bar-chart label { display: flex; justify-content: space-between; font-size: 10px; }.bar-chart i { display: block; height: 9px; margin-top: 5px; border-radius: 9px; background: #e4ebe7; overflow: hidden; }.bar-chart i b { display: block; height: 100%; border-radius: inherit; background: var(--green-500); }.bar-chart i b.orange { background: var(--orange); }.fairness-note { display: flex; gap: 10px; margin: 0 21px 21px; padding: 12px; border-radius: 11px; background: var(--green-50); }.fairness-note span { color: var(--green-700); font-weight: 900; }.fairness-note p { margin: 0; color: #527065; font-size: 10px; line-height: 1.5; }.health-list { padding: 0 20px 18px; }.health-list div { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 10px; }.health-list span { display: flex; align-items: center; gap: 7px; }.health-list i { width: 7px; height: 7px; border-radius: 50%; }.health-list i.success { background: var(--green-500); }.health-list i.warning { background: var(--orange); }.policy-log > div:not(.panel-heading) { display: flex; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--line); }.policy-version { align-self: start; padding: 4px 6px; border-radius: 6px; color: var(--purple); background: var(--purple-100); font-size: 9px; font-weight: 900; }.policy-log p { margin: 0; }.policy-log strong, .policy-log small { display: block; }.policy-log small { margin-top: 4px; color: var(--muted); }.grievance-card { padding-bottom: 20px; }.grievance-card .button { width: calc(100% - 42px); margin: 0 21px; }

.product-drawer { position: fixed; z-index: 60; top: 0; right: 0; width: min(480px, 94vw); height: 100vh; padding: 25px; overflow: auto; background: #fff; box-shadow: -20px 0 50px rgba(18,55,42,.18); transform: translateX(105%); transition: .28s ease; }.product-drawer.open { transform: translateX(0); }.drawer-backdrop, .modal-backdrop { position: fixed; z-index: 50; inset: 0; display: none; background: rgba(12,34,27,.42); backdrop-filter: blur(3px); }.drawer-backdrop.open, .modal-backdrop.open { display: block; }.drawer-close { position: absolute; top: 14px; right: 14px; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 21px; cursor: pointer; }.drawer-product-visual { height: 230px; display: grid; place-items: center; margin: -25px -25px 22px; background: linear-gradient(145deg, #edf7ee, #dfead8); font-size: 100px; }.drawer-tags { display: flex; gap: 6px; flex-wrap: wrap; }.drawer-tags span { padding: 5px 7px; border-radius: 7px; background: var(--green-50); font-size: 9px; }.drawer-title { margin: 13px 0 5px; font-family: Georgia, serif; font-size: 30px; }.drawer-sub { color: var(--muted); }.drawer-price { display: flex; justify-content: space-between; align-items: end; margin: 18px 0; padding: 15px; border-radius: 13px; background: var(--green-50); }.drawer-price strong { color: var(--green-700); font-size: 22px; }.drawer-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }.drawer-specs div { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }.drawer-specs span, .drawer-specs strong { display: block; }.drawer-specs span { color: var(--muted); font-size: 9px; }.drawer-specs strong { margin-top: 4px; }.explanation-box { margin: 17px 0; padding: 14px; border: 1px solid #dcd4ef; border-radius: 13px; background: #f7f4fd; }.explanation-box p { margin: 6px 0 0; color: #685d7f; font-size: 10px; line-height: 1.5; }
.modal { position: fixed; z-index: 70; top: 50%; left: 50%; width: min(520px, 92vw); display: none; padding: 25px; border-radius: 18px; background: #fff; box-shadow: 0 25px 80px rgba(18,55,42,.25); transform: translate(-50%, -50%); }.modal.open { display: block; }.modal h2 { margin: 5px 0 8px; font-family: Georgia, serif; }.modal > p { color: var(--muted); line-height: 1.55; }.modal-body-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }.modal-body-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }.modal-body-grid input, .modal-body-grid select { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }.modal-actions { display: flex; justify-content: end; gap: 8px; margin-top: 20px; }
.toast-region { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: grid; gap: 8px; }.toast { min-width: 280px; display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 13px 15px; border: 1px solid #cfe2d7; border-radius: 12px; background: #fff; box-shadow: var(--shadow); animation: toastIn .25s ease; }.toast strong, .toast small { display: block; }.toast small { margin-top: 2px; color: var(--muted); }.toast > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green-500); } @keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trace-grid { grid-template-columns: 250px 1fr; }.visibility-panel { grid-column: 1 / -1; }
  .xai-layout { grid-template-columns: 1.2fr .8fr; }.alternative-card { grid-column: 2; }.advisor-card { grid-column: 2; }
}
@media (max-width: 920px) {
  .sidebar { transform: translateX(-105%); transition: .25s ease; }.sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }.menu-button { display: grid !important; }
  .topbar { padding: 0 18px; }.top-search { width: min(440px, 55vw); }
  .dashboard-grid, .bottom-grid, .order-detail-grid, .consent-grid, .governance-grid { grid-template-columns: 1fr; }
  .market-layout { grid-template-columns: 1fr; }.filter-panel { position: static; }
  .trace-grid { grid-template-columns: 1fr 1.4fr; }.visibility-panel { grid-column: 1 / -1; }
  .consent-detail { position: static; }.consent-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .page { padding: 23px 16px 90px; }.topbar { height: 66px; gap: 9px; }.top-search { flex: 1; width: auto; }.top-search kbd, .sync-pill small, .sync-pill strong { display: none; }.sync-pill { width: 39px; height: 39px; grid-template-columns: 1fr; place-items: center; padding: 0; }
  .page-heading, .page-heading.compact { align-items: flex-start; flex-direction: column; }.page-heading h1 { font-size: 30px; }.heading-actions { width: 100%; }.heading-actions .button { flex: 1; }
  .metric-grid, .consent-summary { grid-template-columns: 1fr 1fr; gap: 10px; }.metric-card { padding: 15px; }.metric-card > strong { font-size: 21px; }
  .alert-strip { grid-template-columns: auto 1fr; }.alert-strip button { grid-column: 2; text-align: left; padding: 0; }
  .mini-products, .product-grid { grid-template-columns: 1fr; }.market-toolbar { align-items: stretch; flex-direction: column; }.market-toolbar > div { justify-content: space-between; }.search-inline { min-width: 0; width: 100%; }
  .trace-grid, .xai-layout { grid-template-columns: 1fr; }.visibility-panel, .alternative-card, .advisor-card { grid-column: auto; }.trace-search { grid-template-columns: auto 1fr; }.trace-search .button { grid-column: 1 / -1; }
  .governance-status { align-items: flex-start; flex-direction: column; }.governance-status > div:last-child { align-items: flex-start; flex-direction: column; }
  .rec-top { grid-template-columns: auto 1fr; }.confidence { grid-column: 1 / -1; width: 100%; height: auto; display: flex; justify-content: center; gap: 4px; border: 0; border-radius: 9px; background: var(--green-50); padding: 8px; }.rec-summary { grid-template-columns: 1fr; }.rec-summary div { border-right: 0; border-bottom: 1px solid var(--line); }
  .modal-body-grid { grid-template-columns: 1fr; }.lot-summary { grid-template-columns: 84px 1fr; }.qr-mini { width: 80px; height: 80px; }
}
@media (max-width: 430px) { .metric-grid, .consent-summary { grid-template-columns: 1fr; }.top-actions .notification-button { display: none; }.top-search { padding: 9px; }.top-search input::placeholder { color: transparent; } }
