:root {
  --west-orange: #f58226;
  --west-peach: #fac49a;
  --west-ink: #1d1d1b;
  --west-accent: #b84b0d;
  --west-muted: #68635c;
  --west-background: #f7f5f2;
  --west-border: #e7e1d9;
  --west-tint: #fff1e5;
  --west-gradient: linear-gradient(115deg, var(--west-peach), var(--west-orange));
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--west-ink);
  background: var(--west-background);
  font-synthesis: none;
}
body { margin: 0; background: var(--west-background); }
* { box-sizing: border-box; }
a { color: var(--west-accent); }
::selection { background: #fac49a; color: var(--west-ink); }
:focus-visible { outline: 2px solid var(--west-accent); outline-offset: 4px; }
.app-header { min-height: 100px; background: #fff; border-bottom: 1px solid var(--west-border); display: flex; align-items: center; padding: 0 3.5%; gap: 48px; position: relative; }
.app-header::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--west-gradient); }
.brand { display: flex; align-items: center; gap: 18px; color: var(--west-ink); text-decoration: none; flex-shrink: 0; }
.brand-logo { display: block; width: 90px; height: 80px; object-fit: contain; }
.brand-title { border-left: 1px solid var(--west-border); padding-left: 20px; font-size: 23px; line-height: 1.1; font-weight: 650; letter-spacing: -.5px; }
.brand-sub { display: block; font-size: 10px; letter-spacing: 2.8px; color: var(--west-muted); margin-top: 9px; font-weight: 600; }
.app-header nav { display: flex; gap: 24px; flex: 1; align-self: stretch; align-items: stretch; }
.app-header nav a { color: var(--west-muted); text-decoration: none; font-size: 14px; padding: 0 2px; display: flex; align-items: center; white-space: nowrap; transition: color .15s ease; }
.app-header nav a:hover { color: var(--west-ink); }
.app-header nav a.active { color: var(--west-accent); box-shadow: inset 0 -5px var(--west-orange); font-weight: 650; }
.workspace { max-width: 1580px; margin: auto; padding: 36px 3.5% 56px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 20px; }
.eyebrow { font-size: 10px; letter-spacing: 1.8px; font-weight: 700; color: var(--west-accent); }
h1 { font-size: 32px; line-height: 1.3; margin: 8px 0; font-weight: 650; letter-spacing: -.8px; color: var(--west-ink); }
h1[tabindex="-1"]:focus { outline: none; }
h2 { font-size: 18px; margin: 10px 0 20px; font-weight: 650; color: var(--west-ink); }
p { color: var(--west-muted); line-height: 1.6; }
.status-pill { border: 1px solid var(--west-border); border-radius: 24px; padding: 8px 16px; font-size: 13px; background: #fff; white-space: nowrap; }
.status-dot { display: inline-block; height: 7px; width: 7px; border-radius: 50%; background: #958e85; margin-right: 8px; }
.status-dot.connected { background: #217451; }
.connection-bar { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; border-radius: 12px !important; border-color: var(--west-border) !important; border-left: 4px solid var(--west-orange) !important; }
.connection-bar .mud-input-control { flex: 1; min-width: 0; }
.console-grid { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 24px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--west-border); border-radius: 12px; padding: 24px; min-width: 0; box-shadow: 0 3px 12px #3d2c1604; }
.main-panel { padding: 8px 0 0; overflow: hidden; }
.tab-content { padding: 24px; }
.field-pair { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.store-picker { background: #fcf8f4; border: 1px solid var(--west-border); border-top: 3px solid var(--west-orange); border-radius: 10px; padding: 14px; margin-bottom: 20px; }
.store-picker h3 { font-size: 14px; font-weight: 650; margin: 0 0 12px; }
.store-selection-summary { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; margin: 14px 0 8px; overflow-wrap: anywhere; }
.store-selection-summary strong { font-size: 12px; }
.store-selection-summary span { font-size: 11px; color: var(--west-muted); }
.store-selection-summary .store-environment { color: var(--west-accent); background: var(--west-tint); border-radius: 5px; padding: 3px 7px; }
.button-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.mud-button { border-radius: 7px; }
.mud-button-filled-primary:not(:disabled) { background: var(--west-gradient); color: var(--west-ink); box-shadow: 0 3px 8px #d8661424; }
.mud-button-filled-primary:not(:disabled):hover { background: linear-gradient(115deg, #ffb77c, #f58226); box-shadow: 0 4px 12px #d8661433; }
.mud-button-outlined-default { border-color: #d5ccc1; }
.mud-tab.mud-tab-active { background: var(--west-tint); }
.mud-tabs-tabbar { border-bottom: 1px solid var(--west-border); }
.command-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.command-picker .mud-input-control { min-width: 0; }
.pdf-preview-page { height: 100vh; display: flex; flex-direction: column; background: var(--west-background); color: var(--west-ink); font: 16px "Segoe UI", sans-serif; }
.pdf-preview-page header { display: flex; align-items: center; gap: 24px; padding: 16px 24px; }
.pdf-preview-page strong { flex: 1; }
.pdf-preview-page a { background: var(--west-accent); color: white; padding: 10px 18px; border-radius: 6px; text-decoration: none; }
.pdf-preview-page iframe { width: 100%; flex: 1; border: 0; }
.pdf-preview-page p { font-size: 13px; margin: 0 24px 12px; }
.pdf-preview-page [hidden] { display: none; }
.code-editor { display: block; width: 100%; min-height: 310px; padding: 20px; background: var(--west-ink); color: #f9e6d7; border: 1px solid #48423b; border-radius: 8px; resize: vertical; font: 13px/1.7 Consolas, monospace; tab-size: 2; }
.code-editor:focus { outline: 2px solid var(--west-orange); outline-offset: 2px; }
.editor-label { display: block; margin: 16px 0 8px; font-size: 12px; font-weight: 600; color: var(--west-muted); }
.helper { font-size: 12px; margin: 8px 0; }
.scenario-bar { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--west-border); margin-top: 24px; padding-top: 20px; flex-wrap: wrap; }
.scenario-bar > div { flex: 1; min-width: 180px; }
.traffic-panel { margin-top: 24px; }
.traffic-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.count { font-size: 12px; background: var(--west-tint); color: var(--west-accent); padding: 4px 8px; border-radius: 7px; margin-left: 6px; }
.traffic-grid { display: grid; grid-template-columns: minmax(280px,.8fr) minmax(0,1.2fr); border: 1px solid var(--west-border); border-radius: 8px; overflow: hidden; }
.traffic-list { max-height: 420px; overflow: auto; }
.traffic-entry { border: 0; border-bottom: 1px solid var(--west-border); width: 100%; background: #fff; display: flex; gap: 12px; padding: 16px; font-size: 12px; text-align: left; cursor: pointer; align-items: center; }
.traffic-entry:hover, .traffic-entry:focus { background: var(--west-tint); }
.traffic-entry time, .traffic-entry small { color: var(--west-muted); font-family: Consolas, monospace; }
.traffic-entry small { margin-left: auto; }
.direction { color: var(--west-accent); }
.response-panel { min-width: 0; background: #fcf8f4; padding: 16px; border-left: 1px solid var(--west-border); }
.traffic-entry.selected { background: var(--west-tint); box-shadow: inset 3px 0 var(--west-orange); }
.json-viewer { min-width: 0; }
.json-view-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.json-view-switch { display: inline-flex; background: #fff; border: 1px solid var(--west-border); border-radius: 8px; padding: 3px; }
.json-view-option { border: 0; border-radius: 5px; background: transparent; padding: 8px 12px; font: 600 12px "Segoe UI", sans-serif; color: var(--west-muted); cursor: pointer; }
.json-view-option.active { background: var(--west-ink); color: #fff; }
.json-view-option:disabled { opacity: .45; cursor: default; }
.json-tool { border: 0; border-radius: 4px; background: transparent; color: var(--west-accent); font: 600 11px "Segoe UI", sans-serif; cursor: pointer; padding: 5px 7px; }
.json-tool:hover { background: var(--west-tint); }
.json-tree-scroll { max-height: 520px; overflow: auto; padding: 12px 8px; background: #fff; border: 1px solid var(--west-border); border-radius: 8px; }
.json-text { margin: 0; padding: 16px; max-height: 520px; border: 1px solid var(--west-border); border-radius: 8px; background: #fff; }
.json-node { font: 12px/1.65 Consolas, monospace; }
.json-branch { display: flex; align-items: baseline; gap: 7px; border: 0; border-radius: 4px; background: transparent; color: var(--west-ink); font: inherit; text-align: left; padding: 4px 6px; cursor: pointer; max-width: 100%; }
.json-branch:hover { background: var(--west-tint); }
.json-chevron { color: var(--west-accent); flex-shrink: 0; width: 12px; }
.json-key { font-weight: 600; overflow-wrap: anywhere; }
.json-type { color: var(--west-muted); font-size: 11px; white-space: nowrap; }
.json-children { border-left: 1px solid #ead7c7; margin-left: 12px; padding-left: 12px; }
.json-leaf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 4px 6px; }
.json-value { overflow-wrap: anywhere; white-space: pre-wrap; min-width: 0; }
.json-string { color: #276548; }
.json-number { color: #9c480c; }
.json-true, .json-false { color: #7046a1; }
.json-null, .json-empty { color: #77716a; font-style: italic; }
.json-empty { display: block; padding: 4px 6px; }
.json-more { margin: 7px 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.65 Consolas, monospace; max-height: 420px; overflow: auto; }
.empty-state { padding: 36px 24px; font-size: 13px; }
.saved-row { display: flex; align-items: center; border-bottom: 1px solid var(--west-border); padding: 12px 0; gap: 8px; flex-wrap: wrap; }
.saved-row strong { flex: 1; overflow-wrap: anywhere; }
.file-label { font-size: 12px; color: var(--west-muted); }
.file-label input { display: block; width: 210px; max-width: 100%; }
input[type=file] { max-width: 100%; color: var(--west-muted); font: inherit; font-size: 13px; }
input[type=file]::file-selector-button { border: 1px solid #d5ccc1; border-radius: 7px; background: #fff; color: var(--west-ink); padding: 9px 14px; margin-right: 12px; cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--west-tint); }
.plain-button { border: 0; background: transparent; cursor: pointer; color: var(--west-muted); }
.primary-button { display: inline-block; border: 0; background: var(--west-gradient); color: var(--west-ink); padding: 12px 20px; border-radius: 7px; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: 650; }
.primary-button:hover { background: var(--west-orange); }
.account-layout { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse at top, #ffe1c7, var(--west-background) 70%); padding: 24px; }
.login-card { background: white; border: 1px solid var(--west-border); border-top: 4px solid var(--west-orange); border-radius: 18px; padding: 36px 44px 44px; width: min(480px,100%); box-shadow: 0 16px 64px #5c311012; }
.login-logo { display: block; width: 130px; height: auto; margin: 0 auto 24px; }
.login-card label { display: block; margin: 20px 0; font-size: 13px; font-weight: 600; }
.login-card input { display: block; width: 100%; padding: 12px; border: 1px solid #d5ccc1; border-radius: 6px; margin-top: 8px; font: inherit; }
.login-card button { width: 100%; }
.login-version { margin: 24px 0 0; text-align: center; font-size: 12px; color: #6b625a; }
.receipt-module { margin: 20px 0; }
.receipt-editor { border: 0; padding: 0; min-width: 0; }
.receipt-editor legend { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.receipt-editor label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; min-width: 0; }
.receipt-editor input:not([type=checkbox]), .receipt-editor select { width: 100%; min-width: 0; border: 1px solid var(--west-border); border-radius: 6px; padding: 9px; background: white; color: var(--west-ink); font: inherit; font-size: 14px; }
.receipt-editor button { border: 1px solid var(--west-border); border-radius: 6px; padding: 9px 13px; background: white; cursor: pointer; font: inherit; font-size: 13px; }
.receipt-editor .primary-button { background: var(--west-orange); color: #1d1d1b; font-weight: 600; }
.receipt-editor button:disabled { opacity: .45; cursor: default; }
.receipt-editor input:focus-visible, .receipt-editor select:focus-visible, .receipt-editor button:focus-visible { outline: 2px solid var(--west-orange); outline-offset: 2px; }
.receipt-actions, .receipt-card-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
.receipt-random, .receipt-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; align-items: end; margin: 14px 0; }
.receipt-picker { margin: 20px 0 12px; }
.receipt-card { border: 1px solid var(--west-border); border-radius: 10px; padding: 16px; background: #fcfaf7; }
.receipt-card { margin: 12px 0; }
.receipt-card > summary { cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }
.receipt-file-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.receipt-editor .receipt-file-button { position: relative; padding: 9px 13px; border: 1px solid var(--west-border); border-radius: 6px; background: white; cursor: pointer; }
.receipt-file-button input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.receipt-file-button:focus-within { outline: 2px solid var(--west-orange); outline-offset: 2px; }
.receipt-editor:disabled .receipt-file-button { opacity: .5; }
.receipt-article { margin: 14px 0; padding: 12px; border: 1px solid var(--west-border); border-radius: 8px; background: white; }
.receipt-article summary { cursor: pointer; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.receipt-wide { grid-column: span 2; }
.receipt-editor .receipt-check { flex-direction: row; align-items: center; }
.receipt-totals { margin-top: 18px; overflow-x: auto; }
.receipt-totals table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.receipt-totals th, .receipt-totals td { padding: 8px; border-bottom: 1px solid var(--west-border); text-align: right; }
.receipt-totals th:first-child, .receipt-totals td:first-child { text-align: left; }
.receipt-warning { border-left: 3px solid #b84b0d; padding: 10px; background: #fff1e5; color: #833500; }
.receipt-notice { padding: 10px; background: #f2f5f1; }
@media (max-width: 750px) { .receipt-random, .receipt-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 430px) { .receipt-random, .receipt-fields { grid-template-columns: 1fr; } .receipt-wide { grid-column: auto; } }
.notice { padding: 48px; }
#blazor-error-ui { background: #fff4d4; bottom: 0; display: none; left: 0; padding: 12px; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }
@media(max-width:1100px) {
  .app-header { gap: 24px; flex-wrap: wrap; padding-top: 8px; }
  .app-header nav { order: 3; flex-basis: 100%; overflow-x: auto; gap: 24px; }
  .app-header nav a { padding: 14px 2px; }
  .app-header > form, .app-header > a:not(.brand) { margin-left: auto; }
  .console-grid { grid-template-columns: 260px minmax(0,1fr); }
  .traffic-grid { grid-template-columns: 1fr; }
  .response-panel { border-left: 0; border-top: 1px solid var(--west-border); }
}
@media(max-width:720px) {
  .app-header { padding: 8px 16px 0; gap: 4px 16px; }
  .brand-logo { width: 76px; height: 68px; }
  .brand-title { font-size: 21px; padding-left: 16px; }
  .app-header nav { gap: 20px; }
  .app-header nav a { padding: 12px 2px; font-size: 13px; }
  .console-grid { grid-template-columns: minmax(0,1fr); }
  .connection-bar { flex-wrap: wrap; gap: 10px; }
  .connection-bar .mud-input-control { flex-basis: 100%; }
  .workspace { padding: 24px 16px; }
  .page-heading { flex-wrap: wrap; gap: 12px; }
  h1 { font-size: 27px; }
  .panel, .tab-content { padding: 20px; }
  .main-panel { padding: 8px 0 0; }
  .traffic-entry { gap: 6px; flex-wrap: wrap; }
  .login-card { padding: 28px; }
}
@media(prefers-reduced-motion:reduce) { .app-header nav a { transition: none; } }
