/* Tailoring cashier (Sales > Cashier for tailoring branches). The root carries the user's glass look
   (dynora-glass-light/-dark, Glass Light when another look is selected), so panels read the --glass-*
   variables from theme-glass.css. Every rule is scoped to .tc-root; the restaurant cashier is untouched.
   Layout follows the tailoring POS reference: catalog/customer/fabric | garment figure | measurements | summary. */
.tc-root {
    --tc-accent: var(--glass-accent, #1F6F6B);
    --tc-accent-rgb: var(--glass-accent-rgb, 31, 111, 107);
    --tc-text: var(--glass-text, #16211D);
    --tc-muted: var(--glass-text-muted, #56625C);
    --tc-panel: var(--glass-panel, rgba(250, 251, 249, .62));
    --tc-panel-strong: var(--glass-panel-strong, rgba(255, 255, 255, .85));
    --tc-input: var(--glass-input, rgba(255, 255, 255, .9));
    --tc-line: var(--glass-line, rgba(22, 33, 29, .09));
    --tc-edge: var(--glass-edge, rgba(255, 255, 255, .75));
    --tc-shadow: var(--glass-shadow, 0 10px 30px rgba(38, 52, 45, .12));
    --tc-warn: #B4532A;
    --tc-actionbar-h: 58px;
    min-height: 100vh;
    color: var(--tc-text);
    font-size: 14px;
    position: relative;
    isolation: isolate;
    padding-block-end: calc(var(--tc-actionbar-h) + 12px);
}
.tc-root.dynora-glass-dark { --tc-warn: #F5A97F; }
/* Light, Dark and Classic looks: no glass backdrop; the page and panels take the theme's own colours (MainLayout's --dynora-*). */
.tc-root.tc-solid {
    background: var(--dynora-page-bg, #F8FAFC);
    --glass-panel: var(--dynora-surface, #FFFFFF);
    --glass-panel-strong: var(--dynora-surface, #FFFFFF);
    --glass-text: var(--dynora-text, #16211D);
    --glass-text-muted: var(--dynora-text-muted, #56625C);
    --glass-line: var(--dynora-border, rgba(22, 33, 29, .09));
    --glass-edge: var(--dynora-border, rgba(255, 255, 255, .75));
}
.tc-root * { box-sizing: border-box; }
.tc-root h2 { font-size: 18px; font-weight: 750; margin: 0; }
.tc-root h3 { font-size: 15px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 7px; }
.tc-root h3 .mud-icon-root { color: var(--tc-accent); }
.tc-root h4 { font-size: 12.5px; margin: 12px 0 4px; color: var(--tc-muted); }
.tc-root input, .tc-root select, .tc-root textarea {
    font: inherit; color: inherit; background: var(--tc-input); border: 1px solid var(--tc-line);
    border-radius: 10px; padding: 9px 11px; min-width: 0; width: 100%;
}
.tc-root input:focus, .tc-root select:focus, .tc-root textarea:focus { outline: 2px solid rgba(var(--tc-accent-rgb), .5); outline-offset: 1px; }
.tc-root input:disabled, .tc-root select:disabled, .tc-root textarea:disabled { opacity: .78; }
.tc-root select option { color: #16211D; background: #fff; }

/* ---------- Top bar ---------- */
.tc-topbar {
    position: sticky; top: 0; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
    padding: 10px 18px; background: var(--glass-appbar, rgba(250, 251, 249, .72));
    backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
    border-block-end: 1px solid var(--tc-edge); box-shadow: 0 6px 22px rgba(0, 0, 0, .05);
}
.tc-brand { display: flex; align-items: center; gap: 10px; }
.tc-brand strong { font-size: 19px; font-weight: 800; white-space: nowrap; }
.tc-brand-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--tc-accent); color: #fff; }
.tc-select-chip { display: flex; align-items: center; gap: 8px; background: var(--tc-panel-strong); border: 1px solid var(--tc-line); border-radius: 12px; padding: 0 4px 0 12px; }
.tc-select-chip span { font-size: 11.5px; color: var(--tc-muted); white-space: nowrap; }
.tc-root .tc-select-chip select { border: 0; background: transparent; font-weight: 700; padding: 8px 6px; min-width: 150px; }
.tc-top-search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; background: var(--tc-panel-strong); border: 1px solid var(--tc-line); border-radius: 12px; padding: 0 12px; color: var(--tc-muted); }
.tc-root .tc-top-search input { border: 0; background: transparent; padding: 9px 0; color: var(--tc-text); }
.tc-root .tc-top-search input:focus { outline: none; }
.tc-invoice-id { display: flex; align-items: center; gap: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tc-status { border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 650; background: rgba(var(--tc-accent-rgb), .14); color: var(--tc-accent); }
.tc-status-posted { background: rgba(46, 125, 50, .16); color: #2E7D32; }
.tc-status-void { background: rgba(180, 83, 42, .16); color: var(--tc-warn); }
.tc-root .tc-date input { width: 150px; padding: 7px 10px; }
.tc-top-actions { display: flex; gap: 6px; margin-inline-start: auto; }

/* ---------- Buttons ---------- */
.tc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 11px; padding: 8px 13px;
    font: inherit; font-weight: 650; cursor: pointer; border: 1px solid transparent; text-decoration: none; color: inherit; white-space: nowrap;
    transition: background .15s, border-color .15s, transform .1s;
}
.tc-btn:disabled { opacity: .45; cursor: not-allowed; }
.tc-btn:not(:disabled):active { transform: translateY(1px); }
.tc-btn-ghost { background: var(--tc-panel-strong); border-color: var(--tc-line); }
.tc-btn-soft { background: rgba(var(--tc-accent-rgb), .1); color: var(--tc-accent); border-color: rgba(var(--tc-accent-rgb), .3); }
.tc-btn-soft:hover:not(:disabled) { background: rgba(var(--tc-accent-rgb), .18); }
.tc-btn-primary { background: var(--tc-accent); color: #fff; box-shadow: 0 8px 20px rgba(var(--tc-accent-rgb), .3); }
.dynora-glass-dark .tc-btn-primary, .dynora-glass-dark .tc-brand-icon, .dynora-glass-dark .tc-plus, .dynora-glass-dark .tc-count { color: #04201C; }
.tc-btn-block { width: 100%; padding: 13px; font-size: 15px; margin-block-start: 12px; }
.tc-icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--tc-line); background: var(--tc-panel-strong); color: inherit; cursor: pointer; flex: none; text-decoration: none; }
.tc-icon-btn.tc-flat { border-color: transparent; background: transparent; width: 30px; height: 30px; }
.tc-icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.tc-danger { color: var(--tc-warn) !important; }
.tc-link { background: none; border: 0; padding: 4px 0; color: var(--tc-accent); font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- Layout ---------- */
.tc-layout {
    display: grid; gap: 14px; padding: 14px 18px; align-items: start;
    grid-template-columns: minmax(330px, 380px) minmax(320px, 1fr) minmax(300px, 400px) minmax(290px, 330px);
}
.tc-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tc-col-figure, .tc-col-summary { position: sticky; top: 74px; }
.tc-below { padding: 0 18px 12px; }
.tc-panel {
    background: var(--tc-panel); border: 1px solid var(--tc-edge); border-radius: 18px; padding: 14px; box-shadow: var(--tc-shadow);
    backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); min-width: 0;
}
.tc-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-end: 10px; }
.tc-hint, .tc-note { color: var(--tc-muted); font-size: 12px; }
.tc-note { margin: 8px 0 0; }
.tc-warn { color: var(--tc-warn) !important; }
.tc-empty { color: var(--tc-muted); text-align: center; padding: 16px 8px; font-size: 13px; }
.tc-empty-small { padding: 8px; }
.tc-message { max-width: 620px; margin: 40px auto; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }

/* ---------- Catalog ---------- */
.tc-crumbs { display: flex; align-items: center; gap: 4px; color: var(--tc-muted); font-size: 13px; margin-block-end: 8px; }
.tc-crumbs strong { color: var(--tc-text); }
.tc-chips { display: flex; gap: 6px; overflow-x: auto; padding-block-end: 6px; margin-block-end: 6px; }
.tc-chip { border: 1px solid var(--tc-line); background: var(--tc-panel-strong); color: inherit; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.tc-chip.is-on { background: var(--tc-accent); color: #fff; border-color: transparent; }
.tc-products { display: grid; grid-auto-flow: column; grid-auto-columns: 104px; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.tc-product {
    display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 15px; scroll-snap-align: start;
    background: var(--tc-panel-strong); border: 1.5px solid var(--tc-line); transition: border-color .15s, box-shadow .15s;
}
.tc-product:hover { border-color: rgba(var(--tc-accent-rgb), .55); box-shadow: 0 6px 16px rgba(var(--tc-accent-rgb), .16); }
.tc-product.is-in-order { border-color: var(--tc-accent); background: rgba(var(--tc-accent-rgb), .07); }
.tc-product strong { font-size: 12.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-product-image { position: relative; aspect-ratio: 1 / 1.15; border-radius: 11px; background: linear-gradient(170deg, #ffffff, #e6eeeb); display: grid; place-items: center; overflow: hidden; color: var(--tc-accent); }
.tc-product-image img { width: 100%; height: 100%; object-fit: cover; }
.tc-badge { position: absolute; inset-block-start: 5px; inset-inline-end: 5px; min-width: 20px; height: 20px; border-radius: 999px; background: var(--tc-accent); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.tc-product-foot { display: flex; align-items: center; justify-content: space-between; }
.tc-price { font-weight: 800; color: var(--tc-accent); font-variant-numeric: tabular-nums; }
.tc-plus { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--tc-accent); color: #fff; border: 0; cursor: pointer; }
.tc-plus:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Customer ---------- */
.tc-customer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.tc-customer { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 13px; background: var(--tc-panel-strong); border: 1px solid rgba(var(--tc-accent-rgb), .35); min-width: 0; }
.tc-customer > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tc-customer strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-customer small { color: var(--tc-muted); }
.tc-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(var(--tc-accent-rgb), .14); color: var(--tc-accent); flex: none; }
.tc-search { display: flex; align-items: center; gap: 8px; background: var(--tc-input); border: 1px solid var(--tc-line); border-radius: 12px; padding: 0 10px; color: var(--tc-muted); }
.tc-root .tc-search input { border: 0; background: transparent; padding: 10px 0; color: var(--tc-text); }
.tc-root .tc-search input:focus { outline: none; }
.tc-switch { display: flex; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; color: var(--tc-muted); }
.tc-root .tc-switch input { width: 32px; height: 18px; appearance: none; -webkit-appearance: none; border-radius: 999px; background: var(--tc-line); position: relative; padding: 0; border: 0; cursor: pointer; flex: none; }
.tc-switch input::after { content: ""; position: absolute; inset-block-start: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.tc-switch input:checked { background: var(--tc-accent); }
.tc-switch input:checked::after { inset-inline-start: 16px; }
.tc-customer-results { display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow-y: auto; margin-block-start: 8px; }
.tc-customer-option { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name tag" "phone tag"; gap: 0 8px; text-align: start; padding: 8px 10px; border-radius: 11px; border: 1px solid var(--tc-line); background: var(--tc-panel-strong); color: inherit; font: inherit; cursor: pointer; }
.tc-customer-option:hover { border-color: rgba(var(--tc-accent-rgb), .55); }
.tc-customer-option strong { grid-area: name; }
.tc-customer-option small { grid-area: phone; color: var(--tc-muted); }
.tc-tag { grid-area: tag; align-self: center; font-size: 11px; border-radius: 999px; padding: 2px 8px; background: rgba(var(--tc-accent-rgb), .12); color: var(--tc-accent); white-space: nowrap; }
.tc-tag.is-company { background: rgba(120, 120, 120, .14); color: var(--tc-muted); }
.tc-tag.is-other { background: rgba(196, 136, 40, .16); color: #A86A12; }

/* ---------- Fabric and accessories ---------- */
.tc-source-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-block-end: 10px; }
.tc-source { display: flex; align-items: center; gap: 10px; padding: 11px; border-radius: 14px; border: 1.5px solid var(--tc-line); background: var(--tc-panel-strong); color: inherit; font: inherit; cursor: pointer; text-align: start; }
.tc-source span:last-child { display: flex; flex-direction: column; min-width: 0; }
.tc-source small { color: var(--tc-muted); font-size: 11px; }
.tc-source-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: rgba(var(--tc-accent-rgb), .1); color: var(--tc-accent); flex: none; }
.tc-source.is-on { border-color: var(--tc-accent); background: rgba(var(--tc-accent-rgb), .1); box-shadow: inset 0 0 0 1px var(--tc-accent); }
.tc-source.is-on .tc-source-icon { background: var(--tc-accent); color: #fff; }
.tc-fabric { border-block-end: 1px dashed var(--tc-line); padding-block-end: 8px; margin-block-end: 8px; }
.tc-fabric:last-of-type { border-block-end: 0; margin-block-end: 0; }
.tc-fabric-pick { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: end; }
.tc-swatch { width: 44px; height: 44px; border-radius: 11px; margin-block-end: 9px; background: repeating-linear-gradient(45deg, #f7f9f8 0 6px, #e7edeb 6px 12px); border: 1px solid var(--tc-line); }
.tc-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.tc-field { display: flex; flex-direction: column; gap: 4px; margin-block-end: 9px; font-size: 12px; min-width: 0; }
.tc-field > span { color: var(--tc-muted); }
.tc-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--tc-line); border-radius: 10px; overflow: hidden; background: var(--tc-input); width: max-content; }
.tc-stepper button { width: 32px; border: 0; background: rgba(var(--tc-accent-rgb), .08); color: var(--tc-accent); font-size: 17px; cursor: pointer; }
.tc-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.tc-root .tc-stepper input { width: 56px; border: 0; border-radius: 0; text-align: center; padding: 7px 2px; background: transparent; font-weight: 700; }
.tc-stock { font-size: 12px; color: var(--tc-muted); min-height: 16px; }
.tc-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tc-meters > label, .tc-meters > div { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--tc-muted); }
.tc-meters > div { padding: 8px; border-radius: 10px; background: rgba(var(--tc-accent-rgb), .08); justify-content: space-between; }
.tc-meters > div strong { font-size: 18px; color: var(--tc-accent); }
.tc-meters > div.is-over { background: rgba(180, 83, 42, .12); }
.tc-meters > div.is-over strong { color: var(--tc-warn); }
.tc-unit-input { display: flex; align-items: center; border: 1px solid var(--tc-line); border-radius: 10px; background: var(--tc-input); overflow: hidden; }
.tc-root .tc-unit-input input { border: 0; border-radius: 0; background: transparent; text-align: center; font-weight: 700; padding: 8px 4px; }
.tc-unit-input em { font-style: normal; color: var(--tc-muted); font-size: 12px; padding-inline: 8px; border-inline-start: 1px solid var(--tc-line); background: rgba(var(--tc-accent-rgb), .05); align-self: stretch; display: grid; place-items: center; }
.tc-accessories { display: flex; flex-direction: column; }
.tc-accessory { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; gap: 6px 8px; align-items: center; padding: 8px 0; border-block-end: 1px solid var(--tc-line); }
.tc-accessory:last-child { border-block-end: 0; }
.tc-acc-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(var(--tc-accent-rgb), .1); color: var(--tc-accent); }
.tc-root .tc-accessory select { padding: 7px 8px; }
.tc-root .tc-accessory .tc-acc-store { grid-column: 2 / 3; font-size: 12px; padding: 5px 8px; }
.tc-acc-stock { grid-column: 3 / -1; color: var(--tc-muted); font-size: 11px; }

/* ---------- Figure ---------- */
.tc-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; background: var(--tc-panel); border: 1px solid var(--tc-edge); border-radius: 16px; padding: 6px; box-shadow: var(--tc-shadow); }
.tc-type { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 10px; border-radius: 12px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.tc-type:hover:not(:disabled) { background: rgba(var(--tc-accent-rgb), .08); }
.tc-type.is-on { background: var(--tc-accent); color: #fff; box-shadow: 0 6px 16px rgba(var(--tc-accent-rgb), .3); }
.dynora-glass-dark .tc-type.is-on, .dynora-glass-dark .tc-chip.is-on { color: #04201C; }
.tc-figure-stage {
    position: relative; border-radius: 20px; padding: 10px 10px 8px; border: 1px solid var(--tc-edge); box-shadow: var(--tc-shadow);
    background: var(--tc-panel); /* the theme's own panel colour, like every other card */
}
.dynora-glass-dark .tc-figure-stage { background: var(--tc-panel); }
.tc-piece-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tc-piece-nav > div { text-align: center; display: flex; flex-direction: column; }
.tc-piece-nav small { color: var(--tc-muted); }
.tc-figure { width: 100%; max-height: calc(100vh - 230px); min-height: 360px; display: block; }
.tc-figure.is-compact { max-height: none; min-height: 0; }
.tc-figure-hint { text-align: center; margin: 2px 0 0; }
.tc-art .tc-fold { fill: none; stroke: rgba(40, 70, 64, .14); stroke-width: 3; stroke-linecap: round; }
.tc-art .tc-stitch { fill: none; stroke: rgba(40, 70, 64, .28); stroke-width: 1.3; stroke-dasharray: 4 4; }
.tc-art .tc-crease { fill: none; stroke: rgba(40, 70, 64, .16); stroke-width: 1.6; }
.tc-art > path:first-child, .tc-art > path:nth-child(2) { stroke: rgba(40, 70, 64, .38); stroke-width: 2; stroke-linejoin: round; }
.tc-guide { cursor: pointer; }
.tc-guide-line { fill: none; stroke: var(--tc-accent); stroke-width: 2.4; stroke-dasharray: 7 6; }
.tc-guide-end { fill: var(--tc-accent); stroke: #fff; stroke-width: 2; }
.tc-guide-leader { stroke: var(--tc-accent); stroke-width: 1.3; opacity: .55; }
.tc-pill rect { fill: var(--tc-accent); filter: drop-shadow(0 3px 6px rgba(var(--tc-accent-rgb), .35)); }
.tc-pill text { fill: #fff; font-size: 14px; font-weight: 650; font-family: inherit; }
.tc-pill-value { font-weight: 800; }
.tc-guide.is-empty .tc-guide-line, .tc-guide.is-empty .tc-guide-leader { opacity: .35; }
.tc-guide.is-empty .tc-guide-end { fill: #fff; stroke: var(--tc-accent); }
.tc-guide.is-empty .tc-pill rect { fill: rgba(255, 255, 255, .94); stroke: rgba(var(--tc-accent-rgb), .55); stroke-width: 1.5; filter: none; }
.tc-guide.is-empty .tc-pill text { fill: var(--tc-accent); }
.tc-guide.is-active .tc-pill rect { stroke: #F2B134; stroke-width: 3; }
.tc-guide.is-active .tc-guide-line { stroke-width: 3.4; opacity: 1; }
.tc-start { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px; }
.tc-start .tc-figure { max-width: 240px; }
.tc-start p { color: var(--tc-muted); line-height: 1.7; }

/* ---------- Measurements ---------- */
.tc-measurements { display: flex; flex-direction: column; gap: 2px; }
.tc-units { display: inline-flex; border: 1px solid var(--tc-line); border-radius: 10px; overflow: hidden; background: var(--tc-panel-strong); }
.tc-units button { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; padding: 5px 13px; cursor: pointer; }
.tc-units button.is-on { background: var(--tc-accent); color: #fff; }
.tc-measure { display: grid; grid-template-columns: 30px minmax(0, 1fr) 108px; align-items: center; gap: 8px; padding: 6px; border-radius: 12px; border: 1px solid transparent; }
.tc-measure + .tc-measure { border-block-start-color: var(--tc-line); border-radius: 0; }
.tc-measure.is-active { background: rgba(var(--tc-accent-rgb), .1); border-color: rgba(var(--tc-accent-rgb), .45); border-radius: 12px; }
.tc-measure-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(var(--tc-accent-rgb), .09); color: var(--tc-accent); }
.tc-measure-name { font-weight: 600; }
.tc-measure.has-value .tc-measure-icon { background: var(--tc-accent); color: #fff; }
/* Measurement columns: one box per defined length unit, side by side. */
/* The name keeps its own line (the column is narrow); the unit boxes share the full width under it, so names never squeeze. */
.tc-measure { grid-template-columns: 30px minmax(0, 1fr); }
.tc-measure .tc-measure-name { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.tc-unit-columns { grid-column: 1 / -1; display: flex; gap: 6px; }
.tc-unit-columns .tc-unit-input { flex: 1 1 0; min-width: 0; }
.tc-unit-columns .tc-unit-input input { min-width: 0; width: 100%; }
/* Measurement form (Measurement definitions): a collar / pocket choice and a note under the row's values. */
.tc-root .tc-choice, .tc-root .tc-measure-note-input { grid-column: 1 / -1; border: 1px solid var(--tc-line); border-radius: 9px; background: var(--tc-input); color: inherit; font: inherit; padding: 6px 9px; min-width: 0; }
.tc-root .tc-measure-note-input { font-size: 12.5px; }
.tc-unit-head { display: inline-block; min-width: 56px; text-align: center; font-weight: 700; padding: 5px 0; }
.tc-units:has(.tc-unit-head) { gap: 6px; border: 0; background: transparent; }
.tc-custom-measure { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin-block: 8px 6px; }
.tc-other { padding: 8px; border-radius: 13px; border: 1px solid var(--tc-line); background: var(--tc-panel-strong); }
.tc-other + .tc-other { margin-block-start: 8px; }
.tc-other-head { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; align-items: center; }
.tc-other-head > div { display: flex; flex-direction: column; min-width: 0; }
.tc-other-head small { color: var(--tc-muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-other-thumb { width: 44px; height: 54px; border-radius: 9px; background: rgba(var(--tc-accent-rgb), .06); overflow: hidden; }
.tc-other-thumb svg, .tc-line-thumb svg { width: 100%; height: 100%; }
.tc-other-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-block-start: 8px; }
.tc-other-actions .tc-btn { padding: 7px 6px; font-size: 12px; white-space: normal; }

/* ---------- Summary ---------- */
.tc-count { min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px; background: var(--tc-accent); color: #fff; font-weight: 800; font-size: 12px; }
.tc-lines { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 470px); min-height: 120px; overflow-y: auto; padding: 2px; }
.tc-line { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; padding: 9px; border-radius: 14px; border: 1px solid var(--tc-line); background: var(--tc-panel-strong); cursor: pointer; }
.tc-line.is-on { border-color: var(--tc-accent); box-shadow: inset 0 0 0 1px var(--tc-accent); }
.tc-line.has-problem { border-inline-start: 3px solid var(--tc-warn); }
.tc-line-thumb { width: 52px; height: 64px; border-radius: 10px; background: rgba(var(--tc-accent-rgb), .06); overflow: hidden; }
.tc-line-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tc-line-body > strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-line-body small { color: var(--tc-muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-line-edit { display: grid; grid-template-columns: minmax(0, 1fr) auto 46px auto; gap: 5px; align-items: center; margin-block-start: 5px; }
.tc-root .tc-line-edit input { padding: 5px 6px; font-size: 12.5px; text-align: center; }
.tc-line-edit span { color: var(--tc-muted); }
.tc-line-edit strong { font-size: 14px; color: var(--tc-accent); font-variant-numeric: tabular-nums; }
.tc-line-actions { display: flex; flex-direction: column; gap: 2px; }
.tc-discount { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-block: 12px 4px; }
.tc-discount label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--tc-muted); }
.tc-totals { margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; border-block-start: 1px solid var(--tc-line); padding-block-start: 10px; }
.tc-totals > div { display: flex; justify-content: space-between; gap: 10px; }
.tc-totals dt { color: var(--tc-muted); }
.tc-totals dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 650; }
.tc-totals .tc-grand { border-block-start: 1px solid var(--tc-line); padding-block-start: 8px; margin-block-start: 2px; align-items: baseline; }
.tc-totals .tc-grand dt { color: var(--tc-text); font-weight: 800; font-size: 18px; }
.tc-totals .tc-grand dd { font-size: 26px; font-weight: 850; color: var(--tc-accent); }
.tc-totals .tc-cost { font-size: 12px; }

/* ---------- Action bar ---------- */
.tc-actionbar {
    position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 6; height: var(--tc-actionbar-h); display: flex; align-items: center; gap: 4px; padding: 0 14px; overflow-x: auto;
    background: var(--glass-appbar, rgba(250, 251, 249, .85)); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
    border-block-start: 1px solid var(--tc-edge); box-shadow: 0 -6px 22px rgba(0, 0, 0, .06);
}
.tc-actionbar > button, .tc-actionbar > a {
    display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 11px; border: 0; background: transparent;
    color: inherit; font: inherit; font-weight: 750; font-size: 12.5px; text-transform: uppercase; letter-spacing: .3px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.tc-actionbar > button:hover:not(:disabled), .tc-actionbar > a:hover { background: rgba(var(--tc-accent-rgb), .09); }
.tc-actionbar > button:disabled { opacity: .4; cursor: not-allowed; }
.tc-actionbar .is-accent { color: var(--tc-accent); }
.tc-actionbar .is-danger { color: var(--tc-warn); }
.tc-actionbar-spacer { flex: 1; }

/* ---------- Order review ---------- */
.tc-modal { position: fixed; inset: 0; z-index: 50; background: rgba(8, 20, 18, .45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.tc-modal-card { width: min(1080px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--tc-panel-strong); border: 1px solid var(--tc-edge); border-radius: 22px; padding: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.dynora-glass-dark .tc-modal-card { background: rgba(10, 28, 36, .95); }
.tc-review-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-block-end: 12px; }
.tc-review-head > div { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: rgba(var(--tc-accent-rgb), .07); }
.tc-review-head span, .tc-review-head small { color: var(--tc-muted); font-size: 12px; }
.tc-review-head strong { font-size: 15px; }
.tc-review-problems { border-radius: 12px; background: rgba(180, 83, 42, .1); color: var(--tc-warn); padding: 8px 12px; margin-block-end: 12px; }
.tc-review-problems p { margin: 3px 0; }
.tc-review-piece { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 16px; padding: 12px; border-radius: 16px; border: 1px solid var(--tc-line); margin-block-end: 10px; }
.tc-review-figure { border-radius: 14px; background: radial-gradient(ellipse at 50% 35%, #fff, #e8f0ed 75%); }
.dynora-glass-dark .tc-review-figure { background: rgba(255, 255, 255, .06); }
.tc-review-figure .tc-figure { min-height: 0; max-height: 380px; }
.tc-review-details h3 { font-size: 16px; margin-block-end: 8px; }
.tc-review-details h3 small { color: var(--tc-muted); font-weight: 600; }
.tc-review-details p { margin: 3px 0; }
.tc-review-measures { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.tc-review-measures span { display: flex; flex-direction: column; padding: 6px 9px; border-radius: 10px; background: rgba(var(--tc-accent-rgb), .07); }
.tc-review-measures small { color: var(--tc-muted); font-size: 11px; }
.tc-review-price { margin-block-start: 10px !important; font-size: 15px; }
.tc-review-actions { display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: -18px; padding-block: 12px 2px; background: inherit; }

/* ---------- Responsive ---------- */
@media (max-width: 1600px) {
    .tc-layout { grid-template-columns: minmax(320px, 360px) minmax(300px, 1fr) minmax(270px, 300px); }
    .tc-col-summary { grid-column: 1 / -1; position: static; }
    .tc-lines { max-height: none; }
}
@media (max-width: 1200px) {
    .tc-layout { grid-template-columns: minmax(310px, 360px) minmax(0, 1fr); }
    .tc-col-measure { grid-column: 2; }
    .tc-col-figure { position: static; }
    .tc-figure { max-height: 64vh; }
}
@media (max-width: 860px) {
    .tc-layout { grid-template-columns: 1fr; padding: 10px; }
    .tc-col-measure, .tc-col-summary { grid-column: auto; }
    .tc-col-figure { order: -1; }
    .tc-topbar { padding: 8px 10px; }
    .tc-top-actions { margin-inline-start: 0; }
    .tc-review-piece { grid-template-columns: 1fr; }
    .tc-below { padding: 0 10px 12px; }
    .tc-two { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .tc-meters { grid-template-columns: 1fr 1fr; }
    .tc-root .tc-select-chip select { min-width: 110px; }
}

/* ---------- Category tree catalog ---------- */
.tc-crumbs { flex-wrap: wrap; }
.tc-crumb { border: 0; background: transparent; color: var(--tc-muted); font: inherit; font-size: 13px; padding: 2px 4px; border-radius: 7px; cursor: pointer; }
.tc-crumb:hover { background: rgba(var(--tc-accent-rgb), .08); }
.tc-crumb.is-current { color: var(--tc-text); font-weight: 750; }
.tc-type-tile { cursor: pointer; text-align: start; font: inherit; color: inherit; background: linear-gradient(170deg, rgba(var(--tc-accent-rgb), .08), var(--tc-panel-strong)); }
.tc-type-tile .tc-product-image { background: radial-gradient(ellipse at 50% 35%, #fff, #e3ece8 80%); }
.tc-type-tile .tc-product-image svg { width: 100%; height: 100%; }

/* ---------- Piece type (from its category) and drawing switch ---------- */
.tc-piece-type { display: flex; flex-direction: column; gap: 8px; background: var(--tc-panel); border: 1px solid var(--tc-edge); border-radius: 16px; padding: 10px 12px; box-shadow: var(--tc-shadow); }
.tc-piece-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.tc-piece-path .mud-icon-root { color: var(--tc-accent); }
.tc-piece-path span { padding: 2px 9px; border-radius: 999px; background: rgba(var(--tc-accent-rgb), .1); color: var(--tc-accent); font-weight: 700; }
.tc-drawings { display: flex; flex-wrap: wrap; gap: 4px; }
.tc-drawings .tc-type { padding: 5px 10px; font-size: 12px; border: 1px solid var(--tc-line); }

/* ---------- Accessories mounted on the garment ---------- */
.tc-acc .tc-acc-edge { fill: none; stroke: rgba(30, 50, 45, .35); stroke-width: 1.2; }
.tc-acc .tc-acc-button { fill: #f4f1ea; stroke: #8b8270; stroke-width: 1.4; }
.tc-acc .tc-acc-hole { fill: #6d6555; }
.tc-acc .tc-acc-metal { fill: #d9dde0; stroke: #8d969c; stroke-width: 1.4; }
.tc-acc .tc-acc-embroidery { fill: rgba(var(--tc-accent-rgb), .55); stroke: var(--tc-accent); stroke-width: 1.2; }
.tc-acc .tc-acc-band { fill: rgba(120, 110, 90, .35); stroke: rgba(80, 70, 55, .6); stroke-width: 1.2; }
.tc-figure.is-editable .tc-acc[data-marker-id] { cursor: grab; }
.tc-figure.is-editable .tc-acc[data-marker-id]:hover .tc-acc-edge, .tc-figure.is-editable .tc-acc[data-marker-id]:hover .tc-acc-button { stroke: #F2B134; stroke-width: 2.5; }
.tc-acc-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.tc-acc-icon { overflow: hidden; }
.tc-accessory { grid-template-columns: 30px minmax(0, 1fr) auto auto; }
.tc-root .tc-accessory .tc-acc-place { grid-column: 3 / 4; font-size: 12px; padding: 5px 8px; }
.tc-acc-stock { grid-column: 2 / -1; }

/* ---------- Paid / remaining and advance ---------- */
.tc-totals .tc-paid dd { color: #2E7D32; }
.tc-totals .tc-remaining dt { color: var(--tc-text); font-weight: 700; }
.tc-totals .tc-remaining dd { font-weight: 800; color: var(--tc-warn); }
.tc-advance { border: 1px solid rgba(var(--tc-accent-rgb), .35); border-radius: 16px; padding: 12px; margin-block: 6px 4px; background: rgba(var(--tc-accent-rgb), .05); }
.tc-advance h3 { margin-block-end: 8px; }
.tc-advance-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.tc-advance-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 6px 0 0; }
.tc-advance-totals > div { padding: 8px 10px; border-radius: 10px; background: var(--tc-panel-strong); }
.tc-advance-totals dt { color: var(--tc-muted); font-size: 12px; }
.tc-advance-totals dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.tc-advance-totals .tc-grand dd { color: var(--tc-accent); font-size: 18px; }
.tc-review-acc { display: flex; align-items: center; gap: 8px; }
.tc-review-acc img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; border: 1px solid var(--tc-line); }

/* ---------- Customer fabric custody ---------- */
.tc-carried { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; padding: 8px 10px; border-radius: 10px; background: rgba(196, 136, 40, .12); color: #8a5a10; font-size: 12.5px; }
.dynora-glass-dark .tc-carried { color: #f2c27a; }
.tc-field-error { color: var(--tc-warn); font-size: 12px; font-weight: 600; }
.tc-root .tc-unit-select { border: 0; border-inline-start: 1px solid var(--tc-line); border-radius: 0; width: auto; padding: 6px 8px; background: rgba(var(--tc-accent-rgb), .05); font-size: 12px; }
.tc-piece-uses { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--tc-muted); }
.tc-piece-uses li.is-current { color: var(--tc-text); font-weight: 700; }
.tc-custody { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-block-start: 8px; }
.tc-custody .tc-hint { display: inline-flex; align-items: center; gap: 4px; }
.tc-custody-chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(196, 136, 40, .14); color: #8a5a10; }
.dynora-glass-dark .tc-custody-chip { color: #f2c27a; }
.tc-custody-take { margin-inline-start: 6px; border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; font-weight: 700; border-radius: 999px; padding: 1px 8px; cursor: pointer; }
.tc-meters > div { min-width: 0; }

/* ---------- Accessory row: stock item, quantity/warehouse, then mounting position ---------- */
.tc-accessory { display: flex !important; flex-direction: column; gap: 4px; padding: 10px 0; }
.tc-acc-head { display: flex; align-items: flex-end; gap: 8px; }
.tc-acc-head .tc-acc-icon { width: 38px; height: 38px; margin-block-end: 9px; }
.tc-grow { flex: 1; min-width: 0; }
.tc-acc-place-row { display: flex; align-items: flex-end; gap: 8px; padding: 8px; border-radius: 12px; background: rgba(var(--tc-accent-rgb), .06); }
.tc-acc-place-row .tc-field { margin-block-end: 0; }
.tc-acc-place-row .tc-btn { padding: 8px 10px; font-size: 12px; }

/* ---------- Fabric consumption estimate ---------- */
.tc-estimate { display: flex; flex-direction: column; gap: 4px; padding: 9px 10px; border-radius: 12px; margin-block: 2px 8px; background: rgba(var(--tc-accent-rgb), .08); border: 1px solid rgba(var(--tc-accent-rgb), .25); font-size: 12.5px; }
.tc-estimate.is-missing { background: rgba(196, 136, 40, .1); border-color: rgba(196, 136, 40, .35); color: #8a5a10; }
.dynora-glass-dark .tc-estimate.is-missing { color: #f2c27a; }
.tc-estimate-head { display: flex; align-items: flex-start; gap: 6px; font-weight: 650; }
.tc-estimate small { color: var(--tc-muted); }
.tc-estimate-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Piece colour ---------- */
.tc-colors { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 6px 8px; }
.tc-color { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; border: 1px solid var(--tc-line); background: var(--tc-panel-strong); color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.tc-color span { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); }
.tc-color.is-on { border-color: var(--tc-accent); box-shadow: inset 0 0 0 1px var(--tc-accent); font-weight: 700; }
.tc-color:disabled { opacity: .6; cursor: not-allowed; }
.tc-color-custom { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 6px; margin-block-end: 6px; }
.tc-root .tc-color-custom input[type=color] { padding: 2px; height: 38px; cursor: pointer; }
.tc-swatch-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); vertical-align: -1px; margin-inline: 6px 3px; }
.tc-color-current { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 700; }
.tc-photo-toggle { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Item photo with measurement guides (positions are % of the photo box, so they follow any resize) ---------- */
.tc-ph-wrap { display: flex; justify-content: center; padding: 14px 8px 6px; }
/* The box is exactly the rendered photo: full width, capped so its height (width / ratio) stays within --ph-max-h. */
.tc-ph-box { position: relative; display: block; width: 100%; max-width: calc(var(--ph-max-h, 620px) * var(--ph-ratio, .78)); margin-inline: auto; line-height: 0; touch-action: none; }
.tc-ph-wrap { --ph-max-h: max(320px, calc(100vh - 250px)); }
.tc-ph-wrap > .tc-ph-box { flex: 1 1 auto; }
.tc-ph-box > img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.tc-ph-wrap.is-compact { padding: 0; }
.tc-ph-wrap.is-compact .tc-ph-box { max-width: none; }
.tc-ph-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.tc-ph-line { fill: none; stroke: var(--tc-accent); stroke-width: 2.2; stroke-dasharray: 7 6; }
.tc-ph-leader { stroke: var(--tc-accent); stroke-width: 1.2; opacity: .55; }
.tc-ph-lines .is-empty .tc-ph-line, .tc-ph-lines .is-empty .tc-ph-leader { opacity: .4; }
.tc-ph-lines .is-active .tc-ph-line { stroke-width: 3.2; opacity: 1; }
.tc-ph-dot { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--tc-accent); border: 2px solid #fff; transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.tc-ph-dot.is-empty, .tc-ph-dot.is-radius { background: #fff; border-color: var(--tc-accent); }
.tc-ph-label { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; line-height: 1.2;
    padding: 5px 11px; border-radius: 999px; border: 1.5px solid transparent; background: var(--tc-accent); color: #fff; font: inherit; font-size: 12.5px; font-weight: 650;
    cursor: pointer; box-shadow: 0 3px 8px rgba(var(--tc-accent-rgb), .35); z-index: 2; }
.tc-ph-label b { font-weight: 800; }
.tc-ph-label.is-empty { background: rgba(255, 255, 255, .95); color: var(--tc-accent); border-color: rgba(var(--tc-accent-rgb), .55); box-shadow: none; }
.tc-ph-label.is-active { border-color: #F2B134; box-shadow: 0 0 0 2px #F2B134; }
.tc-ph-acc { position: absolute; transform: translate(-50%, -50%); aspect-ratio: 1; border-radius: 22%; overflow: hidden; border: 1.5px solid rgba(255, 255, 255, .9); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); z-index: 1; }
.tc-ph-acc.is-round { border-radius: 50%; }
.tc-ph-acc img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-ph-acc i { display: block; width: 100%; height: 100%; background: radial-gradient(circle, #f4f7f6 35%, #9fb0aa 36%, #cfd8d4 70%); }
.tc-ph-box.is-editable [data-handle] { cursor: grab; }
.tc-ph-box.is-editable [data-handle]:active { cursor: grabbing; }
.tc-ph-box.is-editable .tc-ph-dot { width: 15px; height: 15px; z-index: 3; }

/* ---------- Item setup: placing the measurement points on the item photo ---------- */
.tc-layout-editor { --tc-accent: var(--glass-accent, #1F6F6B); --tc-accent-rgb: var(--glass-accent-rgb, 31, 111, 107); --tc-muted: var(--glass-text-muted, #56625C); --tc-line: var(--glass-line, rgba(22, 33, 29, .09)); margin-block-start: 16px; }
.tc-layout-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tc-layout-head h3 { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.tc-layout-head p { margin: 0; max-width: 640px; }
.tc-layout-body { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 16px; margin-block-start: 12px; align-items: start; }
.tc-layout-photo { border-radius: 16px; border: 1px solid var(--tc-line); background: radial-gradient(ellipse at 50% 35%, rgba(255, 255, 255, .95), rgba(232, 240, 237, .6) 70%); }
.tc-layout-photo .tc-ph-wrap { padding: 18px 12px; }
.tc-layout-photo .tc-ph-wrap { --ph-max-h: 600px; }
.tc-layout-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tc-layout-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--tc-line); cursor: pointer; }
.tc-layout-list li.is-active { border-color: var(--tc-accent); background: rgba(var(--tc-accent-rgb), .08); }
.tc-layout-list small { color: var(--tc-muted); }
@media (max-width: 900px) { .tc-layout-body { grid-template-columns: 1fr; } .tc-layout-list { flex-direction: row; flex-wrap: wrap; } }

/* Customer fabric receipt: description and received quantity side by side, inputs on one line whatever the label length. */
.tc-receipt-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.tc-receipt-row > .tc-field > span:first-child { min-height: 2.6em; display: flex; align-items: flex-end; line-height: 1.3; }
.tc-receipt-row > .tc-field input:not([type]) { height: 38px; }
.tc-receipt-row .tc-unit-input { height: 38px; }
.tc-receipt-row .tc-unit-input input { min-width: 0; flex: 1; }
@media (max-width: 380px) { .tc-receipt-row { grid-template-columns: 1fr; } .tc-receipt-row > .tc-field > span:first-child { min-height: 0; } }

/* Customer fabric: the used quantity is a calculated value, adjusted only on request. */
.tc-calc-qty { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 9px 11px; border-radius: 11px; background: rgba(var(--tc-accent-rgb), .08); margin-block-end: 8px; }
.tc-calc-qty > span:first-child { color: var(--tc-muted); font-size: 12px; flex: 1 1 140px; }
.tc-calc-qty > strong { font-size: 18px; color: var(--tc-accent); font-variant-numeric: tabular-nums; }
.tc-calc-qty .tc-unit-input { width: 140px; }
.tc-calc-qty.is-pending > strong { color: var(--tc-muted); }
.tc-meters.is-two { grid-template-columns: 1fr 1fr; }
.tc-acc-price { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.tc-acc-price > span { font-size: 12px; color: var(--tc-muted); padding-block-end: 18px; white-space: nowrap; }
.tc-acc-price strong { color: var(--tc-accent); }
.tc-saved-note { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 8px 10px; margin-block-end: 8px; border-radius: 11px; background: rgba(var(--tc-accent-rgb), .1); color: var(--tc-accent); font-weight: 600; }
.tc-saved-note span { flex: 1 1 140px; color: var(--tc-text); }
.tc-warn-note { color: var(--tc-warn); }
.tc-type.is-on:hover:not(:disabled) { background: var(--tc-accent); filter: brightness(1.08); }
/* A light halo under every measurement line keeps it readable on dark (e.g. black) and light garments alike. */
.tc-guide-halo { fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 6; stroke-linecap: round; }
.tc-ph-halo { fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 5; stroke-linecap: round; }
.tc-color-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-block-start: 12px; }
.tc-color-photo { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid var(--tc-line); }
/* Customer fabric: received · used · remaining, side by side (stacked on narrow screens). */
.tc-fabric-ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-block: 4px 8px; }
.tc-fabric-ledger > .tc-ledger-box:first-child { grid-column: 1 / -1; }
.tc-fabric-ledger > .tc-ledger-box:first-child > span:first-child { min-height: 0; }
.tc-ledger-box { display: flex; flex-direction: column; gap: 4px; padding: 9px; border-radius: 11px; background: rgba(var(--tc-accent-rgb), .08); min-width: 0; }
.tc-ledger-box > span:first-child { font-size: 11.5px; color: var(--tc-muted); min-height: 2.5em; }
.tc-ledger-box > strong { font-size: 18px; color: var(--tc-accent); font-variant-numeric: tabular-nums; }
.tc-ledger-box > small { font-size: 11.5px; color: var(--tc-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tc-ledger-box.is-used { background: rgba(var(--tc-accent-rgb), .13); }
.tc-ledger-box.is-over { background: rgba(180, 83, 42, .12); }
.tc-ledger-box.is-over > strong { color: var(--tc-warn); }
.tc-ledger-box .tc-unit-input { height: 36px; }
.tc-inline-qty { width: 110px; height: 30px !important; }
@media (max-width: 360px) { .tc-fabric-ledger { grid-template-columns: 1fr; } .tc-ledger-box > span:first-child { min-height: 0; } }
/* Item setup: price and photo per branch. */
.pi-branch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 12px; }
.pi-branch-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--mud-palette-divider); }
.tc-measure-note { grid-column: 1 / -1; font-size: 11.5px; line-height: 1.45; color: var(--tc-muted); padding-inline-start: 38px; }
.tc-measure-note.tc-field-error { color: var(--tc-warn); }
/* Item setup: recipe per branch tabs. */
.pi-recipe-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 12px; }
.pi-recipe-tab { border: 1px solid var(--mud-palette-divider); background: transparent; color: inherit; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.pi-recipe-tab small { font-weight: 500; opacity: .7; margin-inline-start: 4px; }
.pi-recipe-tab.is-on { background: var(--mud-palette-primary); color: var(--mud-palette-primary-text); border-color: transparent; }
.pi-branch-name { font-size: 15px; }
/* Front / back of the drawing when the item's measurement form has lines on the back. */
.tc-root .tc-side-toggle { display: flex; width: max-content; margin: 0 auto 6px; }
/* Measurement boxes: the unit is written inside the box (placeholder) and above the column, so the number gets the room. */
.tc-root .tc-unit-columns .tc-unit-input em { display: none; }
.tc-root .tc-unit-columns .tc-unit-input input { font-size: 15px; padding: 9px 6px; }
.tc-root .tc-unit-columns .tc-unit-input input::placeholder { font-size: 12px; font-weight: 500; color: var(--tc-muted); }
/* Language switch in the cashier top bar: icon with the language it switches to. */
.tc-root .tc-lang-btn { display: inline-flex; align-items: center; width: auto; gap: 4px; padding-inline: 8px; font-weight: 700; font-size: 12px; }
