:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: #eff6ff;
    --navy: #0f172a;
    --slate: #475569;
    --muted: #64748b;
    --border: #e2e8f0;
    --surface: #ffffff;
    --background: #f6f8fc;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .04);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 15px; }
body { margin: 0; background: var(--background); color: var(--navy); font-family: Inter, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-decoration: none; }
.ui-icon { width: 18px; height: 18px; display: block; object-fit: contain; flex: 0 0 auto; }
.ui-icon.icon-missing { visibility: hidden; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
    width: 250px; position: fixed; inset: 0 auto 0 0; background: #fff; border-right: 1px solid var(--border);
    padding: 25px 16px 18px; display: flex; flex-direction: column; z-index: 40; transition: transform .25s ease;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 27px; color: var(--navy); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: inline-grid; place-items: center; flex: 0 0 auto; color: #fff; font-size: 20px; font-weight: 800; background: linear-gradient(145deg, #3b82f6, #1d4ed8); box-shadow: 0 6px 16px rgba(37, 99, 235, .25); }
.brand-mark .ui-icon { width: 24px; height: 24px; }
.brand strong { display: block; font-size: 1.1rem; letter-spacing: -.02em; }
.brand small, .user-meta small { display: block; margin-top: 2px; color: #94a3b8; font-size: .68rem; }
.nav-menu { flex: 1; }
.nav-label { display: block; margin: 13px 12px 8px; color: #94a3b8; font-size: .65rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.nav-menu a { display: flex; align-items: center; gap: 12px; margin: 3px 0; padding: 11px 12px; border-radius: 9px; color: var(--slate); font-size: .88rem; font-weight: 500; transition: .18s; }
.nav-menu a:hover { background: #f8fafc; color: var(--blue); }
.nav-menu a.active { color: var(--blue-dark); background: var(--blue-soft); font-weight: 600; }
.nav-icon { width: 20px; text-align: center; font-size: 1.15rem; font-weight: 700; }
.nav-icon .ui-icon { width: 19px; height: 19px; }
.nav-icon .nav-scan-icon { width: 19px; height: 19px; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-footer { border-top: 1px solid var(--border); padding: 18px 9px 0; display: flex; align-items: center; gap: 10px; }
.avatar { width: 35px; height: 35px; border-radius: 50%; display: inline-grid; place-items: center; flex: 0 0 auto; background: #dbeafe; color: var(--blue-dark); font-weight: 700; }
.user-meta { min-width: 0; }
.user-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: .8rem; }
.main-column { width: calc(100% - 250px); margin-left: 250px; min-width: 0; }
.topbar { height: 72px; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 0 32px; background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.topbar-title { flex: 1; }
.topbar-title strong { display: block; font-size: .94rem; }
.topbar-title span { display: block; color: var(--muted); font-size: .72rem; margin-top: 2px; }
.menu-toggle { display: none; }
.menu-toggle .ui-icon { width: 22px; height: 22px; }
.content { max-width: 1500px; margin: 0 auto; padding: 30px 32px 48px; }

.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 25px; }
.eyebrow { color: var(--blue); font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.page-heading h1 { margin: 6px 0 5px; font-size: 1.7rem; line-height: 1.2; letter-spacing: -.035em; }
.page-heading p { margin: 0; color: var(--muted); font-size: .88rem; }
.heading-actions { display: flex; align-items: center; gap: 9px; }

.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; padding: 9px 15px; cursor: pointer; font-size: .8rem; font-weight: 600; transition: .18s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: white; box-shadow: 0 5px 12px rgba(37, 99, 235, .18); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: white; color: var(--slate); border-color: var(--border); }
.btn-secondary:hover, .btn-ghost:hover { background: #f8fafc; }
.btn-ghost { background: transparent; color: var(--slate); border-color: transparent; }
.btn-block { width: 100%; }
.icon-button { border: 0; background: transparent; cursor: pointer; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.panel-header { padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--border); }
.panel-header h2 { margin: 0 0 4px; font-size: .98rem; letter-spacing: -.015em; }
.panel-header p { margin: 0; color: var(--muted); font-size: .74rem; }
.panel-header a { font-size: .76rem; font-weight: 600; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { min-width: 0; display: flex; align-items: center; gap: 14px; padding: 19px; background: white; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.stat-icon { width: 43px; height: 43px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; font-size: 1.25rem; font-weight: 700; }
.stat-icon .ui-icon { width: 21px; height: 21px; }
.stat-icon.blue { background: #eff6ff; color: #2563eb; }.stat-icon.indigo { background: #eef2ff; color: #4f46e5; }.stat-icon.green { background: #f0fdf4; color: #16a34a; }.stat-icon.orange { background: #fff7ed; color: #ea580c; }
.stat-card span { color: var(--muted); font-size: .72rem; font-weight: 600; }
.stat-card strong { display: block; margin: 3px 0 2px; font-size: 1.55rem; letter-spacing: -.04em; }
.stat-card small { display: block; color: #94a3b8; font-size: .65rem; white-space: nowrap; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 20px; }

.toolbar { min-height: 66px; padding: 13px 17px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--border); }
.search-box { width: min(350px, 100%); display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 0 11px; background: #fff; color: #94a3b8; }
.search-box:focus-within { border-color: #93c5fd; box-shadow: 0 0 0 3px #dbeafe; }
.search-box input { width: 100%; height: 36px; border: 0; outline: 0; color: var(--navy); font-size: .78rem; }
.record-count { color: var(--muted); font-size: .74rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 18px; color: var(--muted); background: #f8fafc; border-bottom: 1px solid var(--border); text-align: left; font-size: .65rem; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px 18px; border-bottom: 1px solid #eef2f7; color: var(--slate); font-size: .77rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdff; }
td strong { color: var(--navy); font-weight: 600; }
.table-sub { display: block; margin-top: 4px; color: #94a3b8; font-size: .65rem; }
.align-right { text-align: right; }
.actions { display: flex; justify-content: flex-end; align-items: center; gap: 5px; }
.actions form { margin: 0; }
.btn-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 7px; color: var(--slate); background: #fff; cursor: pointer; font-size: 1rem; }
.btn-icon .ui-icon { width: 15px; height: 15px; }
.btn-icon:hover { background: var(--blue-soft); color: var(--blue); border-color: #bfdbfe; }
.btn-icon.danger:hover { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.btn-icon.qr-action:hover { background: #eef2ff; color: #4f46e5; border-color: #c7d2fe; }
.sku { padding: 5px 8px; background: #f1f5f9; border-radius: 5px; color: #334155; font-family: Consolas, monospace; font-size: .7rem; font-weight: 600; }
.stock-pill, .badge, .role-badge { display: inline-flex; align-items: center; border-radius: 99px; font-size: .67rem; font-weight: 700; white-space: nowrap; }
.stock-pill { padding: 5px 9px; color: #166534; background: #f0fdf4; }
.stock-pill.low { color: #b45309; background: #fffbeb; }
.badge { padding: 5px 9px; }
.badge-masuk { color: #15803d; background: #f0fdf4; }.badge-keluar { color: #c2410c; background: #fff7ed; }
.description-cell { max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-state { padding: 35px 18px; color: var(--muted); text-align: center; line-height: 1.7; }
.stock-alert-list { padding: 5px 20px 14px; }
.stock-alert { display: flex; align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid #f1f5f9; }
.stock-alert:last-child { border-bottom: 0; }
.item-initial { width: 33px; height: 33px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: #475569; background: #f1f5f9; font-size: .75rem; font-weight: 700; }
.stock-alert div { flex: 1; min-width: 0; }
.stock-alert strong, .stock-alert small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-alert strong { font-size: .74rem; }.stock-alert small { margin-top: 3px; color: #94a3b8; font-size: .64rem; }
.stock-count { padding: 4px 7px; color: #b45309; background: #fffbeb; border-radius: 5px; font-size: .65rem; font-weight: 700; }
.stock-count.zero { color: var(--danger); background: #fef2f2; }

.field { display: block; }
.field > span { display: block; margin-bottom: 7px; color: #334155; font-size: .73rem; font-weight: 600; }
.field input, .field select, .field textarea, .date-filter input { width: 100%; border: 1px solid #d7dee8; border-radius: 8px; padding: 10px 11px; outline: none; color: var(--navy); background: white; transition: .15s; }
.field input, .field select { min-height: 42px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .date-filter input:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px #dbeafe; }
.field small { display: block; margin-top: 6px; color: #94a3b8; font-size: .66rem; }
.form-layout { display: grid; grid-template-columns: minmax(0, 750px) minmax(230px, 1fr); align-items: start; gap: 20px; }
.form-card { overflow: visible; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-card .form-grid { padding: 23px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; padding: 0 23px 23px; }
.type-symbol { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; font-weight: 800; }
.type-symbol .ui-icon { width: 20px; height: 20px; }
.type-symbol.incoming { color: #15803d; background: #dcfce7; }.type-symbol.outgoing { color: #c2410c; background: #ffedd5; }
.info-card { display: flex; gap: 13px; padding: 18px; color: #1e40af; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 11px; }
.info-card.warning { color: #9a3412; background: #fff7ed; border-color: #fed7aa; }
.info-icon { width: 26px; height: 26px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: #3b82f6; font-weight: 800; }
.info-icon .ui-icon { width: 14px; height: 14px; }
.warning .info-icon { background: #f97316; }
.info-card h3 { margin: 1px 0 6px; font-size: .78rem; }.info-card p { margin: 0; opacity: .8; font-size: .7rem; line-height: 1.6; }
.filter-toolbar { flex-wrap: wrap; }
.date-filter { display: flex; align-items: end; gap: 8px; }
.date-filter label { color: var(--muted); font-size: .65rem; font-weight: 600; }
.date-filter input { display: block; width: 135px; height: 36px; margin-top: 4px; padding: 6px 8px; font-size: .7rem; }

.modal { display: none; position: fixed; inset: 0; z-index: 100; padding: 20px; align-items: center; justify-content: center; background: rgba(15, 23, 42, .48); backdrop-filter: blur(3px); }
.modal.open { display: flex; }
.modal-card { width: min(510px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: white; border-radius: 14px; box-shadow: 0 24px 60px rgba(15, 23, 42, .2); animation: modalIn .18s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 15px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0 0 5px; font-size: 1.05rem; }.modal-header p { margin: 0; color: var(--muted); font-size: .7rem; }
.modal-header > button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.4rem; }
.modal-header > button .ui-icon { width: 18px; height: 18px; }
.modal-body { padding: 22px; display: grid; gap: 17px; }
.modal-body.form-grid { grid-template-columns: repeat(2, 1fr); }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 22px; border-top: 1px solid var(--border); background: #f8fafc; border-radius: 0 0 14px 14px; }
body.modal-active { overflow: hidden; }
.qr-modal-card { width: min(440px, 100%); }
.qr-modal-body { padding: 24px; text-align: center; }
.qr-label { width: min(280px, 100%); margin: 0 auto; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.qr-preview { width: 210px; max-width: 100%; aspect-ratio: 1; display: block; margin: 0 auto 13px; object-fit: contain; image-rendering: pixelated; }
.qr-label strong, .qr-label span { display: block; }
.qr-label strong { font-size: .9rem; }
.qr-label span { margin-top: 5px; color: var(--muted); font-family: Consolas, monospace; font-size: .72rem; }
.qr-modal-body > p { max-width: 330px; margin: 16px auto 0; color: var(--muted); font-size: .7rem; line-height: 1.6; }

.flash-stack { position: fixed; top: 84px; right: 24px; z-index: 150; width: min(380px, calc(100vw - 32px)); }
.flash { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; padding: 12px 14px; border: 1px solid; border-radius: 9px; box-shadow: 0 10px 30px rgba(15, 23, 42, .12); background: white; font-size: .74rem; }
.flash-success { color: #166534; border-color: #bbf7d0; background: #f0fdf4; }.flash-danger { color: #991b1b; border-color: #fecaca; background: #fef2f2; }.flash-warning { color: #92400e; border-color: #fde68a; background: #fffbeb; }
.flash-close { border: 0; background: transparent; color: currentColor; cursor: pointer; font-size: 1.1rem; }

.user-cell { display: flex; align-items: center; gap: 10px; }.user-cell .avatar { width: 31px; height: 31px; font-size: .7rem; }.user-cell small { padding: 3px 6px; border-radius: 4px; color: var(--blue); background: var(--blue-soft); font-size: .58rem; }
.role-badge { padding: 5px 8px; color: #3730a3; background: #eef2ff; }
.status-active { color: #15803d; font-size: .7rem; font-weight: 600; }
.export-layout { display: grid; grid-template-columns: minmax(0, 670px) minmax(250px, 340px); gap: 20px; align-items: start; }
.export-card { padding: 28px; }
.export-visual { width: 55px; height: 55px; display: grid; place-items: center; border-radius: 12px; color: white; background: #15803d; font-size: .8rem; font-weight: 800; box-shadow: 0 8px 20px rgba(21, 128, 61, .2); }
.export-visual .ui-icon { width: 30px; height: 30px; }
.export-copy { margin: 18px 0 22px; }.export-copy h2 { margin: 0 0 7px; font-size: 1.08rem; }.export-copy p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.65; }
.export-note { display: flex; gap: 10px; margin: 20px 0; padding: 12px; color: #1e40af; background: #eff6ff; border-radius: 8px; }
.export-note span { width: 20px; height: 20px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: var(--blue); font-size: .65rem; font-weight: 700; }
.export-note span .ui-icon { width: 12px; height: 12px; }
.export-note p { margin: 0; font-size: .7rem; line-height: 1.5; }
.export-info { padding: 22px; }.export-info h3 { margin: 0 0 15px; font-size: .88rem; }.export-info ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .72rem; line-height: 2; }
.file-chip { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 13px; border: 1px dashed #cbd5e1; border-radius: 9px; }
.file-chip > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; color: white; background: #16a34a; font-weight: 700; }
.file-chip > span .ui-icon { width: 19px; height: 19px; }
.file-chip strong, .file-chip small { display: block; }.file-chip strong { font-size: .72rem; }.file-chip small { margin-top: 3px; color: #94a3b8; font-size: .6rem; }
.error-state { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }.error-state > span { color: #dbeafe; font-size: 7rem; font-weight: 800; line-height: 1; }.error-state h1 { margin: 8px 0; }.error-state p { margin: 0 0 20px; color: var(--muted); }

.scanner-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, .8fr); gap: 20px; align-items: start; }
.scanner-card { overflow: hidden; }
.scanner-live { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 99px; color: var(--muted); background: #f1f5f9; font-size: .65rem; font-weight: 700; }
.scanner-live i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.scanner-live.active { color: #166534; background: #dcfce7; }
.scanner-live.active i { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .14); animation: livePulse 1.6s infinite; }
@keyframes livePulse { 50% { opacity: .45; } }
.camera-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0f172a; }
.qr-reader { width: 100%; height: 100%; overflow: hidden; }
.qr-reader video { width: 100% !important; height: 100% !important; display: block; object-fit: cover; }
.qr-reader > div { border: 0 !important; }
.camera-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 20px; color: white; text-align: center; background: radial-gradient(circle at center, #263852, #0f172a 70%); }
.camera-placeholder .scanner-placeholder-icon { width: 44px; height: 44px; margin-bottom: 7px; opacity: .9; }
.camera-placeholder strong { font-size: .88rem; }
.camera-placeholder span { color: #94a3b8; font-size: .7rem; }
.scan-frame { position: absolute; width: min(52%, 280px); aspect-ratio: 1; inset: 50% auto auto 50%; transform: translate(-50%, -50%); pointer-events: none; }
.scan-frame i { position: absolute; width: 28px; height: 28px; border-color: #60a5fa; border-style: solid; filter: drop-shadow(0 0 4px rgba(96,165,250,.7)); }
.scan-frame i:nth-child(1) { inset: 0 auto auto 0; border-width: 3px 0 0 3px; border-radius: 8px 0 0; }
.scan-frame i:nth-child(2) { inset: 0 0 auto auto; border-width: 3px 3px 0 0; border-radius: 0 8px 0 0; }
.scan-frame i:nth-child(3) { inset: auto auto 0 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 8px; }
.scan-frame i:nth-child(4) { inset: auto 0 0 auto; border-width: 0 3px 3px 0; border-radius: 0 0 8px; }
.scanner-status { min-height: 43px; display: flex; align-items: center; gap: 8px; padding: 11px 18px; color: var(--muted); background: #f8fafc; border-top: 1px solid var(--border); font-size: .7rem; }
.scanner-status.success { color: #166534; background: #f0fdf4; }
.scanner-status.error { color: #991b1b; background: #fef2f2; }
.scanner-status.processing { color: #1e40af; background: #eff6ff; }
.scanner-actions { display: flex; justify-content: center; gap: 9px; padding: 16px; border-top: 1px solid var(--border); }
.scanner-side { display: grid; gap: 16px; }
.manual-scan-card form { padding: 20px; }
.manual-scan-card form .btn { margin-top: 14px; }
.image-scan { padding: 0 20px 20px; }
.image-scan > span { position: relative; display: block; margin: 0 0 13px; color: #94a3b8; text-align: center; font-size: .62rem; }
.image-scan > span::before, .image-scan > span::after { content: ""; position: absolute; top: 50%; width: 32%; height: 1px; background: var(--border); }
.image-scan > span::before { left: 0; }.image-scan > span::after { right: 0; }
.scan-result { padding: 20px; border: 1px solid #bbf7d0; border-radius: 13px; background: #f0fdf4; box-shadow: var(--shadow); }
.scan-result.error { border-color: #fecaca; background: #fef2f2; }
.scan-result-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 50%; background: #22c55e; }
.scan-result.error .scan-result-icon { background: #ef4444; }
.scan-result-icon .ui-icon { width: 20px; height: 20px; }
.scan-result span { color: #15803d; font-size: .62rem; font-weight: 800; letter-spacing: .1em; }
.scan-result.error span { color: #b91c1c; }
.scan-result h2 { margin: 6px 0 4px; font-size: 1rem; }
.scan-result p { margin: 0 0 7px; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.scan-result strong { display: block; color: #166534; font-size: .75rem; }
.scan-result .btn { width: 100%; margin-top: 17px; }

.login-page { min-height: 100vh; background: white; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(390px, .9fr) minmax(520px, 1.1fr); }
.login-intro { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 45px 55px; color: white; background: linear-gradient(145deg, #0f2f74, #1d4ed8 65%, #3b82f6); }
.login-intro::before, .login-intro::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.login-intro::before { width: 520px; height: 520px; right: -260px; bottom: -170px; }.login-intro::after { width: 320px; height: 320px; right: -90px; bottom: -95px; }
.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; font-size: 1.05rem; font-weight: 700; }.login-brand .brand-mark { background: white; color: var(--blue); box-shadow: none; }
.login-intro > div { position: relative; z-index: 1; }
.login-intro .eyebrow { color: #bfdbfe; }.login-intro h1 { margin: 14px 0 18px; font-size: clamp(2.5rem, 5vw, 4.3rem); line-height: 1.03; letter-spacing: -.055em; }.login-intro p { max-width: 460px; margin: 0; color: #dbeafe; line-height: 1.7; font-size: .9rem; }
.login-feature { display: flex; align-items: center; gap: 9px; color: #dbeafe; font-size: .74rem; }.login-feature span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.15); }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-card { width: min(410px, 100%); }.login-card h2 { margin: 8px 0 8px; font-size: 1.65rem; letter-spacing: -.035em; }.login-card > .muted { margin: 0 0 25px; color: var(--muted); font-size: .78rem; }.login-card .field { margin-bottom: 17px; }
.password-wrap { position: relative; }.password-wrap input { padding-right: 60px; }.password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; padding: 6px; background: transparent; color: var(--blue); cursor: pointer; font-size: .65rem; font-weight: 600; }
.login-help { margin: 18px 0 0; color: #94a3b8; text-align: center; font-size: .65rem; }.login-help strong { color: #64748b; }
.mobile-brand { display: none; }
.sidebar-overlay { display: none; }
.mobile-activity-list,
.mobile-inventory-list,
.mobile-transaction-list { display: none; }

@media (max-width: 1050px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-layout { grid-template-columns: 1fr; }
    .info-card { max-width: 550px; }
    .login-intro { padding: 40px; }
    .scanner-layout { grid-template-columns: 1fr; }
    .scanner-side { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
    .sidebar { transform: translateX(-100%); box-shadow: 12px 0 30px rgba(15,23,42,.14); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(15,23,42,.35); }
    .main-column { width: 100%; margin-left: 0; }
    .menu-toggle { display: block; }
    .topbar { height: 64px; padding: 0 18px; }
    .content { padding: 24px 18px 40px; }
    .login-shell { grid-template-columns: 1fr; }
    .login-intro { display: none; }
    .login-panel { min-height: 100vh; padding: 25px; }
    .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 45px; font-weight: 700; }
    .export-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    html { font-size: 14px; }
    .page-heading { align-items: stretch; flex-direction: column; }
    .page-heading .btn, .page-heading > button { width: 100%; }
    .heading-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { display: block; padding: 14px; }.stat-icon { width: 34px; height: 34px; margin-bottom: 10px; }.stat-card small { white-space: normal; }
    .form-grid, .modal-body.form-grid { grid-template-columns: 1fr; }.form-grid .full, .modal-body.form-grid .full { grid-column: auto; }
    .toolbar { align-items: stretch; flex-direction: column; }.search-box { width: 100%; }
    .date-filter { display: grid; grid-template-columns: 1fr 1fr; }.date-filter input { width: 100%; }.date-filter .btn { width: 100%; }
    th, td { padding: 12px 13px; }
    .flash-stack { top: 72px; right: 16px; }
    .export-card { padding: 20px; }
    .scanner-side { grid-template-columns: 1fr; }
    .camera-stage { aspect-ratio: 3 / 4; }
    .scan-frame { width: 66%; }
}

/* ------------------------------------------------------------
   Stokku mobile app
   Layout khusus APK: header ringkas, kartu sentuh, dan bottom nav.
   ------------------------------------------------------------ */
body.mobile-app {
    --blue: #2864f0;
    --blue-dark: #1749c9;
    --blue-soft: #edf4ff;
    --background: #f5f7fb;
    min-width: 320px;
    background: var(--background);
    overscroll-behavior-y: none;
}
body.mobile-app .app-shell { display: block; min-height: 100dvh; }
body.mobile-app .main-column { width: 100%; margin-left: 0; }
body.mobile-app .topbar {
    height: auto;
    min-height: 72px;
    padding: max(12px, env(safe-area-inset-top)) 18px 10px;
    gap: 12px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 0;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .05);
}
.mobile-header-logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 13px;
    background: #000;
    box-shadow: 0 6px 15px rgba(15, 23, 42, .16);
}
.mobile-header-logo .ui-icon { width: 100%; height: 100%; }
body.mobile-app .topbar-title strong {
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: -.02em;
}
body.mobile-app .topbar-title span {
    max-width: 220px;
    overflow: hidden;
    color: #94a3b8;
    font-size: .65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mobile-header-action {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    color: #fff;
    background: var(--blue);
    box-shadow: 0 7px 16px rgba(40, 100, 240, .24);
}
.mobile-header-action svg,
.mobile-fab svg {
    width: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}
body.mobile-app .content {
    width: 100%;
    max-width: 720px;
    min-height: calc(100dvh - 72px);
    padding: 18px 16px calc(112px + env(safe-area-inset-bottom));
}
body.mobile-app .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 18px;
}
body.mobile-app .page-heading .eyebrow { font-size: .62rem; }
body.mobile-app .page-heading h1 {
    margin-top: 5px;
    font-size: 1.5rem;
}
body.mobile-app .page-heading p {
    max-width: 95%;
    font-size: .78rem;
    line-height: 1.5;
}
body.mobile-app .page-heading > .btn,
body.mobile-app .page-heading > button { display: none; }
body.mobile-app .panel {
    border-color: #e9edf4;
    border-radius: 17px;
    box-shadow: 0 7px 24px rgba(15, 23, 42, .045);
}
body.mobile-app .panel-header {
    padding: 17px 17px 14px;
    border-bottom-color: #eef1f6;
}
body.mobile-app .panel-header h2 { font-size: .92rem; }
body.mobile-app .panel-header p { font-size: .68rem; }
body.mobile-app .btn {
    min-height: 46px;
    border-radius: 12px;
    padding-inline: 17px;
    font-size: .77rem;
}

/* Bottom navigation */
.mobile-bottom-nav {
    position: fixed;
    z-index: 90;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(72px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left));
    background: rgba(255,255,255,.98);
    border-top: 1px solid #e7ebf2;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, .07);
    backdrop-filter: blur(18px);
}
.mobile-bottom-nav > a {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    color: #94a3b8;
    font-size: .58rem;
    font-weight: 650;
}
.mobile-bottom-nav > a > svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.mobile-bottom-nav > a.active { color: var(--blue); }
.mobile-bottom-nav .scan-nav { position: relative; padding-top: 24px; }
.scan-nav-button {
    position: absolute;
    top: -30px;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 5px solid var(--background);
    border-radius: 50%;
    color: #fff;
    background: var(--blue);
    box-shadow: 0 8px 20px rgba(40,100,240,.32);
}
.scan-nav-button svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
}

/* Dashboard mobile */
.mobile-hero {
    position: relative;
    min-height: 166px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 23px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #3477ff, #1749c9);
    box-shadow: 0 13px 30px rgba(37, 99, 235, .24);
}
.mobile-hero::before {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    right: -85px;
    top: -90px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
}
.mobile-hero-copy { position: relative; z-index: 2; }
.mobile-hero-copy > span {
    display: block;
    color: #dbeafe;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .12em;
}
.mobile-hero-copy > strong {
    display: block;
    margin: 6px 0 3px;
    font-size: 3rem;
    line-height: 1;
    letter-spacing: -.06em;
}
.mobile-hero-copy > small { color: #dbeafe; font-size: .67rem; }
.mobile-hero-art {
    position: absolute;
    right: -8px;
    bottom: -13px;
    width: 145px;
    height: 145px;
    opacity: .12;
}
.mobile-hero-art .ui-icon { width: 100%; height: 100%; }
.mobile-section { margin: 24px 0 18px; }
.mobile-section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 12px;
}
.mobile-section-title span {
    color: var(--blue);
    font-size: .57rem;
    font-weight: 800;
    letter-spacing: .12em;
}
.mobile-section-title h2 { margin: 4px 0 0; font-size: 1rem; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.quick-action {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 13px 6px 11px;
    border: 1px solid #e9edf4;
    border-radius: 15px;
    color: var(--navy);
    background: #fff;
    text-align: center;
    box-shadow: 0 5px 18px rgba(15,23,42,.035);
}
.quick-action > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
    border-radius: 12px;
}
.quick-action > span .ui-icon { width: 19px; height: 19px; }
.quick-action > span svg {
    width: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.quick-action.incoming > span { color: #15803d; background: #eaf9ef; }
.quick-action.outgoing > span { color: #d15718; background: #fff3e8; }
.quick-action.scanner > span { color: #245de0; background: #edf4ff; }
.quick-action.inventory > span { color: #6d3fd5; background: #f3efff; }
.quick-action strong {
    max-width: 100%;
    overflow: hidden;
    font-size: .65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.quick-action small { margin-top: 3px; color: #94a3b8; font-size: .55rem; }
body.mobile-app .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}
body.mobile-app .stat-card {
    align-items: flex-start;
    padding: 14px;
    border-radius: 16px;
}
body.mobile-app .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
}
body.mobile-app .stat-icon .ui-icon { width: 18px; height: 18px; }
body.mobile-app .stat-card span { font-size: .63rem; }
body.mobile-app .stat-card strong { margin-top: 2px; font-size: 1.25rem; }
body.mobile-app .stat-card small { font-size: .57rem; white-space: normal; }
body.mobile-app .dashboard-grid { grid-template-columns: 1fr; gap: 14px; }
.warehouse-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 18px; }
.warehouse-mini-grid a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--navy); background: #fff; border: 1px solid #e9edf4; border-radius: 14px; }
.warehouse-mini-grid a > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-weight: 800; }
.warehouse-mini-grid a.has-reject > span { color: #dc2626; background: #fef2f2; }
.warehouse-mini-grid strong, .warehouse-mini-grid small { display: block; }.warehouse-mini-grid strong { font-size: .82rem; }.warehouse-mini-grid small { margin-top: 3px; color: #94a3b8; font-size: .57rem; }
.mobile-activity-list { padding: 3px 16px 9px; }
body.mobile-app .mobile-activity-list { display: block; }
.mobile-activity {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f6;
}
.mobile-activity:last-child { border-bottom: 0; }
.activity-type {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
}
.activity-type .ui-icon { width: 17px; height: 17px; }
.activity-type.masuk { background: #eaf9ef; }
.activity-type.keluar { background: #fff3e8; }
.mobile-activity > div { flex: 1; min-width: 0; }
.mobile-activity strong,
.mobile-activity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-activity strong { font-size: .72rem; }
.mobile-activity small { margin-top: 4px; color: #94a3b8; font-size: .6rem; }
.activity-qty { font-size: .75rem; font-weight: 800; }
.activity-qty.masuk { color: #15803d; }
.activity-qty.keluar { color: #d15718; }

/* Inventory and transaction cards */
body.mobile-app .desktop-data-table { display: none; }
body.mobile-app .mobile-inventory-list,
body.mobile-app .mobile-transaction-list { display: grid; }
body.mobile-app .toolbar {
    min-height: auto;
    padding: 13px;
    align-items: center;
    flex-direction: row;
}
body.mobile-app .toolbar .search-box { flex: 1; width: auto; border-radius: 12px; background: #f8fafc; }
body.mobile-app .toolbar .record-count { white-space: nowrap; }
.mobile-inventory-list,
.mobile-transaction-list { gap: 11px; padding: 13px; background: #f8fafc; }
.inventory-card,
.transaction-card {
    overflow: hidden;
    border: 1px solid #e9edf4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(15,23,42,.035);
}
.inventory-main { display: flex; align-items: center; gap: 11px; padding: 14px; }
.inventory-avatar {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 13px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: .85rem;
    font-weight: 800;
}
.inventory-copy { flex: 1; min-width: 0; }
.inventory-copy strong,
.inventory-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inventory-copy strong { font-size: .77rem; }
.inventory-copy span { margin-top: 5px; color: #94a3b8; font-family: Consolas, monospace; font-size: .61rem; }
.inventory-stock {
    min-width: 51px;
    padding: 7px 8px;
    border-radius: 11px;
    color: #15803d;
    background: #ecfdf3;
    text-align: center;
}
.inventory-stock.low { color: #b45309; background: #fff8e6; }
.inventory-stock strong,
.inventory-stock small { display: block; }
.inventory-stock strong { font-size: .9rem; line-height: 1; }
.inventory-stock small { margin-top: 3px; font-size: .52rem; }
.inventory-flow {
    display: flex;
    gap: 17px;
    padding: 10px 14px;
    border-top: 1px solid #f0f2f6;
    color: #64748b;
    font-size: .62rem;
}
.inventory-flow span { display: flex; align-items: center; gap: 5px; }
.inventory-flow strong { color: var(--navy); }
.dot { width: 6px; height: 6px; border-radius: 50%; }
.dot.incoming { background: #22c55e; }
.dot.outgoing { background: #f97316; }
.dot.reject { background: #ef4444; }
.inventory-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid #eef1f5;
}
.inventory-actions form { display: contents; }
.inventory-actions button,
.transaction-card-footer button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-right: 1px solid #eef1f5;
    color: #64748b;
    background: #fff;
    font-size: .61rem;
    font-weight: 650;
}
.inventory-actions button:last-child { border-right: 0; }
.inventory-actions button .ui-icon,
.transaction-card-footer button .ui-icon { width: 13px; height: 13px; }
.inventory-actions button.danger,
.transaction-card-footer button.danger { color: #dc2626; }
.transaction-card { padding: 14px; }
.transaction-card-main { display: flex; align-items: center; gap: 10px; }
.transaction-card-main > div { flex: 1; min-width: 0; }
.transaction-card-main > div strong,
.transaction-card-main > div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transaction-card-main > div strong { font-size: .75rem; }
.transaction-card-main > div span { margin-top: 4px; color: #94a3b8; font-size: .59rem; }
.transaction-card > p {
    margin: 11px 0;
    padding: 9px 10px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 9px;
    font-size: .62rem;
    line-height: 1.45;
}
.transaction-card-footer { display: flex; align-items: center; justify-content: space-between; }
.transaction-card-footer > div { display: flex; }
.transaction-card-footer form { display: contents; }
.transaction-card-footer button {
    min-height: 30px;
    padding: 0 9px;
    border-right: 0;
}
.mobile-empty span { display: block; color: var(--navy); font-weight: 700; }
.mobile-empty p { margin: 5px 0 0; font-size: .68rem; }
.mobile-fab {
    position: fixed;
    right: 18px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    z-index: 75;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 18px;
    color: #fff;
    background: var(--blue);
    box-shadow: 0 10px 22px rgba(40,100,240,.32);
}

/* Forms, filters, bottom-sheet modal, scanner */
body.mobile-app .form-layout,
body.mobile-app .export-layout,
body.mobile-app .scanner-layout { grid-template-columns: 1fr; gap: 13px; }
body.mobile-app .form-card .form-grid { grid-template-columns: 1fr; padding: 17px; }
body.mobile-app .form-grid .full { grid-column: auto; }
body.mobile-app .form-actions { padding: 0 17px 17px; }
body.mobile-app .form-actions .btn { width: 100%; }
body.mobile-app .info-card { border-radius: 15px; }
body.mobile-app .field > span { font-size: .69rem; }
body.mobile-app .field input,
body.mobile-app .field select { min-height: 48px; border-radius: 11px; }
body.mobile-app .field textarea { border-radius: 11px; }
body.mobile-app .filter-toolbar { align-items: stretch; flex-direction: column; }
body.mobile-app .date-filter { display: grid; grid-template-columns: 1fr 1fr; }
body.mobile-app .date-filter input { width: 100%; min-height: 42px; border-radius: 10px; }
body.mobile-app .date-filter .btn { width: 100%; }
body.mobile-app .modal {
    align-items: flex-end;
    padding: 0;
    background: rgba(15,23,42,.48);
}
body.mobile-app .modal-card {
    width: 100%;
    max-height: 90dvh;
    border-radius: 22px 22px 0 0;
    animation: mobileSheetIn .22s ease;
}
@keyframes mobileSheetIn { from { transform: translateY(30px); opacity: .6; } }
body.mobile-app .modal-header { padding: 19px 18px 15px; }
body.mobile-app .modal-header::before {
    content: "";
    position: absolute;
    width: 42px;
    height: 4px;
    top: 7px;
    left: calc(50% - 21px);
    border-radius: 5px;
    background: #d8dee8;
}
body.mobile-app .modal-header { position: relative; }
body.mobile-app .modal-body { padding: 18px; }
body.mobile-app .modal-footer {
    padding: 13px 18px calc(13px + env(safe-area-inset-bottom));
    border-radius: 0;
}
body.mobile-app .flash-stack {
    top: max(80px, calc(env(safe-area-inset-top) + 64px));
    right: 14px;
    width: calc(100vw - 28px);
}
body.mobile-app .flash { border-radius: 13px; }
body.mobile-app .scanner-card { border-radius: 20px; }
body.mobile-app .camera-stage { aspect-ratio: 3 / 4; max-height: 62dvh; }
body.mobile-app .scan-frame { width: min(68%, 280px); }
body.mobile-app .scanner-side { grid-template-columns: 1fr; }
body.mobile-app .scanner-actions .btn { flex: 1; }
body.mobile-app .export-card { padding: 20px; }
body.mobile-app .export-info { display: none; }

@media (max-width: 380px) {
    .quick-grid { grid-template-columns: 1fr 1fr; }
    body.mobile-app .stat-card { gap: 9px; padding: 12px; }
    body.mobile-app .content { padding-inline: 12px; }
    .mobile-bottom-nav > a { font-size: .54rem; }
}

/* Menu operasional gudang */
.app-menu-section { margin-bottom: 25px; }
.app-menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.app-menu-item {
    min-width: 0; display: flex; align-items: center; gap: 12px; padding: 15px;
    color: var(--navy); background: #fff; border: 1px solid #e9edf4;
    border-radius: 16px; box-shadow: 0 5px 18px rgba(15,23,42,.035);
}
.app-menu-item > span {
    width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto;
    border-radius: 13px; font-size: 1rem; font-weight: 800;
}
.app-menu-item.green > span { color: #15803d; background: #eaf9ef; }
.app-menu-item.orange > span { color: #c2410c; background: #fff3e8; }
.app-menu-item.blue > span { color: #1d4ed8; background: #edf4ff; }
.app-menu-item.purple > span { color: #6d28d9; background: #f3efff; }
.app-menu-item.teal > span { color: #0f766e; background: #e8fbf8; }
.app-menu-item.red > span { color: #dc2626; background: #fef2f2; }
.app-menu-item strong, .app-menu-item small { display: block; }
.app-menu-item strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.app-menu-item small { margin-top: 4px; color: #94a3b8; font-size: .58rem; }

/* Lokasi, rak, dan QR lokasi */
.location-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.location-card { overflow: hidden; background: #fff; border: 1px solid #e7ebf2; border-radius: 17px; box-shadow: var(--shadow); }
.location-card-head { display: flex; align-items: center; gap: 11px; padding: 15px; }
.location-symbol { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: var(--blue); background: var(--blue-soft); font-weight: 800; }
.reject-location .location-symbol { color: #dc2626; background: #fef2f2; }
.location-card-head > div { flex: 1; min-width: 0; }
.location-card-head strong, .location-card-head div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-card-head strong { font-size: .78rem; }.location-card-head div span { margin-top: 4px; color: #94a3b8; font-size: .61rem; }
.location-kind { padding: 4px 7px; border-radius: 99px; color: #475569; background: #f1f5f9; font-size: .55rem; font-weight: 700; }
.location-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 15px; color: #64748b; background: #f8fafc; font-size: .62rem; }
.location-stats strong { color: var(--navy); }
.location-parent { margin: 0; padding: 9px 15px; color: #94a3b8; border-top: 1px solid #eef1f5; font-size: .58rem; }
.location-card-actions { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #eef1f5; }
.location-card-actions button { min-height: 38px; border: 0; border-right: 1px solid #eef1f5; color: #64748b; background: white; font-size: .59rem; font-weight: 650; }
.location-card-actions button:last-child { border-right: 0; }
.location-inventory > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #eef1f5; }
.location-inventory > div:last-child { border-bottom: 0; }
.location-inventory span strong, .location-inventory span small { display: block; }
.location-inventory span strong { font-size: .72rem; }.location-inventory span small { margin-top: 3px; color: #94a3b8; font-size: .6rem; }
.location-inventory b { white-space: nowrap; font-size: .68rem; }

/* Transfer, stock opname, dan barang reject */
.operation-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 17px; align-items: start; }
.operation-form .form-grid { padding: 20px; }
.operation-list { max-height: 560px; overflow-y: auto; padding: 4px 16px 10px; }
.operation-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #eef1f5; }
.operation-row:last-child { border-bottom: 0; }
.operation-row div strong, .operation-row div small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operation-row div strong { font-size: .7rem; }.operation-row div small { margin-top: 4px; color: #94a3b8; font-size: .58rem; }
.operation-row > span { color: #64748b; font-size: .61rem; }.operation-row > b { font-size: .65rem; white-space: nowrap; }
.operation-row b.positive { color: #15803d; }.operation-row b.negative { color: #dc2626; }
.reject-button { background: #dc2626; box-shadow: 0 5px 12px rgba(220,38,38,.18); }
.reject-button:hover { background: #b91c1c; }
.reject-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #eef1f5; }
.reject-row > div { flex: 1; min-width: 0; }
.reject-row strong, .reject-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reject-row strong { font-size: .7rem; }.reject-row small { margin-top: 4px; color: #94a3b8; font-size: .57rem; }
.reject-row p { margin: 6px 0 0; color: #64748b; font-size: .6rem; }
.reject-row select { max-width: 125px; min-height: 35px; border: 1px solid #dbe1ea; border-radius: 9px; color: #475569; background: white; font-size: .6rem; }
.scanner-mode-select, .scanner-location-select { padding: 14px 17px; border-bottom: 1px solid var(--border); background: #f8fafc; }

@media (max-width: 800px) {
    .operation-layout { grid-template-columns: 1fr; }
    .location-list { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .app-menu-grid { grid-template-columns: 1fr; }
    .operation-row { grid-template-columns: minmax(0,1fr) auto; }
    .operation-row > span { grid-column: 1 / -1; grid-row: 2; }
}

/* Varian barang dan informasi lokasi pada Master Barang */
.variant-toggle {
    display: flex; align-items: flex-start; gap: 11px; padding: 13px;
    border: 1px solid #dbe5f3; border-radius: 12px; background: #f8fbff;
    cursor: pointer;
}
.variant-toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.variant-toggle span, .variant-toggle b, .variant-toggle small { display: block; }
.variant-toggle b { font-size: .72rem; }.variant-toggle small { margin-top: 4px; color: #64748b; font-size: .61rem; line-height: 1.4; }
.variant-editor { margin-top: 14px; padding: 13px; border: 1px solid #e2e8f0; border-radius: 13px; background: #f8fafc; }
.variant-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.variant-editor-head strong, .variant-editor-head small { display: block; }.variant-editor-head strong { font-size: .72rem; }.variant-editor-head small { margin-top: 3px; color: #64748b; font-size: .58rem; }
.btn-small { min-height: 34px; padding: 7px 10px; font-size: .61rem; }
.variant-input-row { display: grid; grid-template-columns: 1fr 1fr 34px; align-items: end; gap: 8px; padding: 10px 0; border-top: 1px solid #e5eaf1; }
.variant-input-row:first-child { border-top: 0; padding-top: 0; }
.variant-input-row > button { width: 34px; height: 42px; border: 0; border-radius: 9px; color: #dc2626; background: #feecec; font-size: 1.1rem; }
.variant-stock-list { padding: 4px 14px 10px; border-top: 1px solid #f0f2f6; }
.variant-stock-list > div { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f1f4f8; }
.variant-stock-list > div:last-child { border-bottom: 0; }
.variant-stock-list span strong, .variant-stock-list span small { display: block; }.variant-stock-list span strong { font-size: .65rem; }.variant-stock-list span small { margin-top: 3px; color: #94a3b8; font-size: .55rem; }
.variant-stock-list > div > b { min-width: 25px; text-align: right; font-size: .7rem; }
.variant-locations { display: flex !important; flex-wrap: wrap; gap: 4px; }
.variant-locations i, .item-location-list span { padding: 4px 7px; border-radius: 99px; color: #3561a9; background: #edf4ff; font-size: .53rem; font-style: normal; }
.item-location-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-top: 1px solid #f0f2f6; }
.table-variant { display: block; margin: 3px 0; color: #64748b; font-size: .62rem; }.muted { color: #94a3b8; font-size: .62rem; }
.variant-qr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; width: 100%; }
.variant-qr-grid .qr-label { padding: 11px; border: 1px solid #e5eaf1; border-radius: 13px; }
.variant-qr-grid .qr-preview { width: min(160px, 100%); }
@media (max-width: 520px) {
    .variant-input-row { grid-template-columns: 1fr 34px; }
    .variant-input-row .field:nth-of-type(2) { grid-column: 1; }
    .variant-input-row > button { grid-column: 2; grid-row: 1 / 3; align-self: center; }
    .variant-qr-grid { grid-template-columns: 1fr; }
}

/* Register workspace dan invitation prototype */
.auth-switch { margin: 15px 0 0; color: #64748b; text-align: center; font-size: .68rem; }
.auth-switch a { color: var(--blue); font-weight: 750; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: #94a3b8; font-size: .62rem; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #e2e8f0; }
.register-button { text-align: center; border-color: #bfd1ee; color: var(--blue); background: #f8fbff; }
.register-button:hover { border-color: var(--blue); background: #eef5ff; }
.invite-share-card { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.2fr); align-items: center; gap: 20px; margin-bottom: 17px; padding: 20px; border-color: #bfd5ff; background: linear-gradient(135deg, #f8fbff, #eef5ff); }
.invite-share-card h2 { margin: 4px 0; font-size: 1rem; }.invite-share-card p { margin: 0; color: #64748b; font-size: .66rem; }
.invite-copy-row { display: flex; gap: 8px; }.invite-copy-row input { min-width: 0; flex: 1; padding: 11px 12px; border: 1px solid #cbd9ee; border-radius: 10px; color: #475569; background: #fff; font-size: .65rem; }
.invite-history { margin-top: 17px; }
.status-used, .status-expired { display: inline-flex; padding: 5px 8px; border-radius: 99px; font-size: .58rem; font-weight: 750; }
.status-used { color: #475569; background: #f1f5f9; }.status-expired { color: #b45309; background: #fff7e6; }
@media (max-width: 720px) {
    .invite-share-card { grid-template-columns: 1fr; }
    .invite-copy-row { align-items: stretch; flex-direction: column; }
}
