:root{font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:#1d374e;background:#eef2f6;font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}a{text-decoration:none}button{cursor:pointer}button:disabled{opacity:.55;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #f2a33c;outline-offset:2px}
.app-shell{max-width:520px;height:100dvh;min-height:430px;margin:0 auto;background:#f6f8fb;display:flex;flex-direction:column;box-shadow:0 8px 35px #19334c1a;overflow:hidden}
.app-head{background:#194d76;color:white;min-height:68px;padding:12px 15px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}.app-head h1{margin:0;font-size:21px;font-weight:800;letter-spacing:-.35px;line-height:1.25}.header-action{color:white;border:1px solid #8dabc4;border-radius:9px;background:#ffffff14;padding:9px 11px;font-size:12px;font-weight:700;white-space:nowrap}.logout button{background:#ffffff14;border:1px solid #8dabc4;border-radius:9px;color:white;height:38px;width:40px;display:grid;place-items:center}.logout svg{fill:none;stroke:currentColor;stroke-width:2;width:22px;height:22px;stroke-linecap:round;stroke-linejoin:round}
.app-content{padding:15px;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.search{border:1px solid #d6e0e9;background:#fff;border-radius:11px;padding:11px 12px;min-height:46px;font-size:15px;width:100%;margin-bottom:11px}.item-count{font-size:12px;color:#7a8a9a;margin:0 0 11px}
.product{border:1px solid #e0e8ef;background:white;border-radius:13px;padding:10px;display:flex;align-items:center;gap:13px;margin-bottom:9px}.photo{width:78px;height:78px;flex-shrink:0;background:#e6eef6;border-radius:10px;overflow:hidden;display:flex;align-items:center;justify-content:center}.photo img{width:100%;height:100%;object-fit:cover}.photo span{font-size:35px}.product-data{min-width:0;flex:1}.product-name{font-size:14px;font-weight:750;line-height:1.35;overflow-wrap:anywhere}.product-stock{font-size:21px;font-weight:800;color:#176b48;margin-top:6px}.product-stock small{font-size:11px;color:#7e8c9c;font-weight:500}.empty{text-align:center;color:#8090a2;font-size:13px;padding:26px 8px}
.bottom-nav{background:white;border-top:1px solid #dde5ed;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:5px 5px calc(7px + env(safe-area-inset-bottom,0px));flex-shrink:0}.bottom-nav a{min-height:71px;padding:7px 3px;border-radius:11px;display:flex;justify-content:center;align-items:center;gap:5px;flex-direction:column;color:#647b91;font-size:11px;font-weight:750;text-align:center}.bottom-nav a.active{background:#e9f3ff;color:#165e9c}.bottom-nav svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round}
.entry-form{padding-top:2px}.field{margin-bottom:17px}.field label:not(.upload){display:block;font-size:13px;font-weight:750;color:#334d65;margin-bottom:7px}.field input:not([type=file]),.field select{background:#fff;border:1px solid #d5e0e9;border-radius:10px;padding:11px 12px;min-height:48px;font-size:16px;color:#213d56;width:100%}.field input::placeholder{color:#9eaebb}.field select{appearance:auto}.balance{background:#e9f3fb;border-radius:10px;padding:12px;color:#385e7d;font-size:13px;margin:0 0 17px}.balance strong{color:#1d496c}.balance .after{font-size:12px;margin-top:5px}.negative{color:#b55c35}.positive{color:#176b48}.primary{display:block;width:100%;min-height:51px;border:0;border-radius:11px;background:#196da9;color:white;font-weight:800;font-size:15px;padding:10px 12px;margin-top:5px}.primary.danger{background:#b8623f}
.upload{display:flex;align-items:center;gap:12px;background:#eef6ff;border:1.5px dashed #a4bdd1;border-radius:13px;padding:12px;color:#285b84;cursor:pointer;font-size:13px}.upload-preview{height:90px;width:90px;flex-shrink:0;background:white;border-radius:9px;display:flex;justify-content:center;align-items:center;overflow:hidden}.upload-preview svg{width:35px;height:35px;fill:none;stroke:#6b94b0;stroke-width:1.7}.upload-preview img{width:100%;height:100%;object-fit:cover}.visually-hidden{position:absolute;clip:rect(0,0,0,0);clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
.flash{border-radius:10px;padding:11px;font-size:12px;line-height:1.5;margin-bottom:13px}.flash.success{background:#e3f5ec;border:1px solid #b5e4c7;color:#176c43}.flash.error{background:#fff0ed;border:1px solid #f0c4bd;color:#953c30}.history{margin:18px 0 10px;border-top:1px solid #dce4ed;padding-top:12px}.history summary{font-size:13px;font-weight:750;cursor:pointer}.history-line{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 0;border-bottom:1px solid #e1e7ed}.history-line b{display:block;font-size:12px;overflow-wrap:anywhere}.history-line small{display:block;color:#71869a;font-size:10px;line-height:1.5;margin-top:3px}.history-line>strong{white-space:nowrap;font-size:13px}
.auth{min-height:100dvh;display:grid;place-items:center;padding:18px}.auth-card{width:100%;max-width:390px;padding:25px;border:1px solid #dfe6ef;border-radius:17px;background:white;box-shadow:0 8px 25px #223c5410}.auth-card h1{font-size:25px;margin:0 0 16px}.auth-card p{font-size:13px;line-height:1.55;color:#718196}.auth-card label{display:block;font-size:13px;font-weight:750;margin:15px 0 6px}.auth-card input{width:100%;min-height:47px;border-radius:10px;border:1px solid #d7e0e9;padding:10px;font-size:16px}.auth-card .primary{margin-top:20px}.quiet{color:#718297;font-size:12px}
@media(max-width:520px){:root{background:#f6f8fb}.app-shell{box-shadow:none}.app-content{padding:12px}.app-head{padding:12px 14px}.bottom-nav a{font-size:10.5px}}
/* Stock Kandara V1.1 — detail barang dan riwayat per produk */
.product-link{color:inherit;text-decoration:none;transition:border-color .12s,background .12s}
.product-link:hover,.product-link:focus-visible{border-color:#6e9bc0;background:#fafdff}
.product-chevron{font-size:27px;line-height:1;color:#8298ac;flex-shrink:0;margin-left:auto}
.optional{font-size:11px;color:#7b8fa0;font-weight:500}
.field-hint{font-size:11px;color:#74899b;line-height:1.5;margin-top:6px}
.detail-product{background:#fff;border:1px solid #dfe8f0;border-radius:14px;padding:14px;display:flex;align-items:center;gap:15px;margin-bottom:10px}
.detail-photo{width:113px;height:113px;background:#e8f0f7;border-radius:12px;overflow:hidden;display:flex;justify-content:center;align-items:center;font-size:48px;flex-shrink:0}
.detail-photo img{width:100%;height:100%;object-fit:cover}
.detail-info{min-width:0;flex:1}.detail-name{font-size:17px;font-weight:800;overflow-wrap:anywhere;line-height:1.3}.detail-stock{font-size:29px;font-weight:850;color:#176b48;margin-top:11px}.detail-stock small{font-size:12px;color:#7c8b9d;font-weight:500}
.detail-quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:14px}.detail-quick-actions a{text-align:center;display:grid;place-items:center;min-height:45px;border:1px solid #c8dcf0;border-radius:10px;background:#eaf4ff;color:#1b6094;font-size:12px;font-weight:800;padding:6px}
.edit-card{border:1px solid #dbe5ee;background:#fff;border-radius:12px;margin:10px 0 22px;overflow:hidden}
.edit-card summary{list-style:none;cursor:pointer;font-size:14px;font-weight:800;padding:16px;color:#1d567f;display:flex;justify-content:space-between;align-items:center;gap:10px}.edit-card summary::-webkit-details-marker{display:none}.edit-card summary:after{content:'⌄';font-size:21px}.edit-card[open] summary:after{content:'⌃'}
.edit-card[open] summary{border-bottom:1px solid #e8edf2}
.edit-form{padding:16px 13px}
.checkbox-row{display:flex;align-items:center;gap:8px;font-size:12px;color:#526c80;margin:-5px 0 17px}.checkbox-row input{width:17px;height:17px;accent-color:#176da9}
.product-history h2{font-size:16px;margin:0 0 12px;font-weight:850;color:#1b3b56}
.product-history-row{background:white;border:1px solid #e0e8ef;border-radius:11px;padding:13px;margin-bottom:9px}
.history-row-top{display:flex;align-items:baseline;justify-content:space-between;gap:7px;font-size:13px}.history-row-top>strong:last-child{white-space:nowrap}
.history-row-meta{font-size:11px;color:#74889b;margin-top:5px}.history-row-balance{font-size:12px;color:#4b667c;margin-top:7px}.history-row-balance strong{color:#1d4e72}
.history-row-note{font-size:11px;color:#6d7f90;margin-top:7px;overflow-wrap:anywhere;line-height:1.5;border-top:1px solid #edf1f5;padding-top:7px}
.history-more{display:block;text-align:center;color:#1a619b;background:#e9f3ff;padding:12px;border-radius:10px;font-size:12px;font-weight:800;margin:8px 0 12px}
@media(max-width:360px){.detail-photo{width:90px;height:90px}.detail-stock{font-size:26px}.detail-name{font-size:15px}.detail-quick-actions a{font-size:11px}}
