:root {
    --navy-950: #0b1f33;
    --navy-900: #102a43;
    --navy-800: #173f5f;
    --blue-600: #2563eb;
    --blue-50: #eff6ff;
    --green-600: #159a62;
    --red-600: #dc4553;
    --amber-500: #e99a16;
    --canvas: #f4f7fb;
    --ink: #172b3f;
    --muted: #68788a;
    --line: #e3eaf2;
    --sidebar-width: 272px;
    --radius: 16px;
    --shadow: 0 8px 28px rgba(22, 44, 72, .07);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { text-underline-offset: 3px; }
button, a, input, select, textarea { touch-action: manipulation; }
.app-body { background: var(--canvas); }
.auth-body { background: #f5f7fb; }
.app-shell { min-height: 100vh; }
.offcanvas-lg.app-sidebar { --bs-offcanvas-width: var(--sidebar-width); --bs-offcanvas-bg: var(--navy-950); width: var(--sidebar-width); color: #d9e4ee; background-color: var(--navy-950) !important; border: 0; z-index: 1045; }
.sidebar-head { height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 0 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-head .btn-close { filter: invert(1); }
.sidebar-brand { display: flex; align-items: center; gap: .8rem; color: #fff; text-decoration: none; letter-spacing: .06em; }
.sidebar-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.1; }
.sidebar-brand strong { font-size: .98rem; }
.sidebar-brand small { margin-top: .28rem; color: #88a2b8; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; color: var(--navy-950); background: #f2b84b; border-radius: 13px; font-size: 1.2rem; box-shadow: 0 8px 20px rgba(242,184,75,.2); }
.sidebar-user { display: flex; gap: .7rem; align-items: center; margin: 1.1rem 1rem .2rem; padding: .8rem; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.07); border-radius: 13px; }
.sidebar-user > div { min-width: 0; display: flex; flex-direction: column; }
.sidebar-user strong { overflow: hidden; color: #fff; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: #8ca5bb; font-size: .72rem; }
.user-avatar { display: inline-grid; flex: 0 0 34px; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--navy-800); border-radius: 11px; }
.sidebar-nav { padding: .65rem .7rem 1rem; }
.nav-section-label { display: block; padding: 1.15rem .7rem .42rem; color: #69839a; font-size: .63rem; font-weight: 800; letter-spacing: .14em; }
.sidebar-link { display: flex; align-items: center; gap: .78rem; margin: .14rem 0; padding: .7rem .78rem; color: #afc1d1; border-radius: 11px; text-decoration: none; transition: .16s ease; }
.sidebar-link i { width: 1.25rem; color: #7892a9; text-align: center; }
.sidebar-link span { font-size: .87rem; }
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-link:hover i { color: #f2b84b; }
.sidebar-link.active { color: #fff; background: #183d5d; box-shadow: inset 3px 0 #f2b84b; font-weight: 700; }
.sidebar-link.active i { color: #f2b84b; }
.nav-badge { margin-left: auto; min-width: 23px; padding: .18rem .4rem; color: #182b3f; background: #f2b84b; border-radius: 999px; font-size: .67rem; text-align: center; }
.sidebar-footer { padding: 1rem; border-top: 1px solid rgba(255,255,255,.08); }
.logout-link { display: flex; gap: .65rem; align-items: center; justify-content: center; padding: .7rem; color: #f2b8be; border: 1px solid rgba(238,126,139,.28); border-radius: 11px; font-size: .84rem; text-decoration: none; }
.logout-link:hover { color: #fff; background: rgba(220,69,83,.15); }

.app-main { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.app-topbar { position: sticky; top: 0; z-index: 1020; height: 82px; display: flex; align-items: center; gap: 1rem; padding: 0 clamp(1rem, 3vw, 2rem); color: #fff; background: var(--navy-900); box-shadow: 0 4px 18px rgba(9,30,48,.12); }
.topbar-title { display: flex; min-width: 0; flex-direction: column; line-height: 1.15; }
.topbar-title small { margin-bottom: .2rem; color: #9eb2c4; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.topbar-title strong { overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { flex: 0 0 auto; }
.menu-button { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; font-size: 1.4rem; }
.app-content { width: min(100%, 1560px); padding: clamp(1rem, 2.4vw, 2rem); flex: 1; }
.app-footer { padding: 1rem 2rem 1.5rem; color: var(--muted); font-size: .76rem; text-align: center; }
.app-public-nav { background: var(--navy-900); }
.app-alert { border: 0; border-radius: 13px; box-shadow: var(--shadow); }

.page-head, .page-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.35rem; padding: 0; background: transparent; box-shadow: none; }
.page-head h1, .page-heading h1 { margin: 0; color: var(--navy-900); font-size: clamp(1.55rem, 2.7vw, 2.15rem); font-weight: 800; letter-spacing: -.035em; }
.page-head p, .page-heading p { max-width: 680px; margin: .35rem 0 0; color: var(--muted); }
.eyebrow { display: block; margin-bottom: .3rem; color: var(--blue-600); font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.surface-card, .dashboard-card, .card.border-0.shadow-sm { background: #fff; border: 1px solid var(--line) !important; border-radius: var(--radius); box-shadow: var(--shadow) !important; overflow: hidden; }
.surface-header, .dashboard-card .card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.2rem; color: var(--navy-900); background: #fff; border-bottom: 1px solid var(--line); font-weight: 800; }
.surface-body { padding: 1.2rem; }
.info-strip { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1.25rem; padding: .9rem 1rem; color: #284f70; background: #eaf4ff; border: 1px solid #d4e8fb; border-radius: 13px; font-size: .86rem; }
.info-strip i { color: var(--blue-600); font-size: 1.1rem; }

.btn { border-radius: 10px; font-weight: 700; }
.btn-primary { --bs-btn-bg: var(--blue-600); --bs-btn-border-color: var(--blue-600); --bs-btn-hover-bg: #1d4ed8; --bs-btn-hover-border-color: #1d4ed8; }
.form-label { margin-bottom: .38rem; color: #42566a; font-size: .78rem; font-weight: 750; }
.form-control, .form-select { min-height: 44px; border-color: #d8e1eb; border-radius: 10px; }
.form-control:focus, .form-select:focus { border-color: #7ca5ee; box-shadow: 0 0 0 .22rem rgba(37,99,235,.12); }
.form-hint { display: block; margin-top: .38rem; color: var(--muted); font-size: .73rem; }
.transaction-form { padding: 1.25rem; }
.transaction-preview { height: 100%; padding: 1.25rem; color: #d8e5ef; background: var(--navy-900); border-radius: var(--radius); }
.transaction-preview h2 { color: #fff; font-size: 1.15rem; font-weight: 800; }
.preview-step { display: flex; gap: .7rem; margin-top: 1rem; }
.preview-step span { display: inline-grid; flex: 0 0 27px; place-items: center; width: 27px; height: 27px; color: var(--navy-900); background: #f2b84b; border-radius: 50%; font-size: .72rem; font-weight: 900; }
.preview-step strong { display: block; color: #fff; font-size: .82rem; }
.preview-step small { color: #94acbf; }

.stat-card { display: flex; align-items: center; min-height: 105px; padding: .9rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-icon { display: grid; flex: 0 0 56px; place-items: center; width: 56px; height: 56px; color: #fff; border-radius: 14px; font-size: 1.3rem; }
.stat-icon.blue { background: var(--blue-600); } .stat-icon.green { background: var(--green-600); } .stat-icon.orange { background: var(--amber-500); } .stat-icon.red { background: var(--red-600); } .stat-icon.cyan { background: #0e9aac; }
.stat-body { display: flex; min-width: 0; padding: 0 .9rem; flex-direction: column; }
.stat-label { color: var(--muted); font-size: .74rem; font-weight: 700; }
.stat-value { color: var(--navy-900); font-size: 1.55rem; font-weight: 850; letter-spacing: -.03em; }
.chart-wrap { position: relative; height: 310px; } .chart-wrap.small { height: 280px; }

.table-responsive { overflow: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
.table { --bs-table-color: var(--ink); }
.table > :not(caption) > * > * { padding: .85rem .9rem; border-bottom-color: #edf1f5; }
.table thead th { color: #667789; background: #f7f9fc; font-size: .68rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.dashboard-table { min-width: 590px; }
.batch-detail-table { min-width: 680px; }
.audit-table { min-width: 920px; }
.approval-table { min-width: 860px; }
.inventory-table .product-cell { min-width: 245px; }
.product-cell { display: flex; align-items: center; gap: .75rem; }
.product-thumb { display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; overflow: hidden; color: #7f92a4; background: #eaf0f6; border-radius: 11px; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-cell strong { display: block; color: var(--navy-900); }
.product-cell small { color: var(--muted); }
.stock-pill { display: inline-grid; min-width: 38px; place-items: center; padding: .35rem .45rem; color: #16603f; background: #e9f8f0; border-radius: 9px; font-weight: 800; }
.stock-pill.empty { color: #9c3d46; background: #fff0f1; }
.stock-pill.low { color: #8b5b08; background: #fff6df; }
.size-input-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .65rem; }
.size-input-grid label { display: block; color: var(--muted); font-size: .68rem; font-weight: 800; text-align: center; }
.size-input-grid input { padding-inline: .45rem; text-align: center; }

.stock-size-grid { display: grid; grid-template-columns: repeat(5, minmax(88px, 1fr)); gap: .8rem; }
.stock-size-card { padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.stock-size-card .size { color: var(--muted); font-size: .72rem; font-weight: 800; }
.stock-size-card .balance { display: block; margin: .1rem 0 .4rem; color: var(--navy-900); font-size: 1.75rem; font-weight: 850; }
.stock-size-card .flow { display: flex; gap: .55rem; color: var(--muted); font-size: .67rem; }
.stock-size-card .flow .in { color: var(--green-600); } .stock-size-card .flow .out { color: var(--red-600); }
.stock-flow-notification-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.stock-flow-notification { position: relative; display: flex; min-width: 0; gap: .9rem; padding: 1.1rem; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stock-flow-notification::after { content: ''; position: absolute; inset: 0 0 auto; height: 4px; }
.stock-flow-notification.incoming::after { background: var(--green-600); }
.stock-flow-notification.outgoing::after { background: var(--red-600); }
.stock-flow-icon { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border-radius: 13px; font-size: 1.25rem; }
.incoming .stock-flow-icon { color: #13784b; background: #e4f8ed; }
.outgoing .stock-flow-icon { color: #c63b49; background: #ffe9eb; }
.stock-flow-content { min-width: 0; flex: 1; }
.stock-flow-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.stock-flow-heading > div { display: flex; flex-direction: column; }
.stock-flow-heading > div > span { color: var(--muted); font-size: .65rem; font-weight: 850; letter-spacing: .08em; }
.stock-flow-heading > div > strong { margin-top: .12rem; color: var(--navy-900); font-size: 1.55rem; font-weight: 900; line-height: 1.1; }
.incoming .stock-flow-heading > div > strong { color: #13784b; }
.outgoing .stock-flow-heading > div > strong { color: #c63b49; }
.stock-flow-heading strong small { font-size: .67rem; font-weight: 750; }
.stock-flow-count { flex: 0 0 auto; padding: .34rem .5rem; color: #64778a; background: #f3f6f9; border-radius: 999px; font-size: .62rem; font-weight: 750; }
.stock-flow-latest { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .65rem; align-items: center; margin-top: .8rem; padding: .7rem .75rem; background: #f8fafc; border: 1px solid #edf1f5; border-radius: 10px; }
.stock-flow-latest-label { color: #8392a1; font-size: .56rem; font-weight: 850; letter-spacing: .07em; }
.stock-flow-latest > div { display: flex; min-width: 0; flex-direction: column; }
.stock-flow-latest > div strong { overflow: hidden; color: var(--navy-900); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.stock-flow-latest > div span { overflow: hidden; color: var(--muted); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.stock-flow-latest time { color: var(--muted); font-size: .6rem; white-space: nowrap; }
.stock-flow-empty { display: flex; gap: .45rem; align-items: center; margin-top: .8rem; padding: .75rem; color: var(--muted); background: #f8fafc; border: 1px dashed #dbe3ec; border-radius: 10px; font-size: .7rem; }
.stock-flow-link { display: inline-flex; gap: .35rem; align-items: center; margin-top: .7rem; color: var(--blue-600); font-size: .68rem; font-weight: 750; text-decoration: none; }
.incoming .stock-flow-link { color: #13784b; }
.outgoing .stock-flow-link { color: #c63b49; }
.stock-flow-link:hover { text-decoration: underline; }
.movement-line { position: relative; padding-left: 2.25rem; }
.movement-line::before { content: ''; position: absolute; top: 0; bottom: -1rem; left: .83rem; width: 1px; background: var(--line); }
.movement-line:last-child::before { bottom: 50%; }
.movement-dot { position: absolute; top: .15rem; left: .32rem; display: grid; place-items: center; width: 25px; height: 25px; color: #fff; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); font-size: .62rem; }
.movement-dot.in { background: var(--green-600); } .movement-dot.out { background: var(--red-600); }
.mutation-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; }
.mutation-icon.in { color: #18864b; background: #e2f7eb; } .mutation-icon.out { color: #d33f3f; background: #ffe8e8; }

.request-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.request-card + .request-card { margin-top: .85rem; }
.request-main { display: grid; grid-template-columns: minmax(230px, 1.25fr) minmax(180px, .8fr) minmax(250px, 1fr); gap: 1rem; align-items: center; padding: 1rem 1.15rem; }
.request-meta { color: var(--muted); font-size: .76rem; }
.request-bundle-card + .request-bundle-card { margin-top: 1rem; }
.request-bundle-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; background: #fff; border-bottom: 1px solid var(--line); }
.request-bundle-body { padding: .35rem 1.15rem .8rem; }
.request-bundle-body .table thead th { background: transparent; }
.request-bundle-foot { padding: .8rem 1.15rem 1rem; background: #fbfcfe; border-top: 1px solid var(--line); }
.request-bundle-foot .status-track { max-width: 540px; margin-inline: auto; }
.status-labels { display: flex; max-width: 600px; justify-content: space-between; margin: .45rem auto 0; color: var(--muted); font-size: .64rem; }
.request-note { display: flex; gap: .65rem; align-items: flex-start; margin-top: .65rem; padding: .7rem .8rem; color: #40566c; background: #f3f7fb; border-radius: 10px; }
.request-note i { color: var(--blue-600); }
.request-note > div { display: flex; flex-direction: column; }
.request-note small { color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.request-note span { font-size: .78rem; }
.batch-summary-card { display: flex; height: 100%; min-height: 320px; overflow: hidden; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgba(16, 42, 67, .06); transition: transform .16s ease, box-shadow .16s ease; }
.batch-summary-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(16, 42, 67, .1); }
.batch-summary-card::before { content: ''; display: block; width: 100%; height: 4px; background: var(--blue-600); }
.batch-summary-card.status-pending::before { background: #f2b84b; }
.batch-summary-card.status-approved::before { background: var(--blue-600); }
.batch-summary-card.status-sent::before { background: #20a4c8; }
.batch-summary-card.status-completed::before { background: var(--green-600); }
.batch-summary-card.status-rejected::before { background: var(--red-600); }
.batch-summary-top { display: flex; align-items: center; gap: .55rem; padding: 1rem 1rem .45rem; }
.batch-summary-top time { margin-left: auto; color: var(--muted); font-size: .62rem; }
.batch-summary-icon { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; color: var(--blue-600); background: #edf3ff; border-radius: 9px; }
.batch-summary-number { display: inline-flex; width: fit-content; margin: .45rem 1rem 0; align-items: center; gap: .45rem; color: var(--navy-900); font-size: 1.35rem; font-weight: 900; letter-spacing: -.02em; text-decoration: none; }
.batch-summary-number i { color: var(--blue-600); font-size: .85rem; transition: transform .15s ease; }
.batch-summary-number:hover { color: var(--blue-600); }
.batch-summary-number:hover i { transform: translate(2px, -2px); }
.batch-summary-owner { display: flex; margin: .7rem 1rem 0; flex-direction: column; }
.batch-summary-owner span, .batch-summary-metrics span { color: var(--muted); font-size: .56rem; font-weight: 850; letter-spacing: .07em; }
.batch-summary-owner strong { color: #334e68; font-size: .72rem; }
.batch-summary-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem; }
.batch-summary-metrics > div { min-width: 0; padding: .7rem; background: #f7f9fc; border: 1px solid #e9eef4; border-radius: 10px; }
.batch-summary-metrics span { display: block; }
.batch-summary-metrics strong { display: block; margin-top: .15rem; color: var(--navy-900); font-size: 1rem; font-weight: 900; }
.batch-summary-metrics small { color: var(--muted); font-size: .58rem; }
.batch-summary-state { display: flex; gap: .5rem; align-items: center; margin: 0 1rem 1rem; padding: .65rem .75rem; color: #496276; background: #f2f7fb; border-radius: 10px; font-size: .67rem; }
.batch-summary-state i { color: var(--blue-600); }
.batch-summary-card footer { display: flex; margin-top: auto; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 1rem; background: #fbfcfe; border-top: 1px solid var(--line); }
.batch-summary-card footer > span { color: var(--muted); font-size: .58rem; }
.batch-summary-card footer a { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .3rem; color: var(--blue-600); font-size: .66rem; font-weight: 850; text-decoration: none; }
.batch-summary-card footer a:hover { text-decoration: underline; }
.approval-form { margin: -.35rem -1.15rem -.8rem; }
.approval-form.detail-approval-form { margin: 0; }
.approval-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1.15rem; background: #f7faff; border-bottom: 1px solid #e3eaf2; }
.approval-toolbar > div { display: flex; flex-direction: column; }
.approval-toolbar strong { color: var(--navy-900); font-size: .82rem; }
.approval-toolbar small { color: var(--muted); font-size: .66rem; }
.approval-table th:first-child, .approval-table td:first-child { width: 58px; }
.approval-table tbody tr { transition: background .15s ease, opacity .15s ease; }
.approval-table tbody tr:not(.is-selected) { background: #fcfcfd; opacity: .78; }
.approval-table tbody tr.is-selected { background: #f5f9ff; }
.approval-table .form-check-input { width: 1.15rem; height: 1.15rem; cursor: pointer; }
.approval-quantity { min-width: 115px; max-width: 135px; }
.approval-reason { min-width: 220px; }
.approval-submit-panel { display: flex; align-items: end; gap: 1rem; padding: 1rem 1.15rem; background: #fbfcfe; border-top: 1px solid #e3eaf2; }
.approval-submit-panel .form-label { margin-bottom: .3rem; color: #52677c; font-size: .62rem; font-weight: 850; letter-spacing: .06em; }
.approval-submit-panel .btn { flex: 0 0 auto; min-height: 38px; }
.status-track { display: flex; align-items: center; gap: .28rem; }
.status-node { width: 8px; height: 8px; background: #dce3eb; border-radius: 50%; }
.status-node.done { background: var(--green-600); } .status-node.current { width: 11px; height: 11px; background: var(--blue-600); box-shadow: 0 0 0 4px #e5eeff; }
.request-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.filter-pills { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; overscroll-behavior-inline: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pill { padding: .48rem .72rem; color: #657689; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: .76rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.filter-pill.active { color: #fff; background: var(--navy-900); border-color: var(--navy-900); }

.product-card { height: 100%; transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(15,35,55,.11) !important; }
.product-image { height: 200px; object-fit: cover; background: #e9eef4; }
.request-product-card { height: 100%; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .16s ease, box-shadow .16s ease; }
.request-product-card.has-selection { border-color: #8aabe8; box-shadow: 0 10px 30px rgba(37,99,235,.12); }
.request-product-head { display: flex; align-items: flex-start; gap: .8rem; min-height: 76px; }
.request-product-head .h5 { color: var(--navy-900); font-weight: 800; }
.request-product-head small { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.request-thumb { width: 58px; height: 58px; flex-basis: 58px; }
.min-w-0 { min-width: 0; }
.variant-order-grid { display: grid; grid-template-columns: repeat(5, minmax(52px, 1fr)); gap: .45rem; margin-top: 1rem; }
.variant-order-field { display: flex; min-width: 0; padding: .5rem .4rem; align-items: center; flex-direction: column; background: #f7f9fc; border: 1px solid #e5ebf2; border-radius: 11px; cursor: text; }
.variant-order-field:focus-within { background: #fff; border-color: #7ca5ee; box-shadow: 0 0 0 .2rem rgba(37,99,235,.1); }
.variant-order-field.empty { opacity: .52; cursor: not-allowed; }
.variant-size { color: var(--navy-900); font-size: .72rem; font-weight: 850; }
.variant-order-field .form-control { width: 100%; min-height: 38px; margin: .35rem 0 .25rem; padding: .25rem; font-size: .92rem; font-weight: 800; text-align: center; background: #fff; }
.variant-stock { color: var(--muted); font-size: .58rem; white-space: nowrap; }
.request-product-foot { display: flex; justify-content: space-between; margin-top: .8rem; padding-top: .7rem; color: var(--muted); border-top: 1px solid #edf1f5; font-size: .72rem; }
.request-product-card.has-selection .request-product-foot > span { color: var(--blue-600); }
.order-summary { position: sticky; top: 102px; padding: 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.order-summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.order-summary-head h2 { margin: 0; color: var(--navy-900); font-size: 1.25rem; font-weight: 850; }
.order-count-badge { padding: .35rem .55rem; color: var(--blue-600); background: var(--blue-50); border-radius: 999px; font-size: .68rem; white-space: nowrap; }
.order-summary-items { max-height: 310px; min-height: 125px; overflow: auto; padding: .5rem 0; }
.order-empty { display: flex; min-height: 125px; align-items: center; justify-content: center; color: var(--muted); flex-direction: column; text-align: center; }
.order-empty i { margin-bottom: .35rem; color: #a6b6c6; font-size: 1.65rem; }
.order-empty strong { color: #526578; font-size: .82rem; }
.order-empty span { margin-top: .2rem; font-size: .7rem; }
.order-summary-line { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .62rem .15rem; border-bottom: 1px solid #edf1f5; }
.order-summary-line > div { display: flex; min-width: 0; flex-direction: column; }
.order-summary-line strong { overflow: hidden; color: var(--navy-900); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.order-summary-line span { color: var(--muted); font-size: .66rem; }
.order-summary-line b { color: var(--blue-600); font-size: .76rem; white-space: nowrap; }
.order-summary-total { display: flex; align-items: center; justify-content: space-between; margin: 0 0 1rem; padding: .85rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.order-summary-total span { color: var(--muted); font-size: .78rem; }
.order-summary-total strong { color: var(--navy-900); font-size: 1rem; }
.form-card { max-width: 560px; margin-inline: auto; }
.empty-state { padding: 3.5rem 1rem; color: var(--muted); text-align: center; }
.empty-state i { display: block; margin-bottom: .65rem; color: #a8b7c6; font-size: 2.2rem; }
.breadcrumb { font-size: .78rem; }

.batch-builder-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.batch-builder-head h2 { margin: 0; color: var(--navy-900); font-size: 1.08rem; font-weight: 850; }
.batch-builder-head p { margin: .2rem 0 0; color: var(--muted); font-size: .76rem; }
.batch-lines { display: grid; gap: .75rem; }
.batch-line { position: relative; display: block; padding: .9rem; background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; }
.batch-line:focus-within { background: #fff; border-color: #b9cbed; box-shadow: 0 5px 20px rgba(37,99,235,.07); }
.batch-line-main { display: grid; grid-template-columns: 34px minmax(180px, 1.2fr) minmax(115px, .65fr) minmax(190px, 1fr) minmax(170px, 1fr) 42px; gap: .65rem; align-items: end; }
.batch-line-number { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 7px; color: #fff; background: var(--navy-900); border-radius: 9px; font-size: .74rem; font-weight: 850; }
.batch-field { min-width: 0; }
.batch-field .form-label { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.batch-field .form-control, .batch-field .form-select { min-height: 42px; font-size: .84rem; }
.line-stock-hint { display: block; overflow: hidden; margin: .25rem 0 -.25rem; color: var(--muted); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.batch-remove-line { width: 42px; height: 42px; margin-bottom: 0; padding: 0; color: var(--red-600); }
.batch-remove-line:disabled { opacity: .28; }
.batch-size-entry { margin: .9rem 0 0 34px; padding-top: .8rem; border-top: 1px solid #e3eaf2; }
.batch-size-entry-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .55rem; }
.batch-size-entry-head strong { color: #42566a; font-size: .72rem; }
.batch-size-entry-head span { color: var(--muted); font-size: .65rem; }
.batch-size-quantity-grid { display: grid; grid-template-columns: repeat(5, minmax(72px, 1fr)); gap: .65rem; }
.batch-size-field { display: flex; min-width: 0; align-items: center; flex-direction: column; }
.batch-size-field > span { margin-bottom: .3rem; color: #52677b; font-size: .68rem; font-weight: 850; }
.batch-size-field .form-control { min-height: 48px; padding-inline: .4rem; font-size: 1rem; font-weight: 750; text-align: center; }
.batch-size-field .form-control:disabled { color: #9ba8b5; background: #eef2f6; }
.line-size-stock { margin-top: .28rem; color: var(--muted); font-size: .58rem; }
.batch-total-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 1rem; padding: 1rem; background: var(--navy-900); border-radius: 14px; }
.batch-total-bar > div { display: flex; min-width: 78px; flex-direction: column; }
.batch-total-bar small { color: #90a8ba; font-size: .62rem; font-weight: 800; letter-spacing: .06em; }
.batch-total-bar strong { color: #fff; font-size: 1.2rem; }
.batch-total-bar .text-success strong { color: #59d58b; }
.batch-total-bar .text-danger strong { color: #ff8490; }
.batch-safety-note { display: flex; gap: .65rem; align-items: flex-start; margin-top: .8rem; padding: .8rem .9rem; color: #365775; background: #edf6ff; border-radius: 11px; font-size: .75rem; }
.batch-safety-note i { color: var(--blue-600); font-size: 1rem; }
.batch-history-list { display: grid; gap: .7rem; }
.batch-history-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; transition: border-color .18s ease, box-shadow .18s ease; }
.batch-history-card.is-focused { border-color: #7fa4ea; box-shadow: 0 0 0 4px rgba(37,99,235,.08); }
.batch-history-head { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; color: inherit; background: #fff; border: 0; text-align: left; }
.batch-history-head:hover { background: #f9fbfd; }
.batch-number { display: flex; min-width: 0; align-items: center; gap: .7rem; }
.batch-number > i { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; color: var(--blue-600); background: var(--blue-50); border-radius: 10px; }
.batch-number > span { display: flex; min-width: 0; flex-direction: column; }
.batch-number strong { overflow: hidden; color: var(--navy-900); font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
.batch-number small { color: var(--muted); font-size: .66rem; }
.batch-flow-summary { display: flex; flex: 0 0 auto; align-items: center; gap: .8rem; }
.batch-flow-summary b { font-size: .82rem; }
.batch-flow-summary small { color: var(--muted); font-size: .68rem; }
.batch-history-head[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }
.batch-history-head .bi-chevron-down { transition: transform .18s ease; }
.batch-history-body { padding: 0 1rem 1rem; background: #fff; border-top: 1px solid #edf1f5; }
.batch-note { display: flex; gap: .55rem; align-items: flex-start; margin: .8rem 0 .2rem; padding: .65rem .75rem; color: #40566c; background: #f3f7fb; border-radius: 9px; font-size: .75rem; }
.batch-note i { color: var(--blue-600); }

.stock-refresh { display: inline-flex; align-items: center; gap: .4rem; padding: .58rem .72rem; color: #566a7d; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: .72rem; font-weight: 700; }
.stat-value small { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: 0; }
.monitor-size-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; }
.monitor-size-card { position: relative; min-width: 0; padding: 1rem; background: linear-gradient(145deg, #f6fbff, #fff); border: 1px solid #dfeaf4; border-radius: 13px; }
.monitor-size-card.empty { background: #fff7f8; border-color: #f2dfe2; }
.monitor-size-name { position: absolute; top: .8rem; right: .8rem; display: grid; min-width: 31px; height: 31px; place-items: center; padding: 0 .4rem; color: var(--blue-600); background: #e7efff; border-radius: 9px; font-size: .72rem; font-weight: 900; }
.monitor-size-card > strong { display: block; color: var(--navy-900); font-size: 1.55rem; font-weight: 850; }
.monitor-size-card > small { display: block; color: var(--muted); font-size: .68rem; }
.monitor-size-card > div { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .65rem; padding-top: .55rem; color: #438063; border-top: 1px solid #e9eef4; font-size: .62rem; }
.monitor-size-card > div span { display: inline-flex; align-items: center; gap: .25rem; }
.monitor-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; }
.monitor-search { width: min(100%, 430px); }
.monitor-search .input-group-text { color: #718397; background: #f8fafc; border-color: #d8e1eb; }
.monitor-product-card { height: 100%; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: transform .16s ease, box-shadow .16s ease; }
.monitor-product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.monitor-product-head { display: flex; gap: .75rem; align-items: center; padding: 1rem; }
.monitor-product-head h2 { overflow: hidden; margin: 0; color: var(--navy-900); font-size: .95rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.monitor-product-head p { display: -webkit-box; overflow: hidden; margin: .18rem 0 0; color: var(--muted); font-size: .68rem; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.monitor-total { display: flex; flex: 0 0 auto; margin-left: auto; align-items: flex-end; flex-direction: column; }
.monitor-total strong { color: var(--navy-900); font-size: 1.4rem; font-weight: 900; line-height: 1; }
.monitor-total small { margin-top: .22rem; color: var(--muted); font-size: .6rem; }
.monitor-variant-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; padding: 0 1rem 1rem; }
.monitor-variant { display: flex; min-width: 0; padding: .55rem .25rem; align-items: center; flex-direction: column; background: #edf9f3; border: 1px solid #d9f0e4; border-radius: 10px; }
.monitor-variant span { color: #317150; font-size: .62rem; font-weight: 850; }
.monitor-variant strong { color: #145f3c; font-size: 1rem; font-weight: 900; }
.monitor-variant small { overflow: hidden; max-width: 100%; color: #508269; font-size: .5rem; text-overflow: ellipsis; white-space: nowrap; }
.monitor-variant.low { background: #fff7e6; border-color: #f3e2b7; }
.monitor-variant.low span, .monitor-variant.low strong { color: #8b5b08; }
.monitor-variant.low small { color: #9b731f; }
.monitor-variant.empty { background: #fff0f1; border-color: #f2dade; }
.monitor-variant.empty span, .monitor-variant.empty strong { color: #a33f4a; }
.monitor-variant.empty small { color: #ab6670; }
.monitor-product-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem; padding: .75rem 1rem; color: var(--muted); background: #fafbfd; border-top: 1px solid var(--line); font-size: .65rem; }
.monitor-product-foot > div { display: flex; gap: .4rem; }
.user-stock-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.25rem; padding: 1.35rem; color: #dbe8f2; background: linear-gradient(120deg, #102a43, #174b70); border-radius: var(--radius); box-shadow: var(--shadow); }
.user-stock-hero .eyebrow { color: #78b8f7; }
.user-stock-hero h2 { margin: 0; color: #fff; font-size: clamp(1.35rem, 2.5vw, 1.85rem); font-weight: 850; }
.user-stock-hero p { max-width: 620px; margin: .35rem 0 0; color: #aec3d4; font-size: .8rem; }
.user-stock-hero-total { display: flex; align-items: center; gap: .8rem; }
.user-stock-hero-total > span { display: grid; width: 52px; height: 52px; place-items: center; color: var(--navy-900); background: #f2b84b; border-radius: 14px; font-size: 1.3rem; }
.user-stock-hero-total > div { display: flex; flex-direction: column; }
.user-stock-hero-total strong { color: #fff; font-size: 1.8rem; line-height: 1; }
.user-stock-hero-total small { margin-top: .3rem; color: #a9bfd0; font-size: .66rem; }
.user-request-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.user-request-mini { padding: .85rem; background: #f7f9fc; border: 1px solid #e8edf3; border-radius: 11px; }
.user-request-mini span { display: block; color: var(--muted); font-size: .62rem; font-weight: 750; }
.user-request-mini strong { display: block; margin-top: .1rem; color: var(--navy-900); font-size: 1.25rem; font-weight: 850; }
.request-batch-link { display: inline-flex; gap: .35rem; align-items: center; color: var(--blue-600); font-weight: 850; text-decoration: none; }
.request-batch-link:hover { text-decoration: underline; }
.request-batch-link::after { content: '\F135'; font-family: 'bootstrap-icons'; font-size: .65rem; }
.journey-track { display: flex; align-items: center; padding: .5rem 0; }
.journey-stage { display: flex; min-width: 130px; align-items: center; gap: .6rem; }
.journey-stage-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; color: #8293a5; background: #edf1f5; border: 4px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #dfe6ed; }
.journey-stage > div:last-child { display: flex; min-width: 0; flex-direction: column; }
.journey-stage > div:last-child > span { color: #8a99a9; font-size: .52rem; font-weight: 850; letter-spacing: .07em; }
.journey-stage > div:last-child > strong { color: #667789; font-size: .75rem; }
.journey-stage > div:last-child > small { color: #8996a4; font-size: .56rem; white-space: nowrap; }
.journey-stage.done .journey-stage-icon { color: #fff; background: var(--green-600); box-shadow: 0 0 0 1px var(--green-600); }
.journey-stage.done > div:last-child > strong { color: #13784b; }
.journey-stage.current .journey-stage-icon { color: #fff; background: var(--blue-600); box-shadow: 0 0 0 4px #e5edff; }
.journey-stage.current > div:last-child > strong { color: var(--blue-600); }
.journey-connector { min-width: 30px; height: 2px; margin: 0 .65rem; background: #dfe6ed; flex: 1; }
.journey-connector.done { background: var(--green-600); }
.batch-rejected-note { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: 1rem; padding: .85rem; color: #923440; background: #fff0f1; border: 1px solid #f2dadd; border-radius: 11px; }
.batch-rejected-note i { font-size: 1.1rem; }
.batch-rejected-note > div { display: flex; flex-direction: column; }
.batch-rejected-note strong { font-size: .8rem; }
.batch-rejected-note span { font-size: .7rem; }
.journey-track.is-rejected .journey-stage.current .journey-stage-icon { background: var(--red-600); box-shadow: 0 0 0 4px #ffe6e8; }
.journey-track.is-rejected .journey-stage.current > div:last-child > strong { color: var(--red-600); }
.journey-log { position: relative; }
.journey-log-item { position: relative; display: flex; gap: .75rem; padding: 0 0 1.1rem 1.05rem; }
.journey-log-item::before { content: ''; position: absolute; top: .55rem; bottom: -.2rem; left: .22rem; width: 1px; background: #dfe6ed; }
.journey-log-item:last-child { padding-bottom: 0; }
.journey-log-item:last-child::before { display: none; }
.journey-log-dot { position: absolute; top: .33rem; left: 0; width: 9px; height: 9px; background: var(--blue-600); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px #cbd9f4; }
.journey-log-item.status-completed .journey-log-dot { background: var(--green-600); box-shadow: 0 0 0 2px #cdebdc; }
.journey-log-item.status-rejected .journey-log-dot { background: var(--red-600); box-shadow: 0 0 0 2px #f0ccd0; }
.journey-log-item > div { min-width: 0; }
.journey-log-item time { color: var(--muted); font-size: .6rem; }
.journey-log-item > div > strong { display: block; margin-top: .35rem; color: var(--navy-900); font-size: .72rem; }
.journey-log-item p { margin: .15rem 0 0; color: var(--muted); font-size: .66rem; }

@media (min-width: 992px) {
    .app-sidebar { position: fixed; inset: 0 auto 0 0; transform: none !important; visibility: visible !important; }
    .app-sidebar .offcanvas-body { height: calc(100vh - 82px); }
    .app-main { margin-left: var(--sidebar-width); }
}
@media (max-width: 1399.98px) {
    .batch-line-main { grid-template-columns: 34px repeat(6, 1fr) 42px; }
    .batch-line-number { grid-column: 1; }
    .product-field { grid-column: 2 / span 3; }
    .type-field { grid-column: 5 / span 2; }
    .batch-remove-line { grid-column: 8; grid-row: 1; }
    .party-field { grid-column: 2 / span 3; }
    .note-field { grid-column: 5 / span 3; }
}
@media (max-width: 991.98px) {
    .offcanvas-lg.app-sidebar { --bs-offcanvas-width: min(86vw, 320px); width: min(86vw, 320px); }
    .app-sidebar .offcanvas-body { overscroll-behavior: contain; }
    .app-content { padding: 1rem; }
    .request-main { grid-template-columns: 1fr; }
    .request-actions { justify-content: flex-start; }
    .order-summary { position: static; }
    .stock-flow-notification-grid { grid-template-columns: 1fr; }
    .journey-track { align-items: stretch; flex-direction: column; }
    .journey-stage { width: 100%; }
    .journey-connector { width: 2px; min-width: 2px; height: 24px; margin: .25rem 0 .25rem 20px; flex: 0 0 24px; }
    .batch-line-main { grid-template-columns: 34px repeat(6, 1fr) 42px; }
    .batch-line-number { grid-column: 1; }
    .product-field { grid-column: 2 / span 3; }
    .type-field { grid-column: 5 / span 2; }
    .batch-remove-line { grid-column: 8; grid-row: 1; }
    .party-field { grid-column: 2 / span 3; }
    .note-field { grid-column: 5 / span 3; }
}
@media (max-width: 767.98px) {
    .page-head, .page-heading { align-items: stretch; margin-bottom: 1rem; }
    .page-head > div:first-child, .page-heading > div:first-child { flex: 1 1 100%; }
    .page-head p, .page-heading p { font-size: .9rem; }
    .info-strip { font-size: .8rem; }
    .stock-size-grid { grid-template-columns: repeat(3, 1fr); }
    .size-input-grid { grid-template-columns: repeat(3, 1fr); }
    .variant-order-grid { grid-template-columns: repeat(5, minmax(48px, 1fr)); }
    .table-responsive { font-size: .82rem; scrollbar-color: #a8b4c0 transparent; scrollbar-width: thin; }
    .table > :not(caption) > * > * { padding: .72rem .75rem; }
    .mobile-table-scroll::before { content: 'Geser tabel ke samping untuk melihat detail'; position: sticky; left: 0; z-index: 5; display: flex; width: 100%; min-height: 36px; align-items: center; padding: .45rem .75rem; color: #587087; background: #edf5ff; border-bottom: 1px solid #dce9f7; font-size: .66rem; font-weight: 750; }
    .chart-wrap { height: 265px; }
    .chart-wrap.small { height: 240px; }
    .monitor-size-summary { grid-template-columns: repeat(3, 1fr); }
    .approval-submit-panel { align-items: stretch; flex-direction: column; }
    .approval-submit-panel .btn { width: 100%; }
}
@media (max-width: 575.98px) {
    .app-topbar { height: 70px; gap: .65rem; padding-inline: .75rem; }
    .menu-button { flex: 0 0 42px; width: 42px; height: 42px; }
    .topbar-title { flex: 1 1 auto; }
    .topbar-title strong { font-size: .92rem; }
    .topbar-title small { display: none; }
    .topbar-quick-action { display: inline-grid; width: 42px; height: 42px; place-items: center; padding: 0; border-radius: 11px; }
    .topbar-quick-action i { margin: 0 !important; font-size: 1.05rem; }
    .topbar-action-label { display: none; }
    .app-content { padding: .85rem .75rem 1.25rem; }
    .app-content .row { --bs-gutter-x: .8rem; }
    .page-head, .page-heading { gap: .7rem; margin-bottom: 1rem; }
    .page-head h1, .page-heading h1 { font-size: 1.45rem; }
    .page-head p, .page-heading p { margin-top: .28rem; font-size: .84rem; line-height: 1.5; }
    .page-head > .btn, .page-heading > .btn { width: 100%; min-height: 44px; }
    .page-head > .d-flex { width: 100%; align-items: stretch; flex-direction: column; }
    .page-head > .d-flex > .btn, .page-head > .d-flex > .stock-refresh { width: 100%; justify-content: center; }
    .eyebrow { font-size: .62rem; }
    .info-strip { gap: .65rem; margin-bottom: 1rem; padding: .8rem; line-height: 1.45; }
    .surface-card, .dashboard-card, .card.border-0.shadow-sm { border-radius: 14px; }
    .surface-header, .dashboard-card .card-header { padding: .85rem .9rem; }
    .surface-header > .btn { min-height: 40px; }
    .surface-body { padding: .9rem; }
    .mobile-stat-grid > [class*='col-'] { width: 50%; }
    .mobile-stat-grid > :last-child:nth-child(odd) { width: 100%; }
    .mobile-stat-grid .stat-card { min-height: 92px; padding: .65rem; border-radius: 14px; }
    .mobile-stat-grid .stat-icon { flex-basis: 44px; width: 44px; height: 44px; border-radius: 12px; font-size: 1.05rem; }
    .mobile-stat-grid .stat-body { padding: 0 0 0 .6rem; }
    .mobile-stat-grid .stat-label { font-size: .62rem; line-height: 1.25; }
    .mobile-stat-grid .stat-value { font-size: 1.28rem; }
    .mobile-stat-grid .stat-value small { font-size: .56rem; }
    .stock-size-grid { grid-template-columns: repeat(2, 1fr); }
    .stock-size-card:last-child { grid-column: span 2; }
    .variant-order-grid { grid-template-columns: repeat(3, 1fr); }
    .transaction-form { padding: .9rem; }
    .batch-line-main { grid-template-columns: 34px 1fr 42px; gap: .55rem; }
    .batch-line-number { grid-column: 1; grid-row: 1; }
    .batch-remove-line { grid-column: 3; grid-row: 1; }
    .product-field, .type-field, .party-field, .note-field { grid-column: 1 / -1; }
    .product-field { grid-row: 2; }
    .type-field { grid-row: 3; }
    .party-field { grid-row: 4; }
    .note-field { grid-row: 5; }
    .batch-size-entry { margin-left: 0; }
    .batch-size-quantity-grid { grid-template-columns: repeat(5, minmax(44px, 1fr)); gap: .3rem; }
    .batch-size-field .form-control { min-height: 46px; font-size: .94rem; }
    .line-size-stock { font-size: .54rem; }
    .batch-total-bar { gap: .9rem; }
    .batch-total-bar .btn { width: 100%; }
    .batch-history-head { align-items: flex-start; flex-direction: column; }
    .batch-flow-summary { width: 100%; padding-left: 46px; }
    .monitor-size-summary { grid-template-columns: repeat(2, 1fr); }
    .monitor-size-card:last-child { grid-column: span 2; }
    .monitor-product-head { align-items: flex-start; }
    .monitor-product-foot { align-items: stretch; flex-direction: column; }
    .monitor-product-foot > div .btn { flex: 1; }
    .user-stock-hero { align-items: stretch; flex-direction: column; }
    .user-stock-hero { padding: 1rem; }
    .user-stock-hero > .d-flex { align-items: stretch !important; flex-direction: column; }
    .user-stock-hero .btn { width: 100%; min-height: 44px; }
    .batch-summary-card { min-height: 0; }
    .batch-summary-top { padding: .85rem .85rem .35rem; }
    .batch-summary-number { margin: .35rem .85rem 0; font-size: 1.18rem; }
    .batch-summary-owner { margin: .6rem .85rem 0; }
    .batch-summary-metrics { gap: .35rem; margin: .75rem .85rem; }
    .batch-summary-metrics > div { padding: .6rem; }
    .batch-summary-state { margin: 0 .85rem .8rem; }
    .batch-summary-card footer { padding: .75rem .85rem; }
    .filter-pills { margin-inline: 0; padding: .15rem 0 .35rem; scroll-snap-type: x proximity; }
    .filter-pill { min-height: 38px; scroll-snap-align: start; }
    .inventory-table .product-cell { min-width: 190px; }
    .inventory-table th:first-child, .inventory-table td:first-child { position: sticky; left: 0; z-index: 2; min-width: 150px; background: #fff; box-shadow: 9px 0 12px -15px rgba(16,42,67,.7); }
    .inventory-table thead th:first-child { z-index: 4; background: #f7f9fc; }
    .breadcrumb { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; white-space: nowrap; scrollbar-width: none; }
    .breadcrumb::-webkit-scrollbar { display: none; }
    .collapse .input-group { gap: .5rem; }
    .collapse .input-group > .form-control, .collapse .input-group > .btn { width: 100%; border-radius: 10px !important; }
    .modal-dialog { margin: .5rem; }
    .modal-content { border: 0; border-radius: 15px; }
    .modal-body { padding: 1rem; }
    .modal-footer { gap: .5rem; padding: .85rem 1rem; }
    .modal-footer > * { flex: 1 1 auto; margin: 0 !important; }
    .modal-footer > .btn-link { flex-basis: 100%; text-align: center; }
    .stock-flow-notification { padding: 1rem; }
    .stock-flow-icon { flex-basis: 40px; width: 40px; height: 40px; }
    .stock-flow-latest { grid-template-columns: 1fr; gap: .25rem; }
    .stock-flow-latest-label { display: none; }
    .app-footer { padding: .9rem .75rem 1.25rem; }
}

@media (max-width: 389.98px) {
    .app-topbar { gap: .5rem; padding-inline: .6rem; }
    .app-content { padding-inline: .65rem; }
    .mobile-stat-grid { --bs-gutter-x: .65rem; --bs-gutter-y: .65rem; }
    .mobile-stat-grid .stat-card { padding: .55rem; }
    .mobile-stat-grid .stat-icon { flex-basis: 40px; width: 40px; height: 40px; }
    .mobile-stat-grid .stat-body { padding-left: .5rem; }
    .mobile-stat-grid .stat-label { font-size: .57rem; }
    .batch-size-quantity-grid { gap: .24rem; }
    .batch-size-field .form-control { padding-inline: .2rem; }
}
