:root {
  --green: #153e36;
  --green-deep: #0e2d28;
  --green-soft: #e5efea;
  --cream: #f7f6f1;
  --paper: #fffefa;
  --gold: #bca775;
  --ink: #233b34;
  --muted: #5f6b63;
  --border: #e3e5dc;
  /* #26 A2: field outline, >= 3:1 on every background a field sits on (WCAG 1.4.11). */
  --field-border: #7f8a82;
  --danger: #b34334;
  --amber: #966324;
  --shadow: 0 12px 38px #173d3410;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button { border: 0; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--green); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
/* #26 A1: gold stays only on the dark blocks, where green would vanish (4,36:1 on --green, 5,43:1 on --green-deep). */
:is(.sidebar, .intro-card, .auth-story, .result-top) :is(button, a, input, select, textarea, summary):focus-visible { outline-color: #b59a59; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid var(--field-border); border-radius: 10px; padding: 11px 13px; background: var(--paper); color: var(--ink); }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--green); }
input[readonly] { background: #f1f3ed; color: var(--muted); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 20px; flex: 0 0 auto; margin: 2px 0 0; padding: 0; accent-color: var(--green); }
textarea { min-height: 92px; resize: vertical; }
label, .field-label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
label small { color: var(--muted); font-weight: 400; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 3.1vw, 42px); font-weight: 400; letter-spacing: -.7px; line-height: 1.2; }
h2 { font-size: 19px; font-weight: 650; letter-spacing: -.3px; }
h3 { font-size: 15px; font-weight: 650; }
p { line-height: 1.6; }
small { line-height: 1.5; }
.muted, .hint { color: var(--muted); }
.space-top { margin-top: 22px; }
.space-top-lg { margin-top: 28px; }
.space-bottom { margin-bottom: 22px; }
.hint { font-size: 12px; margin: 8px 0 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.8px; font-size: 10px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.brand-word { font-family: Georgia, "Times New Roman", serif; font-size: 32px; letter-spacing: 5px; font-weight: 400; line-height: 1.2; }
.brand-word span { display: block; font: 9px "Segoe UI", Arial, sans-serif; letter-spacing: 4px; margin-top: 8px; }
.skip-link { position: fixed; top: -80px; left: 10px; z-index: 100; padding: 14px; background: white; border-radius: 6px; }
.skip-link:focus { top: 10px; }
.boot-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.icon { display: inline-flex; flex-shrink: 0; width: 20px; height: 20px; align-items: center; justify-content: center; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; border-radius: 10px; padding: 11px 18px; font-size: 13px; font-weight: 600; transition: background .16s, transform .16s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover:not(:disabled) { background: #22564b; }
.btn-secondary { background: white; color: var(--green); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--green-soft); }
.btn-quiet { background: transparent; color: var(--green); padding: 10px 13px; }
.btn-danger { background: #f8e9e5; color: var(--danger); }
.btn-small { min-height: 44px; font-size: 12px; padding: 9px 13px; }
.btn-block { width: 100%; }
.btn .icon { width: 17px; height: 17px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field { margin-bottom: 19px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.error { color: var(--danger); font-size: 13px; background: #faeee9; border: 1px solid #eed2c8; border-radius: 9px; padding: 12px 14px; margin-bottom: 16px; }
.success { color: var(--green); font-size: 13px; background: var(--green-soft); border-radius: 9px; padding: 13px 15px; }
.hidden { display: none !important; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 650; line-height: 1.3; padding: 5px 9px; border-radius: 20px; white-space: nowrap; background: var(--green-soft); color: var(--green); }
.badge-warning { background: #f5ead7; color: var(--amber); }
.badge-neutral { background: #edf0e8; color: var(--muted); }
.badge-danger { background: #f8e4de; color: var(--danger); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.notice { display: flex; align-items: flex-start; gap: 12px; border: 1px solid #e7deca; background: #fcf8ee; border-radius: 11px; padding: 14px 17px; color: #735628; font-size: 12px; line-height: 1.65; }
.notice .icon { margin-top: 1px; width: 18px; height: 18px; }
.notice p { margin: 0; }
.notice-green { background: #edf3ec; border-color: #dae7d8; color: #45624b; }

/* A quiet, editorial welcome instead of an infrastructure screen. */
.auth-layout { display: grid; grid-template-columns: 1.04fr 1fr; min-height: 100vh; }
.auth-story { display: flex; flex-direction: column; justify-content: space-between; background: var(--green-deep); color: #f1eee4; padding: 64px 70px 40px; position: relative; overflow: hidden; }
.auth-story::before { content: ""; position: absolute; width: 540px; height: 540px; border: 1px solid #bdab7626; border-radius: 50%; right: -220px; top: 13%; }
.auth-story::after { content: ""; position: absolute; width: 400px; height: 400px; border: 1px solid #bdab7620; border-radius: 50%; right: -150px; top: 22%; }
.auth-story .brand-word { color: #e9e4d8; z-index: 1; }
.auth-story-copy { z-index: 1; max-width: 460px; margin: 70px 0 55px; }
.auth-story h1 { font-size: clamp(36px, 4.1vw, 58px); line-height: 1.15; margin-bottom: 24px; }
.auth-story h1 em { color: #c7b483; font-weight: 400; }
.auth-story-copy p { color: #bcc8bc; font-size: 14px; max-width: 330px; }
.auth-story-foot { color: #9cae9f; font-size: 11px; letter-spacing: .25px; z-index: 1; }
.auth-visual { display: flex; gap: 23px; height: 150px; align-items: flex-end; margin-top: 50px; }
.auth-visual .bottle { transform: scale(1.45); transform-origin: bottom; margin: 0 18px; }
.auth-visual .bottle-tall { transform: scale(1.65); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 55px 40px; }
.auth-card { width: 100%; max-width: 390px; }
.auth-card h2 { font-family: Georgia, "Times New Roman", serif; font-size: 31px; font-weight: 400; margin-bottom: 13px; }
.auth-card > p { color: var(--muted); font-size: 13px; margin-bottom: 28px; }
.auth-card .test-note { margin-top: 24px; }
.auth-lock { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); margin-top: 22px; }
.auth-lock .icon { width: 14px; height: 14px; }
.auth-back { padding-left: 0; margin-bottom: 17px; }
.otp-input { text-align: center; font-size: 28px; letter-spacing: 11px; padding: 13px; font-variant-numeric: tabular-nums; }
.auth-steps { display: flex; gap: 7px; margin: 0 0 28px; }
.auth-steps span { width: 38px; height: 3px; background: #dce2d8; border-radius: 3px; }
.auth-steps .active { background: var(--green); }
.secret-key { overflow-wrap: anywhere; background: #eef1e9; border: 1px solid var(--border); padding: 14px; border-radius: 9px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; margin-bottom: 18px; }

/* App shell. */
.app-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--green-deep); color: #d2ddd2; padding: 34px 20px 24px; position: fixed; top: 0; bottom: 0; width: 240px; display: flex; flex-direction: column; z-index: 30; }
.sidebar .brand-word { font-size: 25px; letter-spacing: 4px; margin: 2px 16px 35px; color: #eee9dc; }
.sidebar .brand-word span { font-size: 7px; letter-spacing: 3.5px; }
.hub-label { display: flex; gap: 8px; align-items: center; border: 1px solid #819a8330; border-radius: 8px; margin: 0 10px 30px; padding: 11px 14px; font-size: 11px; color: #d6ddcb; }
.hub-label .icon { width: 15px; height: 15px; color: #c3b083; }
.nav-section-label { font-size: 9px; letter-spacing: 1.6px; color: #7f9786; margin: 0 17px 11px; text-transform: uppercase; }
.nav-menu { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 4px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #557263 transparent; padding-right: 3px; }
.nav-menu .nav-item { flex-shrink: 0; }
.sidebar > .brand-word, .sidebar > .hub-label, .sidebar > .nav-section-label, .sidebar-bottom { flex-shrink: 0; }
.nav-item { display: flex; align-items: center; gap: 13px; text-decoration: none; border-radius: 8px; padding: 12px 16px; min-height: 46px; color: #b5c6b8; font-size: 12px; background: transparent; text-align: left; }
.nav-item .icon { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { background: #ffffff08; color: #f7f3e8; }
.nav-item.active { background: #39594b; color: #fff9e9; }
.nav-item.active .icon { opacity: 1; color: #d0bc83; }
.sidebar-bottom { margin-top: auto; padding-top: 26px; }
.sidebar-test { margin: 21px 16px; font-size: 10px; color: #8ca28e; line-height: 1.6; }
.user-block { display: flex; align-items: center; gap: 11px; padding: 17px 13px 0; border-top: 1px solid #ffffff15; }
.avatar { flex-shrink: 0; width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; background: #d9decb; color: var(--green); font-family: Georgia, serif; font-size: 15px; }
.user-block strong { display: block; font-size: 11px; font-weight: 500; color: #ececdd; }
.user-block small { font-size: 9px; color: #9db09e; }
.user-block .logout { padding: 8px; background: transparent; color: #abc1ac; margin-left: auto; min-height: 44px; min-width: 44px; }
.workspace { grid-column: 2; min-width: 0; }
.topbar { height: 78px; border-bottom: 1px solid var(--border); background: #fffefa9c; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; gap: 15px; }
.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: 11px; color: var(--muted); }
.breadcrumb strong { color: var(--ink); font-weight: 500; }
.topbar-right { display: flex; gap: 16px; align-items: center; }
.topbar-date { font-size: 11px; color: var(--muted); }
.private-tag { display: flex; gap: 6px; align-items: center; font-size: 10px; color: var(--muted); }
.private-tag .icon { width: 14px; height: 14px; }
.menu-toggle { display: none; color: var(--green); min-height: 44px; min-width: 44px; background: transparent; }
.content { max-width: 1500px; margin: 0 auto; padding: 35px 40px 50px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 29px; }
.page-heading h1 { margin-bottom: 9px; }
.page-heading p { font-size: 12px; color: var(--muted); margin: 0; }
.page-heading .eyebrow { margin-bottom: 9px; }
.section-heading { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 20px; }
.section-heading h2 { margin: 0; }
.card { border: 1px solid var(--border); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); min-width: 0; }
.card-pad { padding: 25px; }
.panel { padding: 25px; }
.panel + .panel { border-top: 1px solid var(--border); }
.step-title { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.step-number { width: 26px; height: 26px; border-radius: 50%; background: #eaf0e6; color: var(--green); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.step-title h2 { font-size: 15px; margin: 0; }
.step-title .badge { margin-left: auto; }
.sim-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(330px, .82fr); gap: 23px; align-items: start; }
.sim-main { min-width: 0; }
.sim-aside { position: sticky; top: 24px; }
.segmented { display: flex; padding: 4px; border-radius: 9px; background: #eff2ea; gap: 3px; margin-bottom: 22px; }
.segmented button { flex: 1; color: var(--muted); background: transparent; padding: 10px 9px; min-height: 44px; border-radius: 7px; font-size: 11px; font-weight: 600; }
.segmented button.active { background: var(--paper); box-shadow: 0 2px 8px #25472e0e; color: var(--green); }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.product-card { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; background: white; }
.product-art { min-height: 144px; position: relative; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 110%, #d5dfce 0%, #eff3e9 60%, #f6f7f0 100%); }
.product-art.amber { background: radial-gradient(ellipse at 50% 110%, #e3d9c4 0%, #f4efdf 60%, #faf6ee 100%); }
.product-art::after { content: ""; position: absolute; bottom: 15px; width: 70px; height: 12px; border-radius: 50%; background: #233d2420; filter: blur(5px); }
.art-label { position: absolute; top: 13px; left: 13px; font-size: 9px; color: #788672; letter-spacing: .8px; }
.bottle { width: 45px; height: 78px; position: relative; border-radius: 6px 6px 9px 9px; background: linear-gradient(100deg, #98aa77a0, #6a855caf 45%, #9bab75d0 55%, #5c7655cb); border: 1px solid #77906595; box-shadow: inset 4px 0 7px #ffffff30, inset -4px 0 6px #11271920; margin-top: 18px; z-index: 1; }
.bottle::before { content: ""; position: absolute; width: 23px; height: 17px; background: linear-gradient(90deg, #263c31, #466048 55%, #1b3029); border-radius: 3px 3px 0 0; left: 10px; top: -18px; border-top: 2px solid #667f61; }
.bottle::after { content: "SHAKAN"; position: absolute; top: 25px; left: 4px; right: 4px; height: 27px; display: grid; place-items: center; background: #ede8d9dd; font-family: Georgia, serif; letter-spacing: 1px; font-size: 6px; color: #244633; border: 1px solid #ddd2b7; }
.bottle-tall { width: 55px; height: 98px; border-radius: 8px 8px 12px 12px; background: linear-gradient(100deg, #c2a0719e, #b1956795 40%, #d7b484a9 55%, #ad8c57bf); border-color: #ac906985; }
.bottle-tall::before { left: 15px; height: 20px; top: -21px; }
.bottle-tall::after { top: 34px; left: 6px; right: 6px; height: 30px; }
.product-info { padding: 16px; }
.product-info h3 { margin-bottom: 5px; font-size: 12px; }
.product-info .volume { font-size: 10px; color: var(--muted); }
.quantity-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 17px 0; }
.quantity-row label { margin: 0; font-size: 11px; font-weight: 500; color: var(--muted); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.stepper button { background: #fafbf6; min-width: 44px; min-height: 44px; color: var(--green); font-size: 20px; }
.stepper input { width: 38px; min-height: 44px; border: 0; border-radius: 0; padding: 4px 0; text-align: center; font-size: 13px; font-weight: 700; appearance: textfield; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.product-info select { min-height: 42px; font-size: 11px; padding: 9px; }
.kit-summary { display: flex; justify-content: space-between; align-items: center; gap: 13px; border-radius: 9px; background: #f3f5ed; padding: 12px 14px; margin-top: 17px; }
.kit-summary p { margin: 0; font-size: 11px; }
.kit-pips { display: flex; gap: 4px; }
.kit-pips span { width: 8px; height: 18px; background: #5c7c59; border-radius: 3px; }
.kit-pips .large { background: #b7a173; height: 23px; margin-top: -5px; }
.kit-pips .empty { height: 18px; border: 1px dashed #cdd7c7; background: transparent; }
.kit-total { font-size: 10px; color: var(--muted); white-space: nowrap; }
.market-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 20px; }
.market-option { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 7px; border: 1px solid var(--border); border-radius: 9px; background: white; min-height: 72px; padding: 11px 4px; font-size: 10px; color: var(--muted); }
.market-option .market-letter { font-family: Georgia, serif; font-size: 22px; height: 24px; }
.market-option.selected { border-color: var(--green); background: #f0f4ed; color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.account-line { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.account-line select { flex: 1; font-size: 12px; }
.money-input { display: flex; border: 1px solid var(--field-border); border-radius: 10px; background: var(--paper); overflow: hidden; align-items: center; }
.money-input span { padding: 0 0 0 14px; color: var(--muted); font-size: 13px; }
.money-input input { border: 0; padding-left: 9px; min-width: 0; }
.advanced { border: 1px solid var(--border); border-radius: 9px; margin-top: 17px; background: #fcfcf7; }
.advanced summary { padding: 14px 16px; font-size: 11px; font-weight: 600; cursor: pointer; min-height: 44px; }
.advanced > div { padding: 0 16px 16px; }
.advanced .field-row { gap: 12px; }
.advanced label { font-size: 11px; }
.advanced input { min-height: 42px; font-size: 12px; }
.sim-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 19px 25px; background: #fcfcf7; border-radius: 0 0 14px 14px; border-top: 1px solid var(--border); }
.sim-footer .btn-primary { min-width: 185px; }
.sim-footer .hint { margin: 0; max-width: 170px; font-size: 10px; }
.preview-status { color: var(--muted); font-size: 10px; line-height: 1.65; max-width: 240px; padding-left: 16px; position: relative; }
.market-image { width: 62px; max-width: 100%; height: 29px; object-fit: contain; display: block; margin: 0 auto 5px; }
.market-word { min-height: 34px; display: grid; place-items: center; font-weight: 600; font-size: 11px; }
.metadata-card { padding: 20px 24px; margin-bottom: 18px; }
.metadata-card > div + div { border-top: 1px solid var(--border); margin-top: 17px; padding-top: 17px; }
.metadata-card .eyebrow { font-size: 8px; display: block; margin-bottom: 8px; }
.metadata-card strong { display: block; font-size: 18px; font-family: Georgia, serif; overflow-wrap: anywhere; }
.metadata-card .hint { font-size: 10px; margin: 9px 0; }
.metadata-card .badge { margin: 4px 0 10px; }
.cleaning-art { background: linear-gradient(135deg,#e5ece2,#f5f3e8); }
.cleaning-pack { width: 69px; height: 105px; border-radius: 4px 4px 13px 13px; display: flex; flex-direction: column; justify-content: center; align-items: center; background: linear-gradient(90deg,#d4d9c5,#f2f0db 40%,#dce1cf); box-shadow: 0 8px 10px #15352d18; border: 1px solid #cad2b8; color: #45624a; }
.cleaning-pack span { font-family: Georgia,serif; font-size: 10px; letter-spacing: 1px; }
.cleaning-pack small { font-size: 9px; margin-top: 9px; }
.fragrance-slots { margin-top: 11px; }
.fragrance-slots summary { font-size: 10px; color: var(--muted); cursor: pointer; padding: 5px 0; }
.fragrance-slots label, .cleaning-slots label { display: block; font-size: 10px; margin-top: 10px; }
.fragrance-slots select,.cleaning-slots select { margin-top: 5px; font-size: 10px; }
.sku-value { overflow-wrap: anywhere; font-family: ui-monospace,Consolas,monospace; font-size: 18px; }
.line-editor-row { display: grid; grid-template-columns: minmax(0,1fr) 62px 44px; align-items: center; gap: 8px; }
/* #152 A7/A11: the product name is read, not skimmed; 44 px to remove a line. */
.line-editor-row select { font-size: 13px; }
.line-editor-row [data-remove-line] { min-width: 44px; min-height: 44px; }
@media (max-width: 767px) { .line-editor-row select { font-size: 16px; } }
.import-layout { display: grid; grid-template-columns: minmax(280px,.8fr) minmax(0,1.2fr); gap: 22px; align-items: start; }
.import-layout textarea { font-family: ui-monospace,Consolas,monospace; font-size: 10px; }
.import-layout td small { display: block; font-size: 9px; color: var(--muted); margin-top: 5px; }
.import-layout table { font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.totp-setup { margin: 22px 0; text-align: center; }
.totp-setup img { display: block; background: #fff; margin: 0 auto 14px; padding: 10px; max-width: 100%; border: 1px solid var(--border); border-radius: 12px; }
.totp-setup .advanced { text-align: left; }
.totp-setup input { font-family: ui-monospace, Consolas, monospace; font-size: 11px; letter-spacing: .5px; }
.recovery-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 22px 0; }
.recovery-grid code { background: #f3f5ed; border: 1px solid var(--border); padding: 10px 6px; border-radius: 7px; font-size: 10px; text-align: center; overflow-wrap: anywhere; }
.preview-status::before { content: ""; position: absolute; left: 0; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: #7b9572; }
.preview-status[data-state="calculating"]::before, .preview-status[data-state="waiting"]::before { background: #9b9667; }
.preview-status[data-state="error"], .preview-status[data-state="invalid"] { color: #9a6337; }
.preview-status[data-state="error"]::before, .preview-status[data-state="invalid"]::before { background: #b78451; }
.result-section-label { margin: 18px 0 5px; color: var(--muted); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; }
.scenario-totals { margin-top: 20px; padding-top: 1px; border-top: 1px solid var(--border); }
.calculation-memory { margin-top: 20px; }
.calculation-memory .metric-line { font-size: 10px; gap: 10px; }
.calculation-memory .metric-line small { overflow-wrap: anywhere; line-height: 1.65; }
.calculation-memory .metric-line strong { white-space: nowrap; }
.calculation-component { padding: 5px 0; border-bottom: 1px solid var(--border); }
.calculation-breakdown { margin: 0 0 10px; padding-left: 12px; border-left: 2px solid #dfe6d6; }
.calculation-breakdown .metric-line { font-size: 9px; padding: 6px 0; }
.calculation-breakdown .hint { font-size: 9px; }
.calculation-formula { font-family: ui-monospace, Consolas, monospace; font-size: 10px; line-height: 1.7; overflow-wrap: anywhere; padding: 10px 0; border-top: 1px solid var(--border); }
.result-card { overflow: hidden; }
.result-top { background: var(--green); color: #f5f5e9; padding: 27px 27px 25px; position: relative; overflow: hidden; }
.result-top::after { content: ""; border: 1px solid #cbd8c520; width: 190px; height: 190px; border-radius: 50%; position: absolute; right: -70px; top: -90px; }
.result-top .eyebrow { color: #b9cfb9; font-size: 9px; margin-bottom: 17px; }
.result-top h2 { font-family: Georgia, serif; font-size: 38px; font-weight: 400; letter-spacing: -.5px; margin: 0 0 4px; }
.result-top .result-sub { color: #bacab8; font-size: 10px; margin: 0; }
.result-top .badge { position: absolute; top: 25px; right: 22px; color: #d6e5cc; background: #ffffff15; }
.result-body { padding: 23px 26px; }
.result-body .result-caption { font-size: 11px; color: var(--muted); margin: 0 0 17px; }
.result-placeholder { min-height: 150px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; color: var(--muted); padding: 18px; }
.result-placeholder .icon { width: 32px; height: 32px; color: #95a58d; margin-bottom: 16px; }
.result-placeholder p { font-size: 12px; max-width: 245px; }
.metric-line { display: flex; justify-content: space-between; gap: 14px; font-size: 11px; padding: 10px 0; align-items: flex-start; }
.metric-line span { color: var(--muted); }
.metric-line strong { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.metric-line small { display: block; color: var(--muted); font-size: 9px; margin-top: 5px; }
.metric-line.total { border-top: 1px solid var(--border); margin-top: 9px; padding-top: 17px; font-size: 12px; }
.metric-line.total span { color: var(--ink); font-weight: 600; }
.profit-block { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; margin-top: 19px; border-radius: 10px; background: #edf3e8; }
.profit-block p { font-size: 11px; margin: 0 0 4px; }
.profit-block strong { font-size: 24px; font-family: Georgia, serif; font-weight: 400; }
.profit-block small { font-size: 10px; color: #647b5f; }
.profit-block.negative { background: #f9ebe5; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 26px 23px; }
.result-actions .btn { font-size: 11px; padding: 9px; }
.result-foot { background: #f7f8f2; border-top: 1px solid var(--border); padding: 14px 26px; font-size: 9px; color: var(--muted); line-height: 1.6; }
.aside-note { display: flex; gap: 10px; margin-top: 17px; padding: 4px 7px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.aside-note .icon { width: 16px; height: 16px; margin-top: 2px; color: #8a9b80; }
.result-pending { margin: 14px 0; }
.result-pending strong { display: block; font-size: 12px; margin-bottom: 4px; }
.sku-no-store-steps { margin: 6px 0 10px; padding-left: 18px; }
.result-pending p { font-size: 11px; margin: 0; }
.box-line { border: 1px dashed #d3dacb; padding: 13px; border-radius: 9px; margin-top: 17px; display: flex; align-items: center; gap: 12px; }
.box-line .icon { width: 28px; height: 28px; color: #8a9d7b; }
.box-line strong { display: block; font-size: 11px; margin-bottom: 3px; }
.box-line small { color: var(--muted); font-size: 10px; }
.loading-bar { height: 3px; background: linear-gradient(90deg, #d5e0c9, #7c9e6c, #d5e0c9); background-size: 200%; animation: shimmer 1s ease infinite; }
@keyframes shimmer { from { background-position: 200%; } to { background-position: -200%; } }

/* Records, versions and summaries. */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 25px; }
.stat-card { padding: 23px; }
.stat-card .eyebrow { font-size: 9px; line-height: 1.6; margin-bottom: 14px; }
.stat-card strong { display: block; font-family: Georgia, serif; font-size: 31px; font-weight: 400; margin-bottom: 8px; }
.stat-card small { font-size: 10px; color: var(--muted); }
.intro-card { display: grid; grid-template-columns: 1fr auto; padding: 31px; background: var(--green); color: #edeedc; margin-bottom: 25px; gap: 25px; align-items: center; }
.intro-card h2 { font-family: Georgia, serif; font-size: 29px; font-weight: 400; margin-bottom: 11px; }
.intro-card p { color: #beccba; max-width: 560px; font-size: 12px; margin: 0; }
.intro-card .btn { background: #eee8d4; color: var(--green); }
.table-wrap { overflow-x: auto; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #f2f4ed; }
th { font-size: 10px; color: var(--muted); font-weight: 550; padding: 16px 20px; text-transform: uppercase; letter-spacing: .6px; }
td { font-size: 11px; padding: 17px 20px; border-top: 1px solid var(--border); vertical-align: middle; }
td strong { font-size: 12px; font-weight: 600; }
td small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.price-cell { white-space: nowrap; color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.table-footer { padding: 14px 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.empty-state { padding: 55px 25px; text-align: center; }
.empty-state .icon { width: 35px; height: 35px; color: #98a68c; margin: 0 0 17px; }
.empty-state h2 { font-family: Georgia, serif; font-weight: 400; font-size: 25px; margin-bottom: 10px; }
.empty-state p { color: var(--muted); font-size: 12px; max-width: 390px; margin: 0 auto 20px; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-pill { padding: 10px 15px; border-radius: 20px; background: #e9eee2; color: var(--muted); font-size: 11px; min-height: 44px; }
.filter-pill.active { color: white; background: var(--green); }
.search-field { max-width: 260px; font-size: 12px; }
.list-stack { display: flex; flex-direction: column; gap: 14px; }
.record-card { padding: 23px; display: flex; gap: 18px; justify-content: space-between; align-items: flex-start; }
.record-card h3 { margin: 0 0 8px; }
.record-card p { color: var(--muted); font-size: 11px; margin-bottom: 10px; }
/* #152 A6: a status badge never touches the text next to it, inside or outside a record card. */
.record-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.record-card .record-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 10px; color: var(--muted); }
.record-card .record-value { font-family: Georgia, serif; font-size: 24px; white-space: nowrap; margin: 13px 0; text-align: right; }
.record-card .record-right { text-align: right; }
.cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.fee-card { padding: 24px; }
.fee-card header { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; margin-bottom: 17px; }
.fee-card h3 { font-size: 15px; margin-bottom: 6px; }
.fee-card p { font-size: 11px; color: var(--muted); margin: 0; }
.fee-card .actions { margin-top: 17px; }
.fee-components { padding: 13px 0; margin: 15px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.fee-component { display: flex; justify-content: space-between; gap: 15px; font-size: 11px; padding: 7px 0; }
.fee-component span { color: var(--muted); }
.source-link { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; text-decoration: none; margin-top: 10px; }
.source-link .icon { width: 13px; height: 13px; }
.compare-wrap { overflow-x: auto; }
.compare-table th, .compare-table td { min-width: 180px; }
.compare-table th:first-child, .compare-table td:first-child { min-width: 160px; }
.compare-table thead th { text-transform: none; font-size: 12px; color: var(--green); }
.compare-table .comparison-key { background: #edf3e8; font-weight: 700; }
.profile-card { max-width: 700px; }
.definition-list { margin: 0; }
.definition-list div { display: flex; justify-content: space-between; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.definition-list dt { color: var(--muted); }
.definition-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.audit-event { display: flex; gap: 15px; padding: 20px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.audit-event:last-child { border: 0; }
.audit-event .icon { background: #edf2e7; color: #6a835f; width: 33px; height: 33px; border-radius: 50%; padding: 8px; }
.audit-event h3 { font-size: 12px; margin-bottom: 6px; }
.audit-event p { font-size: 10px; color: var(--muted); margin: 0; }
.audit-event time { margin-left: auto; white-space: nowrap; color: var(--muted); font-size: 10px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Dialogs. */
.modal { width: min(540px, calc(100% - 32px)); max-height: calc(100vh - 40px); border: 1px solid var(--border); border-radius: 15px; padding: 0; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px #06292030; }
.modal::backdrop { background: #112e2855; backdrop-filter: blur(3px); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 24px 26px 17px; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; font-size: 20px; font-family: Georgia, serif; font-weight: 400; }
.modal-close { width: 44px; height: 44px; background: #f0f3ea; border-radius: 50%; color: var(--muted); display: grid; place-items: center; }
.modal-body { padding: 23px 26px; }
.modal-body > p { color: var(--muted); font-size: 12px; }
.modal-footer { display: flex; gap: 9px; justify-content: flex-end; padding: 17px 26px 23px; border-top: 1px solid var(--border); }
.modal fieldset { border: 1px solid var(--border); padding: 16px; border-radius: 10px; margin: 18px 0; }
.modal legend { font-size: 12px; padding: 0 6px; }
.check-label { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; font-weight: 400; line-height: 1.6; }
.modal fieldset .check-label { min-height: 44px; align-items: center; cursor: pointer; }
.toast-region { position: fixed; bottom: 22px; right: 25px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: min(390px, calc(100vw - 32px)); }
.toast { background: var(--green); border: 1px solid #4b6c55; color: #f4f5e8; padding: 15px 19px; border-radius: 11px; box-shadow: 0 10px 35px #123c3125; font-size: 12px; line-height: 1.5; animation: toast-in .2s ease; }
.toast.error-toast { background: #863e30; border-color: #a25d4b; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (min-width: 1600px) { .content { padding-top: 45px; } .sim-layout { gap: 30px; } .panel { padding: 30px; } }
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { width: 210px; padding-left: 12px; padding-right: 12px; }
  .topbar { padding: 0 26px; }
  .content { padding: 29px 26px 40px; }
  .sim-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, .88fr); gap: 18px; }
  .panel { padding: 21px; }
  .market-grid { grid-template-columns: repeat(4, 1fr); }
  .product-info { padding: 13px; }
  .quantity-row { flex-wrap: wrap; }
  .result-body, .result-top { padding-left: 22px; padding-right: 22px; }
  .result-actions { padding-left: 22px; padding-right: 22px; }
  .stats-grid { gap: 12px; }
  .stat-card { padding: 19px; }
  .auth-story { padding: 50px; }
}
@media (max-width: 980px) {
  .sim-layout { grid-template-columns: 1fr; }
  .sim-aside { position: static; }
  .product-art { min-height: 145px; }
  .quantity-row { flex-wrap: nowrap; }
  .result-body { padding: 22px 26px; }
  .result-top { padding: 25px 26px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: 1fr; }
  .page-heading { align-items: flex-start; }
  .page-heading > .actions { justify-content: flex-end; }
  .auth-story { padding: 46px 38px; }
  .auth-panel { padding: 40px 28px; }
}
@media (max-width: 768px) {
  .import-layout { grid-template-columns: minmax(0,1fr); }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: 250px; }
  .sidebar.open { transform: translateX(0); box-shadow: 10px 0 100px #102f2860; }
  .sidebar-overlay { position: fixed; inset: 0; background: #15352d55; z-index: 25; }
  .workspace { width: 100%; }
  .menu-toggle { display: grid; place-items: center; }
  .topbar { height: 66px; padding: 0 20px; }
  .topbar-left { display: flex; gap: 7px; align-items: center; }
  .topbar-date { display: none; }
  .content { padding: 28px 22px 35px; }
  .page-heading { gap: 15px; margin-bottom: 24px; }
  .page-heading h1 { font-size: 33px; }
  .page-heading .eyebrow { font-size: 9px; }
  .page-heading > .actions .btn { font-size: 11px; padding: 9px 12px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { padding: 30px 30px 28px; min-height: auto; }
  .auth-story .brand-word { font-size: 25px; }
  .auth-story-copy { margin: 38px 0 0; }
  .auth-story h1 { font-size: 34px; margin-bottom: 14px; }
  .auth-story-copy > p, .auth-visual, .auth-story-foot { display: none; }
  .auth-panel { padding: 37px 30px 45px; }
  .auth-card { max-width: 440px; }
  .auth-card h2 { font-size: 28px; }
  .intro-card { grid-template-columns: 1fr; padding: 25px; gap: 19px; }
  .intro-card .btn { justify-self: start; }
  .record-card { flex-wrap: wrap; }
  .record-card .record-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; width: 100%; justify-content: space-between; text-align: left; }
  .record-card .record-value { margin: 0; }
  .audit-event { flex-wrap: wrap; gap: 10px; }
  .audit-event time { margin-left: 43px; }
}
@media (max-width: 480px) {
  .content { padding: 24px 16px 30px; }
  .topbar { padding: 0 12px; }
  .private-tag { font-size: 9px; }
  .breadcrumb { font-size: 10px; }
  .page-heading { display: block; }
  .page-heading > .actions { justify-content: flex-start; margin-top: 15px; }
  .page-heading h1 { font-size: 31px; }
  .page-heading p { font-size: 11px; }
  .panel { padding: 19px 17px; }
  .product-grid { gap: 10px; }
  .product-art { min-height: 135px; }
  .product-info { padding: 12px 10px; }
  .product-info h3 { font-size: 11px; }
  .quantity-row { display: block; margin: 13px 0; }
  .quantity-row label { margin-bottom: 7px; }
  .stepper { width: 100%; justify-content: space-between; }
  .stepper button { width: 32%; min-width: 44px; }
  .stepper input { width: 30%; }
  .product-info select { font-size: 10px; padding: 8px 5px; }
  .segmented button { font-size: 10px; padding: 9px 5px; }
  .step-title { gap: 9px; }
  .step-title h2 { font-size: 14px; }
  .step-title .badge { font-size: 9px; padding: 4px 7px; }
  .kit-summary { padding: 12px 10px; flex-wrap: wrap; gap: 9px; }
  .kit-summary p { font-size: 10px; }
  .kit-pips { gap: 3px; }
  .kit-pips span { width: 7px; }
  .field-row { gap: 12px; }
  .field-row label { font-size: 11px; }
  .field-row input { font-size: 12px; }
  .market-grid { gap: 6px; }
  .market-option { font-size: 9px; min-height: 66px; }
  .sim-footer { padding: 17px; }
  .sim-footer { flex-wrap: wrap; }
  .sim-footer .preview-status { max-width: none; width: 100%; }
  .sim-footer .btn-secondary { width: 100%; }
  .sim-footer .hint { display: none; }
  .sim-footer .btn-primary { width: 100%; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 17px 14px; }
  .stat-card strong { font-size: 26px; }
  .stat-card .eyebrow { letter-spacing: 1px; }
  .card-pad { padding: 20px; }
  th, td { padding: 14px 15px; }
  .price-table thead { display: none; }
  .price-table, .price-table tbody, .price-table tr, .price-table td { display: block; }
  .price-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-top: 1px solid var(--border); padding: 15px; gap: 8px; align-items: center; }
  .price-table td { padding: 0; border: 0; }
  .price-table td:nth-child(3) { grid-column: 1 / -1; }
  .record-card { padding: 19px; }
  .record-card h3 { font-size: 13px; }
  .record-card .record-meta { gap: 8px; }
  .definition-list div { flex-direction: column; gap: 8px; }
  .definition-list dd { text-align: left; }
  .modal-header { padding: 18px 19px 13px; }
  .modal-body { padding: 19px; }
  .modal-footer { padding: 16px 19px 20px; }
  .modal-footer .btn { flex: 1; font-size: 11px; }
  .toast-region { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Store identities. Keep these rules within the store view and its forms. */
.stores-page { min-width: 0; }
.stores-page .page-heading > div { min-width: 0; }
.stores-page h1, .stores-page h2, .stores-page h3,
.stores-page p, .stores-page dd, .stores-page a,
.stores-page .notice, .stores-modal .notice { overflow-wrap: anywhere; }
/* #26 L3: the heading is a sibling of .stores-page, so target it by its own actions. Primary stays on the first line. */
.page-heading:has([data-store-action="refresh"]) > .actions { flex-wrap: nowrap; flex-shrink: 0; }
.page-heading:has([data-store-action="refresh"]) > .actions .btn { white-space: nowrap; }
/* Below this width the title would be squeezed beside three buttons: the actions take their own line instead. */
@media (max-width: 1180px) {
  .page-heading:has([data-store-action="refresh"]) { display: block; }
  .page-heading:has([data-store-action="refresh"]) > .actions { justify-content: flex-start; margin-top: 15px; }
}
.stores-page .stores-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.stores-summary { margin-bottom: 24px; padding: 24px 26px; }
.stores-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.stores-summary-stat { min-width: 0; }
.stores-summary-stat .eyebrow { font-size: 9px; line-height: 1.6; margin-bottom: 8px; }
.stores-summary-stat strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 32px; font-weight: 400; line-height: 1.2; color: var(--green); font-variant-numeric: tabular-nums; }
.stores-summary-stat small { display: block; margin-top: 7px; font-size: 11px; color: var(--muted); }
.stores-summary progress, .stores-progress { display: block; width: 100%; height: 7px; margin: 19px 0 10px; border: 0; border-radius: 10px; overflow: hidden; background: #e9eee4; accent-color: var(--green); }
.stores-summary progress::-webkit-progress-bar { background: #e9eee4; border-radius: 10px; }
.stores-summary progress::-webkit-progress-value { background: var(--green); border-radius: 10px; }
.stores-summary progress::-moz-progress-bar { background: var(--green); border-radius: 10px; }
.stores-summary > p:last-child { margin-bottom: 0; font-size: 11px; color: var(--muted); }
.stores-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stores-filters > * { min-width: 0; }
.stores-filters .field { margin-bottom: 0; }
.stores-filters select { font-size: 12px; }
.stores-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.stores-card { display: flex; flex-direction: column; gap: 17px; padding: 23px; min-width: 0; }
.stores-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stores-card-head > div { min-width: 0; }
.stores-card-head h2, .stores-card-head h3 { margin: 0 0 7px; font-size: 16px; line-height: 1.4; }
.stores-card-head .badge { flex-shrink: 0; }
.stores-card-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.stores-card-meta > div { min-width: 0; }
.stores-card-meta dt { margin-bottom: 6px; font-size: 10px; color: var(--muted); }
.stores-card-meta dd { margin: 0; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.stores-card-meta strong { display: block; font-size: 11px; line-height: 1.6; }
.stores-card-meta small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.stores-card > p { margin: 0; font-size: 11px; }
.stores-card a { line-height: 1.65; }
.stores-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.stores-card-foot > small { font-size: 10px; color: var(--muted); }
.stores-pending { border: 1px solid #e9dec9; border-radius: 10px; background: #fcf8ee; padding: 13px 15px; font-size: 11px; color: #735628; }
.stores-pending p { margin: 0; }
.stores-pending strong { font-weight: 650; }
.stores-pending-list { padding-left: 18px; margin: 8px 0 0; font-size: 11px; line-height: 1.65; }
.stores-pending-list li + li { margin-top: 3px; }
.stores-detail-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 23px; }
.stores-detail-heading > div { min-width: 0; }
.stores-detail-heading h1 { margin-bottom: 9px; }
.stores-detail-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.stores-detail-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 22px; align-items: start; }
.stores-details, .stores-responsibilities, .stores-history { min-width: 0; }
.stores-details > .section-heading { flex-wrap: wrap; align-items: flex-start; }
.stores-details .definition-list { margin-bottom: 20px; }
.stores-details .definition-list div { gap: 14px; padding: 14px 0; font-size: 11px; }
.stores-details .definition-list dt { flex-shrink: 0; }
.stores-details .definition-list dd { min-width: 0; max-width: 70%; line-height: 1.6; }
.stores-details .stores-pending { margin-top: 20px; }
.stores-page .section-heading { flex-wrap: wrap; }
.stores-responsibility { padding: 19px; min-width: 0; }
.stores-responsibility + .stores-responsibility { margin-top: 13px; }
.stores-responsibility-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.stores-responsibility-header > div { min-width: 0; }
.stores-responsibility-header h3 { margin: 0 0 6px; font-size: 13px; line-height: 1.45; }
.stores-responsibility-header .badge { flex-shrink: 0; }
.stores-responsibility p { font-size: 11px; margin: 0 0 8px; }
.stores-responsibility .stores-actions { margin-top: 15px; }
.stores-responsibility .hint { margin-top: 10px; }
.stores-responsibility .metric-line { gap: 12px; font-size: 10px; }
.stores-responsibility .metric-line strong { min-width: 0; white-space: normal; text-align: right; overflow-wrap: anywhere; }
.stores-history { margin-top: 23px; }
.stores-history-event { padding: 18px 0; border-top: 1px solid var(--border); min-width: 0; }
.stores-history-event h3 { font-size: 12px; line-height: 1.5; margin: 0 0 7px; }
.stores-history-event p { font-size: 11px; color: var(--muted); margin: 0 0 8px; }
.stores-history-event time { font-size: 10px; color: var(--muted); line-height: 1.6; }
.stores-history-event details { margin-top: 11px; }
.stores-history-event summary { padding: 10px 0; min-height: 44px; color: var(--green); font-size: 11px; font-weight: 600; cursor: pointer; }
.stores-history-event details[open] summary { margin-bottom: 8px; }
.stores-history-event pre { margin: 0; padding: 15px; border: 1px solid var(--border); border-radius: 9px; background: #f3f5ef; font-family: ui-monospace, Consolas, monospace; font-size: 10px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.stores-field-help { display: block; margin: 8px 0 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.stores-read-error { padding: 23px; }
.stores-read-error p { margin-bottom: 16px; }
.stores-page [aria-busy="true"] .spinner { margin-right: 5px; }
.stores-modal { min-width: 0; }
.modal:has(.stores-modal) { width: min(680px, calc(100% - 32px)); max-height: calc(100dvh - 40px); }
.stores-modal .field:last-child { margin-bottom: 0; }
.stores-modal .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stores-modal label { line-height: 1.5; }
.stores-modal .modal-body > .notice { margin-bottom: 20px; }
/* A notice followed by fields keeps the same gap as two fields (sale record dialog, #102). */
.modal-body > .notice + .field-row, .modal-body > .notice + .field { margin-top: 18px; }
.stores-modal .modal-footer { flex-wrap: wrap; }
.stores-modal .error { overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .stores-grid { grid-template-columns: minmax(0, 1fr); }
  .stores-detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
  .stores-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stores-card { padding: 20px; }
  .stores-card-meta { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .stores-card-meta > div { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
  .stores-card-meta dt { flex-shrink: 0; margin: 0; }
  .stores-card-meta dd { text-align: right; min-width: 0; }
}
@media (max-width: 640px) {
  .stores-grid, .stores-filters { grid-template-columns: minmax(0, 1fr); }
  .stores-filters { gap: 13px; }
  .stores-card-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .stores-card-meta > div { display: block; }
  .stores-card-meta dt { margin-bottom: 6px; }
  .stores-card-meta dd { text-align: left; }
  .stores-summary { padding: 20px; }
  .stores-summary-grid { gap: 12px; }
  .stores-summary-stat strong { font-size: 27px; }
  .stores-summary-stat .eyebrow { letter-spacing: .7px; }
  .page-heading:has([data-store-action="refresh"]) > .actions { flex-wrap: wrap; flex-shrink: 1; }
  .stores-detail-heading { display: block; }
  .stores-detail-heading .stores-actions { margin-top: 15px; }
  .stores-modal .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 480px) {
  .stores-card { padding: 19px; gap: 15px; }
  .stores-card-head, .stores-responsibility-header { flex-wrap: wrap; gap: 9px; }
  .stores-card-head > div, .stores-responsibility-header > div { flex-basis: 100%; }
  .stores-card-meta { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .stores-card-meta > div { display: flex; gap: 14px; justify-content: space-between; }
  .stores-card-meta dt { margin-bottom: 0; flex-shrink: 0; }
  .stores-card-meta dd { text-align: right; min-width: 0; }
  .stores-card-foot .btn { width: 100%; }
  .stores-summary-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .stores-summary-stat + .stores-summary-stat { padding-top: 15px; border-top: 1px solid var(--border); }
  .stores-summary-stat strong { font-size: 30px; }
  .stores-details .definition-list dd { max-width: none; text-align: left; }
  .stores-details .definition-list dt { flex-shrink: 1; }
  .stores-responsibility { padding: 17px; }
  .stores-page .stores-actions .btn { flex: 1 1 auto; }
  .stores-history-event pre { padding: 12px; }
  .stores-modal .modal-footer .btn { flex: 1 1 100%; min-height: 46px; }
  .modal:has(.stores-modal) { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
}

/* Vendas em duplicidade (issue #5) */
.sd-identity { border: 1px solid var(--line, #d9d4c5); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.sd-identity legend { padding: 0 6px; font-weight: 600; }
.sd-duplicate { margin-top: 12px; }
.sd-refs { margin: 8px 0; padding-left: 18px; }
.sd-summary { margin-bottom: 8px; }
.sd-item-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.sd-pair { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line, #d9d4c5); padding-top: 12px; margin-top: 12px; }
.sd-pair > div:first-child { min-width: 0; flex: 1 1 260px; overflow-wrap: anywhere; }
.sd-pair-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sd-pair-side .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sd-total { font-weight: 600; }
@media (max-width: 600px) { .sd-pair-side { align-items: stretch; } .sd-pair-side .actions { justify-content: stretch; } }
/* #26 A3: venda parecida. Comparação, escolha explícita e campos congelados; tudo escopado no diálogo. */
.sd-dialog [data-sd-input]:disabled { background: #f1f3ed; color: var(--ink); border-style: dashed; cursor: not-allowed; opacity: 1; }
.sd-compare { border: 1px solid #e7deca; background: #fcf8ee; border-radius: 11px; padding: 14px 17px; color: var(--ink); font-size: 13px; line-height: 1.6; }
.sd-compare:focus { outline: none; }
.sd-compare:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.sd-compare h3 { display: flex; gap: 8px; align-items: center; margin: 4px 0 6px; font-size: 14px; color: #735628; }
.sd-compare h3 .icon { width: 18px; height: 18px; flex: 0 0 auto; }
.sd-compare p { margin: 0 0 10px; }
.sd-compare-table thead { background: none; }
.sd-compare-table { width: 100%; border-collapse: collapse; margin: 6px 0 4px; font-size: 12px; }
.sd-compare-table th, .sd-compare-table td { text-align: left; vertical-align: top; padding: 8px 6px; border-top: 1px solid #e7deca; overflow-wrap: anywhere; }
.sd-compare-table th { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink); background: none; }
.sd-compare-table thead th { border-top: 0; font-size: 11px; color: #735628; font-weight: 600; }
.sd-compare-table tbody th { font-weight: 600; white-space: nowrap; }
.sd-diff, .sd-same { display: inline-block; margin-left: 4px; font-weight: 600; }
.sd-diff { color: #735628; }
.sd-same { color: #45624b; white-space: nowrap; }
.sd-note { display: inline-block; margin-left: 4px; font-style: italic; color: var(--ink); }
.sd-item:focus { outline: none; }
.sd-item:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.sd-compare-pair { margin-bottom: 14px; }
.sd-compare fieldset { background: var(--paper); }
@media (max-width: 480px) {
  .sd-compare-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .sd-compare-table, .sd-compare-table tbody, .sd-compare-table tr, .sd-compare-table th, .sd-compare-table td { display: block; width: 100%; }
  .sd-compare-table tr { border-top: 1px solid #e7deca; padding: 8px 0; }
  .sd-compare-table th, .sd-compare-table td { border-top: 0; padding: 2px 0; }
  .sd-compare-table td::before { content: attr(data-label) ": "; color: #735628; font-weight: 600; }
}

/* #39 Beta VPS: "Comece por aqui" */
.onboarding { margin-bottom: 25px; }
.onboarding-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.onboarding-head h2 { margin: 4px 0 0; }
.onboarding-notice { display: flex; gap: 9px; align-items: flex-start; margin: 14px 0 6px; padding: 12px 14px; border-radius: 10px; background: var(--green-soft); color: var(--ink); font-size: 13px; line-height: 1.55; }
.onboarding-notice .icon { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.onboarding-tasks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
.onboarding-tasks li { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--border); }
.onboarding-tasks li:first-child { border-top: 0; }
.onboarding-tasks strong { display: block; font-size: 14px; }
.onboarding-tasks p { margin: 3px 0 0; font-size: 12px; color: var(--muted); line-height: 1.55; }
.onboarding-restore { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.onboarding-restore .hint { margin: 0; }
@media (max-width: 600px) {
  .onboarding-tasks li { grid-template-columns: auto 1fr; }
  .onboarding-tasks li .btn { grid-column: 1 / -1; width: 100%; }
}

/* #39 Beta VPS: feedback do testador */
.feedback-trigger { gap: 7px; white-space: nowrap; }
.feedback-trigger .icon { width: 16px; height: 16px; }
.fb-screen { margin: 0 0 14px; font-size: 13px; }
.fb-item:focus { outline: none; }
.fb-item:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.fb-item-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.fb-item-head .hint { margin: 4px 0 0; overflow-wrap: anywhere; }
.fb-text { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 14px 0; font-size: 13px; line-height: 1.6; }
.fb-text dt { font-weight: 600; color: var(--ink); }
.fb-text dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.fb-item .actions { display: flex; justify-content: flex-end; }
@media (max-width: 600px) {
  .fb-text { grid-template-columns: 1fr; gap: 2px; }
  .fb-text dd + dt { margin-top: 8px; }
  .fb-item .actions { justify-content: stretch; }
  .fb-item .actions .btn { width: 100%; }
}
.feedback-label-short { display: none; }
@media (max-width: 480px) {
  /* A word, not only an icon: finding feedback unaided is a GO criterion. The visible "Feedback" is part of the name (2.5.3). */
  .feedback-trigger .feedback-label-long { display: none; }
  .feedback-trigger .feedback-label-short { display: inline; }
  .feedback-trigger { min-width: 44px; flex: 0 0 auto; padding: 0 10px; gap: 5px; }
}
/* #26 L4: one pending item per line instead of a "·" paragraph */
.pending-list { margin: 6px 0 8px; padding-left: 18px; display: grid; gap: 4px; font-size: 12px; line-height: 1.5; }
.pending-list li { overflow-wrap: anywhere; }

/* #26 A5/L5: import preview */
.import-notice { display: flex; gap: 9px; align-items: flex-start; margin: 10px 0 4px; padding: 10px 13px; border-radius: 10px; background: var(--green-soft); color: var(--ink); font-size: 12px; line-height: 1.55; }
.import-notice .icon { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; }
.import-duplicate { margin-top: 6px; }
.import-duplicate .hint { margin: 4px 0 0; }
th small#import-check-hint { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; margin-top: 3px; }

/* #26 A4: import review as cards below 768 px, instead of a squeezed 5-column table */
.import-check-text { display: none; }
@media (max-width: 767px) {
  .import-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .import-table, .import-table tbody, .import-table tr, .import-table td { display: block; width: 100%; }
  .import-table tr { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; background: var(--paper); margin-bottom: 12px; padding: 4px 14px; }
  .import-table td { border-top: 1px solid var(--border); padding: 10px 0; font-size: 12px; overflow-wrap: anywhere; }
  .import-table td:nth-child(2) { border-top: 0; order: 1; }
  .import-table td:nth-child(3) { order: 2; }
  .import-table td:nth-child(4) { order: 3; }
  .import-table td:nth-child(5) { order: 4; }
  /* Selecting is the last decision on a card, after reading it. */
  .import-table td.import-check { order: 5; }
  .import-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
  .import-check-label { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
  .import-check-text { display: inline; font-size: 12px; color: var(--ink); }
  .table-wrap:has(.import-table) { overflow-x: visible; }
}

/* #26 P1: five summary cards on the duplicates page fit one row instead of leaving the fifth alone */
.stats-grid.sd-summary { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
/* #26 P3: two product cards side by side cut the fragrance select at 360 px; stack them below 400 px */
@media (max-width: 400px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* #26 LJ1/LJ4: store detail */
#store-detail .stores-detail-heading h2:focus { outline: none; }
#store-detail .stores-detail-heading h2:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; border-radius: 4px; }
.stores-detail-actions { margin-top: 16px; }
/* .stores-filters sets its own display, which would override the hidden attribute. */
.stores-filters[hidden], .stores-summary[hidden] { display: none; }
/* Room above the detail heading when it is scrolled into view, so the label and the focus ring are not cut. */
.stores-detail-heading { scroll-margin-top: 20px; }

/* #77 beta invitations */
.invite-summary { margin: 14px 0 18px; }
.invite-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.invite-row:first-child { border-top: 0; }
.invite-row > div:first-child { min-width: 0; flex: 1 1 260px; overflow-wrap: anywhere; }
.invite-row .hint { margin: 4px 0 0; }
.invite-row-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#invite-link { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* Comparar cenários: canal e hub em linha própria, abaixo do número do cenário. */
.compare-table th small { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; margin-top: 3px; }

/* #94: contas comerciais. */
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line, #d9d4c5); flex-wrap: wrap; }
.account-row:last-child { border-bottom: 0; }
.account-row h3 { margin: 0; font-size: 15px; }
.account-row .hint { margin: 4px 0 0; }
.account-markets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; }
.account-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.account-id code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; user-select: all; word-break: break-all; }

/* #94: termos de uso e privacidade (só o link no MVP; o aceite vem com a #93). */
.auth-legal { margin: 14px 0 0; }
.auth-legal .btn-quiet { padding-left: 0; min-height: 44px; }
.sidebar-legal { margin: 0 0 8px 16px; }
.sidebar-legal .btn-quiet { color: rgba(255, 255, 255, 0.82); padding: 10px 0; min-height: 44px; }
.terms-body section + section { margin-top: 18px; }
.terms-body h3 { margin: 0 0 6px; font-size: 16px; }
.terms-pending { margin: 0; padding: 10px 12px; border: 1px dashed var(--field-border, #7f8a82); border-radius: 10px; }

/* #94: revisão de taxas componente por componente. */
.fee-components { border: 1px solid var(--line, #d9d4c5); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.fee-components > legend { font-weight: 700; padding: 0 6px; }
.fee-component { border-top: 1px solid var(--line, #d9d4c5); padding: 12px 0 4px; margin: 10px 0 0; border-left: 0; border-right: 0; border-bottom: 0; }
.fee-component > legend { font-weight: 600; padding: 0 6px 0 0; }
.fee-component > legend small { font-weight: 400; color: var(--muted, #5b665e); }
.fee-tiers { width: 100%; border-collapse: collapse; margin: 6px 0 4px; font-size: 13px; }
.fee-tiers caption { text-align: left; font-weight: 600; padding: 4px 0; }
.fee-tiers th, .fee-tiers td { padding: 4px 6px; text-align: left; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 400; }
.fee-tiers input { width: 100%; min-height: 40px; }
.fee-component { display: block; min-width: 0; }
.fee-component select { width: 100%; }
.fee-component .field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 12px; }
.fee-tiers-scroll { overflow-x: auto; max-width: 100%; }
.fee-tiers input { min-width: 72px; }
.fee-tiers th[scope="row"] { min-width: 110px; }
.fee-ref { display: block; margin-top: 2px; font-size: 11px; color: var(--muted, #5b665e); }
/* #107: help and reference text tied to fee fields; muted ink keeps AA contrast on the paper background. */
.fee-help { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--muted, #5b665e); }
.fee-ref { font-size: 12px; }
/* #16 PR B: legacy SKU review page. */
#sku-legacy-review > section, #sku-legacy-review > form { margin-top: 16px; }
.sku-literal { white-space: pre; }
.sku-legacy-versions td, .sku-legacy-versions th { vertical-align: top; }
.sku-legacy-members, .sku-legacy-decisions, .sku-legacy-claims { padding-left: 18px; display: grid; gap: 6px; }
.sku-review-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sku-review-actions .btn { min-height: 44px; }
.sku-review-mfa { margin-top: 12px; }
@media (max-width: 520px) { .sku-review-actions .btn { width: 100%; } }
/* The versions table keeps readable columns and scrolls inside its own region on narrow screens. */
.sku-legacy-versions { min-width: 820px; }
.sku-legacy-versions thead th { white-space: nowrap; }
/* #137: decided families under the CLEAR notice. */
#sku-preflight[data-status="CLEAR"] > h2 { margin-top: 18px; }
/* #134: settlement inheritance block in "Nova conta". */
.account-inheritance { border: 1px solid var(--line, #d9d4c5); border-radius: 12px; padding: 12px 14px; margin: 12px 0; min-width: 0; }
.account-inheritance > legend { font-weight: 700; padding: 0 6px; }
.account-inheritance [data-inheritance-detail] { margin-top: 10px; }
.account-inheritance-table { min-width: 520px; }
/* #151 R2: estimated expenses, said before the number. */
.result-alert { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 14px 18px; background: #fff4e0; color: #5c3b00; border-bottom: 1px solid #e8c98a; border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.result-alert strong { display: block; margin-bottom: 2px; }
.result-alert p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; }
.result-alert .btn { min-height: 44px; }
/* #151 R1: the Gestão price card has its own accent, so the two numbers never read as the same data. */
.result-card--gestao .result-top { background: #2b2a4c; }
.result-base { display: inline-block; margin: 10px 0 0; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.14); color: #f5f5e9; font-size: 12px; font-weight: 600; }
.result-bridge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; margin-bottom: 12px; border: 1px dashed var(--line, #d9d4c5); border-radius: 10px; font-size: 13px; }
.result-bridge p { margin: 0; }
.result-bridge .btn { min-height: 44px; }
/* #151 R3: channels without a published fee profile, on the owner's overview. */
.unpublished-channels { margin: 16px 0; }
.unpublished-channels ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.unpublished-channels li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line, #d9d4c5); }
.unpublished-channels .btn { min-height: 44px; }

/* #95: Sales_by_Variant history. Exported values are shown as text, in the exported order. */
.svh-tabs { max-width: 420px; }
.svh-import { display: grid; gap: 16px; max-width: 760px; }
.svh-import h2, .svh-preview h2 { font-family: Georgia, serif; font-weight: 400; font-size: 22px; margin: 0; }
.svh-context { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; display: grid; gap: 12px; margin: 0; }
.svh-context legend { padding: 0 6px; font-size: 12px; font-weight: 600; }
.svh-context [data-svh-period-hint][data-state="differs"] { color: var(--danger); }
.svh-preview { display: grid; gap: 16px; }
.svh-batch { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; margin: 0; }
.svh-batch div { min-width: 0; }
.svh-batch dt { font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.svh-batch dd { margin: 3px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.svh-batch-scope { grid-column: 1 / -1; }
.svh-preview .notice ul { margin: 6px 0 0; padding-left: 18px; }
.svh-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.svh-toolbar .hint { margin: 0; }
.svh-table-wrap { overflow-x: auto; }
.svh-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.svh-table th, .svh-table td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; min-width: 70px; }
.svh-table th { font-size: 10px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.svh-table td[data-svh-field="product"], .svh-table td[data-svh-field="variant"], .svh-table td[data-svh-field="storeRaw"] { min-width: 150px; }
/* Identifiers are compared character by character with the marketplace panel: never split them; the table scrolls. */
.svh-table td[data-svh-field="sku"], .svh-table td[data-svh-field="variantId"], .svh-table td[data-svh-field="principalSku"], .svh-table td[data-svh-field="listingId"] { white-space: nowrap; overflow-wrap: normal; }
.svh-pager { justify-content: flex-end; }
.svh-confirm { display: grid; gap: 10px; border-top: 1px solid var(--border); padding-top: 16px; }
.svh-confirm .hint { margin: 0; }
.svh-batch-card { display: grid; gap: 12px; }
@media (max-width: 640px) {
  .svh-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .svh-table, .svh-table tbody, .svh-table tr, .svh-table td { display: block; width: 100%; min-width: 0; }
  .svh-table tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper); margin-bottom: 12px; padding: 4px 14px; }
  .svh-table td { padding: 8px 0; }
  .svh-table td[data-svh-field] { white-space: normal; overflow-wrap: anywhere; }
  /* Long texts take the whole card width; short codes and numbers pair up. */
  .svh-table td[data-svh-field="product"], .svh-table td[data-svh-field="storeRaw"], .svh-table td[data-svh-field="variant"], .svh-table td:last-child, .svh-table td[colspan] { grid-column: 1 / -1; }
  .svh-table td:last-child { border-bottom: 0; }
  .svh-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
  .svh-table-wrap { overflow-x: visible; }
  .svh-pager, .svh-confirm .actions { flex-direction: column-reverse; align-items: stretch; }
}
.svh-search { display: grid; gap: 14px; margin-bottom: 18px; }
.svh-results-meta { margin: 0 0 10px; }
.svh-result { display: grid; gap: 12px; }
.svh-result h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.svh-mapping { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 12px; }
.svh-compare { display: grid; gap: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.svh-compare h4 { margin: 0; font-size: 13px; }
.svh-at { display: flex; gap: 10px; flex-wrap: wrap; }
.svh-at input { flex: 1 1 200px; }
.svh-accept { display: grid; gap: 8px; justify-items: start; }
.svh-sides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.svh-side { border: 1px solid var(--border); border-radius: 12px; padding: 14px; min-width: 0; }
.svh-side h5 { margin: 0 0 8px; font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.svh-side .hint { margin: 6px 0 0; }
.svh-value { margin: 0; font-family: Georgia, serif; font-size: 22px; overflow-wrap: anywhere; }
@media (max-width: 760px) { .svh-sides { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .svh-search .field-row, .svh-compare .field-row { grid-template-columns: 1fr; } .svh-at .btn { flex: 1 1 100%; } }

/* #95 Pedidos: whole-batch diagnostics, the 51 literal columns and the upload progress. */
.svh-sources { max-width: 320px; margin-bottom: 12px; }
.oa-lead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.oa-progress { display: grid; gap: 6px; }
.oa-progress progress { width: 100%; height: 8px; accent-color: var(--green); }
.oa-diagnostics { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: grid; gap: 10px; }
.oa-diagnostics h3 { margin: 0; font-size: 13px; }
.oa-diagnostics .hint { margin: 0; }
.oa-table td [data-oa-row-diag] { display: inline-flex; white-space: normal; margin: 0 4px 4px 0; text-align: left; }
/* #102: the diagnostic cell is wide enough for its tags, which wrap by word, so a row stays one or two lines tall. */
.oa-table td[data-oa-diag-cell] { min-width: 260px; overflow-wrap: normal; }
.oa-table td[data-oa-diag-cell] [data-oa-row-diag] { overflow-wrap: normal; word-break: normal; }
.oa-table td[data-oa-diag-cell] [data-oa-expand] { display: block; margin-top: 4px; }
.oa-detail-row td { background: var(--paper); }
.oa-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin: 0; }
.oa-columns div { min-width: 0; }
.oa-columns dt { font-size: 10px; font-weight: 600; letter-spacing: .3px; color: var(--muted); }
.oa-columns dd { margin: 2px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.oa-columns [data-oa-financial] dd .hint { display: block; font-size: 10px; }
/* Order, listing and SKU identifiers are compared with the marketplace panel: never split them on the wide table. */
.oa-table td[data-oa-field="1"], .oa-table td[data-oa-field="32"], .oa-table td[data-oa-field="33"] { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 640px) { .oa-detail-row td::before { content: none; } .oa-columns { grid-template-columns: 1fr; } .oa-table td[data-oa-field] { white-space: normal; overflow-wrap: anywhere; } .oa-table td[data-oa-diag-cell] { min-width: 0; } }

/* #168: "Preço-base sugerido (Temu)" above the seller's price field, and the confirmation below it. */
.temu-suggestion { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; background: var(--paper); display: grid; gap: 6px; }
.temu-suggestion-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.temu-suggestion-value { margin: 0; font-family: Georgia, serif; font-size: 24px; }
.temu-suggestion .hint { margin: 0; }
.temu-field-hints { margin: -8px 0 14px; display: grid; gap: 4px; }
.temu-field-hints .hint { margin: 0; }
.temu-guard { margin: -4px 0 14px; }
