*{box-sizing:border-box}
body{font-family:"Source Sans Pro",Arial,sans-serif}
.auth{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#eaf2ff,#f7f9fc)}
.auth .card{background:#fff;padding:28px;border-radius:16px;box-shadow:0 10px 35px #0002;width:min(430px,92%);display:grid;gap:12px}
.card h1{margin:0}.card input,.card select,.card textarea{padding:12px;border:1px solid #ccd4df;border-radius:9px;width:100%}
button,.btn{border-radius:6px}.error{background:#ffe0e0;padding:10px;border-radius:8px}.notice{background:#e4f4ff;padding:10px;border-radius:8px;margin-bottom:15px}
.panel{background:#fff;border-radius:10px;padding:18px;margin:16px 0;box-shadow:0 2px 8px #0001}.table{width:100%;border-collapse:collapse;background:#fff}.table th,.table td{padding:10px;border-bottom:1px solid #e5e7eb;text-align:left}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px}.stat{background:#fff;padding:20px;border-radius:10px;box-shadow:0 3px 15px #0001}.small{font-size:12px;color:#667085}
.user-avatar{width:34px;height:34px;border-radius:50%;object-fit:cover;vertical-align:middle}.avatar-fallback{display:inline-grid;place-items:center;background:#e9ecef;color:#495057;font-weight:700}.sidebar-avatar{width:34px;height:34px;display:grid;place-items:center;background:#fff;color:#495057;font-weight:700}.sidebar-role{display:block;font-size:11px;color:#adb5bd}.profile-header{line-height:1.25}.profile-header small{display:block;color:#6c757d;margin-top:3px}.company-badge{font-size:12px;color:#e9ecef;background:#343a40;padding:8px 10px;border-radius:5px;margin:8px 5px 12px}
.page-title{font-weight:600}.danger{background:#b42318!important;color:#fff!important}.theme-purple .main-sidebar{background:#24133f}.theme-purple .brand-link{background:#5b21b6}.theme-purple .nav-sidebar .nav-link.active,.theme-purple .nav-sidebar .nav-link:hover{background:#6d28d9}.theme-purple .page-title{color:#5b21b6}.theme-purple .stat .stat-icon{background:#6d28d9}
.theme-blue .main-sidebar{background:#082f49}.theme-blue .brand-link{background:#0369a1}.theme-blue .nav-sidebar .nav-link.active,.theme-blue .nav-sidebar .nav-link:hover{background:#0284c7}.theme-blue .page-title{color:#0369a1}.theme-blue .stat .stat-icon{background:#0284c7}
.theme-green .main-sidebar{background:#123524}.theme-green .brand-link{background:#15803d}.theme-green .nav-sidebar .nav-link.active,.theme-green .nav-sidebar .nav-link:hover{background:#16a34a}.theme-green .page-title{color:#15803d}.theme-green .stat .stat-icon{background:#16a34a}
.theme-orange .main-sidebar{background:#4a2106}.theme-orange .brand-link{background:#c2410c}.theme-orange .nav-sidebar .nav-link.active,.theme-orange .nav-sidebar .nav-link:hover{background:#ea580c}.theme-orange .page-title{color:#c2410c}.theme-orange .stat .stat-icon{background:#ea580c}
.dashboard-hero{border-radius:12px;color:#fff;padding:22px;margin-bottom:18px;box-shadow:0 5px 18px #0002}.dashboard-hero h2{margin:0 0 5px;font-weight:600}.dashboard-hero p{margin:0;opacity:.9}.hero-purple{background:linear-gradient(135deg,#5b21b6,#7c3aed)}.hero-blue{background:linear-gradient(135deg,#0369a1,#0ea5e9)}.hero-green{background:linear-gradient(135deg,#15803d,#22c55e)}.hero-orange{background:linear-gradient(135deg,#c2410c,#f97316)}
.stat-card{position:relative;overflow:hidden;border:0;border-radius:12px;color:#fff;min-height:125px;padding:20px;box-shadow:0 4px 15px #0002}.stat-card h2{font-size:28px;margin:8px 0 0;font-weight:700}.stat-card .icon{position:absolute;right:15px;top:15px;font-size:48px;opacity:.22}.stat-purple{background:linear-gradient(135deg,#5b21b6,#8b5cf6)}.stat-blue{background:linear-gradient(135deg,#0369a1,#38bdf8)}.stat-green{background:linear-gradient(135deg,#15803d,#4ade80)}.stat-orange{background:linear-gradient(135deg,#c2410c,#fb923c)}
@media(max-width:600px){.main-footer{font-size:12px}.table{font-size:13px}.content-header .breadcrumb{display:none}}
.theme-teal .main-sidebar{background:#083c3c}.theme-teal .brand-link{background:#0f766e}.theme-teal .nav-sidebar .nav-link.active,.theme-teal .nav-sidebar .nav-link:hover{background:#0d9488}.theme-teal .page-title{color:#0f766e}.theme-teal .stat-card{background:linear-gradient(135deg,#0f766e,#2dd4bf)}
.auth-page{min-height:100vh;background:radial-gradient(circle at 20% 20%,#e0f2fe 0,#eef2ff 40%,#f8fafc 100%);display:flex;align-items:center;justify-content:center;padding:30px}.auth-shell{width:min(980px,100%);display:grid;grid-template-columns:1fr 1fr;gap:0;background:#fff;border-radius:24px;overflow:hidden;box-shadow:0 25px 70px rgba(15,23,42,.16)}.auth-brand{background:linear-gradient(145deg,#0f3c68,#2563eb);color:#fff;padding:55px 40px;display:flex;align-items:flex-start;gap:16px}.auth-brand i{font-size:42px}.auth-brand h1{font-size:30px;margin:0}.auth-brand span{opacity:.85}.auth-card{padding:38px}.auth-title h2{font-weight:700;margin-bottom:4px}.auth-title p{color:#64748b}.auth-footer{text-align:center;margin-top:18px;color:#64748b}.auth-footer a{font-weight:700}.table-avatar{width:42px;height:42px;border-radius:50%;object-fit:cover}.action-icon{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;border-radius:7px;margin:1px;text-decoration:none}.action-icon:hover{opacity:.85}.action-view{background:#e0f2fe;color:#0369a1}.action-edit{background:#fef3c7;color:#92400e}.action-delete{background:#fee2e2;color:#b91c1c}.action-reset{background:#ede9fe;color:#6d28d9}.action-approve{background:#dcfce7;color:#15803d}.action-reject{background:#fee2e2;color:#b91c1c}.avatar-large{width:88px;height:88px;border-radius:50%;object-fit:cover}.status-pill{padding:5px 10px;border-radius:20px;font-size:11px;font-weight:700}.status-approved{background:#dcfce7;color:#166534}.status-pending{background:#fef3c7;color:#92400e}.status-rejected,.status-disabled{background:#fee2e2;color:#991b1b}.form-section-title{font-size:14px;font-weight:700;text-transform:uppercase;color:#64748b;letter-spacing:.05em;margin-bottom:12px}
@media(max-width:800px){.auth-shell{grid-template-columns:1fr}.auth-brand{padding:30px}.auth-brand h1{font-size:24px}}
.theme-indigo .main-sidebar{background:#17153b}.theme-indigo .brand-link{background:#3730a3}.theme-indigo .nav-sidebar .nav-link.active,.theme-indigo .nav-sidebar .nav-link:hover{background:#4f46e5}.theme-indigo .page-title{color:#3730a3}
.table thead th{background:#f4f6f9;white-space:nowrap}.card-tools .btn{border-radius:6px}.action-icon{border:0;cursor:pointer}.content-wrapper{min-height:calc(100vh - 115px)}

/* Full-width data tables: readable on desktop, horizontally scrollable on small screens */
.data-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.content-wrapper .table{width:100%;margin-bottom:0}
.content-wrapper .table th,.content-wrapper .table td{vertical-align:middle;padding:11px 12px}
.content-wrapper .table thead th{font-weight:700;background:#f8fafc;border-bottom:2px solid #dee2e6}
.content-wrapper .table td.actions,.content-wrapper .table th.actions{white-space:nowrap;width:1%}
@media(max-width:991.98px){.module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.content-wrapper .table{min-width:760px}}
@media(max-width:575.98px){.module-grid{grid-template-columns:1fr}.content-wrapper .table{min-width:680px}.content-wrapper .card-body{padding:14px}.content-wrapper .card-header{padding:14px}.content-wrapper .table th,.content-wrapper .table td{padding:9px 10px;font-size:13px}}
/* Zero page margins help suppress browser-generated URL/date/page counters in print dialogs. */
@page{margin:0}
/* Print only the active business document. Every receipt/order route must be an allowed print root. */
@media print{
  html,body{background:#fff!important;color:#111!important;margin:0!important;padding:0!important;min-height:0!important}
  body *{visibility:hidden!important}
  #printArea,#printArea *,
  #salePrintArea,#salePrintArea *,
  #paymentPrintArea,#paymentPrintArea *,
  #orderPrintArea,#orderPrintArea *,
  .purchase-order-card,.purchase-order-card *,
  .voucher,.voucher *{visibility:visible!important;color:#111!important;-webkit-text-fill-color:#111!important}
  #printArea,#salePrintArea,#paymentPrintArea,#orderPrintArea,.purchase-order-card,.voucher{background:#fff!important;box-shadow:none!important;border-color:#fff!important}
  #printArea,#salePrintArea,#paymentPrintArea,#orderPrintArea,.purchase-order-card{max-width:none!important}
  .main-sidebar,.main-header,.main-footer,.content-header,.d-print-none{display:none!important}
  /* Remove hidden siblings from layout so printed documents start at the very top, not after the page controls/forms. */
  body:has(#printArea) .content > .container-fluid > :not(#printArea),
  body:has(#salePrintArea) .content > .container-fluid > :not(#salePrintArea),
  body:has(#paymentPrintArea) .content > .container-fluid > :not(#paymentPrintArea),
  body:has(#orderPrintArea) .content > .container-fluid > :not(#orderPrintArea),
  body:has(.voucher) .content > .container-fluid > :not(.voucher){display:none!important}
  .content-wrapper,.content,.container-fluid{margin:0!important;padding:0!important;min-height:0!important;width:100%!important;max-width:none!important;overflow:visible!important}
  #printArea table,#salePrintArea table,#paymentPrintArea table,#orderPrintArea table,.purchase-order-card table{border-collapse:collapse!important}
  #printArea th,#printArea td,#salePrintArea th,#salePrintArea td,#paymentPrintArea th,#paymentPrintArea td,#orderPrintArea th,#orderPrintArea td,.purchase-order-card th,.purchase-order-card td{color:#111!important;-webkit-text-fill-color:#111!important}
}

.company-logo{width:46px;height:46px;border-radius:8px;object-fit:contain;background:#fff;border:1px solid #e5e7eb;padding:3px}.company-logo-fallback{display:inline-flex;align-items:center;justify-content:center;font-weight:800;color:#4f46e5;background:#eef2ff}.company-logo-mini{width:24px;height:24px;border-radius:5px;object-fit:contain;background:#fff;vertical-align:middle}.company-initial-mini{display:inline-flex;width:24px;height:24px;border-radius:5px;align-items:center;justify-content:center;background:#fff;color:#374151;font-size:9px;font-weight:800;vertical-align:middle}.company-badge{display:flex;align-items:center}
.module-card{height:100%;min-height:92px;display:flex;align-items:center;gap:14px;padding:16px;background:#fff;border-radius:12px;border-left:5px solid #64748b;box-shadow:0 4px 16px rgba(15,23,42,.08);color:#1f2937;text-decoration:none;position:relative;transition:transform .15s,box-shadow .15s}.module-card:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(15,23,42,.12);color:#111827;text-decoration:none}.module-card h5{margin:0 0 3px;font-weight:700}.module-card small{color:#64748b}.module-icon{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;font-size:20px;background:#f1f5f9}.module-arrow{margin-left:auto;color:#94a3b8}.module-success{border-color:#16a34a}.module-success .module-icon{color:#15803d;background:#dcfce7}.module-primary{border-color:#2563eb}.module-primary .module-icon{color:#1d4ed8;background:#dbeafe}.module-info{border-color:#0891b2}.module-info .module-icon{color:#0e7490;background:#cffafe}.module-warning{border-color:#d97706}.module-warning .module-icon{color:#b45309;background:#fef3c7}.module-purple{border-color:#7c3aed}.module-purple .module-icon{color:#6d28d9;background:#ede9fe}.module-indigo{border-color:#4f46e5}.module-indigo .module-icon{color:#4338ca;background:#e0e7ff}.module-teal{border-color:#0d9488}.module-teal .module-icon{color:#0f766e;background:#ccfbf1}.module-orange{border-color:#ea580c}.module-orange .module-icon{color:#c2410c;background:#ffedd5}.module-danger{border-color:#dc2626}.module-danger .module-icon{color:#b91c1c;background:#fee2e2}
.card-outline.card-purple{border-top:3px solid #7c3aed}

/* Responsive module forms: prevent labels/inputs/buttons from being squeezed or hidden */
.module-form-row,
.card-body > form > .row,
.card-body form .row.form-grid {
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
  margin:0 !important;
}
.module-form-row > [class*="col-"],
.card-body > form > .row > [class*="col-"],
.card-body form .row.form-grid > [class*="col-"] {
  width:100% !important;
  max-width:none !important;
  flex:none !important;
  padding:0 !important;
  min-width:0;
}
.module-form-row .form-group,
.card-body > form .form-group {margin-bottom:0 !important;min-width:0}
.card-body > form label,
.module-form-row label {display:block;white-space:normal;line-height:1.35;margin-bottom:7px;font-weight:600}
.card-body > form .form-control,
.card-body > form .custom-select,
.card-body > form select,
.card-body > form input,
.card-body > form textarea {width:100%;min-width:0;height:auto;min-height:44px;font-size:15px}
.card-body > form textarea {min-height:100px}
.card-body > form .btn-block {width:100%;min-height:44px;white-space:nowrap}

/* Wider working area on desktop and safe gutters on small screens */
.content-wrapper .content {overflow-x:hidden}
.content-wrapper .container-fluid {width:100%;max-width:1600px;margin:0 auto}
.content-wrapper .card {width:100%;max-width:100%;overflow:hidden}
.card-body.table-responsive {overflow-x:auto;-webkit-overflow-scrolling:touch}
.card-body.table-responsive table {width:100%;min-width:100%;}

/* Bootstrap rows used for detail sections remain responsive without clipping */
.card-body > .row:not(form .row) {display:flex;flex-wrap:wrap;margin-left:-7.5px;margin-right:-7.5px}

/* Module dashboard cards */
.module-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.module-grid > * {min-width:0}

@media (max-width:1100px){
  .module-form-row,
  .card-body > form > .row,
  .card-body form .row.form-grid {grid-template-columns:repeat(auto-fit,minmax(200px,1fr));}
}
@media (max-width:767.98px){
  .content-wrapper .content {padding-left:10px;padding-right:10px}
  .content-header {padding-left:10px;padding-right:10px}
  .content-header h1 {font-size:1.45rem}
  .card {border-radius:10px}
  .card-header {display:flex;flex-wrap:wrap;gap:10px;align-items:center}
  .card-header .card-tools {margin-left:auto;float:none}
  .module-form-row,
  .card-body > form > .row,
  .card-body form .row.form-grid {grid-template-columns:1fr;gap:14px;}
  .module-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .module-card {min-height:88px;padding:14px}
  .table {font-size:13px}
}
@media (min-width:768px) and (max-width:991.98px){
  .module-form-row,
  .card-body > form > .row,
  .card-body form .row.form-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (min-width:992px){
  .module-form-row,
  .card-body > form > .row,
  .card-body form .row.form-grid {grid-template-columns:repeat(auto-fit,minmax(210px,1fr));}
}
/* Profile editor */
.profile-page{max-width:1400px;margin:0 auto}.profile-hero{position:relative;display:flex;align-items:center;gap:22px;padding:28px 30px;border-radius:20px;background:linear-gradient(135deg,#0f3c68 0%,#2563eb 58%,#38bdf8 100%);color:#fff;box-shadow:0 15px 35px rgba(15,60,104,.20);overflow:hidden}.profile-hero:after{content:"";position:absolute;width:280px;height:280px;border-radius:50%;right:-90px;top:-150px;background:rgba(255,255,255,.10)}.profile-avatar-wrap{position:relative;z-index:1}.profile-avatar-xl{width:108px;height:108px;border-radius:50%;object-fit:cover;border:4px solid rgba(255,255,255,.9);box-shadow:0 8px 22px rgba(0,0,0,.18);background:#fff}.avatar-fallback-xl{display:flex;align-items:center;justify-content:center;color:#2563eb;background:#eff6ff;font-weight:800;font-size:30px}.profile-online-dot{position:absolute;right:6px;bottom:7px;width:19px;height:19px;border:3px solid #fff;border-radius:50%;background:#22c55e}.profile-hero-info{position:relative;z-index:1}.profile-eyebrow,.section-kicker{font-size:11px;font-weight:800;letter-spacing:.12em;opacity:.75}.profile-hero h2{font-size:30px;margin:5px 0}.profile-hero p{margin:0;opacity:.9}.profile-home{margin-left:auto;position:relative;z-index:1;border:0;font-weight:700}.profile-card{background:#fff;border:1px solid #edf0f5;border-radius:18px;padding:26px;box-shadow:0 8px 28px rgba(15,23,42,.07)}.profile-card-head{display:flex;justify-content:space-between;gap:15px;align-items:flex-start;margin-bottom:22px}.profile-card-head h3{margin:5px 0 4px;font-size:23px;font-weight:700;color:#172033}.profile-card-head p{margin:0;color:#718096;font-size:14px}.section-kicker{color:#64748b;opacity:1}.section-icon{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;font-size:19px}.icon-blue{background:#e0f2fe;color:#0369a1}.icon-purple{background:#ede9fe;color:#6d28d9}.icon-green{background:#dcfce7;color:#15803d}.input-icon{position:relative}.input-icon i{position:absolute;left:13px;top:12px;color:#94a3b8;z-index:2}.input-icon .form-control{padding-left:38px}.profile-card label{font-size:13px;font-weight:700;color:#344054}.profile-card .form-control{border:1px solid #d9e0ea;border-radius:10px;min-height:45px}.profile-card .form-control:focus{border-color:#60a5fa;box-shadow:0 0 0 3px rgba(37,99,235,.10)}.profile-btn{border-radius:10px;padding:10px 18px;font-weight:700}.btn-purple{background:#6d28d9;color:#fff;border-color:#6d28d9}.btn-purple:hover{background:#5b21b6;color:#fff}.picture-card{margin-bottom:25px}.picture-editor{display:grid;grid-template-columns:240px 1fr;gap:28px;align-items:center}.picture-preview-box{padding:18px;border-radius:16px;background:#f8fafc;border:1px dashed #cbd5e1;text-align:center}.preview-label{font-size:11px;font-weight:800;letter-spacing:.1em;color:#64748b;margin-bottom:10px}.picture-preview{width:150px;height:150px;border-radius:16px;object-fit:cover;border:4px solid #fff;box-shadow:0 7px 20px rgba(15,23,42,.12)}.picture-preview-box small{display:block;color:#64748b;margin-top:10px}.upload-dropzone{min-height:180px;border:2px dashed #bfdbfe;border-radius:16px;background:linear-gradient(145deg,#f8fbff,#eff6ff);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;cursor:pointer;color:#475569;text-align:center}.upload-dropzone i{font-size:38px;color:#2563eb}.upload-dropzone strong{font-size:18px;color:#172033}.upload-dropzone span{font-size:13px}.upload-dropzone:hover{border-color:#60a5fa;background:#eff6ff}@media(max-width:767px){.profile-hero{align-items:flex-start;padding:22px;flex-wrap:wrap}.profile-avatar-xl{width:86px;height:86px}.profile-hero h2{font-size:23px}.profile-home{width:100%;margin-left:0}.picture-editor{grid-template-columns:1fr}.picture-preview-box{max-width:300px;margin:auto;width:100%}}
/* Product image UI */
.product-image-thumb{width:48px;height:48px;border-radius:10px;object-fit:cover;border:1px solid #e2e8f0;background:#f8fafc}.product-image-fallback{display:inline-flex;align-items:center;justify-content:center;color:#64748b}.product-image-preview{width:130px;height:130px;border-radius:14px;object-fit:cover;border:3px solid #fff;box-shadow:0 6px 18px rgba(15,23,42,.12)}.product-upload{border:1px dashed #bfdbfe;background:#f8fbff;border-radius:12px;padding:16px}.product-upload label{margin-bottom:8px}

/* === Module dashboard: compact 4-5 column responsive cards === */
.module-grid{
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:16px;
  width:100%;
  margin:0;
}
.module-grid > *{
  width:auto !important;
  max-width:none !important;
  min-width:0;
  margin:0 !important;
  padding:0 !important;
}
.module-card{
  min-height:108px;
  width:100%;
  padding:15px 14px;
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 24px;
  align-items:center;
  gap:11px;
  border:1px solid rgba(255,255,255,.72);
  border-left:4px solid var(--module-accent,#64748b);
  border-radius:16px;
  background:rgba(255,255,255,.62);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  box-shadow:0 8px 24px rgba(15,23,42,.07), inset 0 1px 0 rgba(255,255,255,.8);
  color:#172033;
  text-decoration:none;
  overflow:hidden;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}
.module-card:hover{transform:translateY(-3px);background:rgba(255,255,255,.82);box-shadow:0 12px 30px rgba(15,23,42,.12);color:#111827;text-decoration:none}
.module-card h5{margin:0 0 4px;font-size:16px;line-height:1.2;font-weight:800;white-space:normal}
.module-card small{display:block;color:#64748b;font-size:11px;line-height:1.35;white-space:normal}
.module-icon{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;font-size:18px;background:var(--module-bg);color:var(--module-accent)}
.module-copy{min-width:0}.module-arrow{color:var(--module-accent);font-size:15px;opacity:.75;text-align:center}
.module-success{--module-accent:#16a34a;--module-bg:rgba(220,252,231,.82);background:rgba(240,253,244,.56)}
.module-primary{--module-accent:#2563eb;--module-bg:rgba(219,234,254,.84);background:rgba(239,246,255,.56)}
.module-info{--module-accent:#0891b2;--module-bg:rgba(207,250,254,.84);background:rgba(236,254,255,.56)}
.module-warning{--module-accent:#d97706;--module-bg:rgba(254,243,199,.88);background:rgba(255,251,235,.58)}
.module-purple{--module-accent:#7c3aed;--module-bg:rgba(237,233,254,.88);background:rgba(250,245,255,.58)}
.module-indigo{--module-accent:#4f46e5;--module-bg:rgba(224,231,255,.88);background:rgba(238,242,255,.58)}
.module-teal{--module-accent:#0d9488;--module-bg:rgba(204,251,241,.88);background:rgba(240,253,250,.58)}
.module-orange{--module-accent:#ea580c;--module-bg:rgba(255,237,213,.9);background:rgba(255,247,237,.58)}
.module-danger{--module-accent:#dc2626;--module-bg:rgba(254,226,226,.9);background:rgba(254,242,242,.58)}
.module-cyan{--module-accent:#0891b2;--module-bg:rgba(207,250,254,.9);background:rgba(236,254,255,.58)}
.module-pink{--module-accent:#db2777;--module-bg:rgba(251,207,232,.9);background:rgba(253,242,248,.58)}
@media (max-width:1399.98px){.module-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:991.98px){.module-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.module-card{min-height:100px}}
@media (max-width:767.98px){.module-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.module-card{min-height:94px;padding:12px 11px;grid-template-columns:38px minmax(0,1fr) 18px;gap:8px}.module-icon{width:38px;height:38px;border-radius:11px;font-size:16px}.module-card h5{font-size:14px}.module-card small{font-size:10px}}
@media (max-width:480px){.module-grid{grid-template-columns:1fr}.module-card{min-height:82px}}

/* Global module search */
.global-module-search{position:relative;display:flex;align-items:center;max-width:430px;margin-left:auto;margin-bottom:6px}
.global-module-search>i{position:absolute;left:14px;color:#64748b;z-index:2}
.global-module-search .form-control{padding-left:40px;padding-right:42px;border-radius:12px;border:1px solid #dbe3ef;min-height:42px;box-shadow:0 3px 12px rgba(15,23,42,.05)}
.global-module-search .form-control:focus{border-color:#60a5fa;box-shadow:0 0 0 3px rgba(37,99,235,.10)}
.global-module-search button{position:absolute;right:7px;width:30px;height:30px;border:0;border-radius:8px;background:#f1f5f9;color:#64748b;display:grid;place-items:center}
.global-module-search button:hover{background:#e2e8f0;color:#0f172a}
.top-notification{position:fixed;top:72px;right:18px;z-index:1100;width:min(320px,calc(100vw - 24px));min-width:0;max-width:320px;padding:8px 30px 8px 10px;font-size:11.5px;line-height:1.34;box-shadow:0 10px 28px rgba(15,23,42,.16);border-radius:11px}
.stock-stat-card{border-radius:16px;padding:18px 20px;position:relative;overflow:hidden;box-shadow:0 8px 24px rgba(15,23,42,.08);background:#fff;border:1px solid #e8edf4}
.stock-stat-card .label{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#64748b;font-weight:800}
.stock-stat-card h2{margin:6px 0 0;font-size:28px;font-weight:800;color:#172033}
.stock-stat-card .icon{position:absolute;right:18px;top:18px;font-size:28px;opacity:.18}
@media(max-width:767.98px){.global-module-search{max-width:none;margin-top:10px}.top-notification{left:auto;right:10px;width:min(320px,calc(100vw - 20px));min-width:0;max-width:320px;top:62px;padding:8px 30px 8px 9px;font-size:11px}}
.brand-link-logo{display:flex!important;align-items:center;gap:8px}.brand-logo{width:32px;height:32px;object-fit:contain;background:#fff;border-radius:7px;padding:2px}.brand-link-logo .brand-text{font-size:16px}.auth-logo{width:82px;height:82px;object-fit:contain;background:#fff;border-radius:14px;padding:4px;flex:0 0 auto}.auth-brand{align-items:center!important}.main-footer{font-size:13px}
.auth-copyright{text-align:center;color:#64748b;font-size:12px;margin-top:12px}.auth-shell{position:relative}

/* DUKA MAKINI TZ branding */
.dashboard-hero{position:relative;overflow:hidden;background-image:linear-gradient(135deg,rgba(3,105,161,.97),rgba(14,165,233,.94)),url("duka-makini-tz-logo.png");background-repeat:no-repeat;background-position:center,calc(100% + 20px);background-size:cover,260px;background-blend-mode:normal,screen}
.dashboard-hero:after{content:"";position:absolute;right:-25px;top:-55px;width:310px;height:310px;background:url("duka-makini-tz-logo.png") center/contain no-repeat;opacity:.12;pointer-events:none}
.dashboard-hero h2,.dashboard-hero p{position:relative;z-index:1}
.module-brand-strip{display:flex;align-items:center;gap:14px;padding:12px 16px;margin:0 0 16px;border-radius:12px;background:#fff;border:1px solid #e5e7eb;box-shadow:0 5px 16px rgba(15,23,42,.06)}
.module-brand-strip img{width:54px;height:54px;object-fit:contain;border-radius:9px;background:#fff}
.module-brand-strip strong{display:block;font-size:19px;letter-spacing:.02em;color:#0f3c68}
.module-brand-strip small{display:block;color:#64748b;margin-top:2px}

.profit-value{color:#d4af37 !important;} .loss-value{color:#dc3545 !important;}

/* Animated form controls and shared password/NIDA interactions */
.form-control,.custom-select,select.form-control,textarea.form-control,.btn{transition:border-color .22s ease,box-shadow .22s ease,transform .22s ease,background-color .22s ease}
.form-control,select.form-control,.custom-select,textarea.form-control{border-radius:10px}
.form-control:focus,.custom-select:focus,select.form-control:focus,textarea.form-control:focus{border-color:#60a5fa;box-shadow:0 0 0 3px rgba(37,99,235,.13),0 5px 14px rgba(37,99,235,.06);transform:translateY(-1px);animation:ddpFieldFocus .28s ease-out}
.form-group label{transition:color .2s ease}
.form-group:focus-within>label{color:#2563eb}
.form-control:hover:not(:disabled):not(:focus),.custom-select:hover:not(:disabled):not(:focus){border-color:#a8bbd3}
.btn{transition:transform .2s ease,box-shadow .2s ease,filter .2s ease}
.btn:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 7px 16px rgba(15,23,42,.10)}
@keyframes ddpFieldFocus{from{box-shadow:0 0 0 0 rgba(37,99,235,0)}to{box-shadow:0 0 0 3px rgba(37,99,235,.13)}}
.ddp-password-field{position:relative;display:block;width:100%;min-width:0}
.ddp-password-field>input{padding-right:48px}
.ddp-password-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:42px;border:1px solid #d5deea;background:#f8fafc;color:#64748b;border-radius:0 9px 9px 0;cursor:pointer;transition:background .18s ease,color .18s ease,border-color .18s ease}
.ddp-password-toggle:hover{background:#eaf2ff;color:#1d4ed8;border-color:#93c5fd}
.ddp-password-field>.ddp-password-toggle{position:absolute;right:5px;top:50%;transform:translateY(-50%);height:34px;min-width:36px;border:0;border-radius:8px;background:transparent}
.ddp-password-field>.ddp-password-toggle:hover{background:#eaf2ff}
.ddp-password-toggle-group{border-radius:0 9px 9px 0!important;border-left:0;min-width:44px}
.ddp-password-meter{margin-top:8px;padding:8px 10px;border:1px solid #e5eaf2;border-radius:10px;background:rgba(248,250,252,.88);font-size:12px;line-height:1.35;animation:ddpMeterIn .2s ease-out}
.ddp-meter-bars{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-bottom:7px}
.ddp-meter-bars span{height:5px;border-radius:99px;background:#dbe3ee;transition:background .25s ease,transform .25s ease}
.ddp-password-meter[data-level="weak"] .ddp-meter-bars span.is-filled{background:#ef4444}
.ddp-password-meter[data-level="medium"] .ddp-meter-bars span.is-filled{background:#f59e0b}
.ddp-password-meter[data-level="strong"] .ddp-meter-bars span.is-filled{background:#16a34a}
.ddp-password-meter[data-level="strongest"] .ddp-meter-bars span.is-filled{background:#0d9488}
.ddp-meter-copy{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.ddp-meter-label{font-weight:800;color:#334155}
.ddp-meter-hint{color:#64748b}
.ddp-password-meter[data-level="weak"] .ddp-meter-label{color:#b91c1c}
.ddp-password-meter[data-level="medium"] .ddp-meter-label{color:#a16207}
.ddp-password-meter[data-level="strong"] .ddp-meter-label{color:#15803d}
.ddp-password-meter[data-level="strongest"] .ddp-meter-label{color:#0f766e}
@keyframes ddpMeterIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
.nida-input{font-variant-numeric:tabular-nums;letter-spacing:.03em}
.age-output{font-weight:800;color:#0f766e;background:#f0fdfa!important}
@media(max-width:575.98px){.ddp-meter-copy{display:block}.ddp-meter-hint{display:block;margin-top:3px}}
@media(prefers-reduced-motion:reduce){.form-control,.custom-select,select.form-control,textarea.form-control,.btn,.ddp-password-toggle,.ddp-meter-bars span{transition:none!important;animation:none!important}}

/* Unified animated modal forms for add, update and related record actions */
.ddp-modal-trigger-wrap{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:8px 0}
.ddp-modal-trigger{box-shadow:0 5px 14px rgba(37,99,235,.15);transition:transform .18s ease,box-shadow .18s ease}
.ddp-modal-trigger:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(37,99,235,.22)}
.ddp-crud-modal .modal-dialog,.ddp-confirm-modal .modal-dialog{transform:translateY(18px) scale(.985);transition:transform .22s ease-out}
.ddp-crud-modal.show .modal-dialog,.ddp-confirm-modal.show .modal-dialog{transform:translateY(0) scale(1)}
.ddp-modal-header{background:linear-gradient(115deg,#0b3d91,#0879c9);color:#fff;border-bottom:0;border-radius:calc(.3rem - 1px) calc(.3rem - 1px) 0 0}
.ddp-modal-header .modal-title{font-weight:700;letter-spacing:.1px}
.ddp-modal-header .close{color:#fff;text-shadow:none;opacity:.9}
.ddp-modal-header .close:hover{opacity:1}
.ddp-modal-body{max-height:min(72vh,760px);overflow-y:auto;padding:22px}
.ddp-modal-body>.ddp-modalized-form{width:100%;margin:0}
.ddp-modal-body .form-control,.ddp-modal-body .custom-select{border-radius:8px;min-height:40px;transition:border-color .18s ease,box-shadow .18s ease}
.ddp-modal-body .form-control:focus,.ddp-modal-body .custom-select:focus{border-color:#2784e7;box-shadow:0 0 0 .18rem rgba(39,132,231,.16)}
.ddp-modal-body .form-group label{font-weight:600;color:#334155}
.ddp-confirm-modal .modal-content{border:0;border-radius:14px;overflow:hidden;box-shadow:0 20px 60px rgba(15,23,42,.24)}
.ddp-confirm-modal .modal-body{padding:24px;font-size:1rem;line-height:1.6}
.ddp-confirm-modal .modal-footer{border-top:1px solid #edf0f5}
@media(max-width:575.98px){.ddp-crud-modal .modal-dialog,.ddp-confirm-modal .modal-dialog{margin:.5rem}.ddp-modal-body{padding:16px;max-height:78vh}.ddp-modal-trigger{max-width:100%;white-space:normal}}


/* v24 navigation polish: dark-blue topbar + glowing blue active sidebar with gold shadow */
.main-header.navbar {
  background: linear-gradient(112deg, #061638 0%, #08285b 58%, #0a3472 100%) !important;
  border-bottom: 2px solid #d4af37 !important;
  box-shadow: 0 5px 18px rgba(5, 20, 49, .24);
}
.main-header.navbar.navbar-light .navbar-nav .nav-link,
.main-header.navbar .navbar-nav > .nav-item > .nav-link {
  color: #f8fbff !important;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.main-header.navbar .navbar-nav > .nav-item > .nav-link:hover,
.main-header.navbar .navbar-nav > .nav-item > .nav-link:focus {
  color: #ffe6a0 !important;
  background: rgba(255, 255, 255, .09);
  border-radius: 8px;
}
.main-header.navbar .dropdown-menu .dropdown-item,
.main-header.navbar .dropdown-menu .dropdown-header {
  color: #172033;
}
.main-sidebar .nav-sidebar .nav-link {
  border-radius: 8px;
  margin: 2px 7px;
  width: calc(100% - 14px);
  transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.main-sidebar .nav-sidebar .nav-link:hover:not(.active) {
  background: linear-gradient(105deg, rgba(0, 123, 255, .25), rgba(0, 174, 255, .17)) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, .48), 0 0 11px rgba(212, 175, 55, .20);
}
.main-sidebar .nav-sidebar .nav-link.active,
.main-sidebar .nav-sidebar .nav-link[aria-current="page"] {
  background: linear-gradient(105deg, #087bff 0%, #08a8ff 62%, #35c5ff 100%) !important;
  color: #fff !important;
  border-left: 3px solid #ffd166;
  padding-left: calc(.5rem - 3px);
  box-shadow: 0 0 0 1px rgba(255, 209, 102, .85),
              0 0 11px rgba(255, 193, 7, .34),
              0 9px 10px -4px rgba(255, 193, 7, .86),
              0 12px 17px -5px rgba(0, 123, 255, .30) !important;
  transform: translateX(2px);
}
.main-sidebar .nav-sidebar .nav-link.active .nav-icon,
.main-sidebar .nav-sidebar .nav-link[aria-current="page"] .nav-icon,
.main-sidebar .nav-sidebar .nav-link.active p {
  color: #fff !important;
}
.main-sidebar .nav-sidebar .nav-treeview .nav-link.active,
.main-sidebar .nav-sidebar .nav-treeview .nav-link[aria-current="page"] {
  background: linear-gradient(105deg, #087bff 0%, #08a8ff 100%) !important;
  box-shadow: 0 0 0 1px rgba(255, 209, 102, .82),
              0 0 8px rgba(255, 193, 7, .28),
              0 8px 9px -3px rgba(255, 193, 7, .84) !important;
}
@media (prefers-reduced-motion: reduce) {
  .main-header.navbar .navbar-nav > .nav-item > .nav-link,
  .main-sidebar .nav-sidebar .nav-link { transition: none !important; }
}


/* === DUKA MAKINI TZ: animated global activity toasts === */
.ddp-toast-region{position:fixed;top:18px;right:18px;z-index:30050;width:min(320px,calc(100vw - 24px));display:flex;flex-direction:column;gap:8px;pointer-events:none}
.ddp-toast{position:relative;display:flex;align-items:flex-start;gap:8px;padding:8px 29px 9px 9px;background:rgba(255,255,255,.97);border:1px solid #e2e8f0;border-left:3px solid #087bff;border-radius:12px;box-shadow:0 10px 28px rgba(7,29,73,.17),0 3px 9px rgba(15,23,42,.07);overflow:hidden;pointer-events:auto;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);color:#172033}
.ddp-toast-success{border-left-color:#16a34a}.ddp-toast-error{border-left-color:#dc2626}.ddp-toast-warning{border-left-color:#d97706}.ddp-toast-info{border-left-color:#087bff}
.ddp-toast-icon{width:26px;height:26px;flex:0 0 26px;display:grid;place-items:center;border-radius:9px;font-size:13px;margin-top:1px}
.ddp-toast-icon-success{color:#15803d;background:linear-gradient(135deg,#dcfce7,#bbf7d0)}.ddp-toast-icon-error{color:#b91c1c;background:linear-gradient(135deg,#fee2e2,#fecaca)}.ddp-toast-icon-warning{color:#b45309;background:linear-gradient(135deg,#fef3c7,#fde68a)}.ddp-toast-icon-info{color:#0756b8;background:linear-gradient(135deg,#dbeafe,#bfdbfe)}
.ddp-toast-icon-success i{animation:ddpToastSuccess .72s cubic-bezier(.2,.8,.2,1) both}.ddp-toast-icon-error i{animation:ddpToastShake .48s ease-in-out both}.ddp-toast-icon-warning i{animation:ddpToastPulse 1.15s ease-in-out infinite}.ddp-toast-icon-info i{animation:ddpToastRing 1.35s ease-in-out infinite}
.ddp-toast-copy{min-width:0;flex:1;padding-top:1px}.ddp-toast-heading{font-size:12px;font-weight:800;letter-spacing:.01em;color:#071d49;line-height:1.2;margin-bottom:2px}.ddp-toast-message{font-size:11.5px;line-height:1.32;overflow-wrap:anywhere;color:#475569}
.ddp-toast-close{position:absolute;right:5px;top:5px;width:23px;height:23px;border:0;border-radius:7px;background:transparent;color:#94a3b8;font-size:20px;line-height:1;display:grid;place-items:center;cursor:pointer;transition:background .18s ease,color .18s ease}.ddp-toast-close:hover,.ddp-toast-close:focus{background:#f1f5f9;color:#0f172a;outline:none}
.ddp-toast-progress{position:absolute;left:0;right:0;bottom:0;height:3px;background:#e2e8f0}.ddp-toast-progress span{display:block;height:100%;width:100%;transform-origin:left;background:#087bff;animation:ddpToastProgress linear forwards}.ddp-toast-success .ddp-toast-progress span{background:#16a34a}.ddp-toast-error .ddp-toast-progress span{background:#dc2626}.ddp-toast-warning .ddp-toast-progress span{background:#d97706}
.ddp-toast-enter{animation:ddpToastIn .42s cubic-bezier(.2,.8,.2,1) both}.ddp-toast-leave{animation:ddpToastOut .24s ease-in both}
/* Original inline alerts remain in the document for compatibility with form/modal routing, but toast is their visual presentation. */
.ddp-toast-source{display:none!important}
@keyframes ddpToastIn{from{opacity:0;transform:translate3d(34px,-7px,0) scale(.97);filter:blur(2px)}to{opacity:1;transform:translate3d(0,0,0) scale(1);filter:blur(0)}}
@keyframes ddpToastOut{to{opacity:0;transform:translate3d(28px,-4px,0) scale(.96);max-height:0;margin-top:-10px;padding-top:0;padding-bottom:0}}
@keyframes ddpToastSuccess{0%{transform:scale(.35) rotate(-25deg);opacity:.2}65%{transform:scale(1.2) rotate(8deg)}100%{transform:scale(1) rotate(0);opacity:1}}
@keyframes ddpToastShake{0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-3px)}40%,80%{transform:translateX(3px)}}
@keyframes ddpToastPulse{0%,100%{transform:scale(1);filter:drop-shadow(0 0 0 rgba(217,119,6,0))}50%{transform:scale(1.13);filter:drop-shadow(0 0 5px rgba(217,119,6,.35))}}
@keyframes ddpToastRing{0%,100%{transform:rotate(0)}12%{transform:rotate(13deg)}24%{transform:rotate(-13deg)}36%{transform:rotate(9deg)}48%{transform:rotate(-7deg)}60%{transform:rotate(0)}}
@keyframes ddpToastProgress{from{transform:scaleX(1)}to{transform:scaleX(0)}}
@media(max-width:575.98px){.ddp-toast-region{top:10px;right:10px;left:10px;width:auto;max-width:320px;margin-left:auto}.ddp-toast{gap:7px;padding:8px 28px 9px 8px;border-radius:10px}.ddp-toast-icon{width:25px;height:25px;flex-basis:25px;border-radius:7px;font-size:12px}.ddp-toast-heading{font-size:11px}.ddp-toast-message{font-size:11px;line-height:1.3}}
@media(prefers-reduced-motion:reduce){.ddp-toast-enter,.ddp-toast-leave,.ddp-toast-icon i,.ddp-toast-progress span{animation:none!important}.ddp-toast,.ddp-toast-close{transition:none!important}}


/* v29: fixed/sticky topbar; modal workspace begins after sidebar on desktop. */
.main-header.navbar{
  position:fixed!important;top:0;left:250px;right:0;z-index:1037!important;
  min-height:57px;margin-left:0!important;transition:left .22s ease,box-shadow .22s ease;
}
.content-wrapper{padding-top:57px;}
.main-footer{position:relative;}
.sidebar-mini.sidebar-collapse .main-header{left:4.6rem;}
.modal.ddp-crud-modal,.modal.ddp-confirm-modal{
  left:250px!important;right:0!important;width:auto!important;
  overflow-x:hidden;overscroll-behavior:contain;
}
.modal-backdrop{left:250px;width:auto;right:0;}
.sidebar-mini.sidebar-collapse .modal.ddp-crud-modal,
.sidebar-mini.sidebar-collapse .modal.ddp-confirm-modal{left:4.6rem!important;}
.sidebar-mini.sidebar-collapse .modal-backdrop{left:4.6rem;}
.ddp-modal-header .close{
  display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;
  padding:0;margin:-.25rem -.45rem -.25rem auto;border:1px solid #ff4d4f!important;
  border-radius:9px;color:#fff!important;background:rgba(255,255,255,.06)!important;
  opacity:1!important;text-shadow:none;transition:background .18s ease,box-shadow .18s ease,transform .18s ease;
}
.ddp-modal-header .close:hover,.ddp-modal-header .close:focus,.ddp-modal-header .close:active,
.ddp-modal-header .close:focus-visible{
  color:#fff!important;background:#dc2626!important;border-color:#dc2626!important;
  box-shadow:0 0 0 3px rgba(220,38,38,.24);outline:none;transform:scale(1.04);
}
.ddp-modal-header .close:focus-visible{outline:2px solid #fff;outline-offset:1px;}
.ddp-user-reset-modal .modal-content{border:0;border-radius:15px;overflow:hidden;box-shadow:0 20px 60px rgba(7,29,73,.25);}
.ddp-dob-output{font-weight:700;color:#0f3c68;background:#f8fbff!important;}
@media(max-width:991.98px){
  .main-header.navbar{left:0;}
  .content-wrapper{padding-top:57px;}
  .modal.ddp-crud-modal,.modal.ddp-confirm-modal{left:0!important;right:0!important;width:auto!important;}
  .modal-backdrop{left:0;width:100%;right:auto;}
}
@media(max-width:575.98px){
  .modal.ddp-crud-modal .modal-dialog,.modal.ddp-confirm-modal .modal-dialog{margin:.45rem;max-width:calc(100% - .9rem);}
  .ddp-modal-body{padding:14px;max-height:calc(100dvh - 155px);overflow-y:auto;}
  .ddp-crud-modal .modal-content,.ddp-confirm-modal .modal-content{max-height:calc(100dvh - 28px);}
  .ddp-modal-body .row{margin-left:-7px;margin-right:-7px;}
  .ddp-modal-body .row>[class*="col-"]{padding-left:7px;padding-right:7px;}
  .ddp-modal-header .modal-title{font-size:1rem;}
}


/* v29.1: calculate the work area from the live sidebar width. */
:root{--ddp-sidebar-offset:250px;}
@media(min-width:992px){
  .main-header.navbar{left:var(--ddp-sidebar-offset)!important;}
  .sidebar-mini.sidebar-collapse .main-header{left:var(--ddp-sidebar-offset)!important;}
  .modal.ddp-crud-modal,.modal.ddp-confirm-modal{left:var(--ddp-sidebar-offset)!important;}
  .modal-backdrop{left:var(--ddp-sidebar-offset)!important;width:auto!important;right:0!important;}
}
@media(max-width:991.98px){
  .main-header.navbar{left:0!important;}
  .modal.ddp-crud-modal,.modal.ddp-confirm-modal{left:0!important;right:0!important;width:100%!important;}
  .modal-backdrop{left:0!important;width:100%!important;right:0!important;}
}


/* v30: stable popup workspace, sticky form actions, small-screen usability. */
.main-header.navbar{position:fixed!important;top:0;left:var(--ddp-sidebar-offset,250px)!important;right:0;z-index:1037!important;min-height:57px;margin-left:0!important;transition:left .22s ease,box-shadow .22s ease;}
.content-wrapper{padding-top:57px;}
.modal.ddp-crud-modal,.modal.ddp-confirm-modal{left:var(--ddp-sidebar-offset,250px)!important;right:0!important;width:auto!important;overflow-x:hidden;overscroll-behavior:contain;}
.modal-backdrop{left:var(--ddp-sidebar-offset,250px)!important;right:0!important;width:auto!important;}
.ddp-crud-modal .modal-dialog,.ddp-confirm-modal .modal-dialog{max-width:calc(100% - 1rem);}
.ddp-crud-modal .modal-content,.ddp-confirm-modal .modal-content{display:flex;flex-direction:column;max-height:calc(100vh - 2rem);max-height:calc(100dvh - 2rem);overflow:hidden;border:0;border-radius:15px;box-shadow:0 20px 60px rgba(7,29,73,.25);}
.ddp-crud-modal .ddp-modal-body,.ddp-confirm-modal .modal-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;}
.ddp-crud-modal .ddp-sticky-submit-footer,.ddp-confirm-modal .ddp-sticky-submit-footer{position:sticky;bottom:0;z-index:8;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;background:#fff;border-top:1px solid #dbe4f0;box-shadow:0 -8px 18px rgba(7,29,73,.08);padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));}
.ddp-sticky-submit-source{display:none!important;}
.ddp-sticky-submit-clone{white-space:normal;min-height:42px;max-width:100%;}
.ddp-modal-header .close{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;margin:-.25rem -.45rem -.25rem auto;border:1px solid #dc2626!important;border-radius:9px;color:#fff!important;background:rgba(255,255,255,.06)!important;opacity:1!important;text-shadow:none;transition:background .18s ease,box-shadow .18s ease,transform .18s ease;}
.ddp-modal-header .close:hover,.ddp-modal-header .close:focus,.ddp-modal-header .close:active,.ddp-modal-header .close:focus-visible{color:#fff!important;background:#dc2626!important;border-color:#dc2626!important;box-shadow:0 0 0 3px rgba(220,38,38,.24);outline:none;transform:scale(1.04);}
.ddp-modal-header .close:focus-visible{outline:2px solid #fff;outline-offset:1px;}
.ddp-user-view-modal .modal-body p{margin-bottom:.2rem;overflow-wrap:anywhere;}
@media(max-width:991.98px){
 .main-header.navbar{left:0!important;}
 .modal.ddp-crud-modal,.modal.ddp-confirm-modal{left:0!important;right:0!important;width:auto!important;}
 .modal-backdrop{left:0!important;right:0!important;width:100%!important;}
}
@media(max-width:575.98px){
 .ddp-crud-modal .modal-dialog,.ddp-confirm-modal .modal-dialog{margin:.45rem;max-width:calc(100% - .9rem);min-height:calc(100% - .9rem);}
 .ddp-crud-modal .modal-content,.ddp-confirm-modal .modal-content{max-height:calc(100vh - .9rem);max-height:calc(100dvh - .9rem);}
 .ddp-crud-modal .ddp-modal-body,.ddp-confirm-modal .modal-body{padding:13px;}
 .ddp-crud-modal .ddp-sticky-submit-footer,.ddp-confirm-modal .ddp-sticky-submit-footer{padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));}
 .ddp-sticky-submit-clone{flex:1 1 auto;}
 .ddp-user-view-modal .modal-dialog{width:auto;}
}

body.auth-page .auth-card form button[type="submit"],body.auth-page .auth-card form button:not([type]){position:sticky;bottom:8px;z-index:3;box-shadow:0 8px 22px rgba(7,29,73,.18);}
body.auth-page .auth-card form button[type="submit"]:focus-visible,body.auth-page .auth-card form button:not([type]):focus-visible{outline:2px solid #d4af37;outline-offset:2px;}

.ddp-confirm-modal .modal-footer{position:sticky;bottom:0;z-index:8;flex-shrink:0;background:#fff;border-top:1px solid #dbe4f0;box-shadow:0 -8px 18px rgba(7,29,73,.08);}

/* v32: separated responsive dashboard cards with distinct semantic colours. */
body .stat-card.stat-metric-users{background:linear-gradient(135deg,#1d4ed8 0%,#3b82f6 58%,#60a5fa 100%)!important;}
body .stat-card.stat-metric-pending{background:linear-gradient(135deg,#c2410c 0%,#ea580c 58%,#fb923c 100%)!important;}
body .stat-card.stat-metric-sales{background:linear-gradient(135deg,#047857 0%,#059669 58%,#34d399 100%)!important;}
body .stat-card.stat-metric-stock{background:linear-gradient(135deg,#6d28d9 0%,#7c3aed 58%,#a78bfa 100%)!important;}
body .stat-card.stat-metric-orders{background:linear-gradient(135deg,#075985 0%,#0284c7 58%,#38bdf8 100%)!important;}
body .stat-card.stat-metric-delivered{background:linear-gradient(135deg,#4338ca 0%,#6366f1 58%,#a5b4fc 100%)!important;}
body .stat-card.stat-metric-lowstock{background:linear-gradient(135deg,#b91c1c 0%,#dc2626 58%,#fb7185 100%)!important;}
/* Keep dashboard cards separated when Bootstrap columns stack or wrap on tablets and phones. */
@media(max-width:991.98px){
  .content-wrapper .row > [class*="col-"] > .stat-card{margin-bottom:16px;min-height:118px;}
}
@media(max-width:575.98px){
  .content-wrapper .row > [class*="col-"] > .stat-card{margin-bottom:16px;padding:18px;border-radius:14px;min-height:112px;}
  .content-wrapper .row > [class*="col-"] > .stat-card h2{font-size:26px;}
  .content-wrapper .row > [class*="col-"] > .stat-card .icon{right:16px;top:17px;font-size:40px;}
}



/* v34: reserve real column space between KPI cards at tablet and phone widths for every role dashboard. */
@media (max-width: 991.98px) {
  .content-wrapper .dashboard-stats-row { align-items: stretch; }
  .content-wrapper .dashboard-stats-row > [class*="col-"] { padding-bottom: 18px; min-width: 0; }
  .content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card { margin-bottom: 0 !important; width: 100%; min-height: 112px; }
}
@media (max-width: 575.98px) {
  .content-wrapper .dashboard-stats-row > [class*="col-"] { padding-bottom: 20px; }
  .content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card { padding: 18px; border-radius: 14px; }
}

@media (max-width: 767.98px) {
  .content-wrapper .module-grid { row-gap: 18px !important; column-gap: 14px !important; }
  .content-wrapper .module-grid > .module-card { margin: 0 !important; min-width: 0; }
}


/* === v37: polished public home page and animated contact shortcuts === */
:root{--dm-navy:#071d49;--dm-blue:#1265e8;--dm-gold:#ffd166;--dm-orange:#f97316;--dm-green:#16a34a}
.home-page{margin:0;color:#16233a;background:#fff;font-family:Inter,"Source Sans Pro",Arial,sans-serif;overflow-x:hidden}
.home-nav-wrap{position:sticky;top:0;z-index:1000;background:rgba(255,255,255,.92);backdrop-filter:blur(18px);border-bottom:1px solid rgba(15,37,76,.08);box-shadow:0 5px 25px rgba(7,29,73,.045)}
.home-nav{max-width:1240px;height:82px;margin:auto;padding:0 28px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.home-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--dm-navy);font-weight:900;line-height:1.08;letter-spacing:.01em}.home-brand:hover{color:var(--dm-blue);text-decoration:none}.home-brand img{width:54px;height:54px;object-fit:contain}.home-brand span{font-size:18px}.home-brand b{color:var(--dm-orange)}.home-brand small{display:block;margin-top:5px;color:#718096;letter-spacing:.02em;font-weight:600;font-size:10px}
.home-nav-links{display:flex;align-items:center;gap:25px}.home-nav-links>a:not(.home-nav-login):not(.home-nav-register){color:#4b5c74;font-size:13px;font-weight:700;text-decoration:none;transition:color .2s}.home-nav-links>a:not(.home-nav-login):not(.home-nav-register):hover{color:var(--dm-blue)}.home-nav-login,.home-nav-register{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:43px;padding:0 16px;border-radius:12px;font-size:13px;font-weight:800;text-decoration:none;transition:transform .2s,box-shadow .2s}.home-nav-login{border:1px solid #dbe5f2;color:var(--dm-navy);background:#fff}.home-nav-register{background:var(--dm-navy);color:#fff;box-shadow:0 7px 17px rgba(7,29,73,.17)}.home-nav-login:hover,.home-nav-register:hover{transform:translateY(-2px);text-decoration:none}.home-nav-login:hover{color:var(--dm-blue);box-shadow:0 7px 20px rgba(7,29,73,.08)}.home-nav-register:hover{color:#fff;background:#123777}.home-nav-toggle{display:none;border:0;background:#eaf1ff;color:var(--dm-navy);width:44px;height:44px;border-radius:12px;font-size:19px}
.home-hero{position:relative;overflow:hidden;background:radial-gradient(circle at 80% 30%,rgba(45,111,232,.27),transparent 26%),linear-gradient(125deg,#071d49 0%,#0a2d68 49%,#104f9e 100%);color:#fff;padding:60px 28px 22px;isolation:isolate}.home-hero:before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);background-size:42px 42px;mask-image:linear-gradient(90deg,black,transparent 90%);z-index:-1}.home-hero-inner{position:relative;z-index:1;max-width:1180px;margin:0 auto;display:grid;grid-template-columns:1.03fr .97fr;gap:35px;align-items:center;min-height:475px}.home-hero-copy{padding:10px 0 22px;animation:dmFadeUp .65s ease both}.home-eyebrow{display:inline-flex;align-items:center;gap:9px;padding:8px 12px;border:1px solid rgba(255,209,102,.34);border-radius:100px;background:rgba(255,255,255,.07);color:#ffe5a3;font-size:10px;font-weight:900;letter-spacing:.14em}.home-eyebrow i{color:var(--dm-gold);animation:dmSpark 2.8s ease-in-out infinite}.home-hero h1{max-width:670px;margin:24px 0 17px;font-size:clamp(38px,4.6vw,61px);line-height:1.07;font-weight:900;letter-spacing:-.04em}.home-hero h1 em{font-style:normal;color:var(--dm-gold);position:relative}.home-hero-copy>p{max-width:590px;color:#d4e2fb;font-size:16px;line-height:1.8;margin:0 0 25px}.home-hero-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.home-btn{min-height:50px;border-radius:13px;padding:0 21px;display:inline-flex;gap:12px;align-items:center;justify-content:center;font-weight:900;font-size:13px;text-decoration:none;transition:transform .22s,box-shadow .22s,background .22s}.home-btn:hover{text-decoration:none;transform:translateY(-3px)}.home-btn-gold{background:linear-gradient(135deg,#ffe39b,#ffc342);color:#142c52;box-shadow:0 10px 24px rgba(255,193,45,.2)}.home-btn-gold:hover{color:#071d49;box-shadow:0 15px 28px rgba(255,193,45,.31)}.home-btn-glass{border:1px solid rgba(255,255,255,.3);color:#fff;background:rgba(255,255,255,.075)}.home-btn-glass:hover{color:#fff;background:rgba(255,255,255,.14)}.home-trust-row{display:flex;gap:16px;flex-wrap:wrap;margin-top:26px;color:#c2d6f7;font-size:11px;font-weight:700}.home-trust-row span{display:inline-flex;align-items:center;gap:6px}.home-trust-row i{color:#83e5b4}
.home-hero-visual{position:relative;min-height:410px;display:grid;place-items:center;animation:dmFadeUp .8s .1s ease both}.home-orbit{position:absolute;border:1px solid rgba(255,255,255,.14);border-radius:50%;pointer-events:none}.home-orbit-one{width:390px;height:390px;animation:dmOrbit 42s linear infinite}.home-orbit-two{width:315px;height:315px;border-style:dashed;animation:dmOrbit 32s linear infinite reverse}.home-orbit-one:before,.home-orbit-two:after{content:"";position:absolute;width:11px;height:11px;border-radius:50%;background:var(--dm-gold);box-shadow:0 0 24px rgba(255,209,102,.75)}.home-orbit-one:before{top:20%;left:8%}.home-orbit-two:after{right:10%;bottom:20%;background:#5fb4ff}.home-logo-panel{position:relative;z-index:2;width:min(340px,76%);padding:21px 20px 18px;border-radius:30px;background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(242,247,255,.92));box-shadow:0 35px 85px rgba(0,0,0,.29),inset 0 1px 0 #fff;transform:rotate(-3deg);animation:dmFloat 6s ease-in-out infinite}.home-logo-panel img{display:block;width:100%;aspect-ratio:1/1;object-fit:contain}.home-logo-caption{display:flex;justify-content:center;align-items:center;gap:8px;color:#52627a;font-size:9px;font-weight:900;letter-spacing:.15em}.home-live-dot{width:7px;height:7px;border-radius:50%;background:#16a34a;box-shadow:0 0 0 5px #dcfce7}.home-float-chip{position:absolute;z-index:3;display:flex;align-items:center;gap:10px;padding:12px 15px;border-radius:16px;background:rgba(255,255,255,.97);color:#14213a;box-shadow:0 17px 42px rgba(0,0,0,.2);border:1px solid rgba(255,255,255,.7);animation:dmFloat 5s ease-in-out infinite}.home-float-chip>span:last-child{display:grid;gap:3px}.home-float-chip small{color:#748198;font-size:10px}.home-float-chip b{font-size:13px}.home-chip-icon{width:37px;height:37px;display:grid;place-items:center;border-radius:11px;font-size:15px}.chip-green{background:#dcfce7;color:#15803d}.chip-blue{background:#dbeafe;color:#1d4ed8}.chip-gold{background:#fef3c7;color:#a16207}.home-chip-sales{left:-1%;top:16%;animation-delay:-1.3s}.home-chip-stock{right:-1%;top:29%;animation-delay:-2.4s}.home-chip-reports{right:2%;bottom:11%;animation-delay:-.7s}.home-hero-glow{position:absolute;border-radius:50%;filter:blur(45px);pointer-events:none;z-index:-1}.home-hero-glow-one{width:230px;height:230px;background:rgba(13,110,253,.23);right:5%;top:9%}.home-hero-glow-two{width:170px;height:170px;background:rgba(249,115,22,.11);left:20%;bottom:0}.home-hero-bottom{max-width:1180px;margin:17px auto 0;display:flex;justify-content:center;align-items:center;gap:18px;color:#95b4e3;font-size:9px;font-weight:900;letter-spacing:.2em}.home-bottom-line{width:45px;height:1px;background:rgba(255,255,255,.25)}
.home-section{padding:86px 28px}.home-section-heading{text-align:center;max-width:720px;margin:0 auto 37px}.home-section-kicker{font-size:10px;font-weight:900;letter-spacing:.16em;color:#2563eb}.home-section-heading h2,.home-contact-panel h2,.home-how h2{color:var(--dm-navy);font-size:clamp(27px,3vw,38px);font-weight:900;letter-spacing:-.035em;margin:10px 0}.home-section-heading p,.home-contact-panel p{margin:0;color:#718096;font-size:14px;line-height:1.75}.home-feature-grid{max-width:1180px;margin:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.home-feature-card{position:relative;overflow:hidden;border:1px solid #e7edf7;border-radius:20px;padding:25px 24px 28px;min-height:215px;background:#fff;box-shadow:0 8px 25px rgba(13,39,80,.045);transition:transform .22s,box-shadow .22s,border-color .22s}.home-feature-card:after{content:"";position:absolute;width:125px;height:125px;border-radius:50%;right:-50px;bottom:-58px;background:var(--feature-bg);transition:transform .25s}.home-feature-card:hover{transform:translateY(-6px);box-shadow:0 18px 38px rgba(13,39,80,.10);border-color:var(--feature-color)}.home-feature-card:hover:after{transform:scale(1.2)}.home-feature-icon{width:53px;height:53px;border-radius:16px;display:grid;place-items:center;background:var(--feature-bg);color:var(--feature-color);font-size:21px;margin-bottom:17px}.home-feature-card h3{font-size:17px;font-weight:900;color:#1b2b45;margin:0 0 9px}.home-feature-card p{max-width:300px;font-size:13px;line-height:1.7;color:#748198;margin:0}.home-feature-number{position:absolute;right:20px;top:18px;color:#dbe4f2;font-size:12px;font-weight:900;letter-spacing:.1em}.feature-blue{--feature-color:#2563eb;--feature-bg:#dbeafe}.feature-green{--feature-color:#15803d;--feature-bg:#dcfce7}.feature-orange{--feature-color:#c2410c;--feature-bg:#ffedd5}.feature-purple{--feature-color:#6d28d9;--feature-bg:#ede9fe}.feature-teal{--feature-color:#0f766e;--feature-bg:#ccfbf1}.feature-pink{--feature-color:#be185d;--feature-bg:#fce7f3}
.home-how{padding:75px 28px;background:linear-gradient(135deg,#f5f8ff,#edf4ff)}.home-how-inner{max-width:1120px;margin:auto;display:grid;grid-template-columns:1fr 1fr;gap:70px;align-items:center}.home-how-copy h2{max-width:440px;line-height:1.17}.home-how-copy p{max-width:465px;color:#718096;line-height:1.8;font-size:14px;margin:13px 0 23px}.home-btn-dark{background:var(--dm-navy);color:#fff;box-shadow:0 8px 20px rgba(7,29,73,.17)}.home-btn-dark:hover{background:#123777;color:#fff}.home-steps{display:grid;gap:16px}.home-step{display:flex;gap:17px;align-items:flex-start;background:#fff;border:1px solid #e2eaf6;padding:20px;border-radius:17px;box-shadow:0 8px 18px rgba(13,39,80,.04)}.home-step>span{width:42px;height:42px;flex:none;border-radius:13px;display:grid;place-items:center;background:#071d49;color:#ffda7a;font-weight:900;font-size:17px}.home-step h3{margin:1px 0 5px;color:#172b4d;font-size:15px;font-weight:900}.home-step p{margin:0;color:#718096;font-size:12px;line-height:1.6}
.home-contact-section{padding:65px 28px}.home-contact-panel{max-width:1120px;margin:auto;padding:32px 35px;border:1px solid #e4eaf5;border-radius:24px;background:linear-gradient(120deg,#fff,#f8fbff);box-shadow:0 15px 40px rgba(7,29,73,.07);display:flex;align-items:center;justify-content:space-between;gap:25px}.home-contact-panel h2{font-size:27px}.home-contact-panel p{max-width:530px}.home-contact-actions{display:flex;gap:10px;flex-wrap:wrap}.home-contact-action{display:flex;align-items:center;gap:9px;border-radius:12px;padding:13px 15px;font-size:12px;font-weight:900;text-decoration:none;transition:transform .2s,box-shadow .2s}.home-contact-action:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(7,29,73,.1);text-decoration:none}.home-contact-action i{font-size:17px}.action-call{color:#fff;background:#125ee8}.action-call:hover{color:#fff}.action-whatsapp{background:#dcfce7;color:#15803d}.action-whatsapp:hover{color:#166534}.action-group{background:#fff3cf;color:#8a5a00}.action-group:hover{color:#704800}.home-footer{max-width:1180px;margin:auto;padding:22px 28px 32px;border-top:1px solid #edf0f5;display:flex;align-items:center;gap:18px;color:#8290a5;font-size:11px}.home-footer-brand{display:flex;align-items:center;gap:8px;color:#071d49;margin-right:auto}.home-footer-brand:hover{color:#2563eb;text-decoration:none}.home-footer-brand img{width:34px;height:34px;object-fit:contain}.home-footer-brand strong{font-size:12px}
.dm-contact-fab{position:fixed;right:20px;bottom:20px;z-index:1080;display:flex;flex-direction:column;align-items:flex-end;gap:10px;pointer-events:none}.dm-fab{position:relative;display:flex;align-items:center;gap:10px;min-height:52px;padding:6px 13px 6px 7px;border-radius:100px;background:#fff;color:#fff;text-decoration:none;pointer-events:auto;box-shadow:0 9px 24px rgba(7,29,73,.2);border:1px solid rgba(255,255,255,.75);animation:dmFabEnter .55s cubic-bezier(.2,.8,.2,1) both;transition:transform .2s,box-shadow .2s;overflow:hidden}.dm-fab:nth-child(2){animation-delay:.12s}.dm-fab:nth-child(3){animation-delay:.24s}.dm-fab:hover{transform:translateX(-5px) scale(1.02);text-decoration:none;box-shadow:0 13px 28px rgba(7,29,73,.25);color:#fff}.dm-fab-icon{position:relative;width:39px;height:39px;display:grid;place-items:center;flex:none;border-radius:50%;font-size:16px;box-shadow:0 3px 8px rgba(0,0,0,.12)}.dm-fab-icon:after{content:"";position:absolute;inset:-4px;border:2px solid currentColor;border-radius:50%;opacity:0;animation:dmContactPulse 2.2s ease-out infinite}.dm-fab-label{display:flex;flex-direction:column;font-size:12px;line-height:1.12;font-weight:900;color:#152742;white-space:nowrap}.dm-fab-label small{font-size:10px;font-weight:700;color:#718096;margin-top:4px}.dm-fab-call .dm-fab-icon{background:#1265e8;color:#fff}.dm-fab-whatsapp .dm-fab-icon{background:#22c55e;color:#fff}.dm-fab-group .dm-fab-icon{background:#f4b72f;color:#172b4d}.dm-fab-call{border-left:3px solid #1265e8}.dm-fab-whatsapp{border-left:3px solid #22c55e}.dm-fab-group{border-left:3px solid #f4b72f}.dm-fab-call .dm-fab-icon:after{animation-delay:0s}.dm-fab-whatsapp .dm-fab-icon:after{animation-delay:.6s}.dm-fab-group .dm-fab-icon:after{animation-delay:1.2s}.dm-contact-fab-auth{bottom:20px;right:20px}.auth-page{padding-bottom:115px}
@keyframes dmFadeUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}@keyframes dmFloat{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-10px) rotate(-1.5deg)}}@keyframes dmOrbit{to{transform:rotate(360deg)}}@keyframes dmSpark{0%,100%{transform:scale(1) rotate(0)}50%{transform:scale(1.18) rotate(9deg)}}@keyframes dmContactPulse{0%{transform:scale(.85);opacity:.62}100%{transform:scale(1.5);opacity:0}}@keyframes dmFabEnter{from{opacity:0;transform:translate(24px,10px) scale(.9)}to{opacity:1;transform:translate(0,0) scale(1)}}
@media(max-width:1000px){.home-nav{height:74px;padding:0 20px}.home-nav-toggle{display:block}.home-nav-links{display:none;position:absolute;left:14px;right:14px;top:calc(100% + 6px);padding:17px;background:#fff;border:1px solid #e3eaf5;border-radius:18px;box-shadow:0 20px 45px rgba(7,29,73,.14);flex-direction:column;align-items:stretch;gap:8px}.home-nav-links.is-open{display:flex;animation:dmFadeUp .2s ease both}.home-nav-links>a{padding:12px 14px!important}.home-nav-links>a:not(.home-nav-login):not(.home-nav-register){border-radius:9px}.home-nav-links>a:not(.home-nav-login):not(.home-nav-register):hover{background:#f4f7fd}.home-hero-inner{grid-template-columns:1fr 0.8fr;gap:15px}.home-hero h1{font-size:clamp(34px,5vw,49px)}.home-hero-visual{min-height:340px}.home-orbit-one{width:320px;height:320px}.home-orbit-two{width:260px;height:260px}.home-float-chip{padding:9px 11px}.home-chip-sales{left:-2%}.home-chip-stock{right:-2%}.home-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.home-contact-panel{align-items:flex-start;flex-direction:column}.home-contact-actions{width:100%}}
@media(max-width:700px){.home-hero{padding:38px 20px 18px}.home-hero-inner{grid-template-columns:1fr;gap:4px}.home-hero-copy{padding:8px 0 0}.home-hero h1{margin-top:18px;font-size:clamp(36px,9.2vw,49px)}.home-hero-copy>p{font-size:14px;line-height:1.75}.home-trust-row{gap:10px 14px;font-size:10px}.home-hero-visual{min-height:315px;margin:0 0 2px}.home-logo-panel{width:245px;padding:14px}.home-orbit-one{width:292px;height:292px}.home-orbit-two{width:236px;height:236px}.home-chip-sales{left:0;top:12%}.home-chip-stock{right:0;top:22%}.home-chip-reports{right:0;bottom:4%}.home-float-chip{gap:7px;padding:8px 10px}.home-chip-icon{width:31px;height:31px;font-size:13px}.home-float-chip small{font-size:8px}.home-float-chip b{font-size:11px}.home-hero-bottom{font-size:7px;letter-spacing:.1em;gap:8px;flex-wrap:wrap}.home-bottom-line{width:16px}.home-section{padding:57px 20px}.home-section-heading{margin-bottom:25px}.home-feature-grid{grid-template-columns:1fr;gap:13px}.home-feature-card{min-height:auto;padding:20px 21px 23px}.home-feature-icon{width:47px;height:47px;margin-bottom:13px}.home-how{padding:52px 20px}.home-how-inner{grid-template-columns:1fr;gap:28px}.home-how h2{font-size:30px}.home-step{padding:16px}.home-contact-section{padding:40px 20px}.home-contact-panel{padding:24px 20px;border-radius:18px}.home-contact-panel h2{font-size:23px}.home-contact-actions{display:grid;grid-template-columns:1fr;gap:9px}.home-contact-action{justify-content:center}.home-footer{padding:20px;flex-wrap:wrap;gap:10px 16px}.home-footer-brand{width:100%;margin-right:0}.dm-contact-fab{right:10px;bottom:10px;gap:7px}.dm-fab{min-height:45px;padding:4px 10px 4px 5px;gap:7px}.dm-fab-icon{width:35px;height:35px;font-size:14px}.dm-fab-label{font-size:11px}.dm-fab-label small{font-size:9px}.auth-page{padding:20px 14px 170px}.auth-shell{margin:0 auto}.dm-contact-fab-auth{right:10px;bottom:10px}}
@media(max-width:370px){.home-brand img{width:43px;height:43px}.home-brand span{font-size:15px}.home-brand small{font-size:9px}.home-nav{padding:0 14px}.home-hero-actions .home-btn{width:100%}.home-chip-reports{right:-2%}.dm-fab-label small{display:none}.dm-fab{min-height:43px}}
@media(prefers-reduced-motion:reduce){.home-page *, .dm-contact-fab *{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}

/* v37: polished pagination for longer record lists (all role dashboards/modules). */
.ddp-pagination-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 16px;border-top:1px solid #e8edf5;background:linear-gradient(120deg,#fbfdff,#f5f8fd);border-radius:0 0 12px 12px;color:#5a6b83;font-size:12px;min-width:0}
.ddp-pagination-info{font-weight:700;white-space:nowrap}.ddp-pagination-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.ddp-pagination-size{height:34px;border:1px solid #dce5f2;background:#fff;color:#30435e;border-radius:9px;padding:0 9px;font-size:12px;outline:none}.ddp-pagination-nav{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.ddp-page-btn{min-width:32px;height:32px;padding:0 9px;border:1px solid #dbe4f0;border-radius:9px;background:#fff;color:#405470;font-size:12px;font-weight:800;transition:all .18s}.ddp-page-btn:hover:not(:disabled){background:#eaf2ff;color:#125ee8;border-color:#bfd4ff;transform:translateY(-1px)}.ddp-page-btn.is-current{border-color:#125ee8;background:linear-gradient(135deg,#125ee8,#3785fb);color:#fff;box-shadow:0 4px 11px rgba(18,94,232,.2)}.ddp-page-btn:disabled{opacity:.35;cursor:not-allowed}.ddp-page-ellipsis{padding:0 4px;color:#94a3b8}.ddp-pagination-empty{display:none!important}.content-wrapper .card-body .ddp-pagination-bar{margin:0;position:relative;z-index:1}
@media(max-width:575.98px){.ddp-pagination-bar{align-items:flex-start;flex-direction:column;gap:10px;padding:13px}.ddp-pagination-tools{width:100%;justify-content:space-between}.ddp-pagination-nav{width:100%;justify-content:flex-start}.ddp-page-btn{min-width:30px;height:31px;padding:0 7px}}

/* v37: consistent spacing, distinct module colours, and separate stat cards on every role dashboard. */
.content-wrapper .dashboard-stats-row{align-items:stretch;row-gap:16px;margin-bottom:0}.content-wrapper .dashboard-stats-row>[class*="col-"]{display:flex;min-width:0;padding-bottom:16px}.content-wrapper .dashboard-stats-row>[class*="col-"]>.stat-card{width:100%;height:100%;margin:0!important;min-width:0}.module-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px!important;align-items:stretch;margin-bottom:26px!important}.module-grid>.module-card{min-width:0;margin:0!important;align-self:stretch;border-radius:15px;box-shadow:0 6px 18px rgba(7,29,73,.09);border-left-width:5px}.module-grid>.module-card:nth-child(6n+1){background:linear-gradient(135deg,#fff,#f4f8ff)}.module-grid>.module-card:nth-child(6n+2){background:linear-gradient(135deg,#fff,#f1fff7)}.module-grid>.module-card:nth-child(6n+3){background:linear-gradient(135deg,#fff,#fff8ed)}.module-grid>.module-card:nth-child(6n+4){background:linear-gradient(135deg,#fff,#f6f1ff)}.module-grid>.module-card:nth-child(6n+5){background:linear-gradient(135deg,#fff,#edfcff)}.module-grid>.module-card:nth-child(6n){background:linear-gradient(135deg,#fff,#fff0f7)}.module-grid>.module-card:hover{box-shadow:0 12px 27px rgba(7,29,73,.14)}
@media(max-width:1199.98px){.module-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:15px!important}}
@media(max-width:767.98px){.content-wrapper .dashboard-stats-row{row-gap:15px}.content-wrapper .dashboard-stats-row>[class*="col-"]{padding-bottom:15px}.module-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px!important}.module-grid>.module-card{min-height:98px;padding:13px 12px;gap:10px}.module-card .module-copy{min-width:0}.module-card h5{font-size:14px}.module-card small{font-size:10px;line-height:1.45}}
@media(max-width:480px){.module-grid{grid-template-columns:1fr;gap:13px!important}.module-grid>.module-card{min-height:84px;padding:13px 14px}.content-wrapper .dashboard-stats-row>[class*="col-"]{padding-bottom:15px}.content-wrapper .dashboard-stats-row>[class*="col-"]>.stat-card{min-height:108px;padding:17px}.content-wrapper .dashboard-stats-row>[class*="col-"]>.stat-card h2{font-size:25px}}

/* v44: hide paginated rows reliably against AdminLTE table display rules. */
.ddp-pagination-hidden{display:none!important}


/* === Animated global inputs + administrator-managed login slideshow === */
.form-control,.custom-select,select.form-control,textarea.form-control,.form-control-file,.btn{transition:border-color .24s ease,box-shadow .24s ease,transform .24s ease,background-color .24s ease,color .24s ease}
.form-control:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,.custom-select:hover,select.form-control:hover,textarea.form-control:hover{border-color:#93c5fd}
.form-control:focus,.custom-select:focus,select.form-control:focus,textarea.form-control:focus{border-color:#3b82f6!important;box-shadow:0 0 0 3px rgba(59,130,246,.14),0 5px 16px rgba(37,99,235,.07)!important;outline:0;animation:dmInputFocus .32s ease both}
.form-group>label,.profile-card label{transition:color .22s ease,transform .22s ease}
.form-group:focus-within>label{color:#2563eb;transform:translateX(2px)}
.input-group{transition:transform .22s ease,box-shadow .22s ease;border-radius:10px}
.input-group:focus-within{transform:translateY(-1px)}
.form-control::placeholder,textarea.form-control::placeholder{transition:opacity .2s ease,color .2s ease}
.form-control:focus::placeholder,textarea.form-control:focus::placeholder{opacity:.62}
.btn:not(:disabled):not(.disabled){will-change:transform}
.btn:not(:disabled):not(.disabled):hover{transform:translateY(-1px)}
.btn:not(:disabled):not(.disabled):active{transform:translateY(0) scale(.985)}
@keyframes dmInputFocus{0%{transform:scale(.995)}55%{transform:scale(1.006)}100%{transform:scale(1)}}
@keyframes dmAuthEnter{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
@keyframes dmAuthSlideIn{from{opacity:0;transform:scale(1.035)}to{opacity:1;transform:scale(1)}}
@keyframes dmAuthFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-13px)}}
@keyframes dmAuthShimmer{0%{transform:translateX(-130%)}100%{transform:translateX(130%)}}
body.auth-page{padding:24px 22px 112px;overflow-x:hidden}
body.auth-page .auth-shell{width:min(1280px,100%);min-height:650px;grid-template-columns:minmax(0,1.04fr) minmax(0,.96fr);border-radius:26px;box-shadow:0 28px 80px rgba(15,23,42,.18);animation:dmAuthEnter .7s cubic-bezier(.2,.8,.2,1) both}
body.auth-page .auth-brand.auth-slideshow{position:relative;display:block!important;align-self:stretch;min-height:650px;height:100%;padding:0!important;overflow:hidden;isolation:isolate;background:linear-gradient(145deg,#0f3c68,#2563eb)}
.auth-slide{position:absolute;inset:0;opacity:0;visibility:hidden;z-index:0;transition:opacity .9s ease,visibility .9s ease;overflow:hidden}
.auth-slide.is-active{opacity:1;visibility:visible;z-index:1}
.auth-slide>img{display:block;width:100%;height:100%;object-fit:cover;transform:scale(1.025);transition:transform 7s ease}
.auth-slide.is-active>img{transform:scale(1.08);animation:dmAuthSlideIn 1.1s ease both}
.auth-brand-shade{position:absolute;inset:0;z-index:2;pointer-events:none;background:linear-gradient(180deg,rgba(7,28,66,.42) 0%,rgba(7,31,72,.15) 35%,rgba(5,24,59,.82) 100%),linear-gradient(100deg,rgba(18,70,150,.42),transparent 75%)}
.auth-brand-overlay{position:relative;z-index:3;min-height:650px;height:100%;padding:42px;display:flex;flex-direction:column;justify-content:space-between;color:#fff}
.auth-brand-heading{display:flex;align-items:center;gap:16px;animation:dmAuthEnter .8s .1s both}
body.auth-page .auth-logo{width:84px;height:84px;border-radius:18px;padding:5px;box-shadow:0 10px 30px rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.6)}
body.auth-page .auth-brand h1{font-size:clamp(25px,2.5vw,39px);line-height:1.12;font-weight:800;letter-spacing:-.025em;text-shadow:0 3px 22px rgba(0,0,0,.24);margin:0 0 8px}
body.auth-page .auth-brand span{display:block;font-size:15px;line-height:1.5;opacity:.92}
.auth-slide-copy{min-height:150px;display:flex;align-items:flex-end;margin-top:auto;padding:70px 0 24px}
.auth-slide-caption{display:none;max-width:510px;animation:dmAuthEnter .55s ease both}
.auth-slide-caption.is-active{display:block}
.auth-slide-caption h2{font-size:clamp(27px,3vw,43px);font-weight:800;line-height:1.1;letter-spacing:-.03em;margin:0 0 13px;color:#fff;text-shadow:0 4px 22px rgba(0,0,0,.18)}
.auth-slide-caption p{font-size:15px;line-height:1.7;max-width:450px;margin:0;color:rgba(255,255,255,.9)}
.auth-slide-arrows{position:absolute;inset:0;z-index:6;pointer-events:none}
.auth-slide-arrow{position:absolute;top:50%;pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0;border-radius:50%;border:1px solid rgba(255,255,255,.68);background:rgba(15,35,65,.48);backdrop-filter:blur(9px);color:#fff;box-shadow:0 8px 24px rgba(0,0,0,.2);cursor:pointer;transform:translateY(-50%);transition:transform .2s ease,background .2s ease,box-shadow .2s ease}
#authSlidePrev{left:22px}
#authSlideNext{right:22px}
.auth-slide-arrow:hover,.auth-slide-arrow:focus-visible{background:rgba(255,255,255,.94);color:#125ee8;transform:translateY(-50%) scale(1.07);outline:none;box-shadow:0 10px 28px rgba(0,0,0,.25)}
.auth-slide-arrow:active{transform:translateY(-50%) scale(.96)}
.auth-slide-dots{display:flex;gap:8px;align-items:center;margin:0 0 25px}
.auth-slide-dot{width:9px;height:9px;padding:0;border:0;border-radius:50px;background:rgba(255,255,255,.48);cursor:pointer;transition:width .25s ease,background .25s ease,transform .25s ease}
.auth-slide-dot:hover{transform:scale(1.2)}.auth-slide-dot.is-active{width:29px;background:#fff}
.auth-slide-bottomline{display:flex;align-items:center;gap:10px;color:rgba(255,255,255,.72);font-size:10px;letter-spacing:.14em;font-weight:800}
.auth-slide-bottomline span{width:29px;height:2px;background:#f4b72f;border-radius:10px}
.auth-slide-fallback{background:radial-gradient(circle at 17% 22%,rgba(87,173,255,.55),transparent 27%),radial-gradient(circle at 85% 76%,rgba(134,91,255,.58),transparent 30%),linear-gradient(135deg,#0b315d,#1f59c7 58%,#442cb0)}
.auth-fallback-shapes span{position:absolute;display:block;border:1px solid rgba(255,255,255,.14);border-radius:50%;animation:dmAuthFloat 7s ease-in-out infinite}
.auth-fallback-shapes span:nth-child(1){width:340px;height:340px;right:-120px;top:8%}.auth-fallback-shapes span:nth-child(2){width:220px;height:220px;left:9%;bottom:14%;animation-delay:-2.4s}.auth-fallback-shapes span:nth-child(3){width:130px;height:130px;right:18%;bottom:5%;animation-delay:-4.3s}
body.auth-page .auth-card{padding:clamp(32px,4vw,58px);display:flex;flex-direction:column;justify-content:center;min-width:0;animation:dmAuthEnter .65s .12s both}
body.auth-page .auth-title{margin-bottom:25px}
body.auth-page .auth-title h2{font-size:clamp(30px,3vw,42px);font-weight:800;letter-spacing:-.035em;color:#15233b;line-height:1.12}
body.auth-page .auth-title p{font-size:16px;margin-top:10px;margin-bottom:0}
body.auth-page .auth-card .form-group{margin-bottom:22px}
body.auth-page .auth-card .form-group>label{display:block;color:#26364f;font-weight:750;font-size:14px;margin-bottom:9px}
body.auth-page .auth-card .form-group:focus-within>label{color:#2563eb}
body.auth-page .auth-card .input-group{border-radius:13px;box-shadow:0 5px 17px rgba(15,23,42,.035)}
body.auth-page .auth-card .input-group-text{border:1px solid #d7e0ed;background:#f2f6fb;color:#4f6580;min-width:48px;justify-content:center;border-radius:12px 0 0 12px}
body.auth-page .auth-card .input-group .form-control{height:51px;border-color:#d7e0ed;border-left:0;border-right:0;background:#fff;font-size:15px;min-width:0}
body.auth-page .auth-card .input-group:focus-within .input-group-text{border-color:#60a5fa;background:#eff6ff;color:#2563eb}
body.auth-page .auth-card .input-group-append .auth-password-toggle{border:1px solid #d7e0ed;border-left:0;border-radius:0 12px 12px 0;background:#f8fafc;color:#637893;min-width:49px}
body.auth-page .auth-card .input-group:focus-within .auth-password-toggle{border-color:#60a5fa;color:#2563eb}
body.auth-page .auth-card .custom-control-label{font-weight:600;font-size:14px;color:#34445c}
body.auth-page .auth-card form .btn-primary{min-height:56px;border:0;border-radius:12px;font-size:18px;font-weight:800;letter-spacing:.025em;background:linear-gradient(110deg,#0878f9,#1764e8,#0b83ff);box-shadow:0 13px 26px rgba(18,105,235,.23);position:relative;overflow:hidden;animation:dmAuthEnter .45s .26s both}
body.auth-page .auth-card form .btn-primary:after{content:"";position:absolute;inset:0 auto 0 0;width:45%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.19),transparent);transform:translateX(-130%);pointer-events:none}
body.auth-page .auth-card form .btn-primary:hover:after{animation:dmAuthShimmer .8s ease}
body.auth-page .auth-footer{font-size:14px;margin-top:24px}
body.auth-page .auth-footer a{color:#0878f9}
body.auth-page .auth-copyright{position:absolute;left:50%;bottom:-28px;transform:translateX(-50%);white-space:nowrap}
@media(max-width:900px){body.auth-page .auth-shell{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);min-height:590px}body.auth-page .auth-brand.auth-slideshow,body.auth-page .auth-brand-overlay{min-height:590px}.auth-brand-overlay{padding:30px}body.auth-page .auth-card{padding:30px}.auth-brand-heading{align-items:flex-start;gap:12px}body.auth-page .auth-logo{width:64px;height:64px}.auth-slide-copy{padding-top:50px}}
@media(max-width:700px){body.auth-page{padding:16px 12px 150px}body.auth-page .auth-shell{grid-template-columns:1fr;min-height:0;border-radius:20px}body.auth-page .auth-brand.auth-slideshow{min-height:300px;height:300px}body.auth-page .auth-brand-overlay{min-height:300px;padding:22px 24px}.auth-slide-copy{min-height:90px;padding:26px 0 14px}.auth-slide-caption h2{font-size:26px;margin-bottom:7px}.auth-slide-caption p{font-size:12px;line-height:1.45}.auth-slide-dots{margin-bottom:13px}.auth-slide-arrow{width:38px;height:38px}#authSlidePrev{left:12px}#authSlideNext{right:12px}.auth-slide-bottomline{font-size:8px}.auth-brand-heading{gap:11px}body.auth-page .auth-logo{width:53px;height:53px;border-radius:12px}body.auth-page .auth-brand h1{font-size:23px;margin-bottom:4px}body.auth-page .auth-brand span{font-size:11px}body.auth-page .auth-card{padding:27px 24px 30px}body.auth-page .auth-title{margin-bottom:22px}body.auth-page .auth-title h2{font-size:31px}body.auth-page .auth-title p{font-size:14px}body.auth-page .auth-card .form-group{margin-bottom:18px}body.auth-page .auth-copyright{bottom:-25px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.form-control:focus,.custom-select:focus,select.form-control:focus,textarea.form-control:focus,body.auth-page .auth-shell,.auth-slide.is-active>img,.auth-slide-caption,.login-slide-admin-hero:after,.login-slide-drop i{animation:none!important;transition:none!important}.auth-slide-dot,.auth-slide-arrow{transition:none!important}}


/* v51: selectable Sun/Moon and accent themes. */
.theme-picker-menu{min-width:245px;border:1px solid rgba(100,116,139,.22);border-radius:12px;box-shadow:0 14px 36px rgba(15,23,42,.16)}
.theme-picker-menu select{min-height:39px;border-radius:9px;font-weight:600}
.submit-awaiting-required{opacity:.58!important;cursor:not-allowed!important;filter:saturate(.65)}
html[data-ui-theme="sun"]{color-scheme:light;--ui-page:#f4f6f9;--ui-surface:#fff;--ui-text:#243247;--ui-muted:#68778c;--ui-border:#e1e7ef;--ui-accent:#2563eb}
html[data-ui-theme="ocean"]{color-scheme:light;--ui-page:#edf7fb;--ui-surface:#fff;--ui-text:#17334b;--ui-muted:#58768a;--ui-border:#cde7f1;--ui-accent:#087fbd}
html[data-ui-theme="forest"]{color-scheme:light;--ui-page:#f0f7f0;--ui-surface:#fff;--ui-text:#1d3929;--ui-muted:#5d7866;--ui-border:#d6e8da;--ui-accent:#21824a}
html[data-ui-theme="violet"]{color-scheme:light;--ui-page:#f6f2fb;--ui-surface:#fff;--ui-text:#302247;--ui-muted:#75678b;--ui-border:#e5d9f3;--ui-accent:#7745bd}
html[data-ui-theme="moon"]{color-scheme:dark;--ui-page:#101827;--ui-surface:#1b2638;--ui-text:#e7edf6;--ui-muted:#a4b2c7;--ui-border:#344258;--ui-accent:#7db4ff}
html[data-ui-theme="sun"] .content-wrapper,html[data-ui-theme="ocean"] .content-wrapper,html[data-ui-theme="forest"] .content-wrapper,html[data-ui-theme="violet"] .content-wrapper,html[data-ui-theme="moon"] .content-wrapper{background:var(--ui-page)!important;color:var(--ui-text)}
html[data-ui-theme="ocean"] .main-header,html[data-ui-theme="forest"] .main-header,html[data-ui-theme="violet"] .main-header,html[data-ui-theme="moon"] .main-header{background:var(--ui-surface)!important;color:var(--ui-text)!important}
html[data-ui-theme="ocean"] .main-header .nav-link,html[data-ui-theme="forest"] .main-header .nav-link,html[data-ui-theme="violet"] .main-header .nav-link,html[data-ui-theme="moon"] .main-header .nav-link{color:var(--ui-text)!important}
html[data-ui-theme="ocean"] .main-footer,html[data-ui-theme="forest"] .main-footer,html[data-ui-theme="violet"] .main-footer,html[data-ui-theme="moon"] .main-footer{background:var(--ui-surface)!important;color:var(--ui-muted);border-color:var(--ui-border)!important}
html[data-ui-theme="ocean"] .card,html[data-ui-theme="forest"] .card,html[data-ui-theme="violet"] .card,html[data-ui-theme="moon"] .card,html[data-ui-theme="ocean"] .modal-content,html[data-ui-theme="forest"] .modal-content,html[data-ui-theme="violet"] .modal-content,html[data-ui-theme="moon"] .modal-content{background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border)}
html[data-ui-theme="ocean"] .card-header,html[data-ui-theme="forest"] .card-header,html[data-ui-theme="violet"] .card-header,html[data-ui-theme="moon"] .card-header{background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border)}
html[data-ui-theme="ocean"] .content-header,html[data-ui-theme="forest"] .content-header,html[data-ui-theme="violet"] .content-header,html[data-ui-theme="moon"] .content-header{color:var(--ui-text)}
html[data-ui-theme="ocean"] .page-title,html[data-ui-theme="forest"] .page-title,html[data-ui-theme="violet"] .page-title,html[data-ui-theme="moon"] .page-title{color:var(--ui-accent)!important}
html[data-ui-theme="ocean"] .btn-primary,html[data-ui-theme="ocean"] .btn-info{background:#087fbd;border-color:#087fbd}
html[data-ui-theme="forest"] .btn-primary,html[data-ui-theme="forest"] .btn-info{background:#21824a;border-color:#21824a}
html[data-ui-theme="violet"] .btn-primary,html[data-ui-theme="violet"] .btn-info{background:#7745bd;border-color:#7745bd}
html[data-ui-theme="moon"] body{background:#101827;color:#e7edf6}
html[data-ui-theme="moon"] .main-header.navbar,html[data-ui-theme="moon"] .main-footer{background:#131e2f!important;color:#dbe5f3!important;border-color:#344258!important}
html[data-ui-theme="moon"] .main-header .nav-link,html[data-ui-theme="moon"] .main-header .navbar-nav .nav-link{color:#e7edf6!important}
html[data-ui-theme="moon"] .content-wrapper{background:#101827!important;color:#e7edf6!important}
html[data-ui-theme="moon"] .content-wrapper .card,html[data-ui-theme="moon"] .content-wrapper .info-box,html[data-ui-theme="moon"] .content-wrapper .callout,html[data-ui-theme="moon"] .content-wrapper .list-group-item{background:#1b2638!important;color:#e7edf6!important;border-color:#344258!important}
html[data-ui-theme="moon"] .content-wrapper .card-header,html[data-ui-theme="moon"] .content-wrapper .card-footer{background:#202d42!important;color:#e7edf6!important;border-color:#344258!important}
html[data-ui-theme="moon"] .content-wrapper .card-body,html[data-ui-theme="moon"] .content-wrapper label,html[data-ui-theme="moon"] .content-wrapper h1,html[data-ui-theme="moon"] .content-wrapper h2,html[data-ui-theme="moon"] .content-wrapper h3,html[data-ui-theme="moon"] .content-wrapper h4,html[data-ui-theme="moon"] .content-wrapper h5,html[data-ui-theme="moon"] .content-wrapper h6,html[data-ui-theme="moon"] .content-wrapper .card-title{color:#e7edf6}
html[data-ui-theme="moon"] .content-wrapper .text-dark,html[data-ui-theme="moon"] .content-wrapper .text-body{color:#e7edf6!important}
html[data-ui-theme="moon"] .content-wrapper .text-muted,html[data-ui-theme="moon"] .content-wrapper small{color:#a4b2c7!important}
html[data-ui-theme="moon"] .content-wrapper .form-control,html[data-ui-theme="moon"] .content-wrapper .custom-select,html[data-ui-theme="moon"] .content-wrapper .input-group-text,html[data-ui-theme="moon"] .theme-picker-menu .form-control{background:#111c2d!important;color:#e7edf6!important;border-color:#41516a!important}
html[data-ui-theme="moon"] .content-wrapper .form-control::placeholder{color:#9aa9be}
html[data-ui-theme="moon"] .dropdown-menu,html[data-ui-theme="moon"] .theme-picker-menu{background:#1b2638;color:#e7edf6;border-color:#344258}
html[data-ui-theme="moon"] .dropdown-item{color:#e7edf6}
html[data-ui-theme="moon"] .dropdown-item:hover,html[data-ui-theme="moon"] .dropdown-item:focus{background:#2b3b53;color:#fff}
html[data-ui-theme="moon"] .content-wrapper .table{color:#e7edf6}
html[data-ui-theme="moon"] .content-wrapper .table td,html[data-ui-theme="moon"] .content-wrapper .table th{border-color:#344258}
html[data-ui-theme="moon"] .content-wrapper .table thead th{background:#202d42;color:#e7edf6}
html[data-ui-theme="moon"] .content-wrapper .table-hover tbody tr:hover{background:#233149;color:#fff}
html[data-ui-theme="moon"] .content-wrapper .bg-white,html[data-ui-theme="moon"] .content-wrapper .bg-light{background:#1b2638!important;color:#e7edf6!important}
html[data-ui-theme="moon"] .content-wrapper .border,html[data-ui-theme="moon"] .content-wrapper hr{border-color:#344258!important}
html[data-ui-theme="moon"] .content-wrapper .custom-control-label::before{background-color:#111c2d;border-color:#52627a}
html[data-ui-theme="moon"] .theme-picker-menu .small,html[data-ui-theme="moon"] .theme-picker-menu small{color:#a4b2c7!important}

/* v57: three loader rings rotate in alternating directions and out of phase. */
.ddp-page-loader{position:fixed;inset:0;z-index:40000;display:none;align-items:center;justify-content:center;padding:22px;background:rgba(5,15,35,.42);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);opacity:0;transition:opacity .22s ease}
.ddp-page-loader.is-visible{display:flex;opacity:1}
.ddp-loader-panel{display:flex;align-items:center;flex-direction:column;min-width:210px;padding:27px 32px 23px;border:1px solid rgba(255,255,255,.74);border-radius:22px;background:rgba(255,255,255,.97);box-shadow:0 24px 75px rgba(5,22,54,.28),inset 0 1px 0 #fff;color:#142a45}
.ddp-loader-rings{position:relative;width:86px;height:86px;margin:0 auto 16px;display:grid;place-items:center}
.ddp-loader-ring{position:absolute;display:block;border-style:solid;border-radius:50%;border-color:transparent;will-change:transform;transform-origin:50% 50%;backface-visibility:hidden}
/* Blue rotates clockwise, gold counter-clockwise, green clockwise; offsets prevent a synchronized look. */
.ddp-loader-ring.ring-blue{inset:0;border-width:4px;border-top-color:#1687ff;border-right-color:#1687ff;animation:ddpRingClockwise 1.45s linear infinite;animation-delay:-.48s}
.ddp-loader-ring.ring-gold{inset:11px;border-width:4px;border-left-color:#e5b333;border-bottom-color:#e5b333;animation:ddpRingCounter 1.08s linear infinite;animation-delay:-.29s}
.ddp-loader-ring.ring-green{inset:23px;border-width:4px;border-top-color:#22a45a;border-right-color:#22a45a;animation:ddpRingClockwise .76s linear infinite;animation-delay:-.17s}
.ddp-loader-title{font-size:15px;font-weight:800;letter-spacing:.015em;color:#15345d}
.ddp-loader-subtitle{margin-top:4px;font-size:12px;color:#6b7b90}
.ddp-loader-dots{display:flex;gap:5px;margin-top:13px;align-items:center}
.ddp-loader-dots i{width:5px;height:5px;border-radius:50%;background:#1687ff;animation:ddpLoaderDot .9s ease-in-out infinite}
.ddp-loader-dots i:nth-child(2){background:#e5b333;animation-delay:.14s}.ddp-loader-dots i:nth-child(3){background:#22a45a;animation-delay:.28s}
@keyframes ddpRingClockwise{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
@keyframes ddpRingCounter{from{transform:rotate(0deg)}to{transform:rotate(-360deg)}}
@keyframes ddpLoaderDot{0%,80%,100%{opacity:.35;transform:translateY(0) scale(.8)}40%{opacity:1;transform:translateY(-4px) scale(1.18)}}
.theme-picker-menu{z-index:1055;cursor:default}.theme-picker-menu .form-control{cursor:pointer}.theme-picker-menu select:focus{outline:0;border-color:#1687ff;box-shadow:0 0 0 3px rgba(22,135,255,.14)}
html[data-ui-theme="moon"] .ddp-loader-panel{background:#1b2638;border-color:#344258;color:#e7edf6}html[data-ui-theme="moon"] .ddp-loader-title{color:#e7edf6}html[data-ui-theme="moon"] .ddp-loader-subtitle{color:#a4b2c7}
@media(prefers-reduced-motion:reduce){.ddp-loader-ring,.ddp-loader-dots i{animation:none!important}.ddp-page-loader{transition:none}}

/* v60: compact single-line pagination controls */
.ddp-pagination-bar{flex-wrap:nowrap;gap:8px;padding:10px 12px;overflow-x:auto}.ddp-pagination-info{font-size:11px;flex:0 0 auto}.ddp-pagination-tools{flex-wrap:nowrap;gap:6px;min-width:max-content}.ddp-pagination-nav{flex-wrap:nowrap;gap:3px}.ddp-page-btn{min-width:28px;height:29px;padding:0 6px;border-radius:7px}.ddp-pagination-size{width:64px!important;min-width:64px!important;height:29px;padding:0 4px!important}@media(max-width:767.98px){.ddp-pagination-bar{overflow-x:auto}.ddp-pagination-info{white-space:nowrap}.ddp-pagination-tools{width:auto;justify-content:flex-start}.ddp-pagination-nav{width:auto;justify-content:flex-start}}

/* v61: colorful, readable action icon clusters when a row has multiple actions. */
.action-icon:nth-child(5n+1){background:#dbeafe!important;color:#1d4ed8!important}
.action-icon:nth-child(5n+2){background:#dcfce7!important;color:#15803d!important}
.action-icon:nth-child(5n+3){background:#fef3c7!important;color:#a16207!important}
.action-icon:nth-child(5n+4){background:#f3e8ff!important;color:#7e22ce!important}
.action-icon:nth-child(5n){background:#ffe4e6!important;color:#be123c!important}
.action-icon{box-shadow:0 1px 3px rgba(15,23,42,.08);transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}
.action-icon:hover{transform:translateY(-1px);filter:saturate(1.1);box-shadow:0 4px 10px rgba(15,23,42,.14);opacity:1}

/* v61: compact application footer, matching the navy/gold top navigation bar. */
.main-footer{min-height:34px!important;padding:6px 14px!important;line-height:1.25!important;font-size:11px!important;background:linear-gradient(112deg,#061638 0%,#08285b 58%,#0a3472 100%)!important;color:#f8fbff!important;border-top:2px solid #d4af37!important;box-shadow:0 -3px 12px rgba(5,20,49,.12)}
.main-footer strong,.main-footer span{color:#f8fbff!important}
html[data-ui-theme="ocean"] .main-footer,html[data-ui-theme="forest"] .main-footer,html[data-ui-theme="violet"] .main-footer,html[data-ui-theme="moon"] .main-footer,html[data-ui-theme="sun"] .main-footer{background:linear-gradient(112deg,#061638 0%,#08285b 58%,#0a3472 100%)!important;color:#f8fbff!important;border-color:#d4af37!important}
@media(max-width:575.98px){.main-footer{padding:6px 10px!important;font-size:10px!important}.main-footer .float-right{display:none!important}}


/* v63: semantic action colors always override alternating row-action palette. */
.action-icon.action-delete,
.action-icon.action-lock{background:#fee2e2!important;color:#b91c1c!important}
.action-icon.action-inactive{background:#f3e8ff!important;color:#7e22ce!important}
.action-icon.action-unlock,
.action-icon.action-approve{background:#dcfce7!important;color:#15803d!important}
.action-icon.action-reset{background:#fee2e2!important;color:#b91c1c!important}
.action-icon.action-delete:hover,
.action-icon.action-lock:hover,
.action-icon.action-reset:hover{background:#fecaca!important;color:#991b1b!important}
.action-icon.action-inactive:hover{background:#e9d5ff!important;color:#6b21a8!important}
.action-icon.action-unlock:hover,
.action-icon.action-approve:hover{background:#bbf7d0!important;color:#166534!important}


/* v65: authentication language switcher and branded login header */
body.auth-page .auth-language-switcher{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;margin:-10px 0 20px;font-size:12px;line-height:1.2}
.auth-language-label{color:#64748b;font-weight:700;display:inline-flex;align-items:center;gap:5px;margin-right:2px}
.auth-language-option{display:inline-flex;align-items:center;justify-content:center;padding:7px 10px;border:1px solid #dbe4f0;border-radius:999px;background:#f8fafc;color:#34445c;font-weight:700;text-decoration:none!important;transition:background .18s ease,border-color .18s ease,color .18s ease}
.auth-language-option:hover,.auth-language-option:focus-visible{background:#eff6ff;border-color:#93c5fd;color:#1d4ed8;outline:none}
.auth-language-option.is-active{background:#eaf2ff;border-color:#7aa7f9;color:#1748a0;box-shadow:0 3px 10px rgba(37,99,235,.09)}
body.auth-page .auth-login-title,body.auth-page .auth-register-title{text-align:center;margin-bottom:23px}
body.auth-page .auth-login-card-logo,body.auth-page .auth-register-card-logo{display:block;width:76px;height:76px;object-fit:contain;margin:0 auto 12px;background:#fff;border-radius:17px;padding:4px;border:1px solid #e3eaf4;box-shadow:0 8px 22px rgba(15,23,42,.1)}
body.auth-page .auth-login-card-brand{font-weight:900;letter-spacing:.035em;color:#102d55;font-size:clamp(20px,2vw,26px);line-height:1.2;margin:0 0 11px}
body.auth-page .auth-login-title h2,body.auth-page .auth-register-title h2{font-size:clamp(27px,2.4vw,34px);font-weight:900;letter-spacing:.045em;color:#1461d8;margin:0 0 5px}
body.auth-page .auth-login-title>p{font-size:14px;color:#64748b;margin:8px 0 0}
body.auth-page .auth-login-title .auth-welcome-back{display:inline-block;font-size:14px;font-weight:800;color:#875500;background:#fff4d6;border:1px solid #f3d28a;border-radius:999px;padding:7px 13px;margin:0 auto 12px}
@media(max-width:700px){body.auth-page .auth-language-switcher{margin:-4px 0 18px}.auth-language-label{font-size:11px}.auth-language-option{padding:6px 8px;font-size:11px}body.auth-page .auth-login-card-logo,body.auth-page .auth-register-card-logo{width:66px;height:66px;margin-bottom:9px}body.auth-page .auth-login-card-brand{font-size:21px}}


/* v66: login page uses a compact vertical flag-only language picker on the right. */
body.auth-page .auth-language-switcher-vertical{position:fixed;right:18px;top:16px;transform:none;z-index:1100;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;margin:0;padding:9px;background:rgba(255,255,255,.94);border:1px solid rgba(148,163,184,.38);border-radius:18px;box-shadow:0 12px 32px rgba(15,23,42,.18);backdrop-filter:blur(12px)}
body.auth-page .auth-language-switcher-vertical .auth-language-option{width:46px;height:46px;min-width:46px;padding:0;border-radius:14px;font-size:25px;line-height:1;border:1px solid #dbe4f0;background:#f8fafc;text-decoration:none!important}
body.auth-page .auth-language-switcher-vertical .auth-language-option.is-active{background:#eaf2ff;border:2px solid #2563eb;box-shadow:0 3px 12px rgba(37,99,235,.16)}
body.auth-page .auth-language-switcher-vertical .auth-language-option:hover,body.auth-page .auth-language-switcher-vertical .auth-language-option:focus-visible{background:#eff6ff;border-color:#60a5fa;transform:translateX(-2px);outline:2px solid rgba(37,99,235,.22);outline-offset:2px}
body.auth-page .auth-brand-heading{align-items:flex-start}
body.auth-page .auth-brand-heading .auth-logo{width:88px;height:88px}
@media(max-width:700px){body.auth-page .auth-language-switcher-vertical{right:7px;top:8px;transform:none;gap:6px;padding:6px;border-radius:14px}body.auth-page .auth-language-switcher-vertical .auth-language-option{width:36px;height:36px;min-width:36px;border-radius:11px;font-size:20px}body.auth-page .auth-brand-overlay{padding-right:62px}}


/* v69: login screen has no visible logos; keep the flag-only language selector stacked at the top-right. */
body.auth-page .auth-language-switcher-vertical{top:16px;right:18px;transform:none}
@media(max-width:700px){body.auth-page .auth-language-switcher-vertical{top:8px;right:7px;transform:none}}

/* v73: clear return-to-home action on authentication pages */
body.auth-page .auth-back-home-wrap{display:flex;justify-content:center;margin-top:14px;width:100%}
body.auth-page .auth-back-home{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:10px 18px;border:1px solid #cbd8e8;border-radius:12px;background:linear-gradient(180deg,#fff,#f4f7fb);color:#19365f!important;font-size:14px;font-weight:750;text-decoration:none!important;box-shadow:0 5px 14px rgba(15,35,70,.07);transition:background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease}
body.auth-page .auth-back-home i{font-size:14px;color:#1764e8}
body.auth-page .auth-back-home:hover,body.auth-page .auth-back-home:focus-visible{background:#eaf2ff;border-color:#8ab3f8;color:#123f8c!important;transform:translateY(-1px);box-shadow:0 8px 18px rgba(37,99,235,.13);outline:none}
body.auth-page .auth-back-home:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
@media(max-width:700px){body.auth-page .auth-back-home-wrap{margin-top:12px}body.auth-page .auth-back-home{width:100%;min-height:46px}}

/* Package-aware stock summary: display whole packages and loose items, not package-equivalent decimals. */
.stock-summary-lines{font-size:12px;line-height:1.42;font-weight:600;margin-top:8px;padding-right:34px;overflow-wrap:anywhere;white-space:normal;position:relative;z-index:1}
.stock-summary-line{padding:3px 0}
.stock-summary-line+.stock-summary-line{border-top:1px solid rgba(148,163,184,.24);margin-top:3px;padding-top:5px}
.stock-summary-line small{font-size:10px;font-weight:500}
.stock-stat-card .stock-summary-lines{max-width:100%}
.table .stock-summary-lines{margin-top:0;padding-right:0;min-width:135px;font-size:11px}
.table .stock-summary-line{padding:1px 0}

/* v80: each table's search is directly attached above that table, without blank gaps. */
.ddp-pagination-bar{flex-wrap:wrap!important;overflow:visible!important;align-items:center;row-gap:8px;margin-top:0!important}
.ddp-table-search-row{display:flex;align-items:center;justify-content:flex-end;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;line-height:1}
.ddp-table-search-row-card-body{padding:0 1.25rem}
.ddp-table-search-row-card-body.ddp-table-search-row-flush{padding:0}
.content-wrapper .card-body.ddp-table-body-search-attached{padding-top:0!important}
.ddp-table-search{position:relative;display:flex;align-items:center;box-sizing:border-box;width:100%;flex:0 1 320px;min-width:180px;max-width:320px;margin:0}
.ddp-table-search>i{position:absolute;left:12px;color:#64748b;z-index:2;pointer-events:none}
.ddp-table-search-input{display:block;height:36px;min-width:0;width:100%;margin:0;padding:7px 12px 7px 36px;border:1px solid #dbe3ef;border-radius:8px;background:#fff;color:#23334d;box-shadow:none;line-height:20px}
.ddp-table-search-input:focus{border-color:#60a5fa;outline:0;box-shadow:0 0 0 2px rgba(37,99,235,.10)}
.ddp-table-search-no-results td{background:#f8fafc}
@media(max-width:767.98px){.ddp-pagination-bar{flex-wrap:wrap!important;overflow:visible!important;align-items:stretch!important;gap:8px}.ddp-pagination-info{white-space:normal;flex:1 1 100%}.ddp-table-search-row{justify-content:stretch}.ddp-table-search{flex:1 1 100%;width:100%;max-width:none;min-width:0;margin:0}.ddp-table-search-row-card-body{padding:0 1rem}.ddp-table-search-row-card-body.ddp-table-search-row-flush{padding:0}.ddp-pagination-tools{display:flex;flex-wrap:wrap!important;width:100%;min-width:0;justify-content:flex-start}.ddp-pagination-nav{flex-wrap:wrap!important;min-width:0}}


/* v82: vibrant, distinct stock summary cards with accessible high-contrast text. */
.stock-stat-card{isolation:isolate;min-height:142px;transition:transform .18s ease,box-shadow .18s ease;border:1px solid rgba(255,255,255,.24)}
.stock-stat-card:before{content:"";position:absolute;z-index:-1;width:170px;height:170px;right:-42px;bottom:-100px;border-radius:50%;background:rgba(255,255,255,.13);pointer-events:none}
.stock-stat-card:after{content:"";position:absolute;z-index:-1;width:90px;height:90px;right:20px;bottom:-58px;border-radius:50%;border:1px solid rgba(255,255,255,.18);pointer-events:none}
.stock-stat-card:hover{transform:translateY(-3px);box-shadow:0 13px 28px rgba(15,23,42,.16)}
.stock-stat-card.stock-stat-types{background:linear-gradient(135deg,#6d28d9 0%,#7c3aed 58%,#a78bfa 100%);}
.stock-stat-card.stock-stat-in{background:linear-gradient(135deg,#047857 0%,#059669 56%,#34d399 100%);}
.stock-stat-card.stock-stat-out{background:linear-gradient(135deg,#be123c 0%,#e11d48 56%,#fb7185 100%);}
.stock-stat-card.stock-stat-remaining{background:linear-gradient(135deg,#075985 0%,#0284c7 56%,#38bdf8 100%);}
.stock-stat-card.stock-stat-in:nth-child(2n){background:linear-gradient(135deg,#0f766e 0%,#0d9488 56%,#5eead4 100%)}
.stock-stat-card .label{color:rgba(255,255,255,.91)!important;position:relative;z-index:1}
.stock-stat-card h2{color:#fff!important;position:relative;z-index:1;text-shadow:0 1px 1px rgba(15,23,42,.12)}
.stock-stat-card .stock-summary-lines{color:#fff!important;position:relative;z-index:1}
.stock-stat-card .stock-summary-line,.stock-stat-card .stock-summary-line strong,.stock-stat-card .stock-summary-line small,.stock-stat-card .text-muted{color:rgba(255,255,255,.94)!important}
.stock-stat-card .stock-summary-line+.stock-summary-line{border-top-color:rgba(255,255,255,.28)}
.stock-stat-card .icon{color:#fff!important;opacity:.23!important;font-size:32px;z-index:0}
@media(prefers-reduced-motion:reduce){.stock-stat-card{transition:none}.stock-stat-card:hover{transform:none}}


/* V84: polished, consistent module cards across every role/account */
.module-grid{align-items:stretch;gap:16px}
.module-grid .module-card{min-height:112px;overflow:hidden;border:1px solid rgba(148,163,184,.22);border-left:4px solid var(--module-accent,#64748b);border-radius:16px;background:linear-gradient(145deg,#fff 0%,#f8fafc 100%);box-shadow:0 5px 18px rgba(15,23,42,.07);gap:13px;padding:17px;isolation:isolate}
.module-grid .module-card:before{content:"";position:absolute;z-index:-1;width:100px;height:100px;right:-36px;top:-42px;border-radius:50%;background:var(--module-bg,rgba(226,232,240,.5));opacity:.55;transition:transform .25s ease}
.module-grid .module-card:hover{transform:translateY(-4px);border-color:var(--module-accent,#94a3b8);box-shadow:0 13px 28px rgba(15,23,42,.13);background:#fff}
.module-grid .module-card:hover:before{transform:scale(1.35)}
.module-grid .module-icon{flex:0 0 48px;width:48px;height:48px;border-radius:15px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.75);transition:transform .25s ease, border-radius .25s ease}
.module-grid .module-card:hover .module-icon{transform:rotate(-5deg) scale(1.06);border-radius:17px}
.module-grid .module-copy{flex:1;position:relative;z-index:1}
.module-grid .module-card h5{font-size:15px;letter-spacing:.1px;line-height:1.3}
.module-grid .module-card small{font-size:11.5px;line-height:1.45;margin-top:4px}
.module-grid .module-arrow{position:relative;z-index:1;display:grid;place-items:center;flex:0 0 27px;width:27px;height:27px;border-radius:50%;background:var(--module-bg,#f1f5f9);transition:transform .2s ease,background .2s ease}
.module-grid .module-card:hover .module-arrow{transform:translateX(3px);background:var(--module-accent,#64748b);color:#fff;opacity:1}
@media(max-width:575.98px){.module-grid{gap:11px}.module-grid .module-card{min-height:88px;padding:12px;gap:10px;border-radius:13px}.module-grid .module-icon{width:40px;height:40px;flex-basis:40px;border-radius:12px;font-size:17px}.module-grid .module-card h5{font-size:14px}.module-grid .module-card small{font-size:10.5px}.module-grid .module-arrow{flex-basis:23px;width:23px;height:23px}}
@media(prefers-reduced-motion:reduce){.module-grid .module-card,.module-grid .module-card:before,.module-grid .module-icon,.module-grid .module-arrow{transition:none!important}}


/* V87: high-impact Sale Report metrics and per-stock money valuations. */
.sales-report-metrics .sale-report-metric-card{min-height:160px;color:#fff!important;border:1px solid rgba(255,255,255,.25);isolation:isolate;transition:transform .2s ease,box-shadow .2s ease;box-shadow:0 10px 25px rgba(15,23,42,.14)}
.sales-report-metrics .sale-report-metric-card:before{content:"";position:absolute;z-index:-1;width:155px;height:155px;border-radius:50%;right:-36px;bottom:-78px;background:rgba(255,255,255,.12);pointer-events:none}
.sales-report-metrics .sale-report-metric-card:hover{transform:translateY(-4px);box-shadow:0 17px 32px rgba(15,23,42,.2)}
.sales-report-metrics .sale-report-metric-card .label{color:rgba(255,255,255,.96)!important;font-size:12px;letter-spacing:.07em}
.sales-report-metrics .sale-report-metric-card h2{position:relative;z-index:1;color:#fff!important;font-size:clamp(21px,1.65vw,29px);line-height:1.25;overflow-wrap:anywhere;text-shadow:0 1px 2px rgba(0,0,0,.13)}
.sales-report-metrics .sale-report-metric-card small{display:block;position:relative;z-index:1;margin-top:8px;max-width:85%;color:rgba(255,255,255,.88);font-size:11px;line-height:1.45}
.sales-report-metrics .sale-report-metric-card .icon{color:#fff!important;opacity:.20!important;font-size:37px;top:15px;right:17px}
.sales-report-metrics .sale-metric-revenue{background:linear-gradient(135deg,#064e3b 0%,#059669 52%,#34d399 100%)!important}
.sales-report-metrics .sale-metric-transactions{background:linear-gradient(135deg,#1e3a8a 0%,#2563eb 52%,#60a5fa 100%)!important}
.sales-report-metrics .sale-metric-gross{background:linear-gradient(135deg,#581c87 0%,#9333ea 52%,#c084fc 100%)!important}
.sales-report-metrics .sale-metric-net{background:linear-gradient(135deg,#9a3412 0%,#ea580c 52%,#fdba74 100%)!important}
.stock-value-metrics .stock-stat-card{min-height:155px;color:#fff!important;border:1px solid rgba(255,255,255,.25);isolation:isolate;box-shadow:0 9px 24px rgba(15,23,42,.12)}
.stock-value-metrics .stock-stat-card .label{color:rgba(255,255,255,.95)!important;font-size:12px;letter-spacing:.035em}
.stock-value-metrics .stock-stat-card h2{position:relative;z-index:1;color:#fff!important;font-size:clamp(21px,1.7vw,29px);line-height:1.3;overflow-wrap:anywhere}
.stock-value-metrics .stock-stat-card small{position:relative;z-index:1;display:block;margin-top:8px;max-width:86%;color:rgba(255,255,255,.9);font-size:11px;line-height:1.5}
.stock-value-metrics .stock-stat-card .icon{color:#fff!important;opacity:.2!important;font-size:36px}
.stock-value-metrics .stock-value-retail{background:linear-gradient(135deg,#075985 0%,#0284c7 54%,#38bdf8 100%)!important}
.stock-value-metrics .stock-value-cost{background:linear-gradient(135deg,#4338ca 0%,#6366f1 54%,#a5b4fc 100%)!important}
.stock-value-metrics .stock-value-profit{background:linear-gradient(135deg,#065f46 0%,#059669 54%,#6ee7b7 100%)!important}
.stock-value-metrics .stock-value-profit .value-loss{color:#fff7ed!important;text-decoration:underline;text-decoration-color:rgba(255,255,255,.7);text-decoration-thickness:2px}
.content-wrapper .table td.loss-value{color:#b91c1c!important}.content-wrapper .table td.profit-value{color:#047857!important}
@media(max-width:767.98px){.sales-report-metrics .sale-report-metric-card,.stock-value-metrics .stock-stat-card{min-height:135px;padding:16px}.sales-report-metrics .sale-report-metric-card h2,.stock-value-metrics .stock-stat-card h2{font-size:22px}}
@media(prefers-reduced-motion:reduce){.sales-report-metrics .sale-report-metric-card{transition:none}.sales-report-metrics .sale-report-metric-card:hover{transform:none}}

.stock-value-metrics .stock-value-units{background:linear-gradient(135deg,#7c2d12 0%,#c2410c 54%,#fb923c 100%)!important}


/* V89: BEMIS-SIS-inspired, brand-safe login identity and subscription lock state. */
body.auth-page .auth-system-status{display:flex;flex-direction:column;align-items:center;gap:8px;margin:0 auto 22px;text-align:center;width:100%;animation:dmAuthEnter .45s .06s both}
body.auth-page .auth-system-wordmark{font-size:clamp(20px,2vw,25px);font-weight:900;letter-spacing:.08em;color:#123866;line-height:1.15}
body.auth-page .auth-production-badge{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid #c8e9d7;border-radius:999px;background:#effbf4;color:#17603a;font-size:10px;font-weight:850;letter-spacing:.06em}
body.auth-page .auth-production-badge .fa-circle{font-size:7px;color:#22a55a;animation:authLivePulse 1.8s ease infinite}
@keyframes authLivePulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(.78)}}
body.auth-page .auth-sis-inspired .auth-card{background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)}
body.auth-page .auth-sis-inspired .auth-title h2{color:#163c72}
body.auth-page .auth-sis-inspired .auth-card form .btn-primary{background:linear-gradient(100deg,#0f69cb,#176be9 55%,#2b8fff);border-radius:8px;min-height:52px;letter-spacing:.03em}
.subscription-lock-notice{position:relative;display:flex;gap:18px;align-items:flex-start;margin:0 0 22px;padding:22px 24px;border:1px solid #efb4b4;border-left:6px solid #c62828;border-radius:17px;background:linear-gradient(115deg,#fff4f4 0%,#fff 65%,#fff8e9 100%);box-shadow:0 12px 32px rgba(126,26,26,.09);overflow:hidden}
.subscription-lock-notice:after{content:"";position:absolute;width:180px;height:180px;border:24px solid rgba(198,40,40,.045);border-radius:50%;right:-70px;top:-96px;pointer-events:none}
.subscription-lock-symbol{flex:0 0 54px;height:54px;display:grid;place-items:center;border-radius:15px;background:linear-gradient(135deg,#b91c1c,#ef4444);color:#fff;font-size:22px;box-shadow:0 9px 20px rgba(185,28,28,.22)}
.subscription-lock-copy{position:relative;z-index:1;min-width:0;flex:1}
.subscription-lock-kicker{font-size:10px;font-weight:900;letter-spacing:.13em;color:#b91c1c;margin-bottom:5px}
.subscription-lock-copy h3{font-size:clamp(19px,2vw,25px);line-height:1.2;margin:0 0 8px;font-weight:900;color:#7f1d1d}
.subscription-lock-copy p{font-size:13px;line-height:1.65;margin:0 0 12px;max-width:960px;color:#5b2730}
.subscription-lock-meta{display:flex;gap:8px 16px;align-items:center;flex-wrap:wrap;margin-bottom:13px;font-size:12px;font-weight:750;color:#7f1d1d}
.subscription-lock-details{border-radius:9px;border:1px solid #f0c5c5;color:#8b1e1e!important;font-weight:800;box-shadow:0 3px 9px rgba(127,29,29,.05)}
.subscription-lock-details:hover{background:#fff0f0;border-color:#dc7777}
.subscription-lock-notice.is-disabled{border-left-color:#7c3aed;border-color:#ddd0fe;background:linear-gradient(115deg,#f7f2ff,#fff)}
.subscription-lock-notice.is-disabled .subscription-lock-symbol{background:linear-gradient(135deg,#5b21b6,#8b5cf6);box-shadow:0 9px 20px rgba(91,33,182,.2)}
.subscription-lock-notice.is-disabled .subscription-lock-kicker,.subscription-lock-notice.is-disabled .subscription-lock-copy h3,.subscription-lock-notice.is-disabled .subscription-lock-meta{color:#5b21b6}
.subscription-lock-notice.is-disabled .subscription-lock-copy p{color:#4c3b67}
body.subscription-locked .main-sidebar .nav-link-locked,body.subscription-locked .subscription-locked-link{opacity:.54!important;filter:grayscale(.35);cursor:not-allowed!important;background:rgba(148,163,184,.06)!important;box-shadow:none!important;transform:none!important}
body.subscription-locked .main-sidebar .nav-link-locked .subscription-lock-icon{float:right;margin-top:4px;margin-left:6px;font-size:11px;color:#fca5a5}
body.subscription-locked .main-sidebar .nav-link-locked .nav-icon{color:#94a3b8!important}
.subscription-dropdown-locked{opacity:.52!important;cursor:not-allowed!important}
@media(max-width:575.98px){.subscription-lock-notice{gap:12px;padding:16px 14px;border-radius:13px}.subscription-lock-symbol{flex-basis:40px;height:40px;border-radius:11px;font-size:17px}.subscription-lock-copy p{font-size:12px}.subscription-lock-meta{font-size:11px;gap:6px 10px}body.auth-page .auth-production-badge{font-size:9px;letter-spacing:.025em;padding:6px 8px}}

/* V94: grouped sidebar navigation */
.main-sidebar .nav-sidebar > .nav-item.has-treeview > .nav-link { margin: 3px 8px 2px; border-radius: 9px; font-weight: 650; letter-spacing: .01em; }
.main-sidebar .nav-sidebar > .nav-item.has-treeview > .nav-link .right { transition: transform .18s ease; }
.main-sidebar .nav-sidebar > .nav-item.has-treeview.menu-open > .nav-link .right { transform: rotate(-90deg); }
.main-sidebar .nav-sidebar .nav-treeview { padding: 2px 0 5px; }
.main-sidebar .nav-sidebar .nav-treeview .nav-link { padding-left: 2.25rem; font-size: .92rem; }
.main-sidebar .nav-sidebar .nav-link.active { box-shadow: inset 3px 0 0 rgba(255,255,255,.88); }
@media (prefers-reduced-motion: reduce) { .main-sidebar .nav-sidebar > .nav-item.has-treeview > .nav-link .right { transition: none !important; } }

/* V97: compact detail-view and action-reason modal workspaces. */
.ddp-view-detail-modal .ddp-view-detail-tools{display:flex;align-items:center;gap:6px;margin-left:auto;margin-right:8px;min-width:0;flex-wrap:wrap}
.ddp-view-detail-modal .ddp-view-detail-body{padding:16px;max-height:calc(100dvh - 150px);overflow:auto}
.ddp-view-detail-modal .ddp-view-detail-body>.card-body{padding:0}
.ddp-view-detail-modal .ddp-view-detail-body p{overflow-wrap:anywhere}
.ddp-reason-modal .modal-dialog{max-width:480px}
.ddp-reason-modal .ddp-reason-input{min-height:92px;resize:vertical}
.ddp-reason-modal .ddp-reason-input.is-invalid{border-color:#dc2626}
.ddp-reason-modal .ddp-reason-error:not(:empty){display:block}
@media(max-width:575.98px){.ddp-view-detail-modal .ddp-view-detail-body{padding:12px}.ddp-view-detail-modal .ddp-view-detail-tools{margin-left:0;margin-right:5px}}

/* v97: modal form ergonomics and compact feedback cards */
.ddp-crud-modal .modal-dialog{max-width:min(960px,calc(100vw - 24px));margin:12px auto}
.ddp-crud-modal .modal-content{max-height:calc(100vh - 24px);display:flex;flex-direction:column;border:0;border-radius:14px;overflow:hidden;box-shadow:0 18px 52px rgba(15,23,42,.22)}
.ddp-crud-modal .modal-header{flex:0 0 auto;padding:12px 16px}
.ddp-crud-modal .modal-body,.ddp-view-detail-modal .ddp-view-detail-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px}
.ddp-crud-modal .modal-footer{flex:0 0 auto}
.ddp-view-detail-modal .ddp-view-detail-tools{margin-left:auto;margin-right:12px}
.ddp-view-detail-modal .ddp-view-detail-tools .btn{white-space:nowrap}
@media(max-width:575.98px){.ddp-crud-modal .modal-dialog{max-width:calc(100vw - 12px);margin:6px auto}.ddp-crud-modal .modal-content{max-height:calc(100vh - 12px)}.ddp-crud-modal .modal-body,.ddp-view-detail-modal .ddp-view-detail-body{padding:12px}}

/* V99: open sidebar group header is purple; selected child item keeps its existing active theme color. */
.main-sidebar .nav-sidebar > .nav-item.has-treeview.menu-open > .nav-link.active{background:#7c3aed!important;color:#fff!important;box-shadow:inset 3px 0 0 rgba(255,255,255,.9),0 3px 10px rgba(124,58,237,.22)!important}
.main-sidebar .nav-sidebar > .nav-item.has-treeview.menu-open > .nav-link.active .nav-icon,.main-sidebar .nav-sidebar > .nav-item.has-treeview.menu-open > .nav-link.active p{color:#fff!important}

/* V107: form labels are title-cased by the UI helper, which keeps minor words lowercase. */
label,
.form-label,
.col-form-label,
.custom-control-label { text-transform: none !important; }

/* V107: date report filters stay on one row; narrow screens can scroll horizontally. */
form.date-filter-row{
  display:flex!important; flex-wrap:nowrap!important; align-items:flex-end!important;
  gap:.65rem; width:100%; max-width:100%; overflow-x:auto; overflow-y:hidden;
  margin-left:0!important; margin-right:0!important; padding-bottom:.35rem;
  -webkit-overflow-scrolling:touch;
}
form.date-filter-row>.form-group{
  flex:0 0 180px!important; width:180px!important; max-width:180px!important;
  padding-left:0!important; padding-right:0!important; margin-bottom:.5rem!important;
}
form.date-filter-row>.col-12,
form.date-filter-row>.col-md-3:not(.form-group){
  flex:0 0 auto!important; width:auto!important; max-width:none!important;
  padding-left:0!important; padding-right:0!important; margin-bottom:.5rem!important;
  white-space:nowrap;
}
form.date-filter-row>.col-12 small{white-space:nowrap}

/* V101: never print on-screen search/pagination controls or page counters. */
@media print {
  @page { margin: 0 !important; }
  .ddp-pagination-bar,
  .ddp-pagination-info,
  .ddp-pagination-tools,
  .ddp-pagination-nav,
  .ddp-page-ellipsis,
  .dataTables_paginate,
  .dataTables_info,
  .dataTables_filter,
  .dataTables_length,
  .pagination,
  nav[aria-label*="pagination" i] { display: none !important; }
  html, body, .content-wrapper, .content, .container-fluid { margin-top: 0 !important; padding-top: 0 !important; }
  #printArea, #salePrintArea, #paymentPrintArea, #orderPrintArea { margin-top: 0 !important; top: 0 !important; }
}


/* V103: receipt page tables must not create horizontal scrolling. */
.receipt-table-wrap{width:100%;max-width:100%;overflow-x:visible!important;overflow-y:visible!important;-webkit-overflow-scrolling:auto}
.receipt-table-wrap table{width:100%!important;max-width:100%;table-layout:fixed}
.receipt-table-wrap th,.receipt-table-wrap td{white-space:normal!important;overflow-wrap:anywhere;word-break:normal}
@media(max-width:767.98px){.receipt-table-wrap{overflow-x:visible!important}.receipt-table-wrap table{font-size:11px}.receipt-table-wrap th,.receipt-table-wrap td{padding:5px 4px!important}}

/* V108: consistent dashboard/summary cards; text adapts inside the card instead of stretching its dimensions. */
.content-wrapper .card,
.content-wrapper .info-box,
.content-wrapper .small-box,
.content-wrapper .stat-card,
.content-wrapper .stock-stat-card,
.content-wrapper .sale-report-metric-card,
.content-wrapper .module-grid .module-card {
  min-width: 0;
  box-sizing: border-box;
}

/* Standard card headings wrap within the available width and cannot widen the card. */
.content-wrapper .card-header { min-width: 0; }
.content-wrapper .card-header .card-title {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.3;
}
.content-wrapper .card-body { min-width: 0; }
.content-wrapper .card-body p,
.content-wrapper .card-body label,
.content-wrapper .card-body .text-muted {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* KPI cards: a shared footprint on every role dashboard. */
.content-wrapper .row > [class*="col-"] > .stat-card {
  width: 100%;
  height: 132px;
  min-height: 132px;
  max-height: 132px;
  padding: 17px 18px;
  overflow: hidden;
}
.content-wrapper .stat-card > div:first-child {
  max-width: 100%;
  max-height: 2.55em;
  padding-right: 48px;
  font-size: clamp(10px, .9vw, 13px);
  line-height: 1.27;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.content-wrapper .stat-card h2 {
  max-width: 100%;
  max-height: 2.45em;
  margin-top: 7px;
  padding-right: 36px;
  font-size: clamp(17px, 1.8vw, 27px);
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* AdminLTE summary boxes use one consistent height; long captions/value text stays inside. */
.content-wrapper .row > [class*="col-"] > .small-box {
  width: 100%;
  height: 148px;
  min-height: 148px;
  max-height: 148px;
  margin-bottom: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
}
.content-wrapper .small-box .inner {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 13px 14px 6px;
  padding-right: 64px;
  overflow: hidden;
}
.content-wrapper .small-box .inner h3 {
  max-width: 100%;
  max-height: 2.45em;
  margin: 0 0 7px;
  font-size: clamp(16px, 1.75vw, 27px);
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.content-wrapper .small-box .inner p {
  max-width: 100%;
  max-height: 2.8em;
  margin: 0;
  font-size: clamp(10px, .9vw, 13px);
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.content-wrapper .small-box .icon { font-size: clamp(30px, 3.1vw, 48px); top: 14px; right: 12px; }
.content-wrapper .small-box .small-box-footer {
  flex: 0 0 31px;
  height: 31px;
  max-height: 31px;
  padding: 7px 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 17px;
}

/* Stock cards keep a shared height; long multi-unit summaries scroll inside the card. */
.content-wrapper .row > [class*="col-"] > .stock-stat-card,
.content-wrapper .stock-value-metrics .stock-stat-card {
  width: 100%;
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  padding: 15px 16px;
  overflow: hidden;
}
.content-wrapper .stock-stat-card .label {
  max-width: 100%;
  max-height: 2.55em;
  padding-right: 43px;
  font-size: clamp(10px, .92vw, 13px);
  line-height: 1.28;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.content-wrapper .stock-stat-card h2 {
  max-width: 100%;
  max-height: 2.5em;
  margin: 7px 0 0;
  padding-right: 35px;
  font-size: clamp(16px, 1.7vw, 26px);
  line-height: 1.2;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.content-wrapper .stock-stat-card small {
  max-width: 100%;
  max-height: 2.8em;
  margin-top: 6px;
  font-size: clamp(9px, .78vw, 11px);
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.content-wrapper .stock-stat-card .stock-summary-lines {
  max-height: 74px;
  margin-top: 4px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-right: 3px;
}
.content-wrapper .stock-stat-card .stock-summary-line,
.content-wrapper .stock-stat-card .stock-summary-line strong,
.content-wrapper .stock-stat-card .stock-summary-line small {
  font-size: clamp(9px, .78vw, 11px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

/* Sales report metrics share one height and adapt long captions/amounts. */
.content-wrapper .sales-report-metrics .sale-report-metric-card {
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  padding: 15px 16px;
  overflow: hidden;
}
.content-wrapper .sales-report-metrics .sale-report-metric-card .label {
  max-width: 100%;
  max-height: 2.55em;
  padding-right: 40px;
  font-size: clamp(10px, .9vw, 12px);
  line-height: 1.28;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.content-wrapper .sales-report-metrics .sale-report-metric-card h2 {
  max-width: 100%;
  max-height: 2.45em;
  font-size: clamp(16px, 1.75vw, 27px);
  line-height: 1.2;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.content-wrapper .sales-report-metrics .sale-report-metric-card small {
  max-width: 100%;
  max-height: 2.7em;
  font-size: clamp(9px, .8vw, 11px);
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Module shortcut cards are equal-sized in each grid; title and description fit inside. */
.content-wrapper .module-grid { grid-auto-rows: 112px; align-items: stretch; }
.content-wrapper .module-grid > .module-card {
  width: 100%;
  height: 112px;
  min-height: 112px;
  max-height: 112px;
  min-width: 0;
  overflow: hidden;
}
.content-wrapper .module-grid .module-copy { min-width: 0; max-width: 100%; overflow: hidden; }
.content-wrapper .module-grid .module-card h5 {
  max-height: 2.6em;
  font-size: clamp(11px, 1vw, 14px);
  line-height: 1.3;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.content-wrapper .module-grid .module-card small {
  max-height: 2.9em;
  font-size: clamp(9px, .78vw, 11px);
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .content-wrapper .row > [class*="col-"] > .stat-card { height: 120px; min-height: 120px; max-height: 120px; padding: 14px; }
  .content-wrapper .row > [class*="col-"] > .small-box { height: 140px; min-height: 140px; max-height: 140px; }
  .content-wrapper .row > [class*="col-"] > .stock-stat-card,
  .content-wrapper .stock-value-metrics .stock-stat-card,
  .content-wrapper .sales-report-metrics .sale-report-metric-card { height: 148px; min-height: 148px; max-height: 148px; padding: 13px; }
  .content-wrapper .module-grid { grid-auto-rows: 100px; }
  .content-wrapper .module-grid > .module-card { height: 100px; min-height: 100px; max-height: 100px; padding: 11px; gap: 9px; }
  .content-wrapper .module-grid .module-icon { width: 39px; height: 39px; flex-basis: 39px; }
  .content-wrapper .module-grid .module-arrow { width: 23px; height: 23px; flex-basis: 23px; }
}
@media (max-width: 480px) {
  .content-wrapper .row > [class*="col-"] > .stat-card { height: 116px; min-height: 116px; max-height: 116px; }
  .content-wrapper .row > [class*="col-"] > .small-box { height: 136px; min-height: 136px; max-height: 136px; }
  .content-wrapper .row > [class*="col-"] > .stock-stat-card,
  .content-wrapper .stock-value-metrics .stock-stat-card,
  .content-wrapper .sales-report-metrics .sale-report-metric-card { height: 144px; min-height: 144px; max-height: 144px; }
  .content-wrapper .module-grid { grid-template-columns: 1fr; grid-auto-rows: 92px; }
  .content-wrapper .module-grid > .module-card { height: 92px; min-height: 92px; max-height: 92px; }
}

/* Keep long generic card headings from pushing card headers taller. */
.content-wrapper .card-header .card-title {
  max-height: 2.6em;
  flex: 0 1 auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}


/* v109: only the exact current sidebar destination is selected; open groups stay neutral. */
.main-sidebar .nav-sidebar .nav-link.sidebar-group-toggle,
.main-sidebar .nav-sidebar .nav-link.sidebar-group-toggle.active,
.main-sidebar .nav-sidebar .nav-link.sidebar-group-toggle[aria-current="page"],
.main-sidebar .nav-sidebar .nav-link.sidebar-group-toggle[aria-expanded="true"] {
  background: transparent !important;
  border-left: 0 !important;
  padding-left: .5rem !important;
  box-shadow: none !important;
  transform: none !important;
  color: #c2c7d0 !important;
}
.main-sidebar .nav-sidebar .nav-link.sidebar-group-toggle .nav-icon,
.main-sidebar .nav-sidebar .nav-link.sidebar-group-toggle p { color: inherit !important; }
/* A group may remain expanded, but only its current child link gets the selected color. */
.main-sidebar .nav-sidebar .nav-treeview .nav-link.active,
.main-sidebar .nav-sidebar .nav-treeview .nav-link[aria-current="page"] {
  background: linear-gradient(105deg, #087bff 0%, #08a8ff 62%, #35c5ff 100%) !important;
  color: #fff !important;
}

/* V107 UI refinement: fit currency values inside fixed metric cards without expanding them. */
.content-wrapper .stat-card h2,
.content-wrapper .stock-stat-card h2,
.content-wrapper .sales-report-metrics .sale-report-metric-card .value,
.content-wrapper .small-box .inner h3,
.content-wrapper .metric-card .amount,
.content-wrapper .kpi-card .amount {
  max-width: 100%;
  min-width: 0;
  font-size: clamp(14px, 1.75vw, 27px);
  line-height: 1.16;
  overflow-wrap: anywhere;
  word-break: normal;
  font-variant-numeric: tabular-nums;
}
.content-wrapper .stat-card,
.content-wrapper .stock-stat-card,
.content-wrapper .sale-report-metric-card,
.content-wrapper .small-box {
  min-width: 0;
}
.content-wrapper .stat-card .label,
.content-wrapper .stock-stat-card .label,
.content-wrapper .sale-report-metric-card .label,
.content-wrapper .small-box .inner p {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

/* Give category selectors more vertical room in Sale and Product forms. */
#catFilter,
#saleForm #catFilter,
select[name="category_id"],
#productForm select[name="category_id"] {
  min-height: 46px;
  height: 46px;
  padding-top: 9px;
  padding-bottom: 9px;
  line-height: 1.35;
}
.select2-container .select2-selection--single {
  min-height: 46px !important;
  height: 46px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 44px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 44px !important;
}

/* Use available width for Sale subtotal/total summary without making the card taller. */
#saleForm .alert.alert-light.border {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
#saleForm .alert.alert-light.border #subtotal,
#saleForm .alert.alert-light.border #discount,
#saleForm .alert.alert-light.border #taxAmountPreview,
#saleForm .alert.alert-light.border #total,
#saleForm .alert.alert-light.border #balancePreview {
  display: inline-block;
  min-width: 7.5ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#saleForm .alert.alert-light.border strong {
  display: inline-flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  font-size: 14px;
}
#saleForm .row > .col-md-2:has(#subtotal) {
  flex: 0 0 20%;
  max-width: 20%;
}
#saleForm .row > .col-md-2:has(#subtotal) + .col-md-2 {
  flex: 0 0 16.666667%;
  max-width: 16.666667%;
}
@media (max-width: 767.98px) {
  #saleForm .row > .col-md-2:has(#subtotal),
  #saleForm .row > .col-md-2:has(#subtotal) + .col-md-2 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .content-wrapper .stat-card h2,
  .content-wrapper .stock-stat-card h2,
  .content-wrapper .sales-report-metrics .sale-report-metric-card .value,
  .content-wrapper .small-box .inner h3,
  .content-wrapper .metric-card .amount,
  .content-wrapper .kpi-card .amount {
    font-size: clamp(13px, 4vw, 22px);
  }
}


/* V108: mobile dashboard cards no longer overlap or clip long labels/amounts.
   Let rows grow with their content, and keep decorative icons out of text space. */
@media (max-width: 767.98px) {
  .content-wrapper .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    align-items: stretch !important;
    row-gap: 13px !important;
    column-gap: 12px !important;
  }
  .content-wrapper .module-grid > .module-card {
    height: auto !important;
    min-height: 112px !important;
    max-height: none !important;
    padding: 13px !important;
    overflow: visible !important;
    align-self: stretch;
  }
  .content-wrapper .module-grid .module-copy {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
  }
  .content-wrapper .module-grid .module-card h5,
  .content-wrapper .module-grid .module-card small {
    max-height: none !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .content-wrapper .module-grid .module-card h5 {
    font-size: 14px !important;
    line-height: 1.3 !important;
    margin-bottom: 4px;
  }
  .content-wrapper .module-grid .module-card small {
    font-size: 10.5px !important;
    line-height: 1.4 !important;
  }

  .content-wrapper .dashboard-stats-row {
    row-gap: 0 !important;
    align-items: stretch;
  }
  .content-wrapper .dashboard-stats-row > [class*="col-"] {
    display: flex;
    min-width: 0;
    padding-bottom: 14px !important;
  }
  .content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card {
    width: 100% !important;
    height: auto !important;
    min-height: 122px !important;
    max-height: none !important;
    padding: 16px 58px 18px 17px !important;
    margin: 0 !important;
    overflow: hidden;
  }
  .content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card > div:first-child {
    max-height: none !important;
    padding-right: 0 !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }
  .content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card h2 {
    max-height: none !important;
    padding-right: 0 !important;
    margin-top: 8px;
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    font-size: clamp(19px, 4.4vw, 25px) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere;
  }
  .content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card .icon {
    right: 13px !important;
    top: 14px !important;
    font-size: 35px !important;
    opacity: .17 !important;
    pointer-events: none;
  }

  /* AdminLTE cards also grow when their values/captions wrap on small screens. */
  .content-wrapper .row > [class*="col-"] > .small-box {
    height: auto !important;
    min-height: 148px !important;
    max-height: none !important;
    margin-bottom: 0 !important;
  }
  .content-wrapper .small-box .inner {
    min-height: 0;
    overflow: visible !important;
    padding: 14px 62px 13px 14px !important;
  }
  .content-wrapper .small-box .inner h3,
  .content-wrapper .small-box .inner p {
    max-height: none !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .content-wrapper .small-box .inner h3 {
    font-size: clamp(18px, 4vw, 25px) !important;
    line-height: 1.2 !important;
    margin-bottom: 8px;
  }
  .content-wrapper .small-box .inner p {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }
  .content-wrapper .small-box .icon {
    top: 13px !important;
    right: 11px !important;
    font-size: 34px !important;
    opacity: .2;
  }
}

@media (max-width: 575.98px) {
  /* A single module-card column avoids squeezed copy and overlapping arrows on phones. */
  .content-wrapper .module-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: auto !important;
    gap: 12px !important;
  }
  .content-wrapper .module-grid > .module-card {
    min-height: 98px !important;
    height: auto !important;
    max-height: none !important;
    padding: 13px 14px !important;
    gap: 11px !important;
  }
  .content-wrapper .module-grid .module-icon {
    width: 40px !important;
    height: 40px !important;
    flex-basis: 40px !important;
  }
  .content-wrapper .module-grid .module-arrow {
    width: 23px !important;
    height: 23px !important;
    flex-basis: 23px !important;
  }
  .content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card {
    min-height: 118px !important;
    padding: 15px 56px 17px 16px !important;
  }
  .content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card .icon {
    right: 12px !important;
    top: 13px !important;
    font-size: 32px !important;
  }
}


/* V109: Fix the four approval summary cards (Pending Changes, Deletions Pending,
   Approved Edits, Approved Deletions). Scope this to the approval summary row
   so other dashboard cards keep their existing layout. */
.content-wrapper .approval-summary-row {
  align-items: stretch;
  row-gap: 16px;
}
.content-wrapper .approval-summary-row > [class*="col-"] {
  display: flex;
  min-width: 0;
}
.content-wrapper .approval-summary-row > [class*="col-"] > .small-box {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: auto !important;
  min-height: 166px !important;
  max-height: none !important;
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: 12px;
}
.content-wrapper .approval-summary-row .small-box .inner {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 16px 62px 13px 16px !important;
  overflow: visible !important;
}
.content-wrapper .approval-summary-row .small-box .inner h3 {
  display: block !important;
  max-width: 100% !important;
  max-height: none !important;
  margin: 0 0 8px !important;
  font-size: clamp(20px, 2.0vw, 28px) !important;
  line-height: 1.18 !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  -webkit-line-clamp: unset !important;
}
.content-wrapper .approval-summary-row .small-box .inner p {
  display: block !important;
  max-width: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  -webkit-line-clamp: unset !important;
}
.content-wrapper .approval-summary-row .small-box .icon {
  top: 13px !important;
  right: 12px !important;
  font-size: 36px !important;
  opacity: .19 !important;
  pointer-events: none;
}
.content-wrapper .approval-summary-row .small-box .small-box-footer {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 38px !important;
  max-height: none !important;
  padding: 10px 12px !important;
  line-height: 1.3 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  text-align: center;
}
@media (max-width: 767.98px) {
  .content-wrapper .approval-summary-row > [class*="col-"] {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-bottom: 0 !important;
  }
  .content-wrapper .approval-summary-row > [class*="col-"] > .small-box {
    min-height: 150px !important;
  }
  .content-wrapper .approval-summary-row .small-box .inner {
    padding: 15px 60px 12px 15px !important;
  }
  .content-wrapper .approval-summary-row .small-box .inner p {
    font-size: 13px !important;
    line-height: 1.4 !important;
  }
}

/* V111: responsive dashboard summary and approval cards for ALL roles.
   The old fixed 136-166px heights clipped long captions like supplier payments,
   shifts, stock adjustments, expenses, order approvals and profile changes. */
.content-wrapper .dashboard-cards-row,
.content-wrapper .dashboard-approval-queue-row,
.content-wrapper .dashboard-approval-detail-row,
.content-wrapper .approval-summary-row,
.content-wrapper .dashboard-stats-row {
  align-items: stretch !important;
  min-width: 0;
}

.content-wrapper .dashboard-cards-row > [class*="col-"],
.content-wrapper .dashboard-approval-queue-row > [class*="col-"],
.content-wrapper .dashboard-approval-detail-row > [class*="col-"],
.content-wrapper .approval-summary-row > [class*="col-"],
.content-wrapper .dashboard-stats-row > [class*="col-"] {
  display: flex !important;
  min-width: 0 !important;
}

.content-wrapper .dashboard-cards-row > [class*="col-"] > .small-box,
.content-wrapper .dashboard-approval-queue-row > [class*="col-"] > .small-box,
.content-wrapper .dashboard-approval-detail-row > [class*="col-"] > .small-box,
.content-wrapper .approval-summary-row > [class*="col-"] > .small-box {
  position: relative;
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  width: 100% !important;
  height: auto !important;
  min-height: 156px !important;
  max-height: none !important;
  min-width: 0 !important;
  margin: 0 0 12px !important;
  overflow: hidden !important;
  border-radius: 12px;
}

.content-wrapper .dashboard-cards-row .small-box .inner,
.content-wrapper .dashboard-approval-queue-row .small-box .inner,
.content-wrapper .dashboard-approval-detail-row .small-box .inner,
.content-wrapper .approval-summary-row .small-box .inner {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 16px 62px 14px 16px !important;
  overflow: visible !important;
}

.content-wrapper .dashboard-cards-row .small-box .inner h3,
.content-wrapper .dashboard-approval-queue-row .small-box .inner h3,
.content-wrapper .dashboard-approval-detail-row .small-box .inner h3,
.content-wrapper .approval-summary-row .small-box .inner h3,
.content-wrapper .dashboard-cards-row .small-box .inner p,
.content-wrapper .dashboard-approval-queue-row .small-box .inner p,
.content-wrapper .dashboard-approval-detail-row .small-box .inner p,
.content-wrapper .approval-summary-row .small-box .inner p {
  display: block !important;
  width: 100%;
  max-width: 100% !important;
  max-height: none !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  -webkit-line-clamp: unset !important;
}

.content-wrapper .dashboard-cards-row .small-box .inner h3,
.content-wrapper .dashboard-approval-queue-row .small-box .inner h3,
.content-wrapper .dashboard-approval-detail-row .small-box .inner h3,
.content-wrapper .approval-summary-row .small-box .inner h3 {
  margin: 0 0 8px !important;
  font-size: clamp(19px, 2vw, 28px) !important;
  line-height: 1.2 !important;
  font-variant-numeric: tabular-nums;
}

.content-wrapper .dashboard-cards-row .small-box .inner p,
.content-wrapper .dashboard-approval-queue-row .small-box .inner p,
.content-wrapper .dashboard-approval-detail-row .small-box .inner p,
.content-wrapper .approval-summary-row .small-box .inner p {
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

.content-wrapper .dashboard-cards-row .small-box .icon,
.content-wrapper .dashboard-approval-queue-row .small-box .icon,
.content-wrapper .dashboard-approval-detail-row .small-box .icon,
.content-wrapper .approval-summary-row .small-box .icon {
  top: 13px !important;
  right: 12px !important;
  font-size: 35px !important;
  opacity: .18 !important;
  pointer-events: none !important;
}

.content-wrapper .dashboard-cards-row .small-box .small-box-footer,
.content-wrapper .dashboard-approval-queue-row .small-box .small-box-footer,
.content-wrapper .dashboard-approval-detail-row .small-box .small-box-footer,
.content-wrapper .approval-summary-row .small-box .small-box-footer {
  flex: 0 0 auto !important;
  width: 100%;
  height: auto !important;
  min-height: 40px !important;
  max-height: none !important;
  padding: 10px 12px !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  text-align: center;
}

/* All roles: let dashboard metric cards expand for long titles and values. */
.content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card {
  position: relative;
  display: block;
  width: 100% !important;
  height: auto !important;
  min-height: 122px !important;
  max-height: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 16px 60px 18px 17px !important;
  overflow: hidden;
}
.content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card > div:first-child {
  display: block !important;
  max-height: none !important;
  max-width: 100%;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  -webkit-line-clamp: unset !important;
  line-height: 1.35 !important;
}
.content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card h2 {
  display: block !important;
  max-height: none !important;
  max-width: 100%;
  margin: 8px 0 0 !important;
  padding-right: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
  -webkit-line-clamp: unset !important;
  line-height: 1.2 !important;
}
.content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card .icon {
  pointer-events: none !important;
}

@media (max-width: 991.98px) {
  .content-wrapper .dashboard-cards-row > [class*="col-"] {
    flex: 0 0 50% !important;
    width: 50% !important;
    max-width: 50% !important;
  }
}

@media (max-width: 767.98px) {
  .content-wrapper .dashboard-cards-row,
  .content-wrapper .dashboard-approval-queue-row,
  .content-wrapper .dashboard-approval-detail-row,
  .content-wrapper .approval-summary-row,
  .content-wrapper .dashboard-stats-row {
    row-gap: 0 !important;
    margin-bottom: 0 !important;
  }
  .content-wrapper .dashboard-cards-row > [class*="col-"],
  .content-wrapper .dashboard-approval-queue-row > [class*="col-"],
  .content-wrapper .dashboard-approval-detail-row > [class*="col-"],
  .content-wrapper .approval-summary-row > [class*="col-"],
  .content-wrapper .dashboard-stats-row > [class*="col-"] {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-bottom: 12px !important;
  }
  .content-wrapper .dashboard-cards-row > [class*="col-"] > .small-box,
  .content-wrapper .dashboard-approval-queue-row > [class*="col-"] > .small-box,
  .content-wrapper .dashboard-approval-detail-row > [class*="col-"] > .small-box,
  .content-wrapper .approval-summary-row > [class*="col-"] > .small-box {
    min-height: 145px !important;
    margin-bottom: 0 !important;
  }
  .content-wrapper .dashboard-cards-row .small-box .inner,
  .content-wrapper .dashboard-approval-queue-row .small-box .inner,
  .content-wrapper .dashboard-approval-detail-row .small-box .inner,
  .content-wrapper .approval-summary-row .small-box .inner {
    padding: 15px 60px 13px 15px !important;
  }
  .content-wrapper .dashboard-cards-row .small-box .inner p,
  .content-wrapper .dashboard-approval-queue-row .small-box .inner p,
  .content-wrapper .dashboard-approval-detail-row .small-box .inner p,
  .content-wrapper .approval-summary-row .small-box .inner p {
    font-size: 13px !important;
    line-height: 1.42 !important;
  }
  .content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card {
    min-height: 118px !important;
    padding: 15px 56px 17px 16px !important;
  }
  .content-wrapper .dashboard-stats-row > [class*="col-"] > .stat-card .icon {
    right: 12px !important;
    top: 13px !important;
    font-size: 32px !important;
  }
}

/* V112 — system-wide mobile usability and responsive interaction layer.
   This layer intentionally changes layout only; no business rules or database logic. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body, .wrapper, .content-wrapper, .content, .container-fluid,
.content-wrapper .card, .content-wrapper .card-body, .content-wrapper .row,
.content-wrapper [class*="col-"] {
  min-width: 0;
}
body { max-width: 100%; overflow-x: hidden; }
.wrapper, .content-wrapper { max-width: 100%; }
img, video, canvas, iframe, svg { max-width: 100%; }
.content-wrapper .card { min-width: 0; }
.content-wrapper .table-responsive,
.content-wrapper .data-table-wrap,
.content-wrapper .card-body.table-responsive {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}
.content-wrapper .card-body.table-responsive.p-0 { padding: 0 !important; }
.content-wrapper .table-responsive > .table,
.content-wrapper .data-table-wrap > .table { margin-bottom: 0; }

/* Searchable dropdowns must stay within the visual viewport, including when the phone keyboard opens. */
.select2-container { max-width: 100%; }
.select2-container--open { z-index: 30050 !important; }
.select2-dropdown { box-sizing: border-box !important; max-width: calc(100vw - 16px) !important; }
.select2-search--dropdown .select2-search__field { box-sizing: border-box !important; max-width: 100% !important; font-size: 16px !important; }
.select2-results__options { max-height: min(42vh, 280px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

@media (max-width: 991.98px) {
  .main-header.navbar { left: 0 !important; right: 0 !important; width: 100% !important; }
  .modal.ddp-crud-modal, .modal.ddp-confirm-modal { left: 0 !important; right: 0 !important; width: 100% !important; }
  .modal-backdrop { left: 0 !important; right: 0 !important; width: 100% !important; }
}

@media (max-width: 767.98px) {
  .content-wrapper { padding-top: 57px; margin-left: 0 !important; max-width: 100vw; }
  .content-wrapper .content { padding: .55rem .45rem; }
  .content-header { padding: .6rem .65rem; }
  .content-header h1 { font-size: 1.22rem; line-height: 1.25; overflow-wrap: anywhere; }
  .content-wrapper .container-fluid { padding-left: .25rem; padding-right: .25rem; }
  .content-wrapper .card { margin-bottom: .8rem; border-radius: .65rem; }
  .content-wrapper .card-header { gap: .5rem; align-items: flex-start; min-width: 0; }
  .content-wrapper .card-header > .card-title { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
  .content-wrapper .card-header > .card-tools { float: none !important; margin-left: 0 !important; min-width: 0; max-width: 100%; white-space: normal; }
  .content-wrapper .card-header > .card-tools .btn { max-width: 100%; white-space: normal; line-height: 1.25; }
  .content-wrapper .card-header > .card-tools form,
  .content-wrapper .card-tools .form-inline { display: flex; flex-wrap: wrap; gap: .4rem; min-width: 0; max-width: 100%; }
  .content-wrapper .card-body { min-width: 0; }
  .content-wrapper .table { font-size: 12.5px; }
  .content-wrapper .table th, .content-wrapper .table td { padding: .5rem .55rem; vertical-align: top; }
  .content-wrapper .table-responsive { max-width: 100%; scrollbar-width: thin; }
  .content-wrapper .table-responsive > table { max-width: none; }
  .content-wrapper .form-group, .content-wrapper .input-group,
  .content-wrapper form, .content-wrapper .form-row { min-width: 0; max-width: 100%; }
  .content-wrapper .form-control, .content-wrapper .custom-select,
  .content-wrapper select, .content-wrapper textarea,
  .content-wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]) {
    min-width: 0; max-width: 100%;
    font-size: 16px;
  }
  .content-wrapper .input-group > .form-control,
  .content-wrapper .input-group > .custom-select { flex: 1 1 1%; width: 1%; }
  .content-wrapper .btn { min-height: 38px; max-width: 100%; white-space: normal; line-height: 1.25; }
  .content-wrapper .btn-group, .content-wrapper .btn-toolbar { display: flex; flex-wrap: wrap; gap: .25rem; }
  .content-wrapper .card-footer { padding: .7rem .8rem; }
  .content-wrapper .alert { overflow-wrap: anywhere; }
  .content-wrapper .pagination { flex-wrap: wrap; gap: .2rem; }
  .content-wrapper .dropdown-menu { max-width: calc(100vw - 16px); max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain; }

  /* Wrap date/report filters instead of forcing a horizontally scrolling form on phones. */
  .content-wrapper form.date-filter-row {
    flex-wrap: wrap !important; overflow-x: visible !important; overflow-y: visible !important;
    gap: .55rem; padding-bottom: 0; margin: 0 !important;
  }
  .content-wrapper form.date-filter-row > .form-group,
  .content-wrapper form.date-filter-row > .col-12 {
    flex: 1 1 135px !important; min-width: 0 !important; max-width: 100%;
  }
  .content-wrapper form.date-filter-row .form-control,
  .content-wrapper form.date-filter-row select,
  .content-wrapper form.date-filter-row button { width: 100% !important; max-width: 100%; }

  /* Generic summary cards used by Accounting and dashboard pages without role-specific row classes. */
  .content-wrapper .row > [class*="col-"] { min-width: 0; }
  .content-wrapper .row > [class*="col-"] > .small-box,
  .content-wrapper .row > [class*="col-"] > .info-box {
    width: 100%; max-width: 100%; height: auto !important; min-width: 0;
    min-height: 126px; margin-bottom: .75rem; overflow: hidden;
  }
  .content-wrapper .row > [class*="col-"] > .small-box { display: flex; flex-direction: column; }
  .content-wrapper .row > [class*="col-"] > .small-box .inner {
    flex: 1 1 auto; min-width: 0; padding: 14px 56px 12px 14px;
  }
  .content-wrapper .row > [class*="col-"] > .small-box .inner h3 {
    font-size: clamp(19px, 6vw, 28px); line-height: 1.2; margin: 0 0 7px;
    white-space: normal; overflow-wrap: anywhere; word-break: normal;
  }
  .content-wrapper .row > [class*="col-"] > .small-box .inner p {
    white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere;
    line-height: 1.38; margin: 0; font-size: 13px;
  }
  .content-wrapper .row > [class*="col-"] > .small-box .icon { top: 12px; right: 10px; font-size: 32px; opacity: .17; pointer-events: none; }
  .content-wrapper .row > [class*="col-"] > .small-box .small-box-footer {
    flex: 0 0 auto; height: auto; min-height: 38px; white-space: normal; overflow-wrap: anywhere;
    padding: 9px 10px; line-height: 1.3; text-align: center;
  }
  .content-wrapper .stat-card, .content-wrapper .stock-stat-card,
  .content-wrapper .report-metric, .content-wrapper .sale-report-metric-card {
    max-width: 100%; min-width: 0; height: auto !important; max-height: none !important;
    overflow-wrap: anywhere;
  }
  .content-wrapper .dashboard-hero { padding: 16px; }
  .content-wrapper .dashboard-hero h2 { font-size: 1.25rem; line-height: 1.3; overflow-wrap: anywhere; }
  .content-wrapper .dashboard-hero p { font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
  .content-wrapper .action-icon { width: 36px; height: 36px; margin: 2px; }
  .content-wrapper .table td .d-flex { flex-wrap: wrap; }
  .content-wrapper .table td form { max-width: 100%; }

  /* Modals and dropdowns remain usable with the on-screen keyboard. */
  .modal, .modal.ddp-crud-modal, .modal.ddp-confirm-modal { padding-left: 0 !important; padding-right: 0 !important; }
  .modal-dialog { max-width: calc(100vw - 16px); margin: .5rem auto; }
  .modal-content { max-width: 100%; }
  .ddp-crud-modal .modal-content, .ddp-confirm-modal .modal-content {
    max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px);
  }
  .ddp-crud-modal .ddp-modal-body, .ddp-confirm-modal .modal-body {
    max-height: none; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .select2-dropdown { max-width: calc(100vw - 16px) !important; }
  .select2-results__options { max-height: min(40dvh, 240px) !important; }
}

@media (max-width: 420px) {
  .main-header.navbar { padding-left: .25rem; padding-right: .25rem; }
  .main-header .navbar-nav > .nav-item > .nav-link { padding-left: .4rem; padding-right: .4rem; }
  .content-wrapper .content { padding-left: .35rem; padding-right: .35rem; }
  .content-wrapper .card-header { padding: .65rem .7rem; }
  .content-wrapper .card-body { padding: .7rem; }
  .content-wrapper .card-body.table-responsive.p-0 { padding: 0 !important; }
  .content-wrapper .module-grid { grid-template-columns: 1fr; }
  .content-wrapper .small-box .inner { padding-right: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .content-wrapper *, .main-header *, .main-sidebar * { scroll-behavior: auto !important; }
}

/* V116: consolidated mobile modal positioning and scrolling.
   Root cause fixed: Bootstrap 4 .modal-dialog-centered::before is a full-height
   pseudo-element. Setting the dialog to display:block alone leaves that spacer
   in place, pushing the actual modal-content below the visible screen. */
:root {
  --ddp-visual-height: 100vh;
  --ddp-visual-width: 100vw;
  --ddp-visual-top: 0px;
  --ddp-visual-left: 0px;
}
@media (max-width: 991.98px) {
  html, body { max-width: 100%; }

  /* Reset the desktop sidebar offset and pin every Bootstrap modal to the live viewport. */
  .modal.modal,
  .modal.modal.ddp-crud-modal,
  .modal.modal.ddp-confirm-modal {
    position: fixed !important;
    top: var(--ddp-visual-top, 0px) !important;
    left: var(--ddp-visual-left, 0px) !important;
    right: auto !important;
    bottom: auto !important;
    width: var(--ddp-visual-width, 100vw) !important;
    height: var(--ddp-visual-height, 100vh) !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    max-height: var(--ddp-visual-height, 100vh) !important;
    margin: 0 !important;
    padding: max(6px, env(safe-area-inset-top, 0px))
             max(6px, env(safe-area-inset-right, 0px))
             max(6px, env(safe-area-inset-bottom, 0px))
             max(6px, env(safe-area-inset-left, 0px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    transform: none !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .modal.modal.show,
  .modal.modal.ddp-crud-modal.show,
  .modal.modal.ddp-confirm-modal.show { display: block !important; }

  .modal.modal .modal-dialog,
  .modal.modal .modal-dialog.modal-sm,
  .modal.modal .modal-dialog.modal-lg,
  .modal.modal .modal-dialog.modal-xl {
    position: relative !important;
    display: block !important;
    float: none !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 0 !important;
    max-height: calc(var(--ddp-visual-height, 100vh) - 16px
      - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 auto 8px !important;
    padding: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  /* Critical Bootstrap 4 fix: remove its tall centering spacer on narrow viewports. */
  .modal.modal .modal-dialog-centered {
    display: block !important;
    align-items: initial !important;
    min-height: 0 !important;
  }
  .modal.modal .modal-dialog-centered::before,
  .modal.modal .modal-dialog-centered::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .modal.modal .modal-content {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(var(--ddp-visual-height, 100vh) - 16px
      - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  .modal.modal .modal-header,
  .modal.modal .modal-body,
  .modal.modal .modal-footer {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .modal.modal .modal-header { flex: 0 0 auto !important; }
  .modal.modal .modal-title { min-width: 0 !important; max-width: 100%; overflow-wrap: anywhere; }
  .modal.modal .modal-header .close { flex: 0 0 auto; min-width: 36px; min-height: 36px; }
  .modal.modal .modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .modal.modal .modal-body .row { min-width: 0 !important; max-width: none !important; margin-left: -6px; margin-right: -6px; }
  .modal.modal .modal-body [class*="col-"] { min-width: 0 !important; max-width: 100%; }
  .modal.modal .modal-body form,
  .modal.modal .modal-body .form-group,
  .modal.modal .modal-body .form-row,
  .modal.modal .modal-body .input-group { min-width: 0 !important; max-width: 100% !important; }
  .modal.modal .modal-body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
  .modal.modal .modal-body select,
  .modal.modal .modal-body textarea,
  .modal.modal .modal-body .form-control,
  .modal.modal .modal-body .custom-select,
  .modal.modal .modal-body .select2-container {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 16px;
  }
  .modal.modal .modal-body .input-group > .form-control,
  .modal.modal .modal-body .input-group > .custom-select { flex: 1 1 1%; width: 1%; }
  .modal.modal .modal-body img,
  .modal.modal .modal-body video,
  .modal.modal .modal-body canvas,
  .modal.modal .modal-body iframe { max-width: 100%; }
  .modal.modal .modal-body .table-responsive,
  .modal.modal .modal-body .data-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .modal.modal .modal-footer {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-wrap: wrap !important;
    gap: 8px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .modal.modal .modal-footer > *,
  .modal.modal .modal-footer .btn { min-width: 0 !important; max-width: 100% !important; white-space: normal !important; overflow-wrap: anywhere; margin: 0; }

  .modal-backdrop {
    position: fixed !important;
    top: var(--ddp-visual-top, 0px) !important;
    left: var(--ddp-visual-left, 0px) !important;
    right: auto !important;
    bottom: auto !important;
    width: var(--ddp-visual-width, 100vw) !important;
    height: var(--ddp-visual-height, 100vh) !important;
  }
  .select2-container--open { z-index: 30050 !important; }
  .modal.modal .select2-container { width: 100% !important; max-width: 100% !important; }
  .modal.modal .select2-dropdown { max-width: calc(100vw - 16px) !important; box-sizing: border-box !important; }
}
@media (max-width: 575.98px) {
  .modal.modal { padding: 6px !important; }
  .modal.modal .modal-header { padding: 10px 12px !important; }
  .modal.modal .modal-title { font-size: 1rem; line-height: 1.3; }
  .modal.modal .modal-body { padding: 10px 12px !important; }
  .modal.modal .modal-footer { padding: 10px 12px !important; justify-content: stretch; }
  .modal.modal .modal-footer .btn { flex: 1 1 120px; min-height: 42px; }
}


/* V118: mobile content uses the full viewport; menus overlay instead of reserving width. */
@media (max-width: 991.98px) {
  html, body {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  body .wrapper {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    /* Do not clip fixed-position Bootstrap modals that remain in their original DOM container. */
    overflow-x: visible !important;
  }
  /* AdminLTE's sidebar is an overlay on phones; it must never push the page/modal sideways. */
  body .main-sidebar,
  body .main-sidebar::before {
    left: 0 !important;
    width: 250px !important;
    max-width: 250px !important;
    margin-left: -250px !important;
    transform: none !important;
    transition: margin-left .22s ease !important;
  }
  body.sidebar-open:not(.modal-open) .main-sidebar,
  body.sidebar-open:not(.modal-open) .main-sidebar::before {
    margin-left: 0 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  /* Opening a form closes the mobile drawer visually, even if it was left open. */
  body.modal-open .main-sidebar,
  body.sidebar-open.modal-open .main-sidebar,
  body.modal-open .main-sidebar::before,
  body.sidebar-open.modal-open .main-sidebar::before {
    margin-left: -250px !important;
    transform: translateX(-250px) !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  body .content-wrapper,
  body .main-header.navbar,
  body .main-footer {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
  body .content-wrapper { min-width: 0 !important; }
  body .main-header.navbar { padding-right: max(.25rem, env(safe-area-inset-right, 0px)) !important; }
}

/* V118: root-level modal safeguards remain available for dialogs already rendered at body level. */
@media (max-width: 991.98px) {
  body > .modal.modal,
  body > .modal.modal.ddp-crud-modal,
  body > .modal.modal.ddp-confirm-modal {
    position: fixed !important;
    inset: var(--ddp-visual-top, 0px) auto auto var(--ddp-visual-left, 0px) !important;
    width: var(--ddp-visual-width, 100vw) !important;
    height: var(--ddp-visual-height, 100vh) !important;
    max-width: 100vw !important;
    max-height: var(--ddp-visual-height, 100vh) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  body > .modal-backdrop {
    position: fixed !important;
    inset: var(--ddp-visual-top, 0px) auto auto var(--ddp-visual-left, 0px) !important;
    width: var(--ddp-visual-width, 100vw) !important;
    height: var(--ddp-visual-height, 100vh) !important;
  }
}


/* V119: public-home carousel takes the place previously occupied by the login-side slider. */
.home-promo-slider {
  position: relative; width: 100%; height: 430px; min-height: 300px; max-width: 100%;
  overflow: hidden; isolation: isolate; border: 1px solid rgba(255,255,255,.24); border-radius: 28px;
  background: linear-gradient(145deg,#123c7d,#0a234e); box-shadow: 0 28px 70px rgba(0,0,0,.25);
}
.home-promo-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; z-index: 0; transition: opacity .55s ease, visibility .55s ease; }
.home-promo-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.home-promo-slide > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.home-promo-shade { position: absolute; inset: 0; background: linear-gradient(180deg,rgba(4,16,41,.04) 0%,rgba(4,16,41,.22) 35%,rgba(4,16,41,.9) 100%),linear-gradient(90deg,rgba(7,29,73,.36),transparent 90%); }
.home-promo-caption { position: absolute; z-index: 2; left: 26px; right: 26px; bottom: 58px; color: #fff; }
.home-promo-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #ffdf8a; font-size: 10px; letter-spacing: .13em; font-weight: 900; text-transform: uppercase; }
.home-promo-kicker > span { width: 7px; height: 7px; border-radius: 50%; background: #35d07f; box-shadow: 0 0 0 5px rgba(53,208,127,.18); }
.home-promo-caption h2 { margin: 0 0 9px; color: #fff; font-size: clamp(23px,2.5vw,36px); line-height: 1.12; font-weight: 850; overflow-wrap: anywhere; text-shadow: 0 3px 20px rgba(0,0,0,.3); }
.home-promo-caption p { max-width: 470px; margin: 0; color: rgba(255,255,255,.91); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.home-promo-controls { position: absolute; z-index: 4; left: 18px; right: 18px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-promo-arrow { flex: 0 0 36px; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; color: #fff; background: rgba(5,20,48,.48); border: 1px solid rgba(255,255,255,.5); border-radius: 50%; cursor: pointer; }
.home-promo-arrow:hover,.home-promo-arrow:focus-visible { color: #0b2c61; background: #fff; outline: 2px solid rgba(255,255,255,.45); outline-offset: 2px; }
.home-promo-dots { display: flex; justify-content: center; align-items: center; gap: 7px; flex: 1 1 auto; min-width: 0; }
.home-promo-dot { display: block; width: 8px; height: 8px; min-width: 8px; border: 0; border-radius: 99px; padding: 0; background: rgba(255,255,255,.5); cursor: pointer; transition: width .2s ease,background .2s ease; }
.home-promo-dot.is-active { width: 24px; background: #fff; }
@media (max-width: 1000px) { .home-promo-slider { height: 370px; border-radius: 23px; } }
@media (max-width: 700px) {
  .home-promo-slider { height: 340px; min-height: 290px; border-radius: 22px; }
  .home-promo-caption { left: 18px; right: 18px; bottom: 57px; }
  .home-promo-caption h2 { font-size: clamp(22px,6vw,29px); }
  .home-promo-caption p { font-size: 12px; line-height: 1.48; }
  .home-promo-controls { left: 12px; right: 12px; bottom: 9px; }
}
@media (max-width: 370px) { .home-promo-slider { height: 310px; } .home-promo-caption { left: 14px; right: 14px; } }
@media (prefers-reduced-motion: reduce) { .home-promo-slide,.home-promo-dot { transition: none !important; } }

/* V119: center the login card on its own; the promotional slider now belongs on Home. */
body.auth-page .auth-shell.auth-login-no-slider {
  display: grid !important; grid-template-columns: minmax(0,1fr) !important;
  width: min(540px,100%) !important; max-width: 540px !important; min-height: 0 !important;
  margin: 18px auto 0 !important; border-radius: 24px; overflow: visible;
}
body.auth-page .auth-shell.auth-login-no-slider .auth-card { width: 100%; min-width: 0; padding: clamp(26px,5vw,48px); }
body.auth-page .auth-shell.auth-login-no-slider .auth-copyright { bottom: -28px; }
@media (max-width: 700px) {
  body.auth-page .auth-shell.auth-login-no-slider { width: 100% !important; max-width: 540px !important; margin: 0 auto !important; border-radius: 20px; }
  body.auth-page .auth-shell.auth-login-no-slider .auth-card { padding: 27px 22px 30px; }
}

/* V119: keep the company identity visible even when the mobile sidebar is closed. */
.ddp-company-context { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 7px; min-width: 0; max-width: 100%; color: #52627a; font-size: 12px; line-height: 1.4; }
.ddp-company-context > i { color: #2563eb; flex: 0 0 auto; }
.ddp-company-context-label { font-size: 9px; font-weight: 900; letter-spacing: .12em; color: #64748b; }
.ddp-company-context strong { min-width: 0; max-width: 100%; color: #163c72; font-size: 12px; overflow-wrap: anywhere; }
.ddp-company-context .ddp-no-expiry { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 7px; color: #166534; background: #dcfce7; font-size: 10px; font-weight: 800; }
.ddp-company-context.ddp-system-context > i { color: #7c3aed; }
.ddp-company-context.ddp-system-context strong { color: #5b21b6; }
@media (max-width: 767.98px) {
  .content-header > .container-fluid > .row { row-gap: 8px; }
  .content-header .breadcrumb { font-size: 11px; white-space: normal; flex-wrap: wrap; }
  .ddp-company-context { gap: 5px; font-size: 11px; }
  .ddp-company-context strong { font-size: 11px; }
}

/* V119: authoritative mobile modal positioning. Older CSS placed dialogs at 4.6rem
   when AdminLTE marked the sidebar collapsed, leaving the whole sidebar-width gap.
   This rule intentionally has higher specificity than those legacy sidebar-offset rules. */
@media (max-width: 991.98px) {
  html body.sidebar-mini .modal.modal,
  html body.sidebar-mini.sidebar-collapse .modal.modal,
  html body.sidebar-mini.sidebar-open .modal.modal,
  html body.sidebar-mini .modal.ddp-crud-modal,
  html body.sidebar-mini .modal.ddp-confirm-modal,
  html body.sidebar-mini.sidebar-collapse .modal.ddp-crud-modal,
  html body.sidebar-mini.sidebar-collapse .modal.ddp-confirm-modal,
  html body.sidebar-mini.sidebar-open .modal.ddp-crud-modal,
  html body.sidebar-mini.sidebar-open .modal.ddp-confirm-modal {
    position: fixed !important;
    top: var(--ddp-visual-top,0px) !important;
    left: var(--ddp-visual-left,0px) !important;
    right: auto !important; bottom: auto !important;
    width: var(--ddp-visual-width,100vw) !important;
    max-width: var(--ddp-visual-width,100vw) !important;
    min-width: 0 !important;
    height: var(--ddp-visual-height,100vh) !important;
    max-height: var(--ddp-visual-height,100vh) !important;
    margin: 0 !important; padding: max(6px,env(safe-area-inset-top,0px)) max(6px,env(safe-area-inset-right,0px)) max(6px,env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px)) !important;
    transform: none !important; box-sizing: border-box !important;
    overflow-x: hidden !important; overflow-y: auto !important;
  }
  html body.sidebar-mini .modal.modal .modal-dialog-centered,
  html body.sidebar-mini.sidebar-collapse .modal.modal .modal-dialog-centered,
  html body.sidebar-mini.sidebar-open .modal.modal .modal-dialog-centered {
    display: block !important; align-items: initial !important; min-height: 0 !important;
  }
  html body.sidebar-mini .modal.modal .modal-dialog-centered::before,
  html body.sidebar-mini .modal.modal .modal-dialog-centered::after,
  html body.sidebar-mini.sidebar-collapse .modal.modal .modal-dialog-centered::before,
  html body.sidebar-mini.sidebar-collapse .modal.modal .modal-dialog-centered::after,
  html body.sidebar-mini.sidebar-open .modal.modal .modal-dialog-centered::before,
  html body.sidebar-mini.sidebar-open .modal.modal .modal-dialog-centered::after {
    display: none !important; content: none !important; width: 0 !important; height: 0 !important;
  }
  html body.sidebar-mini .modal.modal .modal-dialog,
  html body.sidebar-mini.sidebar-collapse .modal.modal .modal-dialog,
  html body.sidebar-mini.sidebar-open .modal.modal .modal-dialog {
    float: none !important; position: relative !important; left: auto !important; right: auto !important;
    width: 100% !important; min-width: 0 !important; max-width: 100% !important;
    margin: 0 auto 8px !important; transform: none !important; box-sizing: border-box !important;
  }
  html body.sidebar-mini.sidebar-collapse .modal-backdrop,
  html body.sidebar-mini.sidebar-open .modal-backdrop,
  html body.sidebar-mini .modal-backdrop {
    position: fixed !important; top: var(--ddp-visual-top,0px) !important; left: var(--ddp-visual-left,0px) !important;
    right: auto !important; bottom: auto !important; width: var(--ddp-visual-width,100vw) !important;
    height: var(--ddp-visual-height,100vh) !important; margin: 0 !important;
  }
  /* A transformed/contained wrapper changes the containing block of fixed descendants. */
  body .wrapper, body .content-wrapper { transform: none !important; filter: none !important; perspective: none !important; contain: none !important; }
  body.modal-open { overflow: hidden !important; }
}


/* V120: mobile modal viewport reset. Modal stays in its original DOM context; do not move it. */
@media (max-width: 991.98px) {
  html body .modal,
  html body .modal.ddp-crud-modal,
  html body .modal.ddp-confirm-modal,
  html body .modal.ddp-view-detail-modal {
    left: var(--ddp-visual-left, 0px) !important;
    right: auto !important;
    top: var(--ddp-visual-top, 0px) !important;
    bottom: auto !important;
    width: var(--ddp-visual-width, 100vw) !important;
    max-width: var(--ddp-visual-width, 100vw) !important;
    min-width: 0 !important;
    height: var(--ddp-visual-height, 100vh) !important;
    max-height: var(--ddp-visual-height, 100vh) !important;
    margin: 0 !important;
    padding: max(6px, env(safe-area-inset-top, 0px)) max(6px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)) !important;
    box-sizing: border-box !important;
    transform: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  html body .modal .modal-dialog,
  html body .modal .modal-dialog.modal-sm,
  html body .modal .modal-dialog.modal-lg,
  html body .modal .modal-dialog.modal-xl {
    position: relative !important;
    float: none !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto 8px !important;
    transform: none !important;
    box-sizing: border-box !important;
  }
  html body .modal .modal-dialog-centered { display: block !important; align-items: initial !important; min-height: 0 !important; }
  html body .modal .modal-dialog-centered::before,
  html body .modal .modal-dialog-centered::after { display: none !important; content: none !important; width: 0 !important; height: 0 !important; }
  html body .modal .modal-content { min-width: 0 !important; max-width: 100% !important; max-height: calc(var(--ddp-visual-height, 100vh) - 18px) !important; overflow: hidden !important; display: flex !important; flex-direction: column !important; }
  html body .modal .modal-body { min-width: 0 !important; max-height: none !important; overflow-y: auto !important; overflow-x: hidden !important; flex: 1 1 auto !important; }
  html body .modal .modal-body .row { margin-left: -5px; margin-right: -5px; }
  html body .modal .modal-body [class*="col-"] { min-width: 0; }
  html body .modal .modal-body input,
  html body .modal .modal-body select,
  html body .modal .modal-body textarea,
  html body .modal .modal-body .select2-container { max-width: 100% !important; }
  html body .modal-backdrop { left: var(--ddp-visual-left, 0px) !important; top: var(--ddp-visual-top, 0px) !important; width: var(--ddp-visual-width, 100vw) !important; height: var(--ddp-visual-height, 100vh) !important; }
}


/* V120.1: match legacy sidebar selector specificity exactly so the sidebar offset cannot win. */
@media (max-width: 991.98px) {
  html body.sidebar-mini .modal.ddp-crud-modal,
  html body.sidebar-mini.sidebar-collapse .modal.ddp-crud-modal,
  html body.sidebar-mini.sidebar-open .modal.ddp-crud-modal,
  html body.sidebar-mini .modal.ddp-confirm-modal,
  html body.sidebar-mini.sidebar-collapse .modal.ddp-confirm-modal,
  html body.sidebar-mini.sidebar-open .modal.ddp-confirm-modal,
  html body.sidebar-mini .modal.ddp-view-detail-modal,
  html body.sidebar-mini.sidebar-collapse .modal.ddp-view-detail-modal,
  html body.sidebar-mini.sidebar-open .modal.ddp-view-detail-modal {
    position: fixed !important;
    left: var(--ddp-visual-left, 0px) !important;
    right: auto !important;
    top: var(--ddp-visual-top, 0px) !important;
    bottom: auto !important;
    width: var(--ddp-visual-width, 100vw) !important;
    max-width: var(--ddp-visual-width, 100vw) !important;
    height: var(--ddp-visual-height, 100vh) !important;
    max-height: var(--ddp-visual-height, 100vh) !important;
    margin: 0 !important;
    padding: max(6px, env(safe-area-inset-top, 0px)) max(6px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    transform: none !important;
    box-sizing: border-box !important;
  }
  html body.sidebar-mini .modal.ddp-crud-modal .modal-dialog,
  html body.sidebar-mini.sidebar-collapse .modal.ddp-crud-modal .modal-dialog,
  html body.sidebar-mini.sidebar-open .modal.ddp-crud-modal .modal-dialog,
  html body.sidebar-mini .modal.ddp-confirm-modal .modal-dialog,
  html body.sidebar-mini.sidebar-collapse .modal.ddp-confirm-modal .modal-dialog,
  html body.sidebar-mini.sidebar-open .modal.ddp-confirm-modal .modal-dialog,
  html body.sidebar-mini .modal.ddp-view-detail-modal .modal-dialog,
  html body.sidebar-mini.sidebar-collapse .modal.ddp-view-detail-modal .modal-dialog,
  html body.sidebar-mini.sidebar-open .modal.ddp-view-detail-modal .modal-dialog {
    position: relative !important;
    left: auto !important; right: auto !important; float: none !important;
    width: 100% !important; min-width: 0 !important; max-width: 100% !important;
    margin: 0 auto 8px !important; transform: none !important; box-sizing: border-box !important;
  }
  html body.sidebar-mini .modal .modal-dialog-centered::before,
  html body.sidebar-mini.sidebar-collapse .modal .modal-dialog-centered::before,
  html body.sidebar-mini.sidebar-open .modal .modal-dialog-centered::before,
  html body.sidebar-mini .modal .modal-dialog-centered::after,
  html body.sidebar-mini.sidebar-collapse .modal .modal-dialog-centered::after,
  html body.sidebar-mini.sidebar-open .modal .modal-dialog-centered::after {
    display: none !important; content: none !important; width: 0 !important; height: 0 !important;
  }
}

/* V120.1 final mobile modal authority: viewport width must never inherit sidebar offsets. */
@media (max-width: 991.98px) {
  html body .modal.ddp-crud-modal,
  html body .modal.ddp-confirm-modal,
  html body .modal.ddp-view-detail-modal {
    position: fixed !important;
    left: var(--ddp-visual-left, 0px) !important;
    right: auto !important;
    top: var(--ddp-visual-top, 0px) !important;
    bottom: auto !important;
    width: var(--ddp-visual-width, 100vw) !important;
    max-width: var(--ddp-visual-width, 100vw) !important;
    min-width: 0 !important;
    height: var(--ddp-visual-height, 100vh) !important;
    max-height: var(--ddp-visual-height, 100vh) !important;
    margin: 0 !important;
    padding: max(6px, env(safe-area-inset-top, 0px)) max(6px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    transform: none !important;
    box-sizing: border-box !important;
  }
  html body .modal.ddp-crud-modal .modal-dialog,
  html body .modal.ddp-confirm-modal .modal-dialog,
  html body .modal.ddp-view-detail-modal .modal-dialog {
    display: block !important;
    position: relative !important;
    float: none !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 auto 8px !important;
    transform: none !important;
    box-sizing: border-box !important;
  }
  html body .modal .modal-dialog-centered::before,
  html body .modal .modal-dialog-centered::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  html body .modal .modal-content {
    min-width: 0 !important;
    max-width: 100% !important;
    max-height: calc(var(--ddp-visual-height, 100vh) - 18px) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
  }
  html body .modal .modal-body {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex: 1 1 auto !important;
  }
  html body.modal-open .main-sidebar,
  html body.modal-open .main-sidebar::before {
    margin-left: -250px !important;
    transform: translateX(-250px) !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
@media (max-width: 575.98px) {
  html body .modal.ddp-crud-modal .modal-dialog,
  html body .modal.ddp-confirm-modal .modal-dialog,
  html body .modal.ddp-view-detail-modal .modal-dialog {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 6px !important;
  }
  html body .modal .modal-header,
  html body .modal .modal-body,
  html body .modal .modal-footer {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}


/* V121: grey authentication canvas, one white rounded card for Login/Register, and terms checkbox. */
body.auth-page.auth-page-login,
body.auth-page.auth-page-register,
body.auth-page.auth-page-terms{
  background:#e5e7eb!important;
  color:#1f2937;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  padding:34px 16px 110px!important;
  overflow-x:hidden;
}
body.auth-page.auth-page-login .auth-shell,
body.auth-page.auth-page-register .auth-shell,
body.auth-page.auth-page-terms .auth-shell{
  display:block!important;
  width:100%!important;
  min-height:0!important;
  max-width:780px!important;
  grid-template-columns:none!important;
  gap:0!important;
  margin:18px auto 0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  overflow:visible!important;
  box-shadow:none!important;
  animation:none!important;
}
body.auth-page.auth-page-register .auth-shell>.auth-brand,
body.auth-page.auth-page-login .auth-brand,
body.auth-page.auth-page-terms .auth-brand{display:none!important}
body.auth-page.auth-page-login .auth-shell{max-width:520px!important}
body.auth-page.auth-page-register .auth-shell{max-width:780px!important}
body.auth-page.auth-page-terms .auth-shell{max-width:900px!important}
body.auth-page.auth-page-login .auth-card,
body.auth-page.auth-page-register .auth-card,
body.auth-page.auth-page-terms .auth-card{
  width:100%;
  min-width:0;
  display:block;
  background:#fff!important;
  color:#1f2937;
  border:1px solid #d1d5db;
  border-radius:24px!important;
  box-shadow:0 18px 48px rgba(31,41,55,.14)!important;
  padding:clamp(22px,4vw,42px)!important;
  animation:none!important;
}
body.auth-page.auth-page-login .auth-card .form-control,
body.auth-page.auth-page-register .auth-card .form-control{background:#fff}
body.auth-page.auth-page-register .auth-card .form-row{margin-left:-8px;margin-right:-8px}
body.auth-page.auth-page-register .auth-card .form-row>[class*="col-"]{padding-left:8px;padding-right:8px}
body.auth-page .auth-terms-agreement{
  padding:15px 15px 13px 42px;
  border:1px solid #d1d5db;
  border-radius:13px;
  background:#f9fafb;
  min-height:62px;
}
body.auth-page .auth-terms-agreement .custom-control-label{display:block;line-height:1.65;font-weight:600;color:#374151;cursor:pointer}
body.auth-page .auth-terms-agreement .custom-control-label a{color:#145fca;font-weight:800;text-decoration:underline}
body.auth-page .auth-terms-agreement .form-text{margin-top:7px;line-height:1.45}
body.auth-page .auth-terms-agreement .custom-control-input{top:19px;left:15px}
body.auth-page .auth-terms-agreement .custom-control-label::before{top:2px;left:-27px}
body.auth-page .auth-terms-agreement .custom-control-label::after{top:2px;left:-27px}
body.auth-page .auth-card form button[type="submit"],
body.auth-page .auth-card form button:not([type]){position:relative;bottom:auto}
body.auth-page .auth-copyright{position:static!important;left:auto!important;bottom:auto!important;transform:none!important;white-space:normal!important;text-align:center;margin:14px auto 0!important;width:100%}
body.auth-page.auth-page-login .auth-shell>.auth-copyright,
body.auth-page.auth-page-register .auth-shell>.auth-copyright{display:block}
body.auth-page.auth-page-terms .terms-document{color:#263244;font-size:15px;line-height:1.8;overflow-wrap:anywhere}
body.auth-page.auth-page-terms .terms-document h1{font-size:clamp(26px,4vw,36px);font-weight:850;margin:0 0 18px;color:#17365f}
body.auth-page.auth-page-terms .terms-document h2{font-size:22px;font-weight:800;margin:28px 0 10px;padding-bottom:7px;border-bottom:1px solid #e5e7eb;color:#17365f}
body.auth-page.auth-page-terms .terms-document h3{font-size:17px;font-weight:800;margin:22px 0 8px;color:#243b5b}
body.auth-page.auth-page-terms .terms-document p{margin:0 0 12px}
body.auth-page.auth-page-terms .terms-document ul{padding-left:25px;margin:0 0 16px}
body.auth-page.auth-page-terms .terms-document a{overflow-wrap:anywhere}
body.auth-page.auth-page-terms .terms-top-actions{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:20px}
@media(max-width:700px){
 body.auth-page.auth-page-login,body.auth-page.auth-page-register,body.auth-page.auth-page-terms{padding:14px 10px 118px!important}
 body.auth-page.auth-page-login .auth-shell,body.auth-page.auth-page-register .auth-shell,body.auth-page.auth-page-terms .auth-shell{margin:28px auto 0!important;max-width:100%!important}
 body.auth-page.auth-page-login .auth-card,body.auth-page.auth-page-register .auth-card,body.auth-page.auth-page-terms .auth-card{padding:22px 17px!important;border-radius:20px!important}
 body.auth-page.auth-page-register .auth-card .form-row{margin-left:0;margin-right:0}
 body.auth-page.auth-page-register .auth-card .form-row>[class*="col-"]{padding-left:0;padding-right:0}
 body.auth-page .auth-terms-agreement{padding:13px 12px 12px 39px}
}


/* V127: single modal layout authority for CRUD/view forms across desktop and mobile.
   The workspace tracks the live sidebar width; mobile always uses the visible viewport. */
:root {
  --ddp-sidebar-offset: 250px;
  --ddp-visual-height: 100vh;
  --ddp-visual-width: 100vw;
  --ddp-visual-top: 0px;
  --ddp-visual-left: 0px;
}

/* Suppress the first paint of operational forms while app.js moves them into popups.
   Login/register pages are excluded; the class is removed after modal initialization. */
html.ddp-modal-initializing body:not(.auth-page) form[method="post"],
html.ddp-modal-initializing body:not(.auth-page) form[method="POST"] {
  visibility: hidden !important;
}
html.ddp-modal-initializing.ddp-view-initializing body:not(.auth-page) .content-wrapper .card {
  visibility: hidden !important;
}

@media (min-width: 992px) {
  html body .modal.modal {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: var(--ddp-sidebar-offset, 250px) !important;
    right: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    transform: none;
  }

  /* CRUD/detail dialogs fill the actual workspace, so they expand when sidebar collapses. */
  html body .modal.modal:not(.ddp-confirm-modal):not(.ddp-reason-modal) .modal-dialog {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: stretch !important;
    position: relative !important;
    inset: auto !important;
    float: none !important;
    width: calc(100% - 8px) !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: calc(100dvh - 32px) !important;
    height: auto !important;
    max-height: calc(100dvh - 32px) !important;
    margin: auto !important;
    padding: 0 !important;
    transform: none;
    box-sizing: border-box !important;
  }
  /* Bootstrap 4 adds a full-viewport pseudo spacer to centered dialogs; remove it or
     the dialog's measured height becomes taller than the screen and appears to jump down. */
  html body .modal.modal:not(.ddp-confirm-modal):not(.ddp-reason-modal) .modal-dialog-centered::before,
  html body .modal.modal:not(.ddp-confirm-modal):not(.ddp-reason-modal) .modal-dialog-centered::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body .modal.modal:not(.ddp-confirm-modal):not(.ddp-reason-modal) .modal-content {
    display: flex !important;
    flex: 0 1 auto !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 32px) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  html body .modal.modal:not(.ddp-confirm-modal):not(.ddp-reason-modal) .modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
    overscroll-behavior: contain;
  }

  /* Keep confirmation/reason dialogs compact; only CRUD and detail forms fill the workspace. */
  html body .modal.modal.ddp-confirm-modal .modal-dialog {
    width: min(560px, calc(100% - 24px)) !important;
    max-width: min(560px, calc(100% - 24px)) !important;
    margin: auto !important;
  }
  html body .modal.modal.ddp-reason-modal .modal-dialog {
    width: min(480px, calc(100% - 24px)) !important;
    max-width: min(480px, calc(100% - 24px)) !important;
    margin: auto !important;
  }

  html body .modal-backdrop.modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: var(--ddp-sidebar-offset, 250px) !important;
    right: 0 !important;
    width: auto !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
  }
}

@media (max-width: 991.98px) {
  html body.modal-open { padding-right: 0 !important; margin-right: 0 !important; overflow-x: hidden !important; }
  html body.modal-open .wrapper { max-width: 100vw !important; overflow-x: clip !important; }
  /* Phone/tablet: no sidebar offset, no horizontal transform, fit to visible viewport. */
  html body .modal.modal,
  html body .modal.modal.ddp-crud-modal,
  html body .modal.modal.ddp-confirm-modal,
  html body .modal.modal.ddp-view-detail-modal {
    position: fixed !important;
    top: var(--ddp-visual-top, 0px) !important;
    left: var(--ddp-visual-left, 0px) !important;
    right: auto !important;
    bottom: auto !important;
    width: var(--ddp-visual-width, 100vw) !important;
    min-width: 0 !important;
    max-width: var(--ddp-visual-width, 100vw) !important;
    height: var(--ddp-visual-height, 100vh) !important;
    max-height: var(--ddp-visual-height, 100vh) !important;
    margin: 0 !important;
    padding: max(6px, env(safe-area-inset-top, 0px)) max(6px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)) !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: none !important;
  }
  html body .modal.modal.show { display: block !important; }
  html body .modal.modal .modal-dialog,
  html body .modal.modal.ddp-crud-modal .modal-dialog,
  html body .modal.modal.ddp-confirm-modal .modal-dialog,
  html body .modal.modal.ddp-view-detail-modal .modal-dialog {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 0 !important;
    max-height: calc(var(--ddp-visual-height, 100vh) - 12px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
  }
  html body .modal.modal .modal-dialog-centered,
  html body .modal.modal .modal-dialog-centered::before,
  html body .modal.modal .modal-dialog-centered::after {
    display: block !important;
    min-height: 0 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    content: none !important;
  }
  html body .modal.modal .modal-content {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(var(--ddp-visual-height, 100vh) - 12px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }
  html body .modal.modal .modal-header,
  html body .modal.modal .modal-body,
  html body .modal.modal .modal-footer {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  html body .modal.modal .modal-header { flex: 0 0 auto !important; gap: 8px; }
  html body .modal.modal .modal-title { min-width: 0 !important; max-width: 100% !important; overflow-wrap: anywhere; line-height: 1.3; }
  html body .modal.modal .modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  html body .modal.modal .modal-body form,
  html body .modal.modal .modal-body .form-group,
  html body .modal.modal .modal-body .form-row,
  html body .modal.modal .modal-body .row,
  html body .modal.modal .modal-body .input-group,
  html body .modal.modal .modal-body [class*="col-"] {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  html body .modal.modal .modal-body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  html body .modal.modal .modal-body select,
  html body .modal.modal .modal-body textarea,
  html body .modal.modal .modal-body .form-control,
  html body .modal.modal .modal-body .custom-select,
  html body .modal.modal .modal-body .select2-container {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 16px;
  }
  html body .modal.modal .modal-footer {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html body .modal.modal .modal-footer > *,
  html body .modal.modal .modal-footer .btn {
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    margin: 0 !important;
  }
  html body .modal-backdrop.modal-backdrop {
    position: fixed !important;
    top: var(--ddp-visual-top, 0px) !important;
    left: var(--ddp-visual-left, 0px) !important;
    right: auto !important;
    bottom: auto !important;
    width: var(--ddp-visual-width, 100vw) !important;
    height: var(--ddp-visual-height, 100vh) !important;
    margin: 0 !important;
  }
}

/* V128: responsive module cards — one column on phones, two on tablets, no fixed-height clipping. */
@media (max-width: 991.98px) {
  .content-wrapper .module-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .content-wrapper .module-grid > .module-card {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) 24px !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 96px !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 12px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
  .content-wrapper .module-grid .module-copy {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
  }
  .content-wrapper .module-grid .module-card h5,
  .content-wrapper .module-grid .module-card small {
    display: block !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    -webkit-line-clamp: unset !important;
  }
  .content-wrapper .module-grid .module-card h5 { font-size: 13px !important; line-height: 1.3 !important; }
  .content-wrapper .module-grid .module-card small { font-size: 10.5px !important; line-height: 1.35 !important; }
  .content-wrapper .module-grid .module-icon { width: 40px !important; height: 40px !important; flex-basis: 40px !important; }
  .content-wrapper .module-grid .module-arrow { width: 23px !important; height: 23px !important; flex-basis: 23px !important; }
}
@media (max-width: 575.98px) {
  .content-wrapper .module-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 11px !important; }
  .content-wrapper .module-grid > .module-card {
    grid-template-columns: 42px minmax(0, 1fr) 24px !important;
    min-height: 84px !important;
    padding: 12px 13px !important;
    gap: 10px !important;
  }
  .content-wrapper .module-grid .module-card h5 { font-size: 14px !important; }
  .content-wrapper .module-grid .module-card small { font-size: 11px !important; }
}


/* V128: popup lifecycle and mobile card safety. */
.modal-backdrop { touch-action: auto; }
@media (max-width: 767.98px) {
  .content-wrapper .module-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: auto !important;
    row-gap: 11px !important;
  }
  .content-wrapper .module-grid > .module-card {
    height: auto !important;
    min-height: 84px !important;
    max-height: none !important;
    align-self: stretch !important;
    overflow: visible !important;
  }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .content-wrapper .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
  }
}
