.stock-takes-app{max-width:1500px;margin:0 auto;padding:8px 0 40px;color:var(--text-color,#edf2f7)}
.stock-takes-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:8px 0 24px}
.stock-takes-heading h2{margin:5px 0;font-size:30px}.stock-takes-heading p{margin:5px 0;color:#9aa6b6}.stock-takes-heading h2 small{font-size:15px;color:#98a4b4;font-weight:500}
.stock-takes-eyebrow{display:block;color:#68a4ff;font-size:11px;font-weight:800;letter-spacing:.13em;text-transform:uppercase}
.stock-take-controls{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border:1px solid #343d49;border-radius:13px;background:#20252d}
.stock-take-tabs{display:flex;flex-wrap:wrap;gap:8px}.stock-take-tabs button{display:flex;align-items:center;gap:9px;padding:9px 13px;border:1px solid transparent;border-radius:9px;background:transparent;color:#aeb9c8;cursor:pointer}.stock-take-tabs button.selected{border-color:#4385ed;background:#26374f;color:#fff}.stock-take-tabs button span{min-width:22px;padding:2px 6px;border-radius:20px;background:#303946;color:#dbe5f2;font-size:11px}
.stock-take-list{display:grid;gap:10px;margin-top:14px}.stock-take-card{display:grid;grid-template-columns:74px minmax(0,1fr) auto auto auto;align-items:center;gap:18px;padding:17px 18px;border:1px solid #343d49;border-radius:12px;background:#20252d}.stock-take-card-id{font-size:18px;font-weight:800;color:#78aaff}.stock-take-card-main{display:grid;gap:5px}.stock-take-card-main strong{font-size:15px}.stock-take-card-main strong small{margin-left:7px;color:#96a2b2;font-weight:500}.stock-take-card-main span,.stock-take-card-main>small{color:#9aa6b6;font-size:12px}.stock-take-status{padding:6px 10px;border-radius:30px;background:#303946;color:#dce5ef;font-size:11px;font-weight:800;text-transform:capitalize}.stock-take-status.active{background:#153b2c;color:#6ee7ad}.stock-take-status.completed{background:#223858;color:#8ebaff}.stock-take-delete{width:34px;height:34px;border:0;border-radius:8px;background:#343a43;color:#dbe5f2;font-size:22px;cursor:pointer}.stock-take-empty{padding:48px 20px;border:1px dashed #3a4350;border-radius:13px;color:#9aa6b6;text-align:center}
.stock-take-create-wrap{margin-top:16px}.stock-take-create{display:grid;grid-template-columns:minmax(200px,1fr) minmax(200px,1fr);gap:16px;padding:22px;border:1px solid #4385ed;border-radius:13px;background:#202b3b}.stock-take-create>div:first-child{grid-column:1/-1}.stock-take-create h3{margin:4px 0}.stock-take-create p{margin:4px 0;color:#9aa6b6;font-size:13px}.stock-take-create label,.stock-take-tools label,.stock-take-scan label{display:grid;gap:7px;color:#abb7c6;font-size:12px}.stock-take-create select,.stock-take-tools input,.stock-take-scan input{width:100%;min-height:42px;padding:9px 12px;border:1px solid #414c59;border-radius:8px;background:#171c23;color:#f5f7fa}.stock-take-create-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:9px}
.stock-take-back{display:block;margin:0 0 14px;padding:0;border:0;background:none;color:#85b4ff;cursor:pointer}.stock-take-heading-actions{display:flex;gap:10px}.stock-take-baseline-note{display:flex;align-items:center;gap:14px;margin:0 0 16px;padding:15px 18px;border:1px solid #304d74;border-radius:11px;background:#202d3f}.stock-take-baseline-note>i{font-size:20px;color:#80afff}.stock-take-baseline-note div{display:grid;gap:4px}.stock-take-baseline-note span{color:#a7b4c5;font-size:12px;line-height:1.5}
.stock-take-scan{display:grid;grid-template-columns:minmax(250px,1fr) 130px auto minmax(180px,auto);align-items:end;gap:12px;padding:16px;border:1px solid #384351;border-radius:12px;background:#20252d}.stock-take-scan input:focus,.stock-take-tools input:focus{outline:2px solid #4d93ff;outline-offset:1px}.stock-take-scan-message{padding-bottom:12px;color:#64dfa1;font-size:12px}.stock-take-scan-message.error{color:#ff727b}
.stock-take-tools{display:flex;align-items:end;justify-content:space-between;gap:18px;margin:18px 0 12px}.stock-take-tools label{width:min(440px,100%)}.stock-take-tools>div{display:grid;gap:3px;text-align:right}.stock-take-tools>div span{color:#9aa6b6;font-size:12px}
.stock-take-tables{display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:15px}.stock-take-tables>section{overflow:hidden;border:1px solid #343d49;border-radius:12px;background:#20252d}.stock-take-tables h3{display:flex;justify-content:space-between;margin:0;padding:15px 16px;border-bottom:1px solid #343d49;font-size:15px}.stock-take-tables h3 span{color:#8ebaff}.stock-take-table-scroll{max-height:62vh;overflow:auto}.stock-take-tables table{width:100%;border-collapse:collapse;font-size:12px}.stock-take-tables th{position:sticky;top:0;z-index:1;padding:11px 12px;background:#2c5d9f;color:#fff;text-align:left;white-space:nowrap}.stock-take-tables td{padding:11px 12px;border-top:1px solid #343d49;color:#d5dce6;vertical-align:middle}.stock-take-tables tbody tr:nth-child(even){background:#252b34}.stock-take-tables td:first-child{min-width:200px}.stock-take-tables td strong,.stock-take-tables td small{display:block}.stock-take-tables td small{margin-top:4px;color:#8f9bab}.stock-take-count-input{width:88px;min-height:34px;padding:5px 8px;border:1px solid #536174;border-radius:6px;background:#171c23;color:#fff}.stock-take-counted{color:#69e0a6;font-weight:700}.stock-take-not-counted{color:#a4afbd}.stock-take-no-rows{padding:30px!important;color:#98a4b4!important;text-align:center}.stock-take-loading{display:grid;justify-items:center;gap:12px;padding:80px 20px;color:#aab5c4}.stock-take-loading p{margin:0}.stock-take-toast{position:fixed;right:24px;bottom:24px;z-index:9999;max-width:min(520px,calc(100vw - 48px));padding:12px 16px;border:1px solid #526174;border-radius:10px;background:#202a38;color:#fff;box-shadow:0 12px 40px #0008;opacity:0;transform:translateY(8px);pointer-events:none;transition:.2s}.stock-take-toast.visible{opacity:1;transform:none}
.stock-take-loading .apple-loader{position:relative;width:36px;height:36px;animation:stock-take-spin 1s steps(12) infinite}.stock-take-loading .apple-loader span{position:absolute;left:16px;top:1px;width:4px;height:10px;border-radius:4px;background:#83b2ff;transform-origin:2px 17px;opacity:.2}.stock-take-loading .apple-loader span:nth-child(1){transform:rotate(0deg);opacity:1}.stock-take-loading .apple-loader span:nth-child(2){transform:rotate(30deg);opacity:.9}.stock-take-loading .apple-loader span:nth-child(3){transform:rotate(60deg);opacity:.8}.stock-take-loading .apple-loader span:nth-child(4){transform:rotate(90deg);opacity:.7}.stock-take-loading .apple-loader span:nth-child(5){transform:rotate(120deg);opacity:.6}.stock-take-loading .apple-loader span:nth-child(6){transform:rotate(150deg);opacity:.5}.stock-take-loading .apple-loader span:nth-child(7){transform:rotate(180deg);opacity:.45}.stock-take-loading .apple-loader span:nth-child(8){transform:rotate(210deg);opacity:.4}.stock-take-loading .apple-loader span:nth-child(9){transform:rotate(240deg);opacity:.35}.stock-take-loading .apple-loader span:nth-child(10){transform:rotate(270deg);opacity:.3}.stock-take-loading .apple-loader span:nth-child(11){transform:rotate(300deg);opacity:.25}.stock-take-loading .apple-loader span:nth-child(12){transform:rotate(330deg);opacity:.2}@keyframes stock-take-spin{to{transform:rotate(360deg)}}.stock-take-show-more{width:100%;padding:10px;border:1px solid #3b4654;border-radius:7px;background:#2b323c;color:#dce7f5;cursor:pointer}
.stock-take-mobile-cards{display:none}
.stock-take-ignore-option{display:flex;align-items:center;gap:7px;color:#b9c5d4;font-size:12px;cursor:pointer}.stock-take-ignore-option input{width:16px;height:16px;margin:0;accent-color:#4385ed}
.stock-take-completion-progress{position:fixed;inset:0;z-index:2147483000;display:grid;place-items:center;padding:16px;background:#050a10d9;backdrop-filter:blur(5px)}.stock-take-completion-card{display:grid;justify-items:center;gap:12px;width:min(440px,100%);box-sizing:border-box;padding:28px;border:1px solid #536174;border-radius:16px;background:#20252d;color:#edf2f7;text-align:center;box-shadow:0 22px 70px #000a}.stock-take-completion-card h2,.stock-take-completion-card p{margin:0}.stock-take-completion-card p{color:#bac6d5;line-height:1.45}.stock-take-completion-card small{color:#93a2b5}.stock-take-completion-card .apple-loader{position:relative;width:36px;height:36px;animation:stock-take-spin 1s steps(12) infinite}.stock-take-completion-card .apple-loader span{position:absolute;left:16px;top:1px;width:4px;height:10px;border-radius:4px;background:#83b2ff;transform-origin:2px 17px;opacity:.25}.stock-take-completion-card .apple-loader span:nth-child(1){opacity:1;transform:rotate(0deg)}.stock-take-completion-card .apple-loader span:nth-child(2){opacity:.9;transform:rotate(30deg)}.stock-take-completion-card .apple-loader span:nth-child(3){opacity:.8;transform:rotate(60deg)}.stock-take-completion-card .apple-loader span:nth-child(4){opacity:.7;transform:rotate(90deg)}.stock-take-completion-card .apple-loader span:nth-child(5){opacity:.6;transform:rotate(120deg)}.stock-take-completion-card .apple-loader span:nth-child(6){opacity:.5;transform:rotate(150deg)}.stock-take-completion-card .apple-loader span:nth-child(7){opacity:.45;transform:rotate(180deg)}.stock-take-completion-card .apple-loader span:nth-child(8){opacity:.4;transform:rotate(210deg)}.stock-take-completion-card .apple-loader span:nth-child(9){opacity:.35;transform:rotate(240deg)}.stock-take-completion-card .apple-loader span:nth-child(10){opacity:.3;transform:rotate(270deg)}.stock-take-completion-card .apple-loader span:nth-child(11){opacity:.25;transform:rotate(300deg)}.stock-take-completion-card .apple-loader span:nth-child(12){opacity:.2;transform:rotate(330deg)}.stock-take-completion-track{width:100%;height:6px;overflow:hidden;border-radius:5px;background:#101923}.stock-take-completion-track span{display:block;width:34%;height:100%;border-radius:5px;background:#5b9dff;animation:stock-take-progress 1.5s ease-in-out infinite alternate}@keyframes stock-take-progress{from{transform:translateX(-100%)}to{transform:translateX(300%)}}
.stock-take-group-filter{display:flex;align-items:center;gap:8px;padding:9px 16px;border-bottom:1px solid #343d49;color:#b9c5d4;font-size:12px;cursor:pointer}.stock-take-group-filter input{width:16px;height:16px;margin:0;accent-color:#4385ed}
.stock-take-variance{font-size:14px;font-weight:800}.stock-take-variance.positive{color:#69e0a6}.stock-take-variance.negative{color:#ff818b}.stock-take-variance.even{color:#aab6c4}
.stock-take-unknown-dialog{box-sizing:border-box;width:min(560px,calc(100vw - 24px));max-height:min(90dvh,800px);padding:20px;border:1px solid #536174;border-radius:14px;background:#20252d;color:#edf2f7;box-shadow:0 20px 60px #0009;overflow:auto}.stock-take-unknown-dialog::backdrop{background:#000b}.stock-take-unknown-dialog form{display:grid;gap:14px}.stock-take-unknown-dialog h2,.stock-take-unknown-dialog p{margin:0}.stock-take-unknown-dialog>form>label{display:grid;gap:6px}.stock-take-unknown-dialog input[type=search]{box-sizing:border-box;width:100%;min-height:44px;padding:9px;border:1px solid #536174;border-radius:8px;background:#171c23;color:#fff;font-size:16px}.stock-take-unknown-results{display:grid;gap:4px;max-height:230px;overflow:auto}.stock-take-unknown-results button{display:grid;gap:4px;width:100%;padding:10px;border:1px solid #414c59;border-radius:8px;background:#171c23;color:#edf2f7;text-align:left;cursor:pointer}.stock-take-unknown-results button:hover,.stock-take-unknown-results button:focus{border-color:#68a4ff}.stock-take-unknown-results small,.stock-take-unknown-dialog #stock-take-unknown-choice small{display:block;color:#aab6c4}.stock-take-unknown-dialog #stock-take-unknown-choice{padding:10px;border:1px solid #4385ed;border-radius:8px;background:#26374f}.stock-take-unknown-dialog #stock-take-unknown-choice[hidden]{display:none}.stock-take-unknown-dialog fieldset{display:grid;gap:9px;margin:0;padding:12px;border:1px solid #414c59;border-radius:8px}.stock-take-unknown-dialog fieldset label{display:flex;gap:8px;align-items:center}.stock-take-unknown-dialog #stock-take-unknown-error{color:#ff818b}.stock-take-unknown-actions{display:flex;justify-content:flex-end;gap:8px}.stock-take-unknown-actions button{min-height:44px}
.stock-take-remove,.stock-take-cancel{color:#ff9da5!important}
.stock-take-status.cancelled{background:#3a2b32;color:#ff9da5}
.stock-take-keyboard-toggle{display:inline-flex!important;align-items:center;gap:7px;align-self:center;white-space:nowrap;font-size:11px!important}.stock-take-keyboard-toggle input{width:16px!important;min-height:16px!important;height:16px;margin:0}
.stock-take-baseline-note{display:block}
.stock-take-baseline-note summary{display:flex;align-items:center;gap:10px;cursor:pointer}
.stock-take-baseline-note summary i{color:#80afff;font-size:18px}
.stock-take-baseline-note p{margin:8px 0 0;color:#a7b4c5;font-size:12px;line-height:1.5}
@media(max-width:900px){.stock-take-tables{grid-template-columns:1fr}.stock-take-table-scroll{max-height:52vh}.stock-take-card{grid-template-columns:48px minmax(0,1fr) auto;gap:10px}.stock-take-card .stock-take-status{grid-column:2}.stock-take-card>button:not(.stock-take-delete){grid-column:3;grid-row:1}.stock-take-card .stock-take-delete{grid-column:3;grid-row:2}.stock-takes-heading{align-items:flex-start;flex-direction:column}.stock-take-scan{grid-template-columns:minmax(180px,1fr) 110px}.stock-take-scan .button{grid-column:1}.stock-take-scan span{grid-column:2}.stock-take-controls{align-items:flex-start}.stock-take-tabs{gap:2px}.stock-take-tools{align-items:stretch;flex-direction:column}.stock-take-tools>div{text-align:left}}
@media(max-width:560px){.stock-take-controls{flex-direction:column}.stock-take-create{grid-template-columns:1fr}.stock-take-create>*{grid-column:1!important}.stock-take-scan{grid-template-columns:minmax(0,1fr) 95px}.stock-take-scan .button{grid-column:1/-1}.stock-take-scan span{grid-column:1/-1;padding:0}.stock-take-heading-actions{width:100%;flex-direction:column}.stock-take-heading-actions button{width:100%}.stock-take-card{grid-template-columns:38px minmax(0,1fr) auto;padding:13px 11px}.stock-take-card-main strong small{display:block;margin:3px 0 0}.stock-take-table-scroll{max-height:60vh}}
/* Narrow-screen layout: stack headings/controls and scroll only the data tables. */
@media(max-width:900px){
  .stock-takes-app{box-sizing:border-box;width:100%;max-width:100%;padding:8px 0 28px;overflow-x:hidden}
  .stock-takes-heading{align-items:stretch;gap:12px;margin:4px 0 16px}
  .stock-takes-heading h2{font-size:clamp(24px,7vw,30px);overflow-wrap:anywhere}
  .stock-takes-heading p{font-size:13px;line-height:1.45}
  .stock-take-controls{box-sizing:border-box;width:100%;min-width:0;padding:10px;gap:10px}
  .stock-take-tabs{width:100%;max-width:100%;flex-wrap:wrap;gap:5px}
  .stock-take-tabs button{min-height:40px;padding:8px 9px}
  #stock-take-refresh{width:100%}
  .stock-take-list,.stock-take-create-wrap,.stock-take-create{min-width:0;max-width:100%}
  .stock-take-create{box-sizing:border-box;padding:14px;gap:12px}
  .stock-take-create label{min-width:0}
  .stock-take-create select{box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:44px}
  .stock-take-create-actions{flex-direction:column-reverse}
  .stock-take-create-actions button{width:100%}
  .stock-take-scan{box-sizing:border-box;width:100%;min-width:0;padding:12px;gap:9px}
  .stock-take-scan label,.stock-take-scan input{min-width:0;max-width:100%}
  .stock-take-tools{min-width:0;gap:10px}
  .stock-take-tools label{width:100%;min-width:0}
  .stock-take-tables,.stock-take-tables>section{min-width:0;max-width:100%}
  .stock-take-table-scroll{width:100%;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
  .stock-take-tables table{min-width:570px}
  .stock-take-toast{right:8px;bottom:8px;left:8px;max-width:none}
  .stock-take-tables section{overflow:visible}
  .stock-take-mobile-cards{display:grid;gap:8px;padding:10px}
  .stock-take-desktop-table{display:none}
  .stock-take-mobile-card{display:grid;gap:7px;min-width:0;padding:12px;border:1px solid #384351;border-radius:10px;background:#191e25}
  .stock-take-mobile-card>strong{font-size:14px;line-height:1.35;overflow-wrap:anywhere}
  .stock-take-mobile-card>small{color:#94a2b4;font-size:11px;overflow-wrap:anywhere}
  .stock-take-mobile-card-values{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-top:7px;border-top:1px solid #343d49;font-size:12px;color:#aab6c4}
  .stock-take-mobile-card-values span,.stock-take-mobile-card-values label{display:grid;gap:4px;align-content:start}
  .stock-take-mobile-card-values b{color:#fff;font-size:15px}
  .stock-take-mobile-card-values input{box-sizing:border-box;width:100%;max-width:100%;min-height:40px}
  .stock-take-mobile-card .secondary{width:100%;min-height:40px}
  .stock-take-mobile-cards>.stock-take-no-rows{margin:0;padding:18px 10px!important;text-align:center}
}
/* Keep the stock-taking controls and the two lists usable on phones and tablets. */
@media(max-width:900px){
  .stock-takes-app:has(#stock-take-complete){padding-bottom:calc(140px + env(safe-area-inset-bottom))}
  .stock-takes-heading{gap:6px;margin:2px 0 10px}
  .stock-take-back{margin-bottom:5px;font-size:12px}
  .stock-takes-eyebrow{font-size:10px}
  .stock-takes-heading h2{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 8px;margin:3px 0;font-size:22px;line-height:1.15}
  .stock-takes-heading h2 small{font-size:12px}
  .stock-takes-heading .stock-take-meta{margin:2px 0;font-size:11px;line-height:1.3}
  .stock-take-heading-actions:has(#stock-take-complete){position:fixed;inset:auto 0 0;z-index:5000;box-sizing:border-box;width:100%;padding:8px 12px calc(8px + env(safe-area-inset-bottom));border-top:1px solid #343d49;background:#171c23;box-shadow:0 -8px 24px #0008}
  .stock-take-heading-actions #stock-take-complete{width:100%;min-height:44px}
  .stock-take-baseline-note{margin:0 0 10px;padding:8px 10px}
  .stock-take-baseline-note summary{gap:8px;font-size:11px;line-height:1.3}
  .stock-take-baseline-note summary i{font-size:14px}
  .stock-take-baseline-note p{font-size:11px}
  .stock-take-scan{grid-template-columns:minmax(0,1fr) 62px 84px;gap:6px;align-items:end;padding:8px}
  .stock-take-scan label{min-width:0;gap:4px;font-size:10px;white-space:nowrap}
  .stock-take-scan input{box-sizing:border-box;min-width:0;min-height:40px;padding:7px 6px;font-size:16px}
  .stock-take-scan .button{grid-column:3!important;width:100%;min-width:0;min-height:40px;padding:6px 3px;font-size:11px;white-space:nowrap}
  .stock-take-scan #stock-take-scan-message{grid-column:1/-1;padding:0;white-space:normal}
  .stock-take-scan #stock-take-scan-message:empty{display:none}
  .stock-take-scan .stock-take-keyboard-toggle{grid-column:1/-1;white-space:normal}
  .stock-take-tools{gap:6px;margin:10px 0}
  .stock-take-tables{gap:10px}
  .stock-take-tables h3{padding:10px 12px}
  .stock-take-toast{bottom:calc(70px + env(safe-area-inset-bottom))}
}

/* Inventory write-offs */
.inventory-write-off-section .inventory-doc-toolbar { padding: 20px 28px; }
.inventory-write-off-section .inventory-doc-toolbar h2 { font-size: 24px; }

.write-off-form { display: grid; gap: 22px; padding: 24px 28px 30px; }
.write-off-list-controls { display:flex; gap:10px; padding:18px; flex-wrap:wrap; }
.write-off-list-controls input { flex:1 1 260px; }
.write-off-list-controls select { min-width:160px; }
.write-off-dialog { width:min(1100px,calc(100vw - 24px)); max-width:none; max-height:90dvh; padding:0; overflow:auto; background:#20262d; color:#f2f4f7; border:1px solid #45505d; border-radius:14px; }
.write-off-dialog::backdrop { background:rgba(0,0,0,.72); }
.write-off-dialog-head { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:18px 24px; background:#20262d; border-bottom:1px solid #45505d; }
.write-off-dialog-head h2 { margin:0; }
@media (max-width:600px) { .write-off-dialog { width:100vw; height:100dvh; max-height:100dvh; border-radius:0; } .write-off-list-controls { padding:12px; } .inventory-write-off-section > .inventory-doc-table-wrap { overflow-x:auto; } }
.write-off-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.write-off-fields label, .write-off-notes, .write-off-search > label { display: grid; gap: 7px; min-width: 0; color: var(--main-text-color); font-size: 13px; font-weight: 700; }
.write-off-fields input, .write-off-fields select, .write-off-notes textarea, .write-off-search input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--input-bg-color); color: var(--main-text-color); font: inherit; }
.write-off-fields input:focus-visible, .write-off-fields select:focus-visible, .write-off-notes textarea:focus-visible, .write-off-search input:focus-visible { outline: 2px solid var(--primary-color, #55a7ff); outline-offset: 2px; }
.write-off-fields select:disabled { opacity: .6; }
.write-off-fields [hidden] { display: none; }
.write-off-notes textarea { resize: vertical; }
.write-off-search { position: relative; max-width: 760px; }
#write-off-search-results { position: absolute; z-index: 15; top: calc(100% + 4px); left: 0; right: 0; max-height: 320px; overflow: auto; border: 1px solid var(--border-color); border-radius: 10px; background: var(--second-bg-color); box-shadow: 0 12px 30px #0004; }
#write-off-search-results:empty { display: none; }
.write-off-result { display: grid; gap: 3px; box-sizing: border-box; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--border-color); background: transparent; color: var(--main-text-color); text-align: left; cursor: pointer; }
.write-off-result:last-child { border-bottom: 0; }
.write-off-result:hover, .write-off-result:focus-visible { background: var(--hover-color); }
.write-off-result span, #write-off-items small { display: block; color: var(--secondary-text-color); }
.inventory-write-off-section .inventory-doc-table-wrap { min-width: 0; }
.inventory-write-off-section .table { min-width: 560px; width: 100%; }
.inventory-write-off-section .table th:last-child, .inventory-write-off-section .table td:last-child { text-align: right; }
.write-off-qty { box-sizing: border-box; width: 88px; max-width: 100%; }
.write-off-submit { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; }
#write-off-status { margin-right: auto; overflow-wrap: anywhere; }
#write-off-mapping-panel { margin: 20px 28px 0; padding: 16px 18px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--second-bg-color); }
#write-off-mapping-panel summary { cursor: pointer; color: var(--main-text-color); font-weight: 700; }
#write-off-mapping-panel p { margin: 10px 0; }
.write-off-mapping-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.write-off-mapping-row:last-child { border-bottom: 0; }
.write-off-mapping-row small { display: block; color: var(--secondary-text-color); }
.write-off-mapping-row select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--input-bg-color); color: var(--main-text-color); }
@media (max-width: 900px) { .write-off-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .inventory-write-off-section .inventory-doc-toolbar { align-items: flex-start; flex-wrap: wrap; padding: 18px 16px; } .write-off-form { padding: 18px 16px 26px; } .write-off-fields { grid-template-columns: 1fr; } #write-off-mapping-panel { margin: 16px 16px 0; } .write-off-mapping-row { grid-template-columns: 1fr; } .write-off-submit { align-items: stretch; } .write-off-submit button { width: 100%; } }

.stock-take-adjustment-link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 7px 12px; text-decoration: none; }
.stock-take-bundle-label{display:inline-block;margin-left:6px;padding:2px 6px;border:1px solid var(--border-color,#3a414a);border-radius:5px;color:var(--secondary-text-color,#aeb6c2);font-size:11px;font-weight:500}
.stock-take-bundle-parts{margin-top:8px;font-size:12px}
.stock-take-bundle-parts summary{cursor:pointer;color:var(--secondary-text-color,#aeb6c2)}
.stock-take-bundle-parts ul{margin:6px 0 0;padding-left:18px}
.stock-take-bundle-parts li{padding:3px 0}
