/* 15store: quiet apparel workspace. Shared across planning, stock and factory. */
:root {
  --bg: #f8f7f9;
  --ink: #28242d;
  --muted: #69616d;
  --line: #dfdbe2;
  --surface: #fff;
  --soft: #f1edf2;
  --accent: #793e54;
  --accent-soft: #f1e5eb;
  --green: var(--accent);
  --lime: var(--accent-soft);
  --orange: #85511e;
  --red: #a13443;
}
html { font-size: 100%; color-scheme: light; }
body { font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button,input,select,textarea { font-family: inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color: transparent; }
:is(button,a,input,select,textarea):focus-visible { outline: 3px solid #a56f88; outline-offset: 3px; }
input,select,textarea { border-color: #c9c1cc; border-radius: 7px; min-height: 42px; }
input::placeholder,textarea::placeholder { color: #77707c; opacity: 1; }
input[type=checkbox],input[type=radio] { min-height: 0; accent-color: var(--accent); }
input[type=range] { accent-color: var(--accent); }
[hidden] { display: none !important; }

/* The wordmark and restrained seam line replace the old four-part symbol. */
.shell { grid-template-columns: 252px minmax(0,1fr); }
aside,.factory-shell aside { width: 252px; padding: 30px 16px 22px; background: #f0edf1; border-right: 1px solid var(--line); color: #4f4656; overflow-y: auto; }
.brand,.factory-shell .brand { gap: 0; margin: 0 16px; font-size: 2.125rem; line-height: 1.1; letter-spacing: -1.3px; font-weight: 750; color: var(--ink); text-decoration: none; }
.brand-number { color: var(--accent); font-weight: 800; }
.brand-word { color: var(--ink); }
.brand-sub { margin: 12px 16px 22px; padding-bottom: 23px; border-bottom: 1px dashed #c6bac8; font-size: .875rem; line-height: 1.5; letter-spacing: 0; color: #62586a; text-transform: none; }
.nav-caption { margin: 16px 16px 8px; color: #716677; font-size: .75rem; letter-spacing: .08em; line-height: 1.6; }
aside nav { display: grid; gap: 3px; }
aside nav button,aside nav .connection-nav,.factory-shell aside .connection-nav {
  display: flex; width: 100%; min-height: 44px; margin: 0; padding: 10px 14px; gap: 10px;
  border: 1px solid transparent; border-radius: 7px; background: transparent;
  color: #504658; font-size: .875rem; line-height: 1.5; text-align: left; text-decoration: none; white-space: normal;
}
aside nav .icon { display: none; }
aside nav button:hover:not(.active),aside nav .connection-nav:hover { background: #e7e0e8; color: #352c3a; }
aside nav button.active,aside nav .connection-nav.current,.factory-shell aside .current {
  background: #fff; color: var(--accent); border-color: #e0d6e0; font-weight: 650; box-shadow: inset 3px 0 var(--accent);
}
.aside-foot { margin: auto 16px 0; padding: 22px 0 0; color: #706575; font-size: .8125rem; line-height: 1.7; }
.aside-foot span { display: block; }
.aside-foot b { display: block; margin-top: 13px; padding-top: 13px; border-top: 1px dashed #c6bac8; font-size: .8125rem; font-weight: 600; letter-spacing: .03em; }
.main { min-width: 0; }
.top { height: auto; min-height: 68px; padding: 14px 32px; background: #fff; border-color: var(--line); }
.crumb,.status,.date-chip { font-size: .8125rem; color: var(--muted); }
.crumb b { font-weight: 600; color: var(--ink); }
.date-chip { background: var(--bg); border-color: var(--line); }
.dot { background: #657d87; }
.content,.factory-shell .content { max-width: 1840px; padding: 30px 32px 48px; }
.page-head { margin-bottom: 25px; align-items: center; }
.eyebrow { font-size: .75rem; letter-spacing: .09em; color: #736778; font-weight: 600; margin-bottom: 8px; }
h1 { font-size: clamp(1.75rem,2.4vw,2.25rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.2; margin-bottom: 10px; }
h2 { font-size: 1.125rem; letter-spacing: -.015em; line-height: 1.4; }
h3 { font-size: 1rem; line-height: 1.5; }
.sub { font-size: 1rem; color: var(--muted); line-height: 1.6; }
.btn,.plan-toolbar .btn,.stock-card .btn,.source-buttons .btn { font-size: .875rem; font-weight: 550; min-height: 42px; border-color: #d6cfd9; border-radius: 7px; padding: 10px 15px; line-height: 1.4; white-space: normal; text-decoration: none; }
.btn:hover { border-color: #a594ac; background: #f5f1f6; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #653248; border-color: #653248; }
.btn.lime { background: var(--accent-soft); border-color: #dac2cd; color: #642e44; }
.btn.text { color: var(--accent); }
.btn.small { font-size: .875rem; min-height: 36px; padding: 6px 10px; }
button:disabled { opacity: .6; }

/* One quiet summary strip; the table remains the main working area. */
.metrics { gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 25px; }
.metric,.factory-shell .metric { background: transparent; border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 20px 22px; min-width: 0; }
.metric:last-child { border-right: 0; }
.metric-label { font-size: .875rem; color: #605668; line-height: 1.5; }
.metric-value,.factory-shell .metric-value { font-size: 2rem; font-weight: 650; letter-spacing: -.035em; line-height: 1.25; margin-top: 10px; white-space: normal; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.metric-note,.factory-shell .metric-note { font-size: .8125rem; line-height: 1.55; color: #726778; margin-top: 8px; }
.panel,.form-panel { border-color: var(--line); border-radius: 10px; }
.panel-head,.f-panel .panel-head { padding: 18px 22px; border-color: var(--line); }
.panel-head h2 { font-size: 1rem; font-weight: 650; }
.panel-body { padding: 22px; }
.panel-head .btn { flex-shrink: 0; }
.sync-panel { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 9px; padding: 18px 22px; align-items: flex-start; }
.sync-panel strong { font-size: 1rem; }
.sync-panel p { margin: 6px 0; }
.sync-panel .sub,.sync-panel .small-text { font-size: .875rem; }
.sync-actions .small-text { color: var(--accent); }
.stock-summary,.stock-amount small { color: var(--muted); }
.stock-summary a { color: var(--accent); }

table { font-size: .875rem; font-variant-numeric: tabular-nums; }
th,.factory-shell th,.forecast-models th,.size-grid thead th {
  font-size: .875rem; font-weight: 600; letter-spacing: 0; color: #594e61; background: #f1edf3;
  padding: 13px 15px; line-height: 1.5; border-bottom: 1px solid #d5cbd9;
}
td,.factory-shell td { font-size: .875rem; padding: 14px 15px; border-bottom: 1px solid #e8e3eb; line-height: 1.6; }
.wide-grid th { min-width: 104px; }
.wide-grid .frozen { min-width: 244px; max-width: 300px; border-right: 1px solid #ded5e2; box-shadow: 3px 0 7px #30203708; }
.wide-grid th.frozen { background: #f1edf3; }
.wide-grid td { border-right: 1px solid #eee9f0; }
.forecast-models :is(td,th):not(:first-child):not(:last-child) { text-align: right; }
.wide-grid tbody tr:hover td,tbody tr.clickable:hover { background: #faf6f9; }
.wide-grid th.total-cell,.wide-grid td.total-cell { background: #f4eaf0; color: #6b304b; }
.wide-grid tbody tr:hover td.total-cell { background: #eedde7; }
.wide-grid tfoot td,.wide-grid tfoot .frozen { background: #ede7f0; border-color: #d6cbdc; }
.wide-grid .row-open,.model-toggle,.size-settings,.size-settings[data-season-key] { color: var(--accent); }
.model-toggle { font-size: .9375rem; line-height: 1.5; }
.model-toggle small { color: #706277; font-size: .8125rem; }
.size-settings { font-size: .875rem; min-height: 32px; line-height: 1.5; }
.source-pill,.forecast-models .source-pill,.assortment-table .source-pill,.factory-shell td .muted { font-size: .8125rem; color: #72647a; line-height: 1.6; }
.forecast-models .size-detail-row>td,.forecast-models .size-detail-row:hover>td { background: #f5f0f6; border-color: #d8cadd; }
.size-detail { color: var(--ink); }
.size-detail-head p,.size-notes p,.size-footnote { font-size: .875rem; }
.size-grid { border-color: #d6cbdc; border-radius: 8px; }
.size-grid td,.size-grid th { border-color: #e3dbe8; }
.size-grid .size-order { background: #f6edf3; color: #6b304b; font-weight: 650; }
.size-grid tfoot td,.size-grid tfoot th { background: #eee6f1; border-color: #d6cbdc; }
.size-grid small,.size-grid details,.size-grid details p { font-size: .8125rem; color: #706277; }
.size-grid summary { color: #793e54; }
.size-footnote { color: var(--muted); }
.product b { font-size: .875rem; color: var(--ink); }
.product small { font-size: .8125rem; color: #716476; }
.product-icon,.product-icon.green,.product-icon.blue { background: #f0e7ed; color: #7e596f; border-radius: 7px; }

.badge,.f-tag,.assortment-table .f-tag { font-size: .8125rem; line-height: 1.5; background: #eee9f0; color: #625269; border-radius: 5px; padding: 4px 8px; }
.badge.green,.f-tag.done { background: #e8eff1; color: #3c626d; }
.badge.orange,.f-tag.warn { background: #faf0df; color: #83511b; }
.badge.red,.f-tag.bad { background: #f8e8ed; color: #9b304a; }
.f-positive { color: #386572; }
.f-negative,.danger-text { color: #a1364b; }
.muted,.small-text,.f-caption,.f-note,.f-history summary,.source-meta,.factory-footer,.table-count,.tiny,.footnote,.forecast-help,.export-note { color: var(--muted); }
.small-text,.f-note,.source-meta,.factory-footer,.table-count,.tiny,.footnote,.export-note { font-size: .8125rem; line-height: 1.65; }
.forecast-help,.f-caption,.f-history summary { font-size: .875rem; line-height: 1.7; }
.field label,.dialog-grid label,.plan-meta label,.f-toolbar label { font-size: .875rem; color: #5e5066; line-height: 1.5; }
.dialog-grid input,.dialog-grid select,.dialog-grid textarea,.plan-toolbar input,.plan-toolbar select,.plan-editor input,.plan-editor select,.assortment-bulk select,.assortment-table select { font-size: .9375rem; color: var(--ink); border-color: #cfc3d5; }
.form-panel .field input[type=range],.assortment-table input[type=checkbox] { accent-color: var(--accent); }
.segmented,.tabs { background: #eee8f1; border-color: #ded2e4; border-radius: 8px; }
.segmented button,.tabs button,.radio-tags button { font-size: .875rem; color: #695671; min-height: 38px; line-height: 1.5; }
.segmented button.active,.tabs button.selected { color: #71364f; background: #fff; box-shadow: 0 1px 3px #35203f14; }
.radio-tags button { border-color: #d9cddf; border-radius: 7px; }
.radio-tags button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.factory-tabs { gap: 28px; border-color: var(--line); }
.factory-tabs button { font-size: .9375rem; color: #695671; }
.factory-tabs button.active,.factory-tabs button:hover:not(.active) { background: transparent; color: var(--accent); border-bottom-color: var(--accent); }
.assortment-bulk { background: #eee7f2; border-bottom: 1px solid #d8cadf; }
.formula-strip,.f-coherence { background: #f0e9f2; color: #66516f; border-color: #ddcfe3; }
.formula-strip strong,.f-ledger .total { color: #703650; }
.f-recommendations article,.f-breakdown div,.dialog-summary article { background: #f1ebf4; color: #67556f; }
.f-breakdown b,.dialog-summary b { color: #46324f; }
.f-recommendations p,.issue-card p { font-size: .875rem; color: var(--muted); }
.issue-card h3,.dialog-section h3 { font-size: 1rem; }
.status-band p,.status-band small { font-size: .8125rem; color: var(--muted); }
.f-ledger>* { font-size: .9375rem; }
.factory-shell .source-link,.factory-shell .cell-link,.edit-row-link,.back { color: var(--accent); font-size: .875rem; }
.matrix small,.matrix .boxes,.matrix .destination,.matrix th .btn { font-size: .8125rem; color: #685270; }
.matrix .destination { font-size: .875rem; color: var(--ink); }
.legend-row,.alert-row p,.column-head,.batch h3 { font-size: .875rem; }
.alert-row small,.batch small,.batch-bottom { font-size: .8125rem; color: #716476; }
.batch { border-radius: 8px; }
.batch:hover { border-color: #b490a8; }
.batch-progress { background: #eee3eb; }
.batch-progress i { background: #9a6d86; }
.upload { border-color: #bc9caf; background: #fbf7fa; }
.empty,.factory-shell .empty { color: var(--muted); }
.notice,.workspace-note,.size-notes,.f-banner { background: #fff8ed; border-color: #ead4b4; color: #805226; font-size: .875rem; line-height: 1.65; }
.notice.blue,.factory-shell #message { background: #f1eaf4; color: #65496f; }
.factory-shell #message.error,.dialog-error { background: #faedf0; color: #9b314b; }
.dialog-error { font-size: .875rem; }
dialog,#workDialog { border-color: #d8c9df; border-radius: 12px; padding: 28px; color: var(--ink); box-shadow: 0 24px 90px #28182e30; }
dialog::backdrop,#workDialog::backdrop { background: #22172770; }
.dialog-head .btn { background: #f0e9f4; }
.dialog-section { border-color: var(--line); }
.source-settings { border-color: var(--line); color: var(--ink); }
#toast { background: #4b334f; }
.connection-page .panel-head { border-top: 3px solid var(--accent); }
.connection-details { border-color: var(--line); }
.connection-details dt { color: var(--muted); }
.connection-page h1 { font-size: 2rem; }
.chart text,.profit-chart text { fill: #6b626e; font-size: 12px; }

@media(min-width:1800px) { .content,.factory-shell .content { padding-inline: 42px; } }
@media(max-width:1200px) {
  .shell { grid-template-columns: 224px minmax(0,1fr); }
  aside,.factory-shell aside { width: 224px; padding-inline: 12px; }
  .content,.factory-shell .content { padding: 26px 24px; }
  .top { padding-inline: 24px; }
  .metrics,.factory-shell .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .factory-shell .metric-value { font-size: 1.875rem; }
  .top-right { gap: 12px; flex-wrap: wrap; }
}
@media(max-width:800px) {
  .shell,.factory-shell { display: block; }
  aside,.factory-shell aside { position: static; width: 100%; padding: 19px 20px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand,.factory-shell .brand { font-size: 1.875rem; margin: 0 4px; }
  .brand-sub,.nav-caption,.aside-foot { display: none; }
  aside nav,.factory-shell aside nav { display: flex; gap: 6px; margin-top: 16px; overflow-x: auto; padding-bottom: 6px; }
  aside nav button,aside nav .connection-nav,.factory-shell aside .connection-nav { width: auto; flex-shrink: 0; padding: 9px 12px; font-size: .875rem; white-space: nowrap; }
  .top,.factory-shell .top { min-height: 60px; padding: 13px 20px; flex-wrap: wrap; }
  .content,.factory-shell .content { padding: 24px 20px 36px; }
  .page-head,.factory-shell .page-head { flex-wrap: wrap; align-items: flex-start; }
  .page-head .btn { font-size: .875rem; }
  .grid,.detail-layout,.f-grid { grid-template-columns: 1fr; }
  .sync-panel { flex-direction: column; gap: 12px; }
  .sync-actions { align-items: stretch; width: 100%; }
  .sync-actions .small-text { text-align: center; }
  .factory-tabs button { font-size: .875rem; }
  .wide-grid .frozen { min-width: 200px; max-width: 235px; }
  .size-detail { width: min(100%,calc(100vw - 44px)); }
}
@media(max-width:560px) {
  .content,.factory-shell .content { padding-inline: 14px; }
  .top,.factory-shell .top { padding-inline: 16px; }
  .metric,.factory-shell .metric { padding: 16px; }
  .metric-value,.factory-shell .metric-value { font-size: 1.75rem; }
  .page-head,.factory-shell .page-head { flex-direction: column; }
  .page-head>.btn { width: 100%; }
  .plan-toolbar { gap: 9px; }
  .plan-toolbar #search { width: 100%; min-width: 0; }
  .panel-head,.f-panel .panel-head { padding: 16px; flex-wrap: wrap; }
  .panel-body { padding: 16px; }
  .wide-grid .frozen { min-width: 175px; max-width: 205px; }
  dialog,#workDialog { padding: 20px; }
  .dialog-grid,.dialog-summary { grid-template-columns: 1fr; }
  .dialog-head h2 { overflow-wrap: anywhere; }
  .modal-actions { align-items: stretch; }
  .modal-actions .btn { flex: 1 1 150px; }
  .connection-page h1 { font-size: 1.75rem; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; } }

/* Collapsible delivery plans retain the existing distribution editor. */
.plan-list{display:grid;gap:14px}.plan-card{min-width:0;background:#fff;border:1px solid #ded5e3;border-radius:12px;overflow:hidden}.plan-card-toggle{width:100%;display:flex;align-items:center;gap:24px;padding:22px;text-align:left;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}.plan-card-toggle:hover{background:#f8f5fa}.plan-card-toggle:focus-visible{outline:2px solid #783d58;outline-offset:-3px}.plan-card-name{flex:1;min-width:0;display:grid;grid-template-columns:16px 1fr;gap:6px 10px}.plan-card-name strong{overflow-wrap:anywhere;font-size:16px}.plan-card-name small{grid-column:2;color:#75687e;font-size:14px}.plan-card-count{display:grid;gap:5px;font-size:14px;color:#75687e;white-space:nowrap}.plan-card-count b{font-size:18px;color:#342638}.plan-card-body{padding:22px;border-top:1px solid #ded5e3}.plan-card-body .metrics{margin-top:0}@media(max-width:900px){.plan-card-toggle{flex-wrap:wrap;gap:16px}.plan-card-name{flex-basis:70%}.plan-card-body{padding:12px}.plan-card-count{flex:1}}

/* Dense delivery matrix: identity and quantities stay prominent. */
.plan-card-body .matrix th,.plan-card-body .matrix td{font-size:.8125rem;padding:9px 10px;line-height:1.4}
.plan-card-body .matrix .source-pill{font-size:.75rem;line-height:1.4;margin-top:3px}
.plan-card-body .matrix input{font-size:.8125rem;padding:6px 8px;min-height:34px}
.plan-card-body .matrix .edit-row-link,.plan-card-body .matrix small,.plan-card-body .matrix th .btn{font-size:.75rem;line-height:1.4}
.plan-card-body .matrix th .btn{padding:6px 8px;min-height:32px}
.plan-card-body .matrix .sent-count{background:#f1e8ef;font-size:.875rem;text-align:right;white-space:nowrap}

.matrix input[aria-invalid="true"]{border:2px solid #ac324b;background:#fff2f4}#planError{color:#8b263d;background:#fff2f4;border:1px solid #d999a7;padding:12px 16px;line-height:1.5}
