:root{--green:#0b7a34;--green-dark:#075b27;--ink:#1f2937;--muted:#6b7280;--line:#e5ece8;--bg:#f5f8f6}
*{box-sizing:border-box}
body{background:var(--bg);color:var(--ink);font-family:Inter,Segoe UI,Arial,sans-serif}
.btn-primary{--bs-btn-bg:var(--green);--bs-btn-border-color:var(--green);--bs-btn-hover-bg:var(--green-dark);--bs-btn-hover-border-color:var(--green-dark)}
.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#f7fbf8,#e7f5ec)}
.login-card{width:min(430px,92vw);background:#fff;border-radius:18px;padding:34px;box-shadow:0 22px 70px rgba(11,122,52,.15)}
.login-card h1{font-size:24px;margin:12px 0 6px}.login-card p{color:var(--muted)}
.login-logo,.logo-mark{background:var(--green);color:#fff;display:grid;place-items:center;font-weight:800}
.login-logo{width:64px;height:64px;border-radius:16px;font-size:34px}.logo-mark{width:42px;height:42px;border-radius:12px;font-size:24px}
.app-shell{display:flex;min-height:100vh}.sidebar{width:260px;background:#fff;border-right:1px solid var(--line);padding:20px;position:sticky;top:0;height:100vh;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable}
.sidebar-brand{display:flex;align-items:center;gap:12px;margin-bottom:28px}.sidebar-brand span{display:block;color:var(--muted);font-size:12px}
.sidebar nav{padding-bottom:28px}
.sidebar::-webkit-scrollbar{width:10px}.sidebar::-webkit-scrollbar-track{background:#f4f7f5}.sidebar::-webkit-scrollbar-thumb{background:#c8d7ce;border-radius:999px;border:2px solid #f4f7f5}.sidebar::-webkit-scrollbar-thumb:hover{background:#9fb9aa}
.sidebar nav a{display:flex;align-items:center;gap:12px;padding:12px 14px;margin:5px 0;color:#374151;text-decoration:none;border-radius:12px;font-weight:600}
.sidebar nav a.active,.sidebar nav a:hover{background:#eaf6ee;color:var(--green)}
.app-main{flex:1;min-width:0}.topbar{height:74px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:18px;padding:0 26px;position:sticky;top:0;z-index:10}
.brand{display:flex;align-items:center;gap:12px;min-width:max-content}.logo-slot{width:42px;height:42px;border:1px dashed #aacdb7;border-radius:10px;display:grid;place-items:center;color:var(--green);font-weight:700}.logo-slot:empty:before{content:"F"}
.logo-slot img{max-width:100%;max-height:100%}.topbar-search{max-width:420px;flex:1;background:#f4f7f5;border:1px solid var(--line);border-radius:999px;padding:9px 14px;display:flex;gap:8px;align-items:center}
.topbar-search input{border:0;background:transparent;outline:0;width:100%}.icon-btn{width:40px;height:40px;border:1px solid var(--line);background:#fff;border-radius:10px}
.content{padding:28px}.page-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:22px}.page-head h1{font-size:28px;margin:0;color:#111827}.page-head p{margin:4px 0 0;color:var(--muted)}
.app-card{border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 30px rgba(31,41,55,.05)}.app-card h2{font-size:18px;margin:0 0 16px;color:#111827}.section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.metric-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;box-shadow:0 10px 30px rgba(31,41,55,.05);min-height:124px;display:flex;flex-direction:column;gap:8px}
.metric-card i{font-size:24px;color:var(--green)}.metric-card span{color:var(--muted);font-weight:600}.metric-card strong{font-size:25px}
.table thead th{background:#f8faf9;color:#4b5563;font-size:12px;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}.table td{vertical-align:middle}
.product-table{min-width:1180px}.product-table .form-control,.product-table .form-select,#loadTable .form-control{min-width:90px}.product-table .product-name{min-width:170px}.product-table .description{min-width:180px}
.pill-group{display:flex;flex-wrap:wrap;gap:10px}.pill-group input{display:none}.pill-group span{display:block;border:1px solid var(--line);border-radius:999px;padding:9px 14px;background:#fff;cursor:pointer;font-weight:600}.pill-group input:checked+span{background:#eaf6ee;border-color:var(--green);color:var(--green)}
.suggest-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.suggest-grid div{background:#f8faf9;border:1px solid var(--line);border-radius:10px;padding:12px}.suggest-grid span{display:block;color:var(--muted);font-size:12px}.suggest-grid strong{font-size:17px}
.summary-row{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding:10px 0;gap:12px}.summary-row span{color:var(--muted)}.summary-row.total strong{font-size:24px;color:var(--green)}.sticky-summary{position:sticky;top:92px}
.logo-preview{width:180px;height:120px;border:1px dashed #aacdb7;border-radius:12px;background:#f8faf9;display:grid;place-items:center;overflow:hidden}.logo-preview img{max-width:100%;max-height:100%;object-fit:contain}.logo-preview span{display:none;width:64px;height:64px;border-radius:16px;background:var(--green);color:#fff;font-size:34px;font-weight:800;place-items:center}
@media (max-width: 900px){.app-shell{display:block}.sidebar{position:relative;width:auto;max-height:45vh;height:auto;overflow-y:auto}.sidebar nav{display:grid;grid-template-columns:repeat(2,1fr);padding-bottom:16px}.topbar{position:relative;flex-wrap:wrap;height:auto;padding:14px}.topbar-search{min-width:100%}.content{padding:18px}.page-head{align-items:flex-start;flex-direction:column}.sticky-summary{position:static}}
