:root { font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #20352f; background: #f5f3eb; }
* { box-sizing: border-box; }
html, body, #app { touch-action: pan-x pan-y; }
body { margin: 0; min-width: 320px; overscroll-behavior: none; }
button { border: 0; border-radius: 10px; padding: .8rem 1.1rem; color: white; background: #173f35; font: inherit; font-weight: 700; cursor: pointer; }
button:disabled { opacity: .65; cursor: progress; }
input,textarea { width: 100%; border: 1px solid #d4d2c8; border-radius: 10px; padding: .8rem .9rem; color: #20352f; background: white; font: inherit; }
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
select { width: 100%; border: 1px solid #d4d2c8; border-radius: 10px; padding: .8rem .9rem; color: #20352f; background: white; font: inherit; }
input:focus,textarea:focus { outline: 3px solid rgba(36,101,82,.16); border-color: #246552; }
label { display: block; margin: 1rem 0 .35rem; font-weight: 750; }
.field-title-link { display: inline-block; margin: 1rem 0 .35rem; color: #174f91; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.field-title-link:hover, .field-title-link:focus-visible { color: #2864e8; }
.validation-message { display: block; margin-top: .25rem; color: #a33a32; font-size: .82rem; }
.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { padding: 1.5rem; color: #e9f1ed; background: #173f35; }
.brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 2rem; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #173f35; background: #f0c56b; font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand small { color: #a9bdb7; margin-top: .15rem; }
nav { display: grid; gap: .35rem; }
nav a { padding: .7rem .8rem; border-radius: 8px; color: inherit; text-decoration: none; }
nav a.active { color: #173f35; background: #f0c56b; font-weight: 800; }
nav a.disabled { color: #8fa69f; cursor: default; }
.nav-heading { margin: 1.1rem .8rem .3rem; color: #f0c56b; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; padding: 1rem 2rem; border-bottom: 1px solid #dedbd1; background: rgba(255,255,255,.72); }
.status-dot { color: #31725e; font-size: .9rem; }
.user-menu { display: flex; align-items: center; gap: 1rem; font-size: .88rem; }
.user-menu a, .link-button { color: #246552; text-decoration: none; font-weight: 750; }
.link-button { padding: 0; background: none; }
.content { padding: 2.5rem; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.eyebrow { color: #a06e19; font-size: .75rem; font-weight: 900; letter-spacing: .16em; }
h1 { margin: .2rem 0 .5rem; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1; letter-spacing: -.04em; }
h1:focus { outline: none; }
.page-heading p:last-child { color: #61716c; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0; }
.card, .flow-card { padding: 1.4rem; border: 1px solid #dedbd1; border-radius: 16px; background: white; box-shadow: 0 8px 26px rgba(28,52,44,.06); }
.card span, .card small { display: block; color: #71807b; }
.card strong { display: block; margin: .5rem 0; font-size: 1.25rem; }
.card.accent { color: white; background: #246552; border-color: #246552; }
.card.accent span, .card.accent small { color: #cce0d9; }
.flow { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1.2rem; }
.flow span { flex: 1; padding: 1rem; border-radius: 10px; text-align: center; background: #f5f3eb; }
.flow b { color: #b47b1b; }
.auth-shell { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr); min-height: 100vh; }
.auth-brand { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 6vw, 6rem); color: #eff7f3; background: #173f35; }
.auth-brand .eyebrow { margin-top: 2rem; color: #f0c56b; }
.auth-brand h1 { font-size: clamp(2.8rem, 5vw, 5.4rem); }
.auth-brand > p:last-child { max-width: 34rem; color: #b9cec7; font-size: 1.1rem; }
.brand-mark.large { width: 62px; height: 62px; font-size: 1.15rem; }
.auth-content { display: grid; place-items: center; padding: 2rem; }
.auth-card { width: min(100%, 430px); padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid #dedbd1; border-radius: 18px; background: white; box-shadow: 0 18px 50px rgba(28,52,44,.09); }
.auth-card.wide { width: min(100%, 520px); }
.auth-card h2 { margin: .2rem 0; font-size: 2rem; }
.muted, .hint { color: #687873; }
.hint { display: block; margin-top: .35rem; font-size: .8rem; }
.full-button { width: 100%; margin-top: 1.5rem; }
.alert { margin: 1rem 0; padding: .8rem 1rem; border-radius: 9px; }
.alert.error { color: #812e28; background: #fff0ee; border: 1px solid #f1c2bd; }
.alert.success { color: #195a45; background: #e9f7f1; border: 1px solid #b8ddcf; }
.form-card { max-width: 560px; padding: 1.5rem; border: 1px solid #dedbd1; border-radius: 16px; background: white; }
.form-card button { margin-top: 1.4rem; }
.page-heading.compact h1 { font-size: 2.5rem; }
.master-tabs { display: flex; gap: .4rem; margin: 1.5rem 0; padding: .35rem; border: 1px solid #dedbd1; border-radius: 12px; background: white; overflow-x: auto; }
.master-tabs a { padding: .65rem 1rem; border-radius: 8px; color: #53655f; text-decoration: none; white-space: nowrap; }
.master-tabs a.active { color: white; background: #246552; font-weight: 750; }
.master-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.master-cards a { display: flex; flex-direction: column; gap: .4rem; padding: 1.5rem; border: 1px solid #dedbd1; border-radius: 15px; color: #20352f; background: white; text-decoration: none; }
.master-cards strong { font-size: 1.2rem; }.master-cards span { color: #71807b; }
.master-workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .7fr); gap: 1rem; align-items: start; }
.list-panel,.editor-panel { border: 1px solid #dedbd1; border-radius: 16px; background: white; box-shadow: 0 8px 26px rgba(28,52,44,.05); }
.list-panel { min-width: 0; overflow: hidden; }.editor-panel { padding: 1.4rem; position: sticky; top: 1rem; }
.editor-panel h2 { margin-top: 0; }.editor-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.75rem; }.editor-panel-heading h2 { margin:0; }.editor-panel-heading button { flex:0 0 auto; }.list-tools { display: grid; grid-template-columns: 1fr 150px auto; gap: .6rem; padding: 1rem; border-bottom: 1px solid #e5e2d9; }
.list-tools.stock-list-tools { grid-template-columns: minmax(260px,1fr) minmax(190px,240px) 150px auto auto; }
.stock-export-button { display:flex; align-items:center; justify-content:center; min-height:46px; padding:.8rem 1.1rem; border-radius:10px; color:white; background:#246552; font-weight:700; text-decoration:none; white-space:nowrap; }
.stock-export-button:hover,.stock-export-button:focus-visible { background:#173f35; }
@media (min-width:821px) and (max-width:1179px) {
  .list-tools.stock-list-tools { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .stock-list-tools > input:first-child { grid-column:1/-1; }
}
.table-wrap { overflow-x: auto; }table { width: 100%; border-collapse: collapse; }th,td { padding: .85rem 1rem; border-bottom: 1px solid #ece9e0; text-align: left; vertical-align: middle; white-space: nowrap; }th { color: #6a7974; background: #faf9f5; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; }td small { display: block; margin-top: .15rem; color: #71807b; }
.table-action { padding: .45rem .7rem; color: #246552; background: #edf5f1; font-size: .82rem; }.badge { display: inline-block; padding: .3rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 750; }.badge.active { color: #23634f; background: #e5f4ee; }.badge.inactive { color: #81564e; background: #f5eae7; }
.empty-state { padding: 2rem; color: #71807b; text-align: center; }.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }.check-row { display: flex; align-items: center; gap: .55rem; font-weight: 500; }.check-row input { width: 18px; height: 18px; }
fieldset { margin: 1rem 0; padding: .8rem 1rem; border: 1px solid #dedbd1; border-radius: 10px; }legend { padding: 0 .35rem; font-weight: 750; }.password-reset { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #dedbd1; }.password-reset button { margin-top: .7rem; }
.physical-grid { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 1rem; align-items: start; }.transaction-card,.availability-card,.history-card { border: 1px solid #dedbd1; border-radius: 16px; background: white; box-shadow: 0 8px 26px rgba(28,52,44,.05); }.transaction-card { padding: 1.25rem; }.availability-card { position: sticky; top: 1rem; overflow: hidden; }.availability-card h2,.availability-card>p { padding: 0 1rem; }.availability-list { max-height: 530px; overflow-y: auto; border-top: 1px solid #e7e4db; }.availability-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem 1rem; border-bottom: 1px solid #eeeae2; }.availability-row small { display: block; color: #71807b; }.document-fields { display: grid; grid-template-columns: 1fr 220px; gap: .8rem; }.line-entry { display: grid; grid-template-columns: minmax(240px,1fr) 190px auto; gap: .7rem; align-items: end; margin: 1.25rem 0; padding: 1rem; border-radius: 12px; background: #f5f3eb; }.inline-error { color: #9b3730; }.opening-lines { border: 1px solid #e3e0d8; border-radius: 10px; }.transaction-summary { display: flex; align-items: center; justify-content: flex-end; gap: 1.2rem; margin-top: 1rem; }.history-card { margin-top: 1rem; overflow: hidden; }.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; }.history-heading h2 { margin: .1rem 0; }.history-tools { display: flex; gap: .5rem; }.page-alert { margin: 0 0 1rem; }.table-action.danger { margin-left: .3rem; color: #8a3029; background: #fff0ee; }.detail-row td { background: #faf9f5; }.detail-list { display: grid; gap: .35rem; white-space: normal; }.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1rem; background: rgba(14,35,29,.62); }.confirm-card { width: min(100%,480px); padding: 1.5rem; border-radius: 16px; background: white; box-shadow: 0 25px 70px rgba(0,0,0,.25); }.confirm-card h2 { margin: .2rem 0; }.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }.secondary-button { color: #31443e; background: #e9ece9; }.danger-button { background: #9d3d35; }
.physical-grid.physical-grid-single { grid-template-columns:minmax(0,1fr); }
.line-entry.stock-in-entry { grid-template-columns: minmax(180px,.65fr) minmax(240px,1fr) 160px 160px auto; }
.line-entry.stock-transfer-entry { grid-template-columns: minmax(180px,.65fr) minmax(260px,1fr) 190px auto; }
.line-entry.branch-stock-category-entry,.line-entry.physical-stock-entry { grid-template-columns: minmax(180px,.65fr) minmax(260px,1fr) 210px auto; }
.opening-lines input { min-width: 115px; }
.transfer-fields { display: grid; grid-template-columns: 1fr 1fr 190px; gap: .8rem; }
.loading{display:grid;min-height:100vh;min-height:100dvh;place-items:center;padding:28px;color:#26352f;background:#fff;text-align:center}.loading-brand{display:flex;align-items:center;flex-direction:column}.loading-logo{display:block;width:min(52vw,190px);height:auto;object-fit:contain}.loading-brand strong{margin-top:14px;font-size:1.35rem;letter-spacing:.01em}.loading-brand>span{margin-top:5px;color:#748172;font-size:.86rem;font-weight:650}.loading-progress{position:relative;width:min(52vw,190px);height:5px;overflow:hidden;margin-top:16px;border-radius:999px;background:#e5ebe3}.loading-progress::after{position:absolute;inset:0 auto 0 0;width:42%;border-radius:inherit;background:#879b82;content:"";animation:stockhub-loading 1.15s ease-in-out infinite}@keyframes stockhub-loading{0%{transform:translateX(-110%)}100%{transform:translateX(350%)}}@media(prefers-reduced-motion:reduce){.loading-progress::after{width:65%;animation:none}}
#blazor-error-ui { display: none; position: fixed; z-index: 1000; inset: auto 0 0; align-items: center; gap: .55rem; padding: 1rem; color: #7f1d1d; background: #ffd9d9; border-top: 1px solid #f2aaaa; }
#blazor-error-ui .reload,.error-details-link { padding: 0; border: 0; color: #6d28d9; background: transparent; font: inherit; text-decoration: underline; cursor: pointer; }
#blazor-error-ui .dismiss { margin-left: auto; padding: 0 .25rem; border: 0; color: #7f1d1d; background: transparent; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.error-dialog-backdrop { position: fixed; z-index: 1100; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(15,23,42,.58); }
.error-dialog-backdrop[hidden] { display: none; }
.error-dialog { width: min(720px,100%); max-height: min(82vh,760px); overflow: auto; padding: 1.25rem; border: 1px solid #d3dbe5; border-radius: 10px; background: #fff; box-shadow: 0 20px 55px rgba(15,23,42,.28); }
.error-dialog h2 { margin: 0 0 .5rem; }
.error-dialog p { margin: 0 0 1rem; color: #566477; }
.error-dialog pre { min-height: 150px; max-height: 48vh; overflow: auto; margin: 0; padding: 1rem; border-radius: 7px; color: #f8fafc; background: #172333; font: .82rem/1.5 Consolas,monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.error-dialog-actions { display: flex; justify-content: flex-end; gap: .65rem; margin-top: 1rem; }
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { padding: 1rem; }
  .brand { margin-bottom: .8rem; }
  nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  nav .nav-heading, nav .disabled { display: none; }
  .topbar { padding: .8rem 1rem; }
  .content { padding: 1.2rem; }
  .page-heading { align-items: start; flex-direction: column; }
  .cards { grid-template-columns: 1fr; }
  .flow { align-items: stretch; flex-direction: column; }
  .flow b { display: none; }
  .user-menu > span { display: none; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 230px; padding: 2rem; }
  .auth-brand h1 { font-size: 2.6rem; }
  .auth-brand > p:last-child { display: none; }
  .master-workspace { grid-template-columns: 1fr; }
  .editor-panel { position: static; }
  .list-tools { grid-template-columns: 1fr; }
  .list-tools.stock-list-tools { grid-template-columns:1fr; }
  .master-cards { grid-template-columns: 1fr; }
  .physical-grid { grid-template-columns: 1fr; }
  .availability-card { position: static; }
  .document-fields,.transfer-fields,.line-entry,.line-entry.stock-in-entry,.line-entry.stock-transfer-entry,.line-entry.branch-stock-category-entry,.line-entry.physical-stock-entry { grid-template-columns: 1fr; }
  .transaction-summary,.history-heading { align-items: stretch; flex-direction: column; }
  .history-tools { flex-direction: column; }
}

/* Mobile application shell */
:root { color: #172333; background: #f3f5f8; }
body { color: #172333; background: #f3f5f8; }
button { min-height: 46px; background: #2864e8; }
input,select,textarea { min-height: 48px; border-color: #ccd5e1; border-radius: 7px; }
textarea { min-height: 110px; }
input:focus,select:focus,textarea:focus { outline: 3px solid rgba(40,100,232,.15); border-color: #2864e8; }

.mobile-app-shell,.mobile-auth-shell { min-height: 100vh; margin: 0 auto; border-right: 1px solid #d7dde5; border-left: 1px solid #d7dde5; background: #f4f6f9; box-shadow: 0 0 45px rgba(28,42,58,.08); }
.mobile-app-shell { width: min(calc(100% - 32px),1440px); }
.mobile-auth-shell { width: min(100%,760px); }
.mobile-auth-shell { display: flex; flex-direction: column; }
.mobile-app-header { display: flex; align-items: center; justify-content: space-between; min-height: 70px; padding: 11px 17px; border-bottom: 1px solid #cfd7e2; background: #fff; }
.mobile-brand { display: flex; align-items: center; gap: 11px; color: #172333; text-decoration: none; }
.mobile-brand img { width: 46px; height: 46px; border: 1px solid #d3dbe5; border-radius: 7px; }
.mobile-brand .stockhub-brand-logo { object-fit: contain; background: #fff; }
.mobile-brand span,.mobile-brand small,.mobile-brand strong { display: block; }
.mobile-brand small { margin-bottom: 1px; color: #667487; font-size: .7rem; font-weight: 800; letter-spacing: .035em; }
.mobile-brand strong { font-size: 1.28rem; line-height: 1.05; }
.mobile-brand-copy { min-width: 0; }
.mobile-brand .mobile-company-name { max-width: min(54vw,360px); margin: 2px 0 0; overflow: hidden; color: #667487; font-size: .66rem; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.logout-icon:focus-visible { outline: 3px solid rgba(40,100,232,.22); outline-offset: 2px; }
.logout-icon { display: grid; place-items: center; width: 45px; height: 45px; min-height: 45px; padding: 0; border: 1px solid #d3dbe5; border-radius: 7px; color: #172333; background: #f3f6f9!important; font-size: 1.45rem; }
.mobile-session-strip { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 12px; color: #59677a; background: #f6f8fb; font-size: .8rem; font-weight: 700; }
.connection-state { display: flex; align-items: center; gap: 7px; }
.connection-state i { width: 9px; height: 9px; border-radius: 50%; background: #15935e; box-shadow: 0 0 0 3px rgba(21,147,94,.1); }
.mobile-content { padding: 0 12px 28px; }

.mobile-auth-content { display: grid; flex: 1; place-items: center; padding: 48px 20px 80px; }
.mobile-auth-content .auth-card { width: min(100%,420px); padding: 28px; border: 1px solid #cfd8e4; border-radius: 9px; box-shadow: 0 22px 48px rgba(35,47,63,.12); }
.mobile-auth-content .auth-card.wide { width: min(100%,520px); }
.login-app-icon { width: 72px; height: 72px; margin-bottom: 22px; border: 1px solid #d1dae5; border-radius: 9px; background: #fff; object-fit: contain; }
.mobile-auth-content .auth-card h2 { margin: 0 0 8px; color: #132238; font-size: 1.48rem; letter-spacing: -.025em; }
.mobile-auth-content .auth-card .muted { margin: 0 0 24px; color: #5a6c86; }
.mobile-auth-content .auth-card label { margin-top: 17px; color: #53637a; font-size: .8rem; }
.sign-in-button { border-radius: 6px; background: #2864e8; }

.mobile-menu-list { display: grid; gap: 16px; padding-top: 1px; }
.mobile-menu-card { display: grid; grid-template-columns: 62px minmax(0,1fr) 25px; align-items: center; gap: 16px; width: 100%; min-height: 118px; padding: 20px 22px; border: 1px solid #d0d8e2; border-radius: 9px; color: #132238; background: #fff; box-shadow: 0 8px 22px rgba(34,48,66,.055); text-align: left; text-decoration: none; transition: transform .15s ease,border-color .15s ease,box-shadow .15s ease; }
button.mobile-menu-card { font: inherit; cursor: pointer; }
.mobile-menu-card:not(.disabled):hover { transform: translateY(-1px); border-color: #9eacc0; box-shadow: 0 12px 28px rgba(34,48,66,.09); }
.mobile-menu-card:focus-visible { outline: 3px solid rgba(40,100,232,.22); outline-offset: 2px; }
.mobile-menu-card.featured { border-color: #ef8b93; background: #fff; }
.mobile-menu-card.disabled { color: #737d8a; background: rgba(255,255,255,.72); box-shadow: none; }
.menu-icon { display: grid; place-items: center; width: 58px; height: 58px; border: 2px solid rgba(26,43,65,.16); border-radius: 14px; color: #fff; background: linear-gradient(145deg,#2b6fed,#1749ad); box-shadow: inset 0 0 0 3px rgba(255,255,255,.55),0 5px 10px rgba(28,50,80,.16); font-size: 1.75rem; font-weight: 900; }
.menu-icon.dashboard { background: linear-gradient(145deg,#ff684f,#c72f32); }
.menu-icon.physical { background: linear-gradient(145deg,#3ab986,#147052); }
.menu-icon.stock-in { background: linear-gradient(145deg,#ffb84d,#df7418); }
.menu-icon.stock-in-branch { background: linear-gradient(145deg,#22b6c7,#147080); }
.menu-icon.transfer { background: linear-gradient(145deg,#4888f7,#174eaf); }
.menu-icon.inter-transfer { background: linear-gradient(145deg,#9c6cf2,#5b32a7); }
.menu-icon.stock-out { background: linear-gradient(145deg,#6e7e91,#4c5869); }
.menu-icon.wastage { background: linear-gradient(145deg,#ef6a68,#a93338); }
.menu-icon.adjust { background: linear-gradient(145deg,#45aab4,#216b73); }
.menu-icon.master { background: linear-gradient(145deg,#657487,#303c4b); }
.menu-icon.settings { background: linear-gradient(145deg,#738197,#3f4b5c); }
.menu-icon-image { display: block; width: 68px; height: 68px; margin: -5px; object-fit: contain; filter: drop-shadow(0 4px 5px rgba(25,38,49,.16)); }
.mobile-menu-card.disabled .menu-icon { opacity: .55; filter: grayscale(.4); }
.menu-copy,.menu-copy strong,.menu-copy small { display: block; min-width: 0; }
.menu-copy strong { margin-bottom: 6px; font-size: 1.16rem; line-height: 1.16; }
.menu-copy small { color: #5d6d82; font-size: .79rem; font-weight: 650; line-height: 1.35; }
.mobile-menu-card.disabled .menu-copy small { color: #c85d61; }
.menu-chevron { justify-self: end; color: #101c2c; font-size: 1.75rem; font-weight: 400; }
.menu-lock { justify-self: end; color: #788391; font-size: 1.2rem; }
.signed-in-badge { width: fit-content; margin: 40px auto 0; padding: 12px 15px; border-radius: 6px; color: #fff; background: #1d2a3a; font-size: .78rem; font-weight: 800; }

.mobile-content .page-heading { align-items: flex-start; margin: 20px 0 16px; }
.mobile-content .page-heading h1,.mobile-content .page-heading.compact h1 { font-size: 1.75rem; line-height: 1.1; letter-spacing: -.025em; }
.mobile-content .page-heading p:last-child { margin-bottom: 0; }
.mobile-content .eyebrow { color: #2864e8; }
.mobile-content .page-heading.with-back { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; justify-content: initial; gap: 12px; }
.mobile-content .page-heading.with-back .module-title { min-width: 0; }
.module-back-button { display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid #d3dbe5; border-radius: 7px; color: #172333; background: #f3f6f9; text-decoration: none; }
.module-back-button span { font-size: 1.45rem; line-height: 1; transform: translateY(-1px); }
.module-back-button:hover { border-color: #9eacc0; background: #e9eef5; }
.module-back-button:focus-visible { outline: 3px solid rgba(40,100,232,.22); outline-offset: 2px; }
.mobile-content .master-tabs { margin: 12px 0; }
.mobile-content .transaction-card,.mobile-content .availability-card,.mobile-content .history-card,.mobile-content .list-panel,.mobile-content .editor-panel,.mobile-content .form-card { border-radius: 10px; box-shadow: 0 7px 20px rgba(34,48,66,.055); }
.mobile-content .transaction-summary button { background: #2864e8; }
.mobile-content .master-tabs a.active { background: #2864e8; }
.mobile-content .table-action { color: #2059ca; background: #edf3ff; }
.stock-photo-thumb { display: block; width: 52px; height: 52px; border: 1px solid #d3dbe5; border-radius: 8px; object-fit: cover; background: #f4f6f9; }
.photo-placeholder { color: #84909e; font-size: .72rem; }
.stock-photo-editor { margin-top: 18px; padding: 14px; border: 1px solid #d5dde7; border-radius: 10px; background: #f7f9fc; }
.stock-photo-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stock-photo-heading strong,.stock-photo-heading small { display: block; }
.stock-photo-heading small { margin-top: 3px; color: #68778a; font-size: .75rem; }
.stock-photo-preview { display: block; width: min(100%,280px); aspect-ratio: 4/3; margin: 14px auto; border: 1px solid #cdd6e2; border-radius: 9px; object-fit: contain; background: #fff; }
.stock-photo-empty { display: grid; place-items: center; min-height: 145px; margin: 14px 0; border: 2px dashed #cdd6e2; border-radius: 9px; color: #77869a; background: #fff; }
.stock-photo-empty span { font-size: 2rem; }
.stock-photo-empty small { margin-top: -30px; }
.photo-picker-label { margin-top: 0; }
.stock-photo-editor input[type=file] { min-height: 48px; padding: 9px; background: #fff; }
.stock-photo-editor .photo-remove { margin-top: 10px; color: #36485d; background: #e6ebf1; }
.stock-photo-source-actions{display:grid;gap:9px;margin-top:14px}.stock-camera-button,.stock-google-photo-button{display:flex;width:100%;min-height:48px;align-items:center;justify-content:center;gap:.55rem;border-radius:8px;font-weight:800;text-decoration:none}.stock-camera-button{background:var(--theme-main,#246552)}.stock-camera-button span,.stock-google-photo-button span{font-size:1.15rem}.stock-google-photo-button{border:1px solid #b9c7d8;color:#174ea6;background:#fff}.stock-google-photo-button:hover,.stock-google-photo-button:focus-visible{border-color:#4285f4;color:#0b3d91;background:#f3f7fe}.stock-google-photo-button.disabled{pointer-events:none;color:#89949f;background:#eef1f3;opacity:.7}.stock-photo-web-help{display:block;margin:9px 0 12px;color:#66756f;font-size:.72rem;line-height:1.4}.camera-dialog{width:min(100%,680px);padding:1.25rem;border-radius:16px;background:#fff;box-shadow:0 25px 70px rgba(0,0,0,.28)}.camera-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.camera-dialog-heading h2{margin:.15rem 0}.camera-dialog-heading .secondary-button{flex:0 0 auto}.camera-viewport{position:relative;display:grid;min-height:300px;place-items:center;overflow:hidden;margin-top:1rem;border-radius:12px;color:#d9e2ea;background:#101820}.camera-viewport video{display:block;width:100%;max-height:62vh;object-fit:contain}.camera-viewport span{position:absolute;padding:.55rem .8rem;border-radius:8px;background:rgba(0,0,0,.62)}.camera-capture-preview{display:block;width:100%;max-height:62vh;margin-top:1rem;border-radius:12px;object-fit:contain;background:#101820}.camera-message{margin:.8rem 0 0;color:#53655f}.camera-dialog-actions{display:flex;justify-content:flex-end;gap:.65rem;margin-top:1rem}.camera-dialog-actions button{min-width:120px}
@media(max-width:600px){.stock-camera-backdrop{padding:0}.camera-dialog{width:100%;height:100%;overflow:auto;border-radius:0}.camera-dialog-heading{position:sticky;z-index:2;top:-1.25rem;margin:-1.25rem -1.25rem 0;padding:1rem 1.25rem;border-bottom:1px solid #dde3e8;background:#fff}.camera-viewport{min-height:280px}.camera-dialog-actions{align-items:stretch;flex-direction:column-reverse}.camera-dialog-actions button{width:100%}}

/* The shell stays mobile-width on a maximized desktop window, so module
   layouts size to the shell instead of the browser viewport. */
.mobile-content .physical-grid,
.mobile-content .master-workspace { grid-template-columns: minmax(0,1fr); }
.mobile-content .availability-card,
.mobile-content .editor-panel { position: static; width: 100%; }
.mobile-content .transaction-card,
.mobile-content .availability-card,
.mobile-content .history-card,
.mobile-content .list-panel,
.mobile-content .editor-panel { min-width: 0; max-width: 100%; }
.mobile-content .line-entry > *,
.mobile-content .document-fields > *,
.mobile-content .transfer-fields > * { min-width: 0; }

/* Responsive Master Setup */
@media (min-width: 1180px) {
  .mobile-content { padding-right: 20px; padding-bottom: 36px; padding-left: 20px; }
  .mobile-content .master-workspace { grid-template-columns: minmax(0,2.1fr) minmax(360px,.8fr); }
  .mobile-content .editor-panel { position: sticky; top: 16px; }
  .stock-list-table td:nth-child(2) { min-width: 250px; white-space: normal; }
  .staff-list-table td:first-child { min-width: 150px; }
}

@media (min-width: 641px) and (max-width: 1179px) {
  .mobile-content .master-workspace { grid-template-columns: minmax(0,1fr); }
  .mobile-content .editor-panel { position: static; }
  .stock-list-table { min-width: 980px; }
  .staff-list-table { min-width: 820px; }
}

@media (max-width: 640px) {
  .mobile-app-shell { width: 100%; }
  .mobile-content .master-tabs { scrollbar-width: thin; }
  .mobile-content .master-tabs a { flex: 0 0 auto; padding: .6rem .85rem; }
  .editor-panel-heading { align-items: stretch; flex-direction: column; }
  .editor-panel-heading button { width: 100%; }
  .master-list-table,
  .master-list-table tbody { display: block; width: 100%; }
  .master-list-table thead { display: none; }
  .master-list-table tbody { padding: 12px; }
  .master-list-table tr { display: block; margin-bottom: 12px; overflow: hidden; border: 1px solid #dbe2ea; border-radius: 10px; background: #fff; box-shadow: 0 4px 12px rgba(28,42,58,.05); }
  .master-list-table tr:last-child { margin-bottom: 0; }
  .master-list-table td { display: grid; grid-template-columns: 92px minmax(0,1fr); align-items: center; gap: 10px; padding: 7px 12px; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .master-list-table td:first-child { padding-top: 12px; }
  .master-list-table td:last-child { padding-bottom: 12px; }
  .master-list-table td::before { content: attr(data-label); color: #6a7974; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  .master-list-table .table-action { width: 100%; }
  .stock-list-table td:nth-child(2) strong { line-height: 1.35; }
}

@media (max-width: 820px) {
  .mobile-app-shell,.mobile-auth-shell { border: 0; box-shadow: none; }
  .mobile-content { padding: 0 12px 24px; }
  .mobile-auth-content { padding: 42px 18px 70px; }
  .mobile-content .physical-grid { grid-template-columns: 1fr; }
  .mobile-content .availability-card { position: static; }
}

@media (max-width: 540px) {
  .mobile-app-header { min-height: 68px; padding: 10px 15px; }
  .mobile-brand img { width: 44px; height: 44px; }
  .mobile-brand strong { font-size: 1.2rem; }
  .mobile-auth-content { place-items: start center; padding: clamp(82px,18vh,170px) 16px 50px; }
  .mobile-auth-content .auth-card { padding: 27px; }
  .mobile-menu-list { gap: 15px; }
  .mobile-menu-card { grid-template-columns: 56px minmax(0,1fr) 22px; gap: 14px; min-height: 112px; padding: 18px 20px; }
  .menu-icon { width: 54px; height: 54px; font-size: 1.55rem; }
  .menu-icon-image { width: 62px; height: 62px; margin: -4px; }
  .menu-copy strong { font-size: 1.08rem; }
  .mobile-content .page-heading.with-back { grid-template-columns: 46px minmax(0,1fr); gap: 10px; }
  .mobile-content .page-heading.with-back > button { grid-column: 2; width: 100%; }
  .transaction-summary button,.dialog-actions button { width: 100%; }
  .dialog-actions { flex-direction: column-reverse; }
}

/* Phase 13 pending transfer and printable note */
.badge.pending { color: #8a5b06; background: #fff2c9; }
.print-note-cta { display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 0 0 16px; padding: 10px 16px; border-radius: 7px; color: #fff; background: #2864e8; font-weight: 800; text-decoration: none; }
a.table-action { display: inline-block; min-height: auto; border-radius: 6px; text-decoration: none; }
.mobile-content .master-workspace.category-list-workspace{grid-template-columns:minmax(0,1fr)}.category-list-tools{grid-template-columns:minmax(260px,1fr) 150px auto auto}.category-new-button,.category-list-back-link{display:inline-flex;min-height:46px;align-items:center;justify-content:center;padding:.8rem 1rem;border-radius:9px;font-weight:800;text-decoration:none}.category-new-button{color:#fff;background:var(--theme-main)}.category-new-button:hover,.category-new-button:focus-visible{color:#fff;background:var(--theme-accent)}.category-editor-page{position:static;width:min(100%,720px);margin:1rem auto}.category-editor-page form{display:grid}.category-list-back-link{color:#31443e;background:#e9ece9}.category-editor-actions{display:flex;justify-content:flex-end;gap:.65rem;margin-top:1.2rem}.category-editor-actions>*{width:auto;min-width:145px}
@media(max-width:640px){.category-list-tools{grid-template-columns:1fr 1fr}.category-list-tools input,.category-list-tools select{grid-column:1/-1}.category-list-tools button,.category-list-tools .category-new-button{width:100%}.category-editor-page{margin-top:.75rem;padding:1rem}.category-editor-actions{display:grid;grid-template-columns:1fr 1fr}.category-editor-actions>*{width:100%;min-width:0}}
.transfer-note-loading { padding: 40px; color: #657487; text-align: center; }
.transfer-note-sheet { padding: 28px; border: 1px solid #d1d9e3; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(30,44,62,.07); }
.transfer-note-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 3px solid #172333; }
.transfer-note-header h1 { margin: 3px 0 9px; font-size: 1.7rem; }
.transfer-note-status { text-align: right; }
.transfer-note-status span,.transfer-note-status small { display: block; }
.transfer-note-status span { padding: 7px 10px; border-radius: 5px; color: #8a5b06; background: #fff2c9; font-size: .78rem; font-weight: 900; }
.transfer-note-status small { margin-top: 7px; color: #657487; }
.transfer-note-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 24px; padding: 22px 0; }
.transfer-note-meta small,.transfer-note-meta strong { display: block; }
.transfer-note-meta small { margin-bottom: 4px; color: #6c7989; }
.transfer-note-lines { border: 1px solid #dbe1e8; border-radius: 7px; }
.transfer-note-lines tfoot td { background: #f4f6f9; }
.transfer-note-remarks { margin-top: 18px; padding: 12px; border-radius: 7px; background: #f5f7fa; }
.transfer-note-remarks small { color: #6c7989; }
.transfer-note-remarks p { margin: 5px 0 0; }
.transfer-note-receipt { display: grid; grid-template-columns: 175px minmax(0,1fr); gap: 24px; align-items: center; margin-top: 24px; padding: 18px; border: 2px solid #172333; border-radius: 8px; }
.qr-panel { text-align: center; }
.qr-panel img { display: block; width: 150px; height: 150px; margin: auto; image-rendering: pixelated; }
.qr-panel small { display: block; margin-top: 5px; font-weight: 800; }
.receipt-instructions h2 { margin: 0 0 7px; }
.receipt-instructions p { color: #526176; }
.receipt-instructions code { display: inline-block; padding: 6px 9px; border-radius: 4px; background: #eef2f6; font-weight: 800; }
.transfer-note-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 55px; }
.transfer-note-signatures span { display: block; border-top: 1px solid #172333; }
.transfer-note-signatures small { display: block; padding-top: 6px; text-align: center; }

@media (max-width: 540px) {
  .transfer-note-sheet { padding: 18px; }
  .transfer-note-header { flex-direction: column; }
  .transfer-note-receipt { grid-template-columns: 1fr; }
  .transfer-note-status { text-align: left; }
  .transfer-note-meta { grid-template-columns: 1fr; }
}

@media print {
  body,.mobile-app-shell { background: #fff; }
  .mobile-app-shell { width: 100%; max-width: none; border: 0; box-shadow: none; }
  .mobile-app-header,.mobile-session-strip,.no-print { display: none !important; }
  .mobile-content { padding: 0; }
  .transfer-note-sheet { border: 0; box-shadow: none; }
  .transfer-note-status span { border: 1px solid #8a5b06; }
}

/* Phase 15 Stock In Branch scanner */
.qr-receive-card { max-width: 560px; margin: 20px auto; padding: 24px; border: 1px solid #d0d8e2; border-radius: 10px; background: #fff; text-align: center; box-shadow: 0 8px 22px rgba(34,48,66,.055); }
.qr-receive-card h2 { margin: 8px 0; }.qr-receive-card>p { color: #607087; }
.qr-scan-mark { display: grid; place-items: center; width: 78px; height: 78px; margin: 0 auto 15px; border-radius: 50%; color: #2864e8; background: #eaf0ff; font-size: 2.5rem; }
.scan-qr-button,.qr-photo-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin-top: 12px; border-radius: 6px; font-weight: 800; }
.scan-qr-button { color: #fff; background: #2864e8; }.qr-photo-button { border: 1px solid #aeb9c7; color: #172333; background: #fff; cursor: pointer; }.qr-photo-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.manual-qr-entry { display: grid; grid-template-columns: minmax(0,1fr) 48px; gap: 8px; margin-top: 18px; }.manual-qr-entry button { padding: 0; font-size: 1.35rem; }
.qr-camera { margin-top: 16px; }.qr-camera #stockhub-qr-reader { width: 100%; overflow: hidden; border: 0 !important; border-radius: 8px; background: #121923; }.qr-camera #stockhub-qr-reader video { display: block; width: 100% !important; max-height: 360px; object-fit: cover; }.qr-camera button { width: 100%; margin-top: 8px; }
.branch-receipt-card { margin: 20px 0; }.receipt-detail-back{width:auto;margin-bottom:14px}.receipt-transfer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }.receipt-transfer-heading h2 { margin: 3px 0; }.receipt-transfer-heading p:last-child { color: #5e6e82; }
.inquiry-pager{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-top:1px solid #e2e7eb;color:#5f706c}.inquiry-pager-buttons{display:flex;align-items:center;gap:6px}.inquiry-pager button{min-width:40px;padding:9px 12px}.inquiry-pager button.active{color:#fff;background:var(--theme-primary)}
@media(max-width:640px){.inquiry-pager{align-items:stretch;flex-direction:column}.inquiry-pager-buttons{flex-wrap:wrap}.inquiry-pager button{flex:1}}
.branch-receipt-lines input[type=text]{min-width:220px}.branch-receipt-lines select{min-width:190px}.branch-receipt-lines .overage-row td,.history-card .overage-row td{background:#fff8df}.branch-receipt-lines .short-close-row td,.history-card .short-close-row td{background:#fff4e5}.branch-receipt-lines .ng-row td{background:#fff0ee}.short-close-check{display:flex;align-items:center;gap:7px;min-width:140px;font-weight:700}.short-close-check input{width:18px;height:18px}.field-error{display:block;margin-top:4px;color:#b42318;font-weight:700}.receipt-excess-value{color:#9a6200}.receipt-excess-warning,.receipt-excess-summary,.short-close-summary{display:block;margin-top:4px;color:#825500;font-size:.78rem;font-weight:700}.receipt-detail-list{display:grid;gap:8px;padding:8px}.receipt-detail-item{display:grid;grid-template-columns:minmax(220px,2fr) minmax(130px,1fr) minmax(240px,2fr);align-items:center;gap:16px;padding:10px 12px;border:1px solid #e0e5e9;border-radius:8px;background:#fff}.receipt-detail-item.overage-detail{border-color:#e0b84f;background:#fff8df}.receipt-detail-item.short-close-detail{border-color:#d89a35;background:#fff4e5}.receipt-detail-item small{display:block;color:#718096}
@media(max-width:700px){.receipt-detail-item{grid-template-columns:1fr;gap:5px}}
.stock-in-browser-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.pending-browser-button { width:100%; min-height:52px; margin-top:0; white-space:nowrap; }.pending-transfer-browser { border-color: #b9caea; }.pending-transfer-browser .history-heading>div>p:last-child { margin: .25rem 0 0; color: #607087; }.pending-transfer-table { min-width: 1080px; }
.history-toggle-button{width:100%;min-height:52px;margin:0 0 20px}
@media(max-width:600px){.stock-in-browser-actions{grid-template-columns:1fr}}
@media(max-width:640px){.pending-transfer-table,.pending-transfer-table tbody{display:block;width:100%}.pending-transfer-table thead{display:none}.pending-transfer-table tbody{padding:12px}.pending-transfer-table tr{display:block;margin-bottom:12px;overflow:hidden;border:1px solid #dbe2ea;border-radius:10px;background:#fff}.pending-transfer-table tr:last-child{margin-bottom:0}.pending-transfer-table td{display:grid;grid-template-columns:92px minmax(0,1fr);align-items:center;gap:10px;padding:7px 12px;border:0;white-space:normal;overflow-wrap:anywhere}.pending-transfer-table td:first-child{padding-top:12px}.pending-transfer-table td:last-child{padding-bottom:12px}.pending-transfer-table td::before{content:attr(data-label);color:#6a7974;font-size:.7rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.pending-transfer-table .table-action{width:100%}}

/* Phases 16 and 17 */
.wastage-evidence-editor { margin-bottom: 16px; }
.daily-balance-card { margin-top: 18px; }
.daily-balance-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 10px; }
.daily-balance-filters { display: grid; grid-template-columns: minmax(220px,320px) minmax(220px,360px); gap: 10px; width: min(100%,690px); }
.daily-balance-tools input { max-width: 360px; }
.daily-balance-tools span { color: #657487; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.daily-balance-lines input { min-width: 120px; }
.daily-balance-lines .ng-row td { background: #fff0ee; }
.badge.ng { color: #9b2d27; background: #ffdcd8; }
@media (max-width:700px){.daily-balance-tools{align-items:stretch;flex-direction:column}.daily-balance-filters{grid-template-columns:1fr;width:100%}.daily-balance-tools input{max-width:none}}

/* Stock Dashboard */
.dashboard-total-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: 1.25rem 1.4rem; border: 1px solid #d9e1ec; border-radius: 16px; background: linear-gradient(135deg,#0d2b35,#174b4d); color: #fff; box-shadow: 0 12px 30px rgba(15,42,50,.12); }
.dashboard-total-card > div { display: grid; gap: .2rem; }
.dashboard-total-card strong { font-size: clamp(2rem,7vw,3.2rem); line-height: 1; }
.dashboard-total-card small { color: #c5dcda; }
.dashboard-label { color: #9dd3ca; font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.dashboard-total-card .secondary-button { width: auto; border-color: #fff; background: #fff; color: #123f45; }
.stock-dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(270px,1fr)); gap: 1rem; }
.location-stock-card { position:relative; padding: 1.25rem; border: 1px solid #d8e0e9; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(22,38,50,.06); transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.location-stock-card:hover { transform:translateY(-2px); border-color:var(--theme-main); box-shadow:0 12px 30px rgba(22,38,50,.11); }
.location-stock-card.selected { border-color:var(--theme-main); box-shadow:0 0 0 3px var(--theme-focus),0 12px 30px rgba(22,38,50,.11); }
.location-card-action { position:absolute; z-index:2; inset:0; width:100%; height:100%; padding:0; border-radius:16px; background:transparent!important; }
.location-card-action:focus-visible { outline:3px solid var(--theme-accent); outline-offset:3px; }
.location-stock-card.hq { border-color: #f0b1b1; }
.location-card-heading { display: flex; align-items: center; gap: .85rem; }
.location-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: #e8f0ff; color: #2462e8; font-size: .72rem; font-weight: 900; }
.location-stock-card.hq .location-icon { background: #fff0ef; color: #e44c47; }
.location-card-heading p { margin: 0; color: #657874; font-size: .67rem; font-weight: 900; letter-spacing: .1em; }
.location-card-heading h2 { margin: .1rem 0; font-size: 1.15rem; }
.location-card-heading small { color: #73827f; }
.location-total { display: grid; gap: .15rem; margin: 1.4rem 0 1rem; }
.location-total span { color: #677873; font-size: .8rem; font-weight: 700; }
.location-total strong { color: #172433; font-size: 2rem; line-height: 1; }
.location-card-footer { display: flex; justify-content: space-between; gap: .75rem; color: #6c7b78; font-size: .75rem; }
.location-view-detail { color:var(--theme-accent); font-weight:800; white-space:nowrap; }
.location-share { height: 6px; margin-top: .65rem; overflow: hidden; border-radius: 999px; background: #eef1f4; }
.location-share span { display: block; height: 100%; border-radius: inherit; background: #2d68ed; }
.location-stock-card.hq .location-share span { background: #ec5a55; }
@media (max-width:600px) { .dashboard-total-card { align-items: flex-end; } .dashboard-total-card .secondary-button { padding: .65rem .8rem; } .stock-dashboard-grid { grid-template-columns: 1fr; } .location-stock-card { padding: 1.1rem; } }
.dashboard-stock-detail{margin-top:1rem}.dashboard-detail-heading p:last-child{margin:.25rem 0 0;color:#687874}.dashboard-detail-heading .secondary-button{width:auto}.dashboard-detail-alert{margin:0 1rem 1rem}.dashboard-detail-tools{display:grid;grid-template-columns:minmax(190px,280px) minmax(240px,380px) auto auto;align-items:center;gap:.65rem;padding:0 1.25rem 1rem}.dashboard-detail-tools span{color:#687874;font-size:.8rem;font-weight:800;text-align:right}.stock-balance-export-button{display:flex;width:auto;align-items:center;justify-content:center;min-height:48px;padding:.8rem 1rem;border-radius:8px;color:#fff;background:var(--theme-main)!important;font-weight:750;white-space:nowrap}.stock-balance-export-button:hover,.stock-balance-export-button:focus-visible{background:var(--theme-accent)!important}.dashboard-detail-lines{max-height:560px}.dashboard-detail-lines td{white-space:normal}.dashboard-live-qty{display:inline-block;min-width:80px;padding:.35rem .6rem;border-radius:999px;color:#176149;text-align:center;background:#e4f4ed}.dashboard-live-qty.zero{color:#7a554e;background:#f3eae7}
.dashboard-stock-photo-cell{width:76px}.dashboard-stock-thumbnail{display:grid;width:52px;height:52px;place-items:center;border:1px solid #d3dbe5;border-radius:8px;object-fit:cover;color:#82909d;background:#f3f6f8}.dashboard-stock-thumbnail.stock-thumbnail-placeholder span{font-size:1.25rem}
@media(max-width:700px){.dashboard-detail-heading{align-items:stretch;flex-direction:column}.dashboard-detail-heading .secondary-button{width:100%}.dashboard-detail-tools{grid-template-columns:1fr}.dashboard-detail-tools span{text-align:left}.stock-balance-export-button{width:100%}.dashboard-detail-lines table,.dashboard-detail-lines tbody{display:block;width:100%}.dashboard-detail-lines thead{display:none}.dashboard-detail-lines tbody{padding:10px}.dashboard-detail-lines tr{display:block;margin-bottom:10px;padding:8px 0;border:1px solid #e0e4e8;border-radius:10px}.dashboard-detail-lines td{display:grid;grid-template-columns:105px minmax(0,1fr);gap:8px;padding:7px 12px;border:0}.dashboard-detail-lines td::before{content:attr(data-label);color:#687874;font-size:.72rem;font-weight:800;text-transform:uppercase}.dashboard-stock-photo-cell{width:auto}}

/* Phase 18 themes and settings */
:root { --theme-main:#7f9479; --theme-accent:#5f735a; --theme-soft:#eef2ec; --theme-focus:rgba(127,148,121,.22); }
:root[data-theme="blue"] { --theme-main:#173f68; --theme-accent:#2969d8; --theme-soft:#e8f0ff; --theme-focus:rgba(41,105,216,.16); }
:root[data-theme="red"] { --theme-main:#6b2727; --theme-accent:#d34b45; --theme-soft:#fff0ef; --theme-focus:rgba(211,75,69,.16); }
:root[data-theme="purple"] { --theme-main:#4d2d68; --theme-accent:#8250bd; --theme-soft:#f2eafd; --theme-focus:rgba(130,80,189,.16); }
button,.sidebar,.auth-brand { background-color:var(--theme-main); }.mobile-menu-card.featured{border-color:var(--theme-accent)}.menu-icon.dashboard,.menu-icon.settings{background:var(--theme-soft);color:var(--theme-accent)}input:focus,select:focus,textarea:focus{outline-color:var(--theme-focus);border-color:var(--theme-accent)}.eyebrow,.user-menu a,.link-button{color:var(--theme-accent)}.dashboard-total-card{background:linear-gradient(135deg,var(--theme-main),var(--theme-accent))}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-top:1rem}.settings-card{padding:1.35rem;border:1px solid #d8e0e9;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(22,38,50,.06)}.settings-card h2{margin:.1rem 0}.settings-card>p{color:#687874}.theme-options{display:grid;grid-template-columns:repeat(4,1fr);gap:.55rem;margin:1rem 0}.theme-choice{display:grid;justify-items:center;gap:.35rem;margin:0;padding:.65rem .35rem;border:1px solid #d8e0e9;border-radius:10px;font-size:.75rem;cursor:pointer}.theme-choice input{width:auto;margin:0}.theme-choice span{width:30px;height:30px;border-radius:50%;background:#7f9479}.theme-choice.blue span{background:#2969d8}.theme-choice.red span{background:#d34b45}.theme-choice.purple span{background:#8250bd}.danger-zone{border-color:#efb1ad}.danger-zone h2{color:#a8322c}.danger-button{margin-top:1rem;background:#b93630!important}.master-clear-zone{border-color:#e7bd72}.master-clear-zone h2{color:#8a5711}.master-clear-button{margin-top:1rem;background:#a96816!important}@media(max-width:720px){.settings-grid{grid-template-columns:1fr}.theme-options{grid-template-columns:repeat(2,1fr)}}
.transaction-clear-zone{border-color:#e5a494}.transaction-clear-zone h2{color:#963f2f}.transaction-clear-button{margin-top:1rem;background:#b5543e!important}
.settings-heading{align-items:center}.settings-menu-wrap{position:relative;align-self:center}.settings-menu-button{display:grid;width:48px;height:48px;place-content:center;gap:5px;padding:0;border:1px solid #ccd7e3;border-radius:10px;background:#fff!important}.settings-menu-button span{display:block;width:23px;height:3px;border-radius:3px;background:#172334}.settings-menu-popover{position:absolute;z-index:30;top:54px;right:0;width:180px;padding:.4rem;border:1px solid #d5dde6;border-radius:10px;background:#fff;box-shadow:0 14px 35px rgba(19,34,56,.2)}.settings-menu-popover button{width:100%;padding:.7rem .8rem;text-align:left;color:#172334;background:#fff!important}.settings-menu-popover button+button{border-top:1px solid #e1e6ec;border-top-left-radius:0;border-top-right-radius:0}.settings-menu-popover button:hover,.settings-menu-popover button:focus-visible{background:#eef3f8!important}.language-options{display:grid;gap:.65rem;margin:1rem 0}.language-choice{display:flex;align-items:center;gap:.75rem;margin:0;padding:.8rem;border:1px solid #d8e0e9;border-radius:10px;cursor:pointer}.language-choice:has(input:checked){border-color:#2864e8;background:#eef4ff}.language-choice input{width:auto;margin:0}.language-choice strong,.language-choice small{display:block}.language-choice small{margin-top:.15rem;color:#718096}.manage-dialog{border-top:5px solid #2864e8}.manage-dialog>p{color:#687874}.admin-settings-grid{align-items:start}.admin-lock-button{align-self:center}.idle-value{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin:1.25rem 0 .8rem}.idle-value strong{color:#173f35;font-size:2.2rem;line-height:1}.idle-value span{color:#687874;text-align:right}.idle-slider{width:100%;height:10px;padding:0;border:0;border-radius:999px;outline:0;appearance:none;background:linear-gradient(90deg,#2864e8 0 var(--idle-percent),#d8e0e9 var(--idle-percent) 100%)}.idle-slider::-webkit-slider-thumb{width:28px;height:28px;border:4px solid #fff;border-radius:50%;appearance:none;background:#2864e8;box-shadow:0 2px 8px rgba(20,48,88,.35)}.idle-slider::-moz-range-thumb{width:20px;height:20px;border:4px solid #fff;border-radius:50%;background:#2864e8;box-shadow:0 2px 8px rgba(20,48,88,.35)}.idle-scale,.idle-seconds{display:grid;grid-template-columns:repeat(6,1fr);margin-top:.65rem;color:#53637a;font-size:.72rem}.idle-seconds{margin-top:.15rem;color:#87939f}.idle-scale span,.idle-seconds span{text-align:center}.idle-scale span:first-child,.idle-seconds span:first-child{text-align:left}.idle-scale span:last-child,.idle-seconds span:last-child{text-align:right}.idle-slider+.idle-scale{margin-bottom:0}.admin-settings-grid .full-button{margin-top:1.25rem}@media(max-width:720px){.settings-heading{grid-template-columns:46px minmax(0,1fr) 48px!important}.settings-heading .settings-menu-wrap{grid-column:3;grid-row:1;justify-self:end}.settings-heading .module-title{grid-column:2;grid-row:1}.idle-value{align-items:flex-start;flex-direction:column}.idle-value span{text-align:left}.admin-lock-button{grid-column:2;width:100%}}

/* Phase 25: Stock Branch Master */
.stock-branch-master{margin-top:1rem}.stock-branch-heading{display:grid;grid-template-columns:minmax(260px,1fr) auto;align-items:end;gap:1rem;margin-bottom:1rem}.stock-branch-heading select{min-width:320px}.stock-branch-count{display:grid;text-align:right}.stock-branch-count span{color:#687874;font-size:.82rem}.stock-branch-count strong{font-size:1.35rem}.stock-branch-tools{display:flex;align-items:center;gap:.6rem;margin:1rem 0}.stock-branch-tools select{min-width:220px;max-width:320px}.stock-branch-tools input{min-width:260px;max-width:430px}.stock-branch-tools .secondary-button{width:auto}.stock-branch-lines{max-height:580px;border:1px solid #e0e4e8;border-radius:10px}.stock-branch-lines input[type=checkbox]{width:22px;height:22px;margin:0}.stock-branch-lines td{white-space:normal}
.stock-branch-assignment-help{margin:1rem 0;padding:1rem 1.1rem;border:1px solid color-mix(in srgb,var(--theme-main) 30%,#dce2df);border-left:5px solid var(--theme-main);border-radius:12px;background:var(--theme-soft);color:#283b37}.stock-branch-assignment-help p{margin:.3rem 0}.stock-branch-assignment-help ul{margin:.35rem 0 .5rem;padding-left:1.35rem}.stock-branch-assignment-help small{color:#566c67}.stock-branch-lines input[type=number]{min-width:145px}
@media(max-width:640px){.stock-branch-heading{grid-template-columns:1fr}.stock-branch-heading select{min-width:0}.stock-branch-count{text-align:left}.stock-branch-tools{align-items:stretch;flex-direction:column}.stock-branch-tools select,.stock-branch-tools input,.stock-branch-tools .secondary-button{width:100%;max-width:none}.stock-branch-lines table,.stock-branch-lines tbody{display:block;width:100%}.stock-branch-lines thead{display:none}.stock-branch-lines tr{display:block;margin:10px;border:1px solid #e0e4e8;border-radius:10px}.stock-branch-lines td{display:grid;grid-template-columns:90px minmax(0,1fr);gap:8px;border:0}.stock-branch-lines td::before{content:attr(data-label);color:#687874;font-size:.72rem;font-weight:800;text-transform:uppercase}}

/* Phase 28: application menu and Pending Branch Orders */
.app-menu-wrap{position:relative;margin-left:auto}.app-menu-button{position:relative;display:grid;width:48px;height:48px;place-content:center;gap:5px;padding:0;border:1px solid #ccd7e3;border-radius:10px;background:#fff!important}.app-menu-button>span{display:block;width:23px;height:3px;border-radius:3px;background:#172334}.app-menu-badge{position:absolute;top:-8px;right:-8px;display:grid;min-width:24px;height:24px;place-items:center;padding:0 6px;border:2px solid #fff;border-radius:999px;color:#fff;background:#c8443b;box-shadow:0 3px 8px rgba(93,25,20,.25);font-size:.72rem;font-weight:900;line-height:1;pointer-events:none}.app-menu-popover{position:absolute;z-index:80;top:54px;right:0;width:240px;padding:.4rem;border:1px solid #d5dde6;border-radius:10px;background:#fff;box-shadow:0 14px 35px rgba(19,34,56,.2)}.app-menu-popover a,.app-menu-popover button{display:flex;width:100%;align-items:center;justify-content:space-between;gap:.75rem;padding:.75rem .8rem;border:0;color:#172334;text-align:left;text-decoration:none;background:#fff!important}.app-menu-popover a+*,.app-menu-popover button+*{border-top:1px solid #e1e6ec}.app-menu-popover a:hover,.app-menu-popover button:hover{background:#eef3f8!important}.app-menu-popover strong{min-width:25px;padding:.15rem .4rem;border-radius:999px;color:#fff;text-align:center;background:#c34a3d}
.pending-order-layout{display:grid;grid-template-columns:310px minmax(0,1fr);gap:1rem;align-items:start}.pending-order-list{padding:1rem;border:1px solid #dedbd1;border-radius:14px;background:#fff}.pending-order-documents{display:grid;gap:.55rem;margin-top:1rem}.pending-order-document{display:grid;gap:.2rem;padding:.8rem;border:1px solid #d8e0e9;color:#172334;text-align:left;background:#fff!important}.pending-order-document span,.pending-order-document small{color:#687874}.pending-order-document .pending-order-source{width:max-content;padding:.16rem .42rem;border-radius:999px;color:var(--theme-accent);background:var(--theme-soft);font-size:.68rem;font-weight:850;text-transform:uppercase}.pending-order-document.active{border-color:var(--theme-main);background:var(--theme-soft)!important}.pending-order-detail{min-width:0}.pending-order-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.pending-order-heading h2,.pending-order-heading p{margin:.2rem 0}.pending-order-selection-tools{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;margin-bottom:.75rem}.pending-order-selection-tools small{margin-left:auto;color:#687874}.compact-button{width:auto;padding:.55rem .8rem}.pending-order-lines{max-height:590px;border:1px solid #e1e5e8;border-radius:10px}.pending-order-lines td{white-space:normal}.pending-order-lines td:nth-child(2) small{display:block;color:#718096}.pending-order-lines input[type=number]{min-width:110px}.pending-order-check-column,.pending-order-check-cell{width:70px;text-align:center}.pending-order-check-cell input[type=checkbox]{width:22px;height:22px;min-width:22px;accent-color:var(--theme-main);cursor:pointer}.pending-order-lines tr{transition:background-color .16s ease,opacity .16s ease}.pending-order-lines .selected-order-row{background:var(--theme-soft)}.pending-order-lines .selected-order-row td{border-bottom-color:color-mix(in srgb,var(--theme-main) 25%,#e5e7eb)}.pending-order-lines .unselected-order-row{opacity:.58;background:#fff}.pending-order-lines .unselected-order-row input[type=number]{background:#eef1f3}.pending-order-actions{flex-wrap:wrap}
.pending-order-view-tabs{display:flex;gap:.55rem;margin-bottom:1rem}.pending-order-view-tabs button{width:auto;min-width:110px}.pending-order-history-filters{margin-bottom:1rem}.pending-order-history-filter-grid{grid-template-columns:repeat(4,minmax(150px,1fr))}.pending-order-history-search{display:flex;gap:.6rem;align-items:end;margin-top:.75rem}.pending-order-history-search input{flex:1}.pending-order-history-search button{width:auto;white-space:nowrap}.pending-order-history-card td small{display:block;color:#718096}.pending-order-history-actions{display:flex;gap:.4rem;flex-wrap:wrap}.pending-order-history-actions button{width:auto}.pending-order-history-actions .restore-action{color:#805800;background:#fff7db}.pending-order-history-detail{display:grid;gap:.45rem}.pending-order-history-detail>div{display:grid;grid-template-columns:minmax(230px,2fr) repeat(3,minmax(120px,1fr));gap:.8rem;padding:.55rem .7rem;border:1px solid #e1e5e8;border-radius:8px;background:#fff}.pending-order-history-detail small{display:block}.record-count{padding:.35rem .65rem;border-radius:999px;background:var(--theme-soft);font-weight:800}
@media(max-width:820px){.pending-order-layout{grid-template-columns:1fr}.pending-order-list{position:static}.pending-order-documents{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.pending-order-history-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pending-order-history-detail>div{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.pending-order-documents{grid-template-columns:1fr}.pending-order-selection-tools small{width:100%;margin-left:0}.pending-order-lines table,.pending-order-lines tbody{display:block;width:100%}.pending-order-lines thead{display:none}.pending-order-lines tr{display:block;margin:10px;border:1px solid #e0e4e8;border-radius:10px}.pending-order-lines td{display:grid;grid-template-columns:105px minmax(0,1fr);gap:8px;border:0}.pending-order-lines td::before{content:attr(data-label);color:#687874;font-size:.72rem;font-weight:800;text-transform:uppercase}.pending-order-check-cell{width:auto;text-align:left}.pending-order-actions{align-items:stretch;flex-direction:column}.pending-order-actions button{width:100%}}
@media(max-width:600px){.pending-order-history-filter-grid{grid-template-columns:1fr}.pending-order-history-search{align-items:stretch;flex-direction:column}.pending-order-history-search button{width:100%}.pending-order-history-detail>div{grid-template-columns:1fr}.pending-order-view-tabs button{flex:1}}

/* Phase 36 reports */
.report-menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.report-menu-card{display:grid;grid-template-columns:78px minmax(0,1fr) auto;align-items:center;gap:18px;padding:20px;border:1px solid #dce3df;border-radius:14px;color:#14241f;background:#fff;box-shadow:0 8px 24px rgba(28,51,43,.06);text-decoration:none}.report-menu-card:hover{border-color:var(--theme-main);transform:translateY(-1px)}.report-menu-card img{width:72px;height:72px;object-fit:contain}.report-menu-card span:nth-child(2){display:grid;gap:5px}.report-menu-card strong{font-size:1.15rem}.report-menu-card small{color:#65756f}.report-filter-card{display:grid;gap:14px;margin:18px 0}.report-date-filters{display:grid;grid-template-columns:minmax(150px,220px) minmax(150px,220px) minmax(260px,1fr);gap:12px}.report-stock-filters{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:12px}.report-filter-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.report-filter-actions>*{width:auto;min-width:120px}.report-export-link{display:inline-flex;min-height:46px;align-items:center;justify-content:center;padding:.8rem 1.1rem;border-radius:10px;color:#31443e;background:#e9ece9;font:inherit;font-weight:700;line-height:1;text-decoration:none;white-space:nowrap}.report-export-link:hover,.report-export-link:focus-visible{color:#20352f;background:#dce2df}.report-export-link.disabled{pointer-events:none;opacity:.5}.report-print-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:14px}.report-print-heading h2,.report-print-heading p{margin:.2rem 0}.report-summary-numbers{display:flex;gap:10px}.report-summary-numbers span{display:grid;min-width:135px;padding:10px 14px;border-radius:10px;background:var(--theme-soft)}.report-summary-numbers small{color:#687874;font-weight:750}.report-summary-numbers strong{font-size:1.2rem}.stock-ledger-report-table{border:1px solid #e0e5e2;border-radius:10px}.stock-ledger-report-table table{min-width:1180px}.stock-ledger-report-table td{white-space:normal}.stock-ledger-report-table td small{display:block;color:#6b7b76}.qty-in-value{color:#08785b}
@media(max-width:820px){.report-menu-grid{grid-template-columns:1fr}.report-date-filters,.report-stock-filters{grid-template-columns:1fr 1fr}.report-date-filters>div:last-child,.report-stock-filters>div:last-child{grid-column:1/-1}}
@media(max-width:600px){.report-menu-card{grid-template-columns:64px minmax(0,1fr) auto;padding:16px}.report-menu-card img{width:60px;height:60px}.report-date-filters,.report-stock-filters{grid-template-columns:1fr}.report-date-filters>div:last-child,.report-stock-filters>div:last-child{grid-column:auto}.report-filter-actions{align-items:stretch;flex-direction:column}.report-filter-actions>*{width:100%}.report-print-heading{align-items:stretch;flex-direction:column}.report-summary-numbers{display:grid;grid-template-columns:1fr 1fr}.report-summary-numbers span{min-width:0}.stock-ledger-report-table table,.stock-ledger-report-table tbody{display:block;width:100%;min-width:0}.stock-ledger-report-table thead{display:none}.stock-ledger-report-table tr{display:block;margin:10px;border:1px solid #e0e5e2;border-radius:10px}.stock-ledger-report-table td{display:grid;grid-template-columns:105px minmax(0,1fr);gap:9px;padding:7px 12px;border:0;overflow-wrap:anywhere}.stock-ledger-report-table td::before{content:attr(data-label);color:#687874;font-size:.7rem;font-weight:800;text-transform:uppercase}}
@media print{.stock-ledger-report-print{padding:0;border:0;box-shadow:none}.stock-ledger-report-print .inquiry-pager{display:none}.stock-ledger-report-table{overflow:visible;border:0}.stock-ledger-report-table table{min-width:0;font-size:8px}.stock-ledger-report-table th,.stock-ledger-report-table td{padding:5px}.report-print-heading{margin:0 0 8px}.report-summary-numbers span{padding:5px 8px}}
.sales-analysis-filters{display:grid;grid-template-columns:minmax(220px,1fr) minmax(260px,1.25fr) minmax(150px,220px);gap:12px}.sales-analysis-filters .stock-picker-trigger{height:50px;min-height:50px;padding:3px 8px}.sales-analysis-filters .stock-picker-trigger .stock-picker-thumbnail,.sales-analysis-filters .stock-picker-trigger .stock-picker-empty-photo{width:38px;height:38px;flex-basis:38px}.sales-analysis-report{display:grid;gap:16px}.sales-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.sales-kpi-grid article{display:grid;gap:5px;min-height:120px;padding:16px;border:1px solid #dce4e0;border-radius:14px;background:#fff;box-shadow:0 7px 20px rgba(28,51,43,.05)}.sales-kpi-grid small{color:#687874;font-size:.73rem;font-weight:800;text-transform:uppercase}.sales-kpi-grid strong{font-size:1.35rem;line-height:1.15;overflow-wrap:anywhere}.sales-kpi-grid span{align-self:end;color:#6b7b76;font-size:.8rem}.sales-quantity-note{margin:0;padding:10px 14px;border-left:4px solid var(--theme-main);border-radius:7px;color:#546660;background:var(--theme-soft)}.sales-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.sales-chart-card{min-width:0;padding:18px;border:1px solid #dce4e0;border-radius:14px;background:#fff;box-shadow:0 7px 20px rgba(28,51,43,.05)}.sales-category-chart{grid-column:1/-1}.sales-chart-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}.sales-chart-heading h3,.sales-chart-heading p{margin:.1rem 0}.sales-chart-heading>span{padding:5px 9px;border-radius:999px;color:#51645d;background:#eef2ef;font-size:.75rem;font-weight:800}.sales-horizontal-chart{display:grid;gap:11px;max-height:500px;overflow:auto}.sales-bar-row{display:grid;grid-template-columns:minmax(130px,190px) minmax(100px,1fr) 70px;align-items:center;gap:10px}.sales-bar-label{min-width:0}.sales-bar-label strong,.sales-bar-label small{display:block}.sales-bar-label small{overflow:hidden;color:#6b7b76;font-size:.7rem;text-overflow:ellipsis;white-space:nowrap}.sales-bar-track{height:16px;overflow:hidden;border-radius:999px;background:#e9efec}.sales-bar-track>span{display:block;height:100%;min-width:3px;border-radius:inherit;background:linear-gradient(90deg,var(--theme-main),var(--theme-accent))}.sales-bar-value{text-align:right}.sales-column-chart{display:flex;align-items:flex-end;gap:8px;min-height:260px;overflow-x:auto;padding:12px 4px 0}.sales-column-item{display:grid;grid-template-rows:25px 190px 25px;flex:1 0 48px;min-width:48px;text-align:center}.sales-column-item>strong{font-size:.68rem}.sales-column-item>small{font-size:.66rem}.sales-column-track{display:flex;align-items:flex-end;justify-content:center;height:185px;border-bottom:1px solid #ccd7d2;background:linear-gradient(to top,rgba(230,237,233,.55),transparent)}.sales-column-track>span{display:block;width:60%;min-height:3px;border-radius:5px 5px 0 0;background:var(--theme-main)}.sales-detail-card{margin-top:0}.sales-detail-table table{min-width:1240px}.sales-stock-thumbnail{display:grid;width:46px;height:46px;place-items:center;border:1px solid #d3dbe5;border-radius:8px;object-fit:cover;color:#82909d;background:#f3f6f8}.sales-sold-value{color:#08785b}
@media(max-width:900px){.sales-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sales-chart-grid{grid-template-columns:1fr}.sales-category-chart{grid-column:auto}}
@media(max-width:700px){.sales-analysis-filters{grid-template-columns:1fr}.sales-bar-row{grid-template-columns:minmax(110px,145px) minmax(80px,1fr) 55px}.sales-detail-table table,.sales-detail-table tbody{display:block;width:100%;min-width:0}.sales-detail-table thead{display:none}.sales-detail-table tr{display:block;margin:10px;border:1px solid #e0e5e2;border-radius:10px}.sales-detail-table td{display:grid;grid-template-columns:105px minmax(0,1fr);gap:9px;padding:7px 12px;border:0;overflow-wrap:anywhere}.sales-detail-table td::before{content:attr(data-label);color:#687874;font-size:.7rem;font-weight:800;text-transform:uppercase}}
@media(max-width:480px){.sales-kpi-grid{grid-template-columns:1fr}.sales-bar-row{grid-template-columns:1fr 55px}.sales-bar-track{grid-column:1}.sales-bar-value{grid-column:2;grid-row:2}.sales-bar-label small{white-space:normal}}
@media print{.stock-sales-report-print{gap:8px}.stock-sales-report-print .inquiry-pager,.stock-sales-report-print .sales-chart-grid,.stock-sales-report-print .sales-quantity-note{display:none}.sales-kpi-grid{grid-template-columns:repeat(4,1fr);gap:5px}.sales-kpi-grid article{min-height:0;padding:6px;box-shadow:none}.sales-kpi-grid strong{font-size:11px}.sales-detail-card{border:0;box-shadow:none}.sales-detail-table{overflow:visible;border:0}.sales-detail-table table{min-width:0;font-size:7px}.sales-detail-table th,.sales-detail-table td{padding:4px}.sales-stock-thumbnail{width:28px;height:28px}}
.sales-ranked-stock{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:8px;min-width:0}.sales-ranking-thumbnail{display:grid;width:40px;height:40px;place-items:center;border:1px solid #d3dbe5;border-radius:7px;object-fit:cover;color:#82909d;background:#f3f6f8}.sales-stock-thumbnail{width:52px;height:52px}.sales-photo-missing{display:grid;width:76px;min-height:52px;place-items:center;padding:4px;border:1px dashed #cbd5d0;border-radius:8px;color:#7c8b86;text-align:center;background:#f6f8f7}.sales-photo-missing>span{font-size:1rem;line-height:1}.sales-photo-missing small{font-size:.62rem;line-height:1.1}
@media(max-width:480px){.sales-ranked-stock{grid-template-columns:36px minmax(0,1fr)}.sales-ranking-thumbnail{width:36px;height:36px}}
.mobile-content .master-workspace.master-list-only-workspace{grid-template-columns:minmax(0,1fr)}.list-tools.standard-master-list-tools{grid-template-columns:minmax(260px,1fr) 150px auto auto}.list-tools.stock-list-tools{grid-template-columns:minmax(260px,1fr) minmax(190px,240px) 150px auto auto auto}.master-new-button,.master-back-link{display:inline-flex;min-height:46px;align-items:center;justify-content:center;padding:.8rem 1rem;border-radius:9px;font-weight:800;text-decoration:none}.master-new-button{color:#fff;background:var(--theme-main)}.master-new-button:hover,.master-new-button:focus-visible{color:#fff;background:var(--theme-accent)}.master-back-link{color:#31443e;background:#e9ece9}.master-editor-page{position:static;width:min(100%,760px);margin:1rem auto}.master-editor-page form{display:grid}.master-editor-actions{display:flex;justify-content:flex-end;gap:.65rem;margin-top:1.2rem}.master-editor-actions>*{width:auto;min-width:145px}.master-editor-page .password-reset{margin-top:1.2rem}
@media(max-width:900px){.list-tools.stock-list-tools{grid-template-columns:1fr 1fr}.list-tools.stock-list-tools input{grid-column:1/-1}.list-tools.stock-list-tools select:first-of-type{grid-column:1/-1}.list-tools.stock-list-tools>*{width:100%}}
@media(max-width:640px){.list-tools.standard-master-list-tools{grid-template-columns:1fr 1fr}.list-tools.standard-master-list-tools input,.list-tools.standard-master-list-tools select{grid-column:1/-1}.list-tools.standard-master-list-tools button,.list-tools.standard-master-list-tools .master-new-button{width:100%}.master-editor-page{margin-top:.75rem;padding:1rem}.master-editor-actions{display:grid;grid-template-columns:1fr 1fr}.master-editor-actions>*{width:100%;min-width:0}}

/* Phase 37: Reason Master and branch-order exclusions */
.reason-badge{display:inline-flex;align-items:center;padding:.32rem .58rem;border:1px solid transparent;border-radius:999px;font-size:.75rem;font-weight:800;white-space:normal}.reason-red{--reason-bg:#fff0ee;--reason-border:#efb8b2;--reason-text:#9a3029}.reason-amber{--reason-bg:#fff7db;--reason-border:#ead28a;--reason-text:#805800}.reason-blue{--reason-bg:#edf4ff;--reason-border:#b8cef2;--reason-text:#24589e}.reason-grey{--reason-bg:#f0f2f3;--reason-border:#cfd5d8;--reason-text:#4e5a60}.reason-green{--reason-bg:#e9f7f1;--reason-border:#b8ddcf;--reason-text:#195a45}.reason-badge.reason-red,.reason-badge.reason-amber,.reason-badge.reason-blue,.reason-badge.reason-grey,.reason-badge.reason-green{color:var(--reason-text);background:var(--reason-bg);border-color:var(--reason-border)}.reason-select.reason-red,.reason-select.reason-amber,.reason-select.reason-blue,.reason-select.reason-grey,.reason-select.reason-green{border-color:var(--reason-border);background:var(--reason-bg)}.not-supplied-section{margin-top:1.25rem;padding:1rem;border:1px solid #dedbd1;border-left:5px solid #bd7b20;border-radius:12px;background:#fffdf8}.not-supplied-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.not-supplied-heading h2,.not-supplied-heading p{margin:.15rem 0}.not-supplied-heading>span{padding:.3rem .55rem;border-radius:999px;color:#805800;background:#fff0bf;font-size:.78rem;font-weight:800}.not-supplied-section table{margin-top:.75rem}.not-supplied-row.reason-red td,.not-supplied-row.reason-amber td,.not-supplied-row.reason-blue td,.not-supplied-row.reason-grey td,.not-supplied-row.reason-green td{background:var(--reason-bg)}.transfer-note-not-supplied{break-inside:avoid;page-break-inside:avoid}.reason-list-table td{white-space:normal}@media(max-width:600px){.not-supplied-heading{flex-direction:column}.pending-order-lines .reason-select{min-width:0;width:100%}}@media print{.reason-badge,.not-supplied-row td{-webkit-print-color-adjust:exact;print-color-adjust:exact}.not-supplied-section{box-shadow:none}}

/* Phase 30: Stock Request Branch */
.stock-request-card{margin-top:1rem}.management-review-card{border-left:5px solid var(--theme-accent);background:var(--theme-soft)}.management-review-card h2{margin:.15rem 0}.management-review-card p:last-child{margin-bottom:0;color:#53655f}.stock-request-lines{max-height:600px;border:1px solid #e1e5e8;border-radius:10px}.stock-request-lines td{white-space:normal}.stock-request-lines td:first-child small{display:block;color:#718096}.stock-request-lines input[type=number]{min-width:140px}.stock-request-lines .ng-row td{background:#fff0ee}
.stock-request-stock{display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:12px;min-width:250px}
.stock-request-stock-text{min-width:0}
.stock-request-thumbnail{display:grid;width:52px;height:52px;place-items:center;border:1px solid #d3dbe5;border-radius:8px;object-fit:cover;color:#82909d;background:#f3f6f8}
.stock-request-thumbnail.stock-thumbnail-placeholder span{font-size:1.25rem}
@media(max-width:640px){.stock-request-lines table,.stock-request-lines tbody{display:block;width:100%}.stock-request-lines thead{display:none}.stock-request-lines tbody{padding:10px}.stock-request-lines tr{display:block;margin-bottom:10px;padding:7px 0;border:1px solid #e0e4e8;border-radius:10px}.stock-request-lines td{display:grid;grid-template-columns:105px minmax(0,1fr);gap:8px;padding:7px 12px;border:0}.stock-request-lines td::before{content:attr(data-label);color:#687874;font-size:.72rem;font-weight:800;text-transform:uppercase}.stock-request-lines input[type=number]{min-width:0}}
@media(max-width:640px){.stock-request-stock{min-width:0}}

/* Image-enabled stock selector */
.stock-image-picker{position:relative;min-width:0}
.stock-picker-trigger{display:grid;grid-template-columns:48px minmax(0,1fr) 20px;align-items:center;gap:10px;width:100%;min-height:64px;padding:7px 10px;border:1px solid #c9d5e3;border-radius:8px;color:#172334;text-align:left;background:#fff!important}
.stock-picker-trigger:focus-visible{outline:3px solid color-mix(in srgb,var(--theme-main) 24%,transparent);outline-offset:2px}
.stock-image-picker.disabled .stock-picker-trigger{cursor:not-allowed;opacity:.62;background:#eef1f4!important}
.stock-picker-thumbnail,.stock-picker-empty-photo{display:grid;width:46px;height:46px;place-items:center;flex:0 0 46px;border:1px solid #d4dde7;border-radius:8px;object-fit:cover;color:#82909d;background:#f3f6f8}
.stock-thumbnail-placeholder span,.stock-picker-empty-photo{font-size:1.25rem}
.stock-picker-copy{display:block;min-width:0}
.stock-picker-copy strong,.stock-picker-copy small{display:block;overflow:hidden;text-overflow:ellipsis}
.stock-picker-copy strong{color:#142238;font-size:.95rem;white-space:nowrap}
.stock-picker-copy small{margin-top:2px;color:#627185;font-size:.74rem;line-height:1.25;white-space:normal}
.stock-picker-placeholder{min-width:0;color:#566577;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stock-picker-chevron{justify-self:end;font-size:1.25rem}
.stock-picker-popover{position:absolute;z-index:90;top:calc(100% + 5px);right:0;left:0;overflow:hidden;border:1px solid #c8d2de;border-radius:10px;background:#fff;box-shadow:0 16px 38px rgba(20,34,51,.2)}
.stock-picker-search{width:calc(100% - 16px)!important;margin:8px;min-height:44px!important}
.stock-picker-options{max-height:330px;overflow:auto;border-top:1px solid #e1e6ec}
.stock-picker-option{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;min-height:62px;padding:7px 10px;border:0;border-bottom:1px solid #edf0f3;color:#172334;text-align:left;background:#fff!important}
.stock-picker-option:last-child{border-bottom:0}
.stock-picker-option:hover,.stock-picker-option:focus-visible{background:var(--theme-soft)!important}
.stock-picker-option.selected{box-shadow:inset 4px 0 0 var(--theme-main);background:var(--theme-soft)!important}
.stock-picker-detail{justify-self:end;padding-left:8px;color:#536276;font-size:.75rem;font-weight:750;white-space:nowrap}
.stock-picker-no-result{padding:20px;color:#69788a;text-align:center}
.stock-code-with-photo{display:grid;grid-template-columns:52px minmax(0,1fr);align-items:center;gap:10px}
.stock-code-with-photo .stock-picker-copy strong,.stock-code-with-photo .stock-picker-copy small{white-space:normal}
.daily-balance-photo-column{width:68px}
@media(max-width:540px){.stock-picker-popover{position:fixed;z-index:120;top:88px;right:12px;bottom:16px;left:12px;display:flex;flex-direction:column}.stock-picker-options{max-height:none;flex:1}.stock-picker-option{grid-template-columns:48px minmax(0,1fr)}.stock-picker-detail{grid-column:2;justify-self:start;padding-left:0}.daily-balance-lines td.stock-photo-cell{display:grid}}

/* Phase 39: management review of Stock In Branch line remarks */
.receipt-remark-filter-card{display:grid;gap:1rem}.receipt-remark-tabs{display:flex;gap:.6rem}.receipt-remark-tabs button{min-width:120px}.receipt-remark-tabs button.active{background:var(--theme-accent);color:#fff}.receipt-remark-date-filters{align-items:end}.receipt-remark-filter-actions{display:flex;gap:.6rem;align-items:end}.receipt-remark-list-card .history-heading{align-items:center}.receipt-remark-total{padding:.55rem .8rem;border-radius:999px;background:var(--theme-soft);color:var(--theme-ink)}.receipt-remark-row td{vertical-align:middle}.receipt-remark-row small{display:block;color:#718096;margin-top:2px}.receipt-branch-arrow{display:block;color:var(--theme-accent);font-weight:900;line-height:1}.receipt-remark-text{display:block;min-width:180px;padding:.55rem .7rem;border-left:4px solid #d99a28;border-radius:6px;background:#fff8df;color:#704900;font-weight:700}.receipt-remark-table .table-action{white-space:nowrap}
@media(max-width:720px){.receipt-remark-date-filters{grid-template-columns:1fr 1fr}.receipt-remark-filter-actions{grid-column:1/-1}.receipt-remark-filter-actions button{flex:1}.receipt-remark-tabs button{flex:1;min-width:0}.receipt-remark-total{font-size:.85rem}.receipt-remark-text{min-width:0}}
.receipt-remark-row td{font-size:.84rem}.receipt-remark-row strong{font-size:.88rem}.receipt-remark-row small{font-size:.72rem;line-height:1.25}.receipt-remark-row .receipt-branch-arrow{font-size:.8rem}.receipt-remark-row .receipt-remark-text{padding:.5rem .65rem;font-size:.82rem}.receipt-remark-table .table-action{font-size:.8rem}
.report-stock-filters .stock-picker-trigger{height:50px;min-height:50px;padding:3px 8px}.report-stock-filters .stock-picker-trigger .stock-picker-thumbnail,.report-stock-filters .stock-picker-trigger .stock-picker-empty-photo{width:38px;height:38px;flex-basis:38px}
.stock-image-picker .stock-picker-trigger{height:50px;min-height:50px;padding:3px 8px}.stock-image-picker .stock-picker-trigger .stock-picker-thumbnail,.stock-image-picker .stock-picker-trigger .stock-picker-empty-photo{width:38px;height:38px;flex-basis:38px}
.dashboard-module-menu { position: relative; margin-left: auto; align-self: flex-start; }
.dashboard-module-menu .dashboard-menu-toggle { min-width: 46px; min-height: 46px; font-size: 1.4rem; padding: 8px 12px; }
.dashboard-module-menu .dashboard-menu-dismiss { position: fixed; inset: 0; z-index: 40; width: 100%; height: 100%; background: transparent; border: 0; border-radius: 0; padding: 0; box-shadow: none; cursor: default; }
.dashboard-module-menu .dashboard-menu-dismiss:hover { background: transparent; }
.dashboard-menu-links { position: absolute; right: 0; top: calc(100% + 8px); z-index: 41; box-sizing: border-box; width: min(290px, calc(100vw - 32px)); padding: 8px; background: #fff; border: 1px solid #dce3df; border-radius: 12px; box-shadow: 0 8px 24px #172b3526; }
.dashboard-menu-links a { display: block; padding: 14px 12px; color: #172b35; text-decoration: none; border-radius: 8px; font-weight: 700; white-space: normal; }
.dashboard-menu-links a:hover, .dashboard-menu-links a:focus-visible { background: var(--theme-soft, #eef2eb); }
.management-dashboard-filters { display: grid; grid-template-columns: minmax(150px,220px) minmax(220px,300px) auto; align-items: end; gap: 12px; }
.management-dashboard-filters input,.management-dashboard-filters select,.management-dashboard-filters button { box-sizing: border-box; height: 50px; margin-bottom: 0; }
@media(max-width:600px) { .management-dashboard-filters { grid-template-columns: 1fr; } }
.dashboard-submission-options { padding: 0 20px; }
.dashboard-submission-options .dashboard-submission-check { display: inline-flex; align-items: center; gap: 12px; box-sizing: border-box; max-width: 100%; min-height: 48px; margin: 0 0 8px; padding: 12px 16px; border: 1px solid #dce3df; border-radius: 10px; background: var(--theme-soft, #eef2eb); color: #24392f; cursor: pointer; line-height: 1.4; }
.dashboard-submission-check input[type="checkbox"] { appearance: auto; display: inline-block; flex: 0 0 20px; width: 20px; height: 20px; min-width: 20px; min-height: 20px; margin: 0; padding: 0; box-shadow: none; accent-color: var(--theme-main, #71856b); cursor: pointer; }
.dashboard-submission-check input[type="checkbox"]:focus-visible { outline: 2px solid #31443e; outline-offset: 3px; }
