:root {
  color: #18232e;
  background: #edf1f4;
  font: 100% / 1.5 "Segoe UI", Arial, sans-serif;
  --paper: #fff;
  --line: #d5dfe6;
  --muted: #4b5d69;
  --accent: #185c6a;
}
* { box-sizing: border-box; }
body { margin: 0; }
.bar { background: #142d3b; color: #fff; }
.bar-inner, main { width: min(94%, 1360px); margin-inline: auto; }
.bar-inner { display: flex; align-items: center; gap: 1rem; min-height: 60px; }
.bar-inner strong { letter-spacing: .14em; }
.bar-inner span { color: #ccdce5; }
#language { margin-inline-start: auto; min-width: 5.25rem; border: 1px solid #90aab7; border-radius: .3rem; background: transparent; color: #fff; padding: .35rem .7rem; }
#language:hover { background: #254657; }
#language:focus-visible { outline-color: #b5d8e6; }
main { padding-block: clamp(1.1rem, 4vw, 3rem); }
.page-heading { display: flex; align-items: start; justify-content: space-between; gap: .75rem; margin-bottom: 1.5rem; }
h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.8rem); line-height: 1.1; letter-spacing: -.035em; }
p { margin: .45rem 0 0; }
.mode { border: 1px solid #a1bec3; color: #124f5c; background: #e4f2f3; padding: .25rem .65rem; font-size: .9rem; border-radius: .35rem; white-space: nowrap; }
.accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: .5rem; margin-bottom: 1.4rem; }
.account { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: .7rem 1rem; min-height: 77px; }
.account.error { border-top-color: #a83736; }
.account p, #snapshot, .foot, small { color: var(--muted); }
.account small { display: block; margin-top: .3rem; font-size: .82rem; }
.catalog { border: 1px solid var(--line); background: var(--paper); }
.toolbar { display: flex; gap: .85rem; flex-wrap: wrap; align-items: end; padding: .8rem 1rem; }
.toolbar label { display: grid; gap: .25rem; font-size: .9rem; color: var(--muted); }
.toolbar p { margin-left: auto; padding-block: .4rem; color: var(--muted); }
input, select, button { color: inherit; font: inherit; }
input, select, dialog button { border: 1px solid #a8bac4; background: #fff; border-radius: .3rem; padding: .45rem .6rem; min-width: 0; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.scroller { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .65rem .75rem; vertical-align: top; border-top: 1px solid var(--line); min-width: 132px; }
th { background: #e3ebf0; font-size: .92rem; }
td { font-size: .92rem; }
td small { display: block; margin-top: .15rem; }
tr:nth-child(even) td { background: #f6f9fa; }
.sku { background: none; border: 0; padding: 0; font-weight: 700; text-decoration: underline; text-underline-offset: .18em; color: #145a6c; }
.problem { color: #8e3230; }
.foot { font-size: .87rem; max-width: 70ch; margin-top: .8rem; }
dialog { color: inherit; width: min(96%, 1440px); border: 1px solid var(--line); border-radius: .4rem; padding: 1.4rem; max-height: 88vh; }
dialog::backdrop { background: #142d3bb5; }
dialog form { float: right; }
dialog h2 { margin: 0 0 .8rem; padding-right: 5.5rem; overflow-wrap: anywhere; }
#detail-finding { color: var(--muted); margin-bottom: 1rem; }
#detail-body { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: .65rem; overflow: auto; padding-bottom: .5rem; }
.review-account { border: 1px solid var(--line); padding: .85rem; min-width: 0; overflow-wrap: anywhere; }
.review-account header { border-bottom: 1px solid var(--line); padding-bottom: .6rem; }
.review-account h3, .review-account h4 { margin: 0; font-size: 1rem; }
.review-account h4 { margin-top: .9rem; font-size: .86rem; color: var(--muted); }
.listing-details { padding-top: .25rem; }
.listing-details + .listing-details { margin-top: .85rem; border-top: 1px solid var(--line); }
.listing-details p, .unknown { font-size: .9rem; }
.description { white-space: pre-wrap; max-height: 230px; overflow: auto; }
.unknown { color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(51px, 1fr)); gap: .28rem; margin: .55rem 0 0; padding: 0; list-style: none; }
.gallery button { position: relative; display: grid; place-items: center; padding: 0; width: 100%; aspect-ratio: 1; overflow: hidden; background: #edf1f4; }
.gallery img { width: 100%; height: 100%; object-fit: contain; }
.gallery span { position: absolute; right: 0; bottom: 0; padding: 0 .24rem; background: #142d3b; color: white; font-size: .75rem; }
.additional-fields dl { margin: .65rem 0 0; font-size: .86rem; }
.additional-fields dt { margin-top: .55rem; font-weight: 600; color: var(--muted); }
.additional-fields dd { margin: .05rem 0; }
.additional-fields details, .workflow details { border-top: 1px solid var(--line); margin-top: .65rem; padding-top: .45rem; }
summary { cursor: pointer; }
.additional-fields pre, .workflow pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 250px; overflow: auto; font-size: .82rem; margin: .35rem 0; }
.workflow { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .8rem; }
.workflow h3, .workflow h4, .workflow h5 { margin: 0 0 .55rem; }
.workflow-message { color: var(--accent); }
.workflow-decisions, .workflow-editors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: .6rem; margin-block: .6rem; }
.workflow-editors { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.workflow-card { border: 1px solid var(--line); background: #f6f9fa; padding: .75rem; min-width: 0; }
.workflow > div > .workflow-card { margin-bottom: .6rem; }
.workflow label { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin: .35rem 0; }
.workflow select { width: 100%; }
.workflow textarea { width: 100%; border: 1px solid #a8bac4; resize: vertical; font: inherit; padding: .35rem; }
.workflow fieldset { border: 1px solid var(--line); padding: .3rem .7rem; }
.workflow fieldset label { flex-direction: row-reverse; justify-content: start; }
.workflow-line { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
#photo-preview { width: min(94vw, 840px); }
#photo-preview form { float: none; text-align: right; margin-bottom: .7rem; }
#photo-preview img { display: block; max-height: 72vh; max-width: 100%; margin-inline: auto; }
@media (max-width: 560px) {
  .page-heading { flex-wrap: wrap; }
  .toolbar label { flex: 1 1 100%; }
  .toolbar p { margin-left: 0; }
}
.product-edit-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; padding: 1rem 0; }
.product-edit-controls p { margin: 0; }
.product-edit-controls.is-editing { position: sticky; bottom: 0; z-index: 1; background: var(--paper); border-top: 1px solid var(--line); }
.product-edit-controls button:first-child, .product-edit-controls.is-editing button:nth-child(2) { background: var(--accent); color: white; }
.product-edit-controls.is-editing button:first-child { background: var(--paper); color: var(--accent); }
.inline-listing-editor { display: grid; gap: .75rem; padding-block: .8rem; border-block: 1px solid #cad8e1; }
.inline-listing-editor label { display: grid; gap: .35rem; min-width: 0; }
.inline-listing-editor input, .inline-listing-editor textarea, .inline-listing-editor select { width: 100%; box-sizing: border-box; }
.inline-listing-editor textarea { resize: vertical; }
.inline-listing-editor fieldset { display: grid; gap: .5rem; min-width: 0; margin: 0; }
.editor-photo-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; list-style: none; padding: 0; margin: 0; }
.editor-photo-list li { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.editor-photo-list img { width: 100%; height: 112px; object-fit: contain; background: #f3f6f8; }
.editor-photo-list button { font-size: .8rem; padding: .3rem; }
.editor-photo-list .editor-photo-preview { display: block; padding: 0; overflow: hidden; }
.draft-gallery { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .55rem 0; list-style-position: inside; }
.draft-gallery img { display: block; width: 88px; height: 88px; object-fit: contain; background: #f3f6f8; }
#create-product { width: min(96%, 720px); }
.create-form { display: grid; gap: .6rem; margin-bottom: 1rem; }
.create-form label { display: grid; gap: .25rem; font-size: .9rem; color: var(--muted); }
.create-form input, .create-form textarea, .create-form select { width: 100%; border: 1px solid #a8bac4; background: #fff; border-radius: .3rem; padding: .45rem .6rem; font: inherit; color: inherit; }
.create-form fieldset { display: flex; gap: .6rem; flex-wrap: wrap; border: 1px solid var(--line); border-radius: .3rem; padding: .6rem; }
.create-form fieldset label { flex: 1 1 120px; }
.create-form fieldset label:has(input[type=checkbox]) { display: flex; flex-direction: row; align-items: center; gap: .4rem; }
.create-form fieldset input[type=checkbox] { width: auto; }
.create-form > button, #create-product > button { justify-self: start; border: 1px solid #a8bac4; background: #fff; border-radius: .3rem; padding: .45rem .9rem; }
#create-product .workflow-card { border: 1px solid var(--line); border-radius: .3rem; padding: .7rem; margin-bottom: .6rem; }
#create-product .workflow-card pre { max-height: 220px; overflow: auto; background: #f6f9fa; padding: .5rem; font-size: .82rem; }
#bulk-edit { width: min(96%, 820px); }
#bulk-edit fieldset { display: grid; gap: .6rem; border: 1px solid var(--line); border-radius: .3rem; padding: .7rem; margin-bottom: .7rem; }
#bulk-edit fieldset fieldset { display: flex; flex-direction: row; gap: 1rem; }
#bulk-edit label { display: grid; gap: .25rem; font-size: .9rem; color: var(--muted); }
#bulk-edit fieldset fieldset label { display: flex; flex-direction: row; align-items: center; gap: .4rem; }
#bulk-edit input:not([type=checkbox]):not([type=file]), #bulk-edit textarea, #bulk-edit select { width: 100%; border: 1px solid #a8bac4; background: #fff; border-radius: .3rem; padding: .45rem .6rem; font: inherit; color: inherit; }
#bulk-edit > button { margin-right: .5rem; border: 1px solid #a8bac4; background: #fff; border-radius: .3rem; padding: .45rem .9rem; }
#bulk-edit table { margin-top: 1rem; }
#excel-dialog { width: min(96%, 900px); }
#excel-dialog a { display: inline-block; margin: .2rem .5rem .2rem 0; border: 1px solid #a8bac4; border-radius: .3rem; padding: .45rem .9rem; color: #145a6c; text-decoration: none; }
#excel-dialog label { display: grid; gap: .25rem; font-size: .9rem; color: var(--muted); margin-block: .5rem; }
#excel-dialog button { margin-right: .5rem; border: 1px solid #a8bac4; background: #fff; border-radius: .3rem; padding: .45rem .9rem; }
#excel-dialog table { margin-top: 1rem; font-size: .85rem; }
#mapping-dialog { width: min(96%, 900px); }
#mapping-dialog .mapping-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
#mapping-dialog select { max-width: 320px; border: 1px solid #a8bac4; background: #fff; border-radius: .3rem; padding: .45rem .6rem; }
#mapping-dialog button { border: 1px solid #a8bac4; background: #fff; border-radius: .3rem; padding: .45rem .9rem; margin-right: .4rem; }
#mapping-dialog fieldset { display: grid; gap: .5rem; border: 1px solid var(--line); border-radius: .3rem; padding: .7rem; margin-top: .7rem; }
#mapping-dialog table { margin-top: 1rem; font-size: .85rem; }
.login-card { max-width: 380px; margin-inline: auto; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: 1.2rem 1.4rem; }
.login-card form { display: grid; gap: .7rem; }
.login-card label { display: grid; gap: .25rem; font-size: .9rem; color: var(--muted); }
.login-card input { border: 1px solid #a8bac4; border-radius: .3rem; padding: .45rem .6rem; font: inherit; }
.login-card button { border: 1px solid #a8bac4; background: #fff; border-radius: .3rem; padding: .5rem .9rem; justify-self: start; }
.logout { color: #ccdce5; margin-left: .6rem; }
#settings-open { border: 1px solid #90aab7; border-radius: .3rem; background: transparent; color: #fff; padding: .35rem .7rem; margin-left: auto; }
#settings-open + #language { margin-inline-start: .5rem; }
#settings-dialog { width: min(96%, 640px); }
#settings-dialog .settings-account { border: 1px solid var(--line); border-radius: .3rem; padding: .7rem; margin-bottom: .6rem; display: grid; gap: .5rem; }
#settings-dialog .settings-account h4 { margin: 0; }
#settings-dialog label { display: grid; gap: .25rem; font-size: .9rem; color: var(--muted); }
#settings-dialog input { border: 1px solid #a8bac4; border-radius: .3rem; padding: .45rem .6rem; font: inherit; }
#settings-dialog button { border: 1px solid #a8bac4; background: #fff; border-radius: .3rem; padding: .45rem .9rem; margin-right: .4rem; justify-self: start; }
