/* Shop Manager — T-Shirt Zone. Plain CSS, no build step. */
:root {
  --bg: #F4F2EE;
  --card: #FFFFFF;
  --soft: #FAF9F6;
  --ink: #1B1D1F;
  --ink-2: #3D4146;
  --muted: #5F646B;
  --faint: #A9A59D;
  --line: #E2DED6;
  --input: #CFCAC0;
  --accent: #C2410C;
  --accent-ink: #8A2C07;
  --accent-bg: #FFF9F5;
  --link: #B53A0A;
  --ok-bg: #F3F8F4; --ok-line: #CFE6D6; --ok-ink: #1F4D2E;
  --warn-bg: #FFF7E6; --warn-line: #F1D9A6; --warn-ink: #6B4A00;
  --err-bg: #FDF0EE; --err-line: #F0C7BF; --err-ink: #8A1F0E;
  --nav: #1B1D1F; --nav-ink: #D9D6CF; --nav-active: #34373B;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Archivo, system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.4; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent-ink); }
h1, h2, h3 { margin: 0; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.strong { font-weight: 700; }
.num { text-align: right; }
.cap { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* Shell */
.shell { display: flex; min-height: 100vh; }
.nav { width: 208px; flex-shrink: 0; background: var(--nav); color: var(--nav-ink); display: flex; flex-direction: column; padding: 24px 14px; gap: 4px; position: sticky; top: 0; height: 100vh; }
.nav a, .nav .nav-soon { color: var(--nav-ink); padding: 11px 12px; border-radius: 8px; font-size: 14px; }
.nav a.active { color: #fff; background: var(--nav-active); font-weight: 600; }
.nav .nav-soon { color: #6F737A; cursor: default; }
.nav-fill { flex-grow: 1; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.brand-name { font-weight: 700; font-size: 15px; color: #fff; }
.brand-name.dark { color: var(--ink); }
.nav-user { display: flex; align-items: center; gap: 10px; padding: 16px 10px 0; border-top: 1px solid var(--nav-active); flex-wrap: wrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #4A4E54; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nav-user-name { color: #fff; font-size: 13px; font-weight: 600; flex-grow: 1; }
.link-button { background: none; border: none; color: var(--nav-ink); font: inherit; font-size: 13px; padding: 6px 0; cursor: pointer; text-decoration: underline; }
.main { flex-grow: 1; min-width: 0; padding: 28px 32px 60px; display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .nav { width: auto; height: auto; position: static; flex-direction: row; align-items: center; padding: 10px 16px; gap: 4px; overflow-x: auto; }
  .brand { padding: 0 8px 0 0; }
  .nav .brand-name, .nav .nav-soon, .nav-user-name, .nav .nav-label { display: none; }
  .nav a { white-space: nowrap; }
  .nav-user { border-top: none; padding: 0; }
  .main { padding: 18px 16px 60px; }
}

/* Controls */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=date], input[type=number], input:not([type]), select, textarea {
  height: 44px; padding: 0 12px; border: 1px solid var(--input); border-radius: 8px; font: inherit; font-size: 15px; background: #fff; color: var(--ink); min-width: 0; width: 100%;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
select { padding-right: 28px; }
.btn { height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--input); background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-small { height: 36px; padding: 0 12px; font-size: 13px; }
.btn-dashed { border: 2px dashed var(--input); background: transparent; height: 56px; font-size: 15px; font-weight: 700; width: 100%; border-radius: var(--radius); }
.icon-btn { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; flex-shrink: 0; }
.icon-btn:hover { color: var(--err-ink); border-color: var(--err-line); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.alert { background: var(--err-bg); border: 1px solid var(--err-line); color: var(--err-ink); border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.note { border-radius: 8px; padding: 10px 14px; font-size: 13px; border: 1px solid; }
.note-ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.note-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.note-err { background: var(--err-bg); border-color: var(--err-line); color: var(--err-ink); }
.pill { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 5px 10px; border-radius: 999px; background: #EEEBE5; color: var(--ink-2); white-space: nowrap; }
.pill-sent { background: #E6EEF9; color: #1D3F7A; }
.pill-approved { background: #E3F2E7; color: #1F4D2E; }
.pill-declined { background: #F6E4E0; color: #8A1F0E; }
.tag { font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 4px; background: #E6EEF9; color: #1D3F7A; text-transform: uppercase; white-space: nowrap; }

/* Login */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.login-card { width: 100%; max-width: 400px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.login-card .brand { padding: 0; }

/* Quotes list */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head .muted { margin-top: 6px; }
.filter-bar { display: flex; gap: 10px; padding: 12px; flex-wrap: wrap; }
.filter-bar select { width: auto; }
.search-field { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--input); border-radius: 8px; padding: 0 12px; color: var(--muted); background: #fff; }
.search-field input { border: none; outline: none; padding: 0; height: 42px; }
.search-field:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.table-card { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.num { text-align: right; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table.clickable tbody tr { cursor: pointer; }
.table.clickable tbody tr:hover { background: var(--soft); }
.table tbody tr:last-child td { border-bottom: none; }
.empty { padding: 40px; text-align: center; display: flex; flex-direction: column; gap: 8px; }

/* Quote editor */
.editor { display: flex; flex-direction: column; gap: 20px; }
.q-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.q-title { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.q-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--muted); }
.crumb a { color: var(--muted); }
.save-state { font-size: 14px; color: var(--muted); }
.save-state.err { color: var(--err-ink); font-weight: 600; }
.q-head-actions { display: flex; gap: 10px; align-items: center; }
.q-head-actions select { width: auto; font-weight: 600; }
.customer-card { padding: 16px 20px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 14px; }
.customer-card .wide { grid-column: span 1; }
.q-body { display: flex; gap: 20px; align-items: flex-start; }
.q-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.q-side { width: 330px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.design { display: flex; flex-direction: column; }
.design-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.design-head .name { display: flex; align-items: center; gap: 12px; flex: 1 1 280px; min-width: 0; }
.design-head .name input { font-weight: 700; font-size: 16px; height: 40px; max-width: 360px; }
.design-head .totals { display: flex; align-items: center; gap: 14px; }
.design-total { font-family: var(--mono); font-size: 17px; font-weight: 700; }
.section { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: none; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.loc { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 12px 62px 12px 14px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.loc.first { border-color: var(--accent); background: var(--accent-bg); }
.loc-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.loc-row select, .loc-row input { height: 40px; width: auto; }
.loc-row .method-sel { max-width: 190px; }
.loc-row .where-sel { font-weight: 600; max-width: 220px; }
.loc-row .small-num { width: 64px; text-align: center; font-family: var(--mono); }
.loc-row .dim { width: 70px; text-align: center; font-family: var(--mono); }
.loc .del { position: absolute; top: 12px; right: 12px; }
.loc-price { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.loc-price .p { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.loc-price .p small { font-size: 12px; color: var(--muted); font-weight: 400; }
.loc-price .role { font-size: 12px; color: var(--muted); font-weight: 600; }
.loc.first .loc-price .role { color: var(--accent-ink); }
.loc-opts { display: flex; gap: 18px; flex-wrap: wrap; }
.loc-opts .check { font-size: 13px; }
.loc-opts .check input { width: 18px; height: 18px; }
.loc-meta { font-size: 12px; color: var(--muted); }
.add-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.add-row select { width: auto; height: 40px; }
.garment { border: 1px solid var(--line); border-radius: 10px; }
.garment-head { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--soft); border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.swatch { width: 40px; height: 40px; border-radius: 8px; background: #ccc center/cover no-repeat; flex-shrink: 0; border: 1px solid rgba(0,0,0,0.08); }
.garment-info { flex-grow: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.garment-info strong { font-size: 15px; }
.garment-info span { font-size: 13px; color: var(--muted); }
.garment-sum { display: flex; flex-direction: column; gap: 2px; text-align: right; }
.garment-sum .t { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.garment-sum span { font-size: 12px; color: var(--muted); }
.garment-opts { display: flex; gap: 14px; align-items: center; padding: 10px 14px 0; flex-wrap: wrap; font-size: 13px; }
.garment-opts select { width: auto; height: 36px; font-size: 13px; }
.sizes { padding: 12px 14px; display: grid; gap: 6px 8px; align-items: center; overflow-x: auto; }
.sizes .lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.sizes .sz { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.sizes input { height: 40px; padding: 0 4px; text-align: center; font-family: var(--mono); font-size: 15px; min-width: 52px; }
.sizes input.zero { color: var(--faint); }
.sizes .each { font-size: 12px; font-family: var(--mono); color: var(--ink-2); text-align: center; background: none; border: none; padding: 4px 0; cursor: pointer; border-radius: 4px; }
.sizes .each:hover, .sizes .each.sel { background: #EEEBE5; }
.sizes .each.none { color: var(--faint); cursor: default; background: none; }
.sizes .stock { font-size: 11px; color: var(--muted); text-align: center; font-family: var(--mono); }
.sizes .stock.low { color: var(--err-ink); font-weight: 700; }
.garment-foot { padding: 0 14px 12px; font-size: 12px; color: var(--muted); }
.search-box { position: relative; }
.search-box .search-field { border-style: dashed; }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(27,29,31,0.14); z-index: 20; max-height: 420px; overflow-y: auto; }
.result { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border: none; border-bottom: 1px solid var(--line); background: #fff; width: 100%; text-align: left; font: inherit; cursor: pointer; }
.result:last-child { border-bottom: none; }
.result:hover, .result:focus { background: var(--soft); outline: none; }
.result img, .result .ph { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: #EEEBE5; flex-shrink: 0; }
.result .r-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.result .r-main strong { font-size: 14px; }
.result .r-main span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results .r-msg { padding: 14px; font-size: 14px; color: var(--muted); }
.color-picker { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--soft); }
.color-picker .cp-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; }
.color-opt { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.color-opt:hover { border-color: var(--accent); }
.color-opt .swatch { width: 26px; height: 26px; border-radius: 5px; }
.fees-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fee { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; min-height: 48px; }
.fee.on { border-color: var(--accent); background: var(--accent-bg); }
.fee .fee-name { display: flex; gap: 10px; align-items: center; }
.fee input[type=number] { width: 100px; height: 34px; font-size: 14px; text-align: center; }
.fee .amt { font-family: var(--mono); white-space: nowrap; }
.side-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.row .mono { white-space: nowrap; }
.row.sub { color: var(--ink-2); }
.row.line { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 600; }
.row.total { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 800; font-size: 18px; }
.private { background: var(--soft); border: 1px dashed var(--input); }
.side-card .check { font-size: 14px; }
.side-card .check input { width: 18px; height: 18px; }
.side-card input[type=number] { width: 70px; height: 32px; font-size: 13px; }

@media (max-width: 1180px) {
  .q-body { flex-direction: column; }
  .q-side { width: 100%; position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}
@media (max-width: 900px) {
  .customer-card { grid-template-columns: 1fr 1fr; }
  .fees-grid { grid-template-columns: 1fr; }
  .loc-price { margin-left: 0; align-items: flex-start; text-align: left; width: 100%; }
  h1 { font-size: 24px; }
}
@media (max-width: 560px) {
  .customer-card { grid-template-columns: 1fr; }
}

/* Total bar while the summary is below the page (iPad portrait, narrow windows) */
.q-sticky { display: none; }
@media (max-width: 1180px) {
  .q-sticky { display: flex; position: sticky; bottom: 0; z-index: 15; margin: 0 -32px -60px; padding: 12px 32px; background: var(--ink); color: #fff; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
  .q-sticky .mono { font-size: 18px; font-weight: 700; }
}
@media (max-width: 900px) { .q-sticky { margin: 0 -16px -60px; padding: 12px 16px; } }

/* Settings and price sheets */
.small { font-size: 13px; }
code { font-family: var(--mono); font-size: 13px; background: #EEEBE5; padding: 1px 5px; border-radius: 4px; }
.settings { display: flex; flex-direction: column; gap: 20px; }
.inline-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
input.short-num { width: 96px; text-align: center; font-family: var(--mono); }
.sub-block { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.tier-rows { display: flex; flex-direction: column; gap: 8px; }
.tier-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.tier-row .icon-btn { font-size: 18px; }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; }
.radio-row .check input, .fee-table .check input { width: 18px; height: 18px; }
.fee-table td { white-space: normal; vertical-align: middle; }
.fee-table td:first-child { width: 44px; }
.fee-table input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.fee-table .check { margin-right: 12px; font-size: 13px; white-space: nowrap; }
.fee-table tr.fee-row:not(.on) .money-input, .fee-table tr.fee-row:not(.on) td:last-child { opacity: 0.45; }
.fee-table tr.on { background: var(--accent-bg); }
.group-row td { background: var(--soft); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 8px 16px; }
.money-input { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); }
.money-input input { height: 38px; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sheet-slot { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.slot-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.slot-actions form { margin: 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.sheet-table td, .sheet-table th { padding: 8px 14px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 900px) { .sheet-grid { grid-template-columns: 1fr; } .fee-table th:nth-child(3), .fee-table td:nth-child(3) { display: none; } }

.supplier-markup { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.supplier-markup.on { border-color: var(--accent); background: var(--accent-bg); }
.supplier-markup:not(.on) .sm-fields { display: none; }

/* Decoration methods */
.method-list { width: 240px; flex-shrink: 0; position: sticky; top: 20px; gap: 6px; }
.method-link { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; color: var(--ink); border: 1px solid transparent; }
.method-link:hover { background: var(--soft); color: var(--ink); }
.method-link.active { border-color: var(--accent); background: var(--accent-bg); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.type-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; }
.type-card > span { display: flex; flex-direction: column; gap: 3px; }
.type-card input { width: 20px; height: 20px; accent-color: var(--accent); margin: 2px 0 0; flex-shrink: 0; }
.type-card:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
input.name-in { width: 220px; }
.gt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.gt-grid .check input { width: 18px; height: 18px; }
.loc-table td { white-space: normal; vertical-align: middle; padding: 8px 10px; }
.loc-table input.short-num { width: 72px; height: 40px; }
.loc-table input.name-in { width: 100%; min-width: 150px; height: 40px; }
.nowrap { white-space: nowrap !important; }
.order-btns { white-space: nowrap; }
.order-btns .icon-btn { width: 32px; height: 32px; }
.types-pick { position: relative; }
.types-pick summary { cursor: pointer; font-size: 13px; padding: 8px 10px; border: 1px solid var(--input); border-radius: 8px; list-style: none; white-space: nowrap; background: #fff; }
.types-pick summary::-webkit-details-marker { display: none; }
.types-pop { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(27,29,31,0.14); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.types-pop .check input { width: 18px; height: 18px; }
@media (max-width: 1180px) { .method-list { width: 100%; position: static; } }
@media (max-width: 900px) { .two-col, .type-grid { grid-template-columns: 1fr; } }

.nav-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #6F737A; padding: 16px 12px 4px; }
/* Orders */
.pill-stage { background: #E6EEF9; color: #1D3F7A; }
.pill-rush { background: #FDE7DA; color: #8A2C07; }
.overdue { color: var(--err-ink); font-weight: 700; }
.stepper { display: flex; gap: 4px; padding: 8px; flex-wrap: wrap; }
.step { flex: 1 1 110px; padding: 10px 8px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; text-align: center; background: var(--soft); border: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.step.done { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.step.current { background: var(--accent); border-color: var(--accent); color: #fff; }
span.step { cursor: default; }
.garment-head.flat { background: none; border: none; padding: 0 0 8px; }
.size-table td, .size-table th { padding: 6px 10px; }
.imprint { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.imprint:last-child { border-bottom: none; }
.event { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pay-form { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-form input { flex: 1 1 110px; width: auto; min-width: 100px; height: 40px; }
.pay-form select { width: auto; height: 40px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.side-card a.row { color: var(--ink); padding: 4px 0; }
/* Production board */
.seg { display: inline-flex; border: 1px solid var(--input); border-radius: 8px; overflow: hidden; }
.seg a { padding: 0 14px; height: 42px; display: inline-flex; align-items: center; color: var(--ink); font-size: 14px; font-weight: 600; border-right: 1px solid var(--line); background: #fff; }
.seg a:last-child { border-right: none; }
.seg a.on { background: var(--ink); color: #fff; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; -webkit-overflow-scrolling: touch; }
.board-col { background: #EAE7E1; border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; }
.board-col-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 4px 6px; }
.board-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; }
.board-card.late { border-left: 4px solid var(--err-ink); }
.board-card-link { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 8px; color: var(--ink); }
.board-card-link:hover { color: var(--ink); background: var(--soft); border-radius: 10px 10px 0 0; }
.board-cust { font-weight: 600; font-size: 14px; }
.tags { display: inline-flex; gap: 4px; }
.board-move { padding: 0 10px 10px; }
.board-move select { height: 34px; font-size: 13px; }
.board-empty { padding: 8px 4px; }

/* Art & proof */
.imprint-card { display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.mock-box { width: 150px; height: 150px; border-radius: 8px; background: #EEEBE5; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted); font-size: 12px; text-align: center; padding: 6px; }
.mock-box img { width: 100%; height: 100%; object-fit: contain; }
.imprint-body { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.imprint-title { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex-grow: 1; }
.art-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.art-grid .wide { grid-column: span 2; }
.art-grid input { height: 40px; }
.file-list { display: flex; gap: 8px; flex-wrap: wrap; }
.file-chip { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; background: var(--soft); }
.chip-x { border: none; background: none; font-size: 16px; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; color: var(--muted); }
.chip-x:hover { background: var(--err-bg); color: var(--err-ink); }
.drop-zone { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 56px; border: 2px dashed var(--input); border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 8px 14px; cursor: pointer; }
.drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.version { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.v-badge { width: 36px; height: 36px; border-radius: 50%; background: var(--muted); color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.v-sent { background: #1D3F7A; } .v-approved { background: #1F4D2E; } .v-changes { background: var(--accent-ink); }
.link-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.link-box input { flex: 1 1 280px; height: 36px; font-family: var(--mono); font-size: 13px; }
details.side-card summary { cursor: pointer; }
@media (max-width: 700px) { .imprint-card { flex-direction: column; } .mock-box { width: 100%; height: 200px; } .art-grid { grid-template-columns: 1fr; } .art-grid .wide { grid-column: auto; } }
/* Invoices, shop settings (0.10) */
.settings-grid { display: flex; flex-direction: column; gap: 16px; max-width: 880px; }
.settings-grid h2 { margin: 0 0 4px; font-size: 17px; }
.pill-inv-draft { background: #EEEBE5; color: var(--ink-2); }
.pill-inv-sent { background: #E6EEF9; color: #1D3F7A; }
.pill-inv-partly { background: #FFF7E6; color: #6B4A00; }
.pill-inv-paid { background: #E3F2E7; color: #1F4D2E; }
.pill-inv-overdue { background: #FDF0EE; color: #8A1F0E; }
.pill-inv-void { background: #EEEBE5; color: #5F646B; }
.inv-lines td { vertical-align: top; }
.sr-col { width: 44px; text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.table-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: #FAF9F6; border-top: 1px solid var(--line); flex-wrap: wrap; }
.table-foot form.inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.add-line { display: flex; gap: 8px; padding: 12px 14px 4px; flex-wrap: wrap; align-items: center; }
.add-line input[type=text] { flex: 1 1 240px; width: auto; }
.add-line input { height: 42px; }
.pad { padding: 0 14px 12px; margin: 0; }
.deposit-row { font-size: 13px; padding: 6px 8px; border-radius: 6px; }
.deposit-row.due { background: #FFF7E6; color: #6B4A00; }
.deposit-row.ok { background: #F3F8F4; color: #1F4D2E; }
.link-button.danger { color: #8A1F0E; }
.pre { white-space: pre-line; }
.pay-form input[name=reference] { flex: 1 1 140px; }
.note-plain { background: #FAF9F6; border: 1px dashed #CFCAC0; color: var(--ink-2); }
.side-card .field input[type=number], .side-card .pay-form input[type=number] { width: 100%; height: 40px; font-size: 15px; }
.side-card .pay-form input[type=number] { width: auto; }
.row-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pad-head { padding: 14px 16px 0; }
/* Purchasing (0.12) */
.page-head .seg { align-self: flex-start; }
.po-card { margin-bottom: 18px; }
.po-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.po-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.po-sum { font-size: 14px; }
.scroll-x { overflow-x: auto; }
.po-table td { vertical-align: top; }
.po-table .check { align-items: flex-start; }
.stock-ok { color: #1F4D2E; font-weight: 600; }
.stock-short { color: #8A1F0E; font-weight: 600; }
.po-foot { display: grid; grid-template-columns: 1fr 1fr 140px; gap: 12px; padding: 14px 16px; background: #FAF9F6; border-top: 1px solid var(--line); align-items: end; }
.po-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.copy-list { width: calc(100% - 32px); margin: 0 16px 16px; font-size: 13px; }
.big-check { width: 24px; height: 24px; accent-color: #C2410C; }
tr.is-in td { background: #F3F8F4; }
.note-input { height: 36px; font-size: 13px; min-width: 140px; }
@media (max-width: 700px) { .po-foot { grid-template-columns: 1fr; } }
/* Email, templates, logo (0.13) */
.three-col { display: grid; grid-template-columns: 1.6fr 0.8fr 1.2fr; gap: 14px; }
@media (max-width: 900px) { .three-col { grid-template-columns: 1fr; } }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-opt { position: relative; }
.chip-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.chip-opt span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--input); border-radius: 8px; font-size: 14px; font-weight: 600; background: #fff; cursor: pointer; }
.chip-opt input:checked + span { border-color: #C2410C; background: #FFF8F3; }
.chip-opt input:focus-visible + span { outline: 2px solid #C2410C; outline-offset: 2px; }
.send-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.chip-add { height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--input); background: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip-add:hover { border-color: #C2410C; }
.tpl-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .tpl-layout { grid-template-columns: 1fr; } }
.tpl-list { display: flex; flex-direction: column; gap: 4px; }
.tpl-list a { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; border-radius: 8px; color: var(--ink); border: 1px solid transparent; }
.tpl-list a span { font-size: 12px; color: var(--muted); }
.tpl-list a.on { border-color: #C2410C; background: #FFF8F3; }
.tpl-editor textarea { font-size: 15px; line-height: 1.5; }
.mail-prev { overflow: hidden; padding: 0; }
.mail-from { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.mail-from strong { color: var(--ink); font-size: 13px; }
.mail-top { background: #1B1D1F; color: #fff; padding: 12px 16px; font-weight: 700; }
.mail-top img { max-height: 40px; max-width: 220px; background: #fff; border-radius: 6px; padding: 3px; display: block; }
.mail-body { padding: 14px 16px; font-size: 14px; line-height: 1.55; }
.mail-body p { margin: 0 0 12px; }
.mail-btn { display: inline-block; background: #C2410C; color: #fff; font-weight: 700; padding: 11px 18px; border-radius: 8px; }
.logo-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.logo-box { width: 260px; height: 130px; border: 1px dashed var(--input); border-radius: 10px; display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(#F4F2EE 0% 25%, #FFFFFF 0% 50%) 50% / 16px 16px; }
.logo-box img { max-width: 230px; max-height: 110px; }
.brand-logo { max-height: 34px; max-width: 150px; background: #fff; border-radius: 6px; padding: 3px; }
.danger-text { color: #8A1F0E; }
.logo-card { margin-bottom: 16px; }
/* Online stores (0.14) */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.store-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: #fff; }
.store-card.on { border-color: #CFE6D6; }
.store-card.opening { border-color: #C2410C; }
.store-card.later { background: #FAF9F6; opacity: 0.75; }
.connect-card { border-color: #C2410C; }
.map-grid { display: grid; grid-template-columns: 160px 1fr; gap: 8px 12px; align-items: center; font-size: 14px; }
.map-grid input { height: 40px; }
.code-sample { background: #1B1D1F; color: #EDEBE6; border-radius: 8px; padding: 12px; font-size: 12px; overflow-x: auto; white-space: pre; }
.csv-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; flex-wrap: wrap; }
.csv-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.csv-prev { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pill-src { background: #FDE7DA; color: #8A2C07; }
.pill-store { background: #EEEBE5; color: #3D4146; }
/* Mockup maker (0.15) */
.mock-box { gap: 4px; }
.mock-box:has(.closeup-thumb) img { width: 50%; }
.mk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .mk-layout { grid-template-columns: 1fr; } }
.mk-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 760px) { .mk-top { grid-template-columns: 1fr; } }
.mk-stage { position: relative; width: 100%; max-width: 520px; background: #EEEBE5; border-radius: 10px; overflow: hidden; touch-action: none; }
.mk-stage canvas { display: block; }
.mk-design { position: absolute; outline: 2px dashed #C2410C; outline-offset: 2px; cursor: move; touch-action: none; }
.mk-design img { width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; }
.mk-design:focus-visible { outline: 3px solid #C2410C; }
.mk-handle { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; background: #fff; border: 2px solid #C2410C; border-radius: 4px; cursor: nwse-resize; }
.mk-tag { position: absolute; left: 0; top: calc(100% + 6px); font-size: 12px; font-weight: 700; color: #fff; background: #C2410C; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.mk-close { width: 100%; max-width: 340px; aspect-ratio: 1; border-radius: 10px; display: block; }
.mk-sides { display: flex; gap: 6px; flex-wrap: wrap; }
.mk-sides .btn.on { border-color: #C2410C; background: #FFF8F3; }
.mk-swatches { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mk-swatch { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #CFCAC0; cursor: pointer; padding: 0; }
.mk-swatch.on { outline: 3px solid #C2410C; outline-offset: 2px; }
.mk-files { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-file { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.mk-file:has(input:checked) { border-color: #C2410C; background: #FFF8F3; }
.mk-file img { width: 36px; height: 36px; object-fit: contain; background: repeating-conic-gradient(#EEE 0% 25%, #FFF 0% 50%) 50% / 10px 10px; border-radius: 4px; }
.err-text { color: #8A1F0E; }
.closeup-thumb { border-radius: 6px; }
.tpl-sides { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tpl-side { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tpl-thumb { width: 100%; aspect-ratio: 300 / 340; background: #9A9DA2; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tpl-thumb img { width: 92%; height: 92%; object-fit: contain; }
.spec { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 0; font-size: 13px; }
.spec dt { font-weight: 700; margin-top: 8px; }
.spec dd { margin: 0; color: var(--ink-2); }
.perm-table input[type=checkbox] { width: 22px; height: 22px; accent-color: #C2410C; }
.perm-table td:first-child { min-width: 240px; }
form.inline { display: inline; }

/* v0.16 Shops subscribing: banner, billing, sign-up page, owner console */
.saas-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.saas-banner a { font-weight: 700; }
body.console { --nav: #12234A; --nav-active: #243B6B; --nav-ink: #D6DDEB; }
.console .brand-sub { display: block; font-size: 12px; font-weight: 500; color: var(--nav-ink); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat .big { font-size: 26px; font-weight: 700; font-family: var(--mono); }
.console-body { display: flex; gap: 20px; align-items: flex-start; }
.console-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.console-side { width: 420px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 14px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row form { display: inline; }
.table tr.picked td { background: var(--accent-bg); }
.plan-row { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.plan-edit { padding: 18px 20px; display: grid; grid-template-columns: 1.4fr 2fr 0.8fr 0.8fr; gap: 12px 14px; align-items: end; }
.plan-edit .wide { grid-column: 1 / -1; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.signup-page { min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; padding: 40px 16px; }
.signup-card { width: 100%; max-width: 520px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.signup-card h1 { font-size: 26px; }
.addr-field { display: flex; align-items: stretch; }
.addr-field input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; flex-grow: 1; }
.addr-field .addr-host { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--input); border-left: none; border-radius: 0 8px 8px 0; background: var(--soft); color: var(--muted); font-size: 13px; white-space: nowrap; max-width: 70%; overflow: hidden; text-overflow: ellipsis; }
.addr-note { font-size: 13px; min-height: 18px; }
.addr-note.ok { color: var(--ok-ink); }
.addr-note.bad { color: var(--err-ink); }
.plan-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-pick label { position: relative; border: 1px solid var(--input); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; font-size: 13px; }
.plan-pick label strong { font-size: 14px; }
.plan-pick input { position: absolute; opacity: 0; pointer-events: none; }
.plan-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 0 1px var(--accent); }
.plan-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1100px) {
  .console-body { flex-direction: column; }
  .console-side { width: 100%; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .plan-edit { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .plan-pick, .two-fields { grid-template-columns: 1fr; }
}
.console-main, .console-side { min-width: 0; max-width: 100%; }
.console .section-head { flex-wrap: wrap; gap: 10px; }
.console .seg { max-width: 100%; overflow-x: auto; }
.console .seg a { white-space: nowrap; }
/* v0.17 Settings → Suppliers */
.style-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border: 1px solid var(--input); border-radius: 999px; background: #fff; font-family: var(--mono); font-size: 13px; }
.style-chip button { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; }
.style-chip button:hover { background: var(--err-bg); color: var(--err-ink); }
