:root{
  --sf-primary:#1f6feb;
  --sf-dark:#0d2137;
  --sf-sidebar:#13243a;
  --sf-sidebar-hover:#1d3350;
}
body{background:#f4f6f9;font-size:.9rem;}
/* Layout */
.sf-wrapper{display:flex;min-height:100vh;}
.sf-sidebar{width:250px;background:var(--sf-sidebar);color:#cdd6e2;flex-shrink:0;position:fixed;top:0;bottom:0;left:0;overflow-y:auto;transition:.2s;z-index:1030;}
.sf-sidebar .brand{padding:16px 18px;font-weight:700;color:#fff;font-size:1.05rem;border-bottom:1px solid rgba(255,255,255,.08);display:flex;align-items:center;gap:8px;}
.sf-sidebar .nav-section{padding:14px 18px 6px;font-size:.68rem;letter-spacing:.08em;text-transform:uppercase;color:#5f7693;}
.sf-sidebar a.nav-link{color:#cdd6e2;padding:8px 18px;display:flex;align-items:center;gap:10px;border-left:3px solid transparent;font-size:.85rem;}
.sf-sidebar a.nav-link:hover{background:rgba(255,255,255,.05);color:#fff;}
.sf-sidebar a.nav-link.active{background:rgba(31,111,235,.18);color:#fff;border-left-color:var(--sf-primary);}
.sf-sidebar .nav-link i{width:18px;text-align:center;}
.sf-main{flex:1;margin-left:250px;display:flex;flex-direction:column;min-width:0;}
.sf-topbar{background:#fff;border-bottom:1px solid #e3e8ef;padding:10px 20px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:1020;}
.sf-content{padding:20px;flex:1;}
.sf-footer{padding:12px 20px;color:#8a97a8;font-size:.8rem;border-top:1px solid #e9edf2;background:#fff;}
@media(max-width:992px){.sf-sidebar{left:-260px;} .sf-sidebar.open{left:0;} .sf-main{margin-left:0;}}
/* Cards & tables */
.card{border:1px solid #e6eaf0;box-shadow:0 1px 2px rgba(16,24,40,.04);}
.page-title{font-size:1.25rem;font-weight:600;margin:0;}
.table thead th{background:#f1f4f8;font-size:.78rem;text-transform:uppercase;letter-spacing:.03em;color:#54657a;white-space:nowrap;}
.table td,.table th{vertical-align:middle;}
.table-sm td,.table-sm th{padding:.4rem .5rem;}
/* Aging colours */
.aging-red{background:#fde2e1!important;color:#b42318;}
.aging-yellow{background:#fef7d6!important;color:#9a6700;}
.aging-green{background:#e3f5e9!important;color:#1a7f37;}
.badge.aging-red{background:#d92d20;color:#fff;}
.badge.aging-yellow{background:#eaaa08;color:#3a2a00;}
.badge.aging-green{background:#17b26a;color:#fff;}
/* Calendar urgency */
.cal-urgent{background:#fde2e1;border-left:4px solid #d92d20;}
.cal-normal{background:#fef7d6;border-left:4px solid #eaaa08;}
.cal-stock{background:#e3f5e9;border-left:4px solid #17b26a;}
/* Filters bar */
.filter-bar{background:#fff;border:1px solid #e6eaf0;border-radius:.5rem;padding:12px 14px;margin-bottom:16px;}
.required:after{content:" *";color:#d92d20;}
.text-mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;}
.stat-card .stat-icon{width:46px;height:46px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1.2rem;}
/* Print */
@media print{
  .no-print,.sf-sidebar,.sf-topbar,.sf-footer{display:none!important;}
  .sf-main{margin-left:0;}
  body{background:#fff;}
  .sf-content{padding:0;}
}
.print-doc{font-family:Arial,Helvetica,sans-serif;color:#000;}
.print-doc table{width:100%;border-collapse:collapse;}
.print-doc table.bordered td,.print-doc table.bordered th{border:1px solid #000;padding:3px 6px;font-size:12px;}
/* Select2 + Bootstrap 5 fit */
.select2-container{width:100%!important;}
.input-group>.select2-container{flex:1 1 auto;width:1%!important;}
.input-group>.select2-container .select2-selection--single{border-top-right-radius:0;border-bottom-right-radius:0;}
.select2-container--default .select2-selection--single{height:calc(2.375rem);display:flex;align-items:center;border-color:#ced4da;}
.select2-container--default .select2-selection--single .select2-selection__rendered{padding-left:.7rem;color:#212529;}
.select2-container--default .select2-selection--single .select2-selection__arrow{height:100%;}
table .select2-container--default .select2-selection--single{height:calc(1.95rem);font-size:.85rem;}
.select2-dropdown{z-index:1060;border-color:#ced4da;}
.select2-container--open .select2-dropdown{box-shadow:0 6px 18px rgba(16,24,40,.12);}
