/* Core Layout & Dashboard Styles */
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f4ec;
    color: #1e293b;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}
.wrap {
    max-width: 1320px;
    margin: 0 auto;
    padding: 18px 20px 36px;
}
.topbar.theme-header {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #6c9542;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.brand-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.theme-logo {
    max-height: 44px;
    max-width: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}
.brand-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.badge-master {
    background: #e1e9d9;
    color: #30431d;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}
.meta-line {
    font-size: 12px;
    color: #475569;
    margin-top: 3px;
}
.nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 7px;
    border: 1px solid #cbd5e1;
    color: #334155;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
}
.nav-links a:hover { background: #f8fafc; }
.nav-links a.primary { background: #6c9542; color: #ffffff; border-color: #6c9542; }
.nav-links a.primary:hover { background: #5a7e36; }
.nav-links a.logout { color: #991b1b; border-color: #fecaca; background: #fef2f2; }

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.kpi-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}
.kpi-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; }
.kpi-value { font-size: 22px; font-weight: 800; color: #0f172a; margin-top: 6px; }
.kpi-sub { font-size: 12px; color: #64748b; margin-top: 4px; }

.panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}
.panel-title { font-size: 15px; font-weight: 800; color: #0f172a; }
.panel-sub { font-size: 12px; color: #64748b; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
    text-align: left;
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}
td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}
tr:hover td { background: #fafafa; }

.pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.pill-danger { background: #fee2e2; color: #991b1b; }
.pill-warn { background: #fef3c7; color: #92400e; }
.pill-ok { background: #dcfce7; color: #166534; }

.btn-primary {
    background: #6c9542;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary:hover { background: #5a7e36; }
.btn-secondary {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-secondary:hover { background: #f8fafc; }

.alert-ok, .msg-ok {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}
.alert-err, .msg-err {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}
.theme-footer {
    margin-top: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    flex-wrap: wrap;
    gap: 10px;
}
.theme-footer-logo { height: 22px; width: auto; object-fit: contain; }
.footer-left, .footer-right { display: flex; align-items: center; gap: 10px; }

a:not(.btn-primary):not(.btn-secondary):not(.site-menu-parent-link):not(.primary):not(.logout):not(.active):not(.selected):not(.is-active):not([aria-current]):not([aria-selected="true"]) {
    color: #6c9542;
    font-weight: 600;
    text-decoration: none;
}
a:not(.btn-primary):not(.btn-secondary):not(.site-menu-parent-link):not(.primary):not(.logout):not(.active):not(.selected):not(.is-active):not([aria-current]):not([aria-selected="true"]):hover {
    color: #5a7e36;
    text-decoration: underline;
}
a.active,
a.selected,
a.is-active,
a[aria-current="page"],
a[aria-current="true"],
a[aria-selected="true"],
button.active,
button.selected,
button.is-active,
button[aria-selected="true"],
.rep-tab-btn.active,
.rep-subtab-btn.active,
.tab-btn.active,
.filter-btn.active,
.btn.active {
    color: #ffffff !important;
    text-decoration: none !important;
}
a.active:hover,
a.selected:hover,
a.is-active:hover,
button.active:hover,
button.selected:hover,
.rep-tab-btn.active:hover,
.rep-subtab-btn.active:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}
.nav-links a {
    color: #334155;
    text-decoration: none;
}
.nav-links a.primary,
a.primary,
a.btn-primary {
    background: #6c9542;
    color: #ffffff !important;
    border-color: #6c9542;
    font-weight: 700;
    text-decoration: none !important;
}
.nav-links a.primary:hover,
a.primary:hover,
a.btn-primary:hover {
    background: #5a7e36;
    color: #ffffff !important;
    text-decoration: none !important;
}
.nav-links a.logout,
a.logout {
    color: #991b1b;
}
.site-menu-dropdown li a {
    color: #334155;
    text-decoration: none;
}



/* ==========================================================================
   v40: Reference Dashboard Layout — White KPI Cards with Large Right Symbol
   ========================================================================== */
.kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
    margin-bottom: 18px !important;
}

@media (max-width: 1100px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .kpi-grid {
        grid-template-columns: 1fr !important;
    }
}

.kpi-grid .kpi-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 18px 20px !important;
    min-height: 112px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
    box-sizing: border-box !important;
}

.kpi-grid .kpi-card .kpi-card-content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.kpi-grid .kpi-card .kpi-matrix-sym {
    position: static !important;
    transform: none !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 56px !important;
    height: auto !important;
    margin: 0 0 0 8px !important;
    padding: 0 4px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", "Arial Unicode MS", sans-serif !important;
    font-size: clamp(36px, 3.6vw, 52px) !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    pointer-events: none !important;
}

.kpi-grid .kpi-card:nth-child(4n+1) .kpi-matrix-sym { color: #1e3a8a !important; }
.kpi-grid .kpi-card:nth-child(4n+2) .kpi-matrix-sym { color: #eab308 !important; }
.kpi-grid .kpi-card:nth-child(4n+3) .kpi-matrix-sym { color: #1d4ed8 !important; }
.kpi-grid .kpi-card:nth-child(4n+4) .kpi-matrix-sym { color: #1e293b !important; }



/* ==========================================================================
   v41: Cool Elevated Top Action Buttons Applied Across All Top Header Links
   ========================================================================== */
.nav-links,
.top-action-bar,
.header-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
}

.nav-links a,
.nav-links a.top-action-btn,
.nav-links a.top-square-btn,
a.top-action-btn,
a.top-square-btn {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-width: 112px !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    line-height: 1.2 !important;
    letter-spacing: 0.01em !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    color: #1e293b !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease !important;
}

.nav-links a:hover,
a.top-action-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12) !important;
    border-color: #64748b !important;
}

.nav-links a .top-btn-sym,
.nav-links a .top-sq-sym,
a.top-action-btn .top-btn-sym,
a.top-square-btn .top-sq-sym {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 28px !important;
    height: 24px !important;
    padding: 0 6px !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    background: rgba(15, 23, 42, 0.06) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

/* Primary / POS Billing button */
.nav-links a.primary,
.nav-links a.top-btn-tone-pos,
a.top-action-btn.primary,
a.top-action-btn.top-btn-tone-pos {
    background: linear-gradient(180deg, #68933d 0%, #4e722b 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #3f5e21 !important;
    box-shadow: 0 3px 10px rgba(78, 114, 43, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.nav-links a.primary:hover,
.nav-links a.top-btn-tone-pos:hover,
a.top-action-btn.primary:hover,
a.top-action-btn.top-btn-tone-pos:hover {
    background: linear-gradient(180deg, #5d8534 0%, #426223 100%) !important;
    box-shadow: 0 6px 16px rgba(78, 114, 43, 0.36) !important;
}

.nav-links a.primary .top-btn-sym,
.nav-links a.top-btn-tone-pos .top-btn-sym,
a.top-action-btn.primary .top-btn-sym,
a.top-action-btn.top-btn-tone-pos .top-btn-sym {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Inventory & FEFO button */
.nav-links a.top-btn-tone-inv,
a.top-action-btn.top-btn-tone-inv {
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%) !important;
    color: #1e3a8a !important;
    border-color: #93c5fd !important;
}

.nav-links a.top-btn-tone-inv .top-btn-sym,
a.top-action-btn.top-btn-tone-inv .top-btn-sym {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border-color: #60a5fa !important;
}

/* Sales & Audit Logs button */
.nav-links a.top-btn-tone-rep,
.nav-links a.top-btn-tone-1,
a.top-action-btn.top-btn-tone-rep,
a.top-action-btn.top-btn-tone-1 {
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%) !important;
    color: #166534 !important;
    border-color: #86efac !important;
}

.nav-links a.top-btn-tone-rep .top-btn-sym,
.nav-links a.top-btn-tone-1 .top-btn-sym,
a.top-action-btn.top-btn-tone-rep .top-btn-sym,
a.top-action-btn.top-btn-tone-1 .top-btn-sym {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #4ade80 !important;
}

/* Users & Geofence / Setup buttons */
.nav-links a.top-btn-tone-2,
.nav-links a.top-btn-tone-3,
.nav-links a.top-btn-tone-4,
.nav-links a.top-btn-tone-5,
a.top-action-btn.top-btn-tone-2,
a.top-action-btn.top-btn-tone-3,
a.top-action-btn.top-btn-tone-4,
a.top-action-btn.top-btn-tone-5 {
    background: linear-gradient(180deg, #ffffff 0%, #f5f3ff 100%) !important;
    color: #3730a3 !important;
    border-color: #c4b5fd !important;
}

.nav-links a.top-btn-tone-2 .top-btn-sym,
.nav-links a.top-btn-tone-3 .top-btn-sym,
.nav-links a.top-btn-tone-4 .top-btn-sym,
.nav-links a.top-btn-tone-5 .top-btn-sym,
a.top-action-btn.top-btn-tone-2 .top-btn-sym,
a.top-action-btn.top-btn-tone-3 .top-btn-sym,
a.top-action-btn.top-btn-tone-4 .top-btn-sym,
a.top-action-btn.top-btn-tone-5 .top-btn-sym {
    background: #ede9fe !important;
    color: #5b21b6 !important;
    border-color: #a78bfa !important;
}

/* Logout button */
.nav-links a.logout,
.nav-links a.top-btn-tone-logout,
a.top-action-btn.logout,
a.top-action-btn.top-btn-tone-logout {
    background: linear-gradient(180deg, #fff5f5 0%, #fee2e2 100%) !important;
    color: #991b1b !important;
    border-color: #fca5a5 !important;
}

.nav-links a.logout .top-btn-sym,
.nav-links a.top-btn-tone-logout .top-btn-sym,
a.top-action-btn.logout .top-btn-sym,
a.top-action-btn.top-btn-tone-logout .top-btn-sym {
    background: #fecaca !important;
    color: #b91c1c !important;
    border-color: #f87171 !important;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f4ec;
    color: #1e293b;
    min-height: 100vh;
}
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-shell {
    width: 100%;
    max-width: 720px;
}
.login-card, .setup-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    border-top: 4px solid #6c9542;
    padding: 28px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}
.login-card { max-width: 440px; margin: 0 auto; }
.brand-center { text-align: center; margin-bottom: 18px; }
.theme-logo { max-height: 54px; max-width: 180px; object-fit: contain; display: block; margin: 0 auto 10px; }
.theme-footer-logo { height: 22px; width: auto; object-fit: contain; }
.brand-title { font-size: 20px; font-weight: 800; color: #30431d; letter-spacing: 0.3px; }
.brand-sub { font-size: 11px; color: #64748b; letter-spacing: 1.5px; text-transform: uppercase; margin-top: 3px; }
.meta { font-size: 13px; color: #475569; margin-bottom: 14px; text-align: center; }
.section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #334155;
    letter-spacing: 0.6px;
    margin: 18px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) {
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: #334155; margin-bottom: 5px; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    background: #ffffff;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: #6c9542;
    box-shadow: 0 0 0 3px rgba(108, 149, 66, 0.18);
}
.btn-primary {
    background: #6c9542;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary:hover { background: #5a7e36; }
.btn-secondary {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-secondary:hover { background: #f8fafc; }
.actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    gap: 12px;
    flex-wrap: wrap;
}
.link-login { color: #30431d; font-size: 13px; font-weight: 600; text-decoration: none; }
.link-login:hover { text-decoration: underline; }
.msg-ok, .alert-ok {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}
.msg-err, .alert-err {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #30431d;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}
.wrap {
    max-width: 1320px;
    margin: 0 auto;
    padding: 18px 20px 36px;
}
.topbar.theme-header {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #6c9542;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.brand-left { display: flex; align-items: center; gap: 14px; }
.brand-left .theme-logo { margin: 0; max-height: 44px; }
.brand-left .brand-title { font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge-master {
    background: #e1e9d9;
    color: #30431d;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}
.meta-line { font-size: 12px; color: #64748b; margin-top: 3px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav-links a {
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 7px;
    border: 1px solid #cbd5e1;
    color: #334155;
    background: #ffffff;
}
.nav-links a:hover { background: #f8fafc; }
.nav-links a.primary { background: #6c9542; color: #ffffff; border-color: #6c9542; }
.nav-links a.primary:hover { background: #5a7e36; }
.nav-links a.logout { color: #30431d; border-color: #fecaca; background: #fef2f2; }
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.kpi-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
}
.kpi-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; }
.kpi-value { font-size: 22px; font-weight: 800; color: #0f172a; margin-top: 6px; }
.kpi-sub { font-size: 12px; color: #64748b; margin-top: 4px; }
.panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}
.panel-title { font-size: 15px; font-weight: 800; color: #0f172a; }
.panel-sub { font-size: 12px; color: #64748b; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
    text-align: left;
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}
td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}
tr:hover td { background: #fafafa; }
.pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.pill-danger { background: #fee2e2; color: #b91c1c; }
.pill-warn { background: #fef3c7; color: #92400e; }
.pill-ok { background: #dcfce7; color: #166534; }
.theme-footer {
    margin-top: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    flex-wrap: wrap;
    gap: 10px;
}
.footer-left, .footer-right { display: flex; align-items: center; gap: 10px; }


a:not(.btn-primary):not(.btn-secondary):not(.site-menu-parent-link):not(.primary):not(.logout):not(.active):not(.selected):not(.is-active):not([aria-current]):not([aria-selected="true"]) {
    color: #6c9542;
    font-weight: 600;
    text-decoration: none;
}
a:not(.btn-primary):not(.btn-secondary):not(.site-menu-parent-link):not(.primary):not(.logout):not(.active):not(.selected):not(.is-active):not([aria-current]):not([aria-selected="true"]):hover {
    color: #5a7e36;
    text-decoration: underline;
}
a.active,
a.selected,
a.is-active,
a[aria-current="page"],
a[aria-current="true"],
a[aria-selected="true"],
button.active,
button.selected,
button.is-active,
button[aria-selected="true"],
.rep-tab-btn.active,
.rep-subtab-btn.active,
.tab-btn.active,
.filter-btn.active,
.btn.active {
    color: #ffffff !important;
    text-decoration: none !important;
}
a.active:hover,
a.selected:hover,
a.is-active:hover,
button.active:hover,
button.selected:hover,
.rep-tab-btn.active:hover,
.rep-subtab-btn.active:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}
.nav-links a {
    color: #334155;
    text-decoration: none;
}
.nav-links a.primary,
a.primary,
a.btn-primary {
    background: #6c9542;
    color: #ffffff !important;
    border-color: #6c9542;
    font-weight: 700;
    text-decoration: none !important;
}
.nav-links a.primary:hover,
a.primary:hover,
a.btn-primary:hover {
    background: #5a7e36;
    color: #ffffff !important;
    text-decoration: none !important;
}
.nav-links a.logout,
a.logout {
    color: #991b1b;
}
.site-menu-dropdown li a {
    color: #334155;
    text-decoration: none;
}


/* ==========================================================================
   v26: Left Sidebar Navigation, Top Action Buttons, Symbols & Data Highlights
   ========================================================================== */
.wrap.app-shell { max-width: 1440px; }

.workspace-body {
    display: grid;
    grid-template-columns: 255px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

@media (max-width: 960px) {
    .workspace-body { grid-template-columns: 1fr; }
}

.app-sidebar-nav {
    background: #16281c;
    color: #ecfdf5;
    border-radius: 12px;
    border: 1px solid #24422d;
    padding: 12px 10px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
    position: sticky;
    top: 14px;
}

.sidebar-brand-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-wingding-badge {
    font-family: "Wingdings", "Webdings", "Segoe UI Symbol", sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #22c55e;
    color: #052e16;
    font-size: 14px;
    font-weight: 800;
}

.sidebar-heading-text {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #bbf7d0;
}

.site-menu-root.sidebar-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.site-menu-parent { border-radius: 8px; }

.site-menu-parent-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-radius: 8px;
    color: #f1f5f9 !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    border-left: 3px solid transparent;
}

.site-menu-parent:hover > .site-menu-parent-link { background: rgba(255, 255, 255, 0.09); }

.site-menu-parent.is-active > .site-menu-parent-link {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.28), rgba(16, 185, 129, 0.12));
    color: #ffffff !important;
    border-left-color: #4ade80;
}

.site-menu-parent.nav-tone-1 .sidebar-sym { color: #4ade80; }
.site-menu-parent.nav-tone-2 .sidebar-sym { color: #38bdf8; }
.site-menu-parent.nav-tone-3 .sidebar-sym { color: #fbbf24; }
.site-menu-parent.nav-tone-4 .sidebar-sym { color: #f472b6; }
.site-menu-parent.nav-tone-5 .sidebar-sym { color: #a78bfa; }
.site-menu-parent.nav-tone-6 .sidebar-sym { color: #fb7185; }

.sidebar-sym, .sub-sym, .top-btn-sym {
    font-family: "Wingdings", "Webdings", "Segoe UI Symbol", "Apple Color Emoji", sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-sym { font-size: 15px; width: 18px; }
.sidebar-label { flex: 1; line-height: 1.25; }
.site-menu-caret { font-size: 11px; opacity: 0.75; }

.site-menu-dropdown.sidebar-submenu {
    list-style: none;
    margin: 2px 0 6px 14px;
    padding: 2px 0 2px 8px;
    border-left: 1px dashed rgba(148, 163, 184, 0.35);
    display: none;
}

.site-menu-parent.is-active .site-menu-dropdown.sidebar-submenu,
.site-menu-parent:hover .site-menu-dropdown.sidebar-submenu,
.site-menu-parent:focus-within .site-menu-dropdown.sidebar-submenu {
    display: block;
}

.site-menu-dropdown.sidebar-submenu li a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: #cbd5e1 !important;
    text-decoration: none !important;
}

.site-menu-dropdown.sidebar-submenu li a:hover,
.site-menu-dropdown.sidebar-submenu li a.is-current-page {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    font-weight: 700;
}

a.top-action-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 13px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: 1px solid transparent !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.top-btn-tone-1 { background: #ecfdf5 !important; color: #065f46 !important; border-color: #6ee7b7 !important; }
.top-btn-tone-2 { background: #eff6ff !important; color: #1e40af !important; border-color: #93c5fd !important; }
.top-btn-tone-3 { background: #fffbeb !important; color: #92400e !important; border-color: #fcd34d !important; }
.top-btn-tone-4 { background: #fdf2f8 !important; color: #9d174d !important; border-color: #f9a8d4 !important; }
.top-btn-tone-5 { background: #f5f3ff !important; color: #5b21b6 !important; border-color: #c4b5fd !important; }
a.top-action-btn.top-btn-tone-dash { background: #e0f2fe !important; color: #0369a1 !important; border-color: #7dd3fc !important; }
a.top-action-btn.top-btn-tone-pos  { background: #16a34a !important; color: #ffffff !important; border-color: #15803d !important; }
a.top-action-btn.top-btn-tone-rep  { background: #fef3c7 !important; color: #92400e !important; border-color: #f59e0b !important; }
a.top-action-btn.top-btn-tone-inv  { background: #ede9fe !important; color: #5b21b6 !important; border-color: #a78bfa !important; }
a.top-action-btn.top-btn-tone-logout,
a.top-action-btn.logout { background: #fee2e2 !important; color: #991b1b !important; border-color: #fca5a5 !important; }

/* Distinct color highlights for different data types */
.kpi-grid .kpi-card:nth-child(4n+1) { border-top: 4px solid #16a34a; background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 38%); }
.kpi-grid .kpi-card:nth-child(4n+1) .kpi-value { color: #15803d; }
.kpi-grid .kpi-card:nth-child(4n+2) { border-top: 4px solid #0284c7; background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 38%); }
.kpi-grid .kpi-card:nth-child(4n+2) .kpi-value { color: #0369a1; }
.kpi-grid .kpi-card:nth-child(4n+3) { border-top: 4px solid #d97706; background: linear-gradient(180deg, #fffbeb 0%, #ffffff 38%); }
.kpi-grid .kpi-card:nth-child(4n+3) .kpi-value { color: #b45309; }
.kpi-grid .kpi-card:nth-child(4n+4) { border-top: 4px solid #7c3aed; background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 38%); }
.kpi-grid .kpi-card:nth-child(4n+4) .kpi-value { color: #6d28d9; }

.highlight-amount, .data-amount { color: #15803d; font-weight: 800; background: #dcfce7; padding: 2px 7px; border-radius: 6px; }
.highlight-code, .data-code     { color: #0369a1; font-weight: 700; background: #e0f2fe; padding: 2px 7px; border-radius: 6px; }
.highlight-expiry, .data-expiry { color: #b45309; font-weight: 700; background: #fef3c7; padding: 2px 7px; border-radius: 6px; }
.highlight-alert, .data-alert   { color: #b91c1c; font-weight: 800; background: #fee2e2; padding: 2px 7px; border-radius: 6px; }


/* ==========================================================================
   v31: Crisp Square Top Buttons with High-Contrast Symbols
   ========================================================================== */
.nav-links.top-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

a.top-action-btn.top-square-btn {
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 62px;
    padding: 7px 9px !important;
    border-radius: 6px !important;
    border-width: 2px !important;
    border-style: solid !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.15;
    text-align: center;
    text-decoration: none !important;
    gap: 4px;
    box-shadow: 0 2px 0 rgba(15, 23, 42, 0.14);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

a.top-action-btn.top-square-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 0 rgba(15, 23, 42, 0.22);
    filter: brightness(0.97);
}

a.top-action-btn.top-square-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.16);
}

.top-btn-sym.top-sq-sym {
    font-family: "Wingdings", "Webdings", "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.16);
}

a.top-action-btn.top-btn-tone-pos .top-btn-sym.top-sq-sym {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
}

a.top-action-btn.top-square-btn .top-btn-label {
    font-size: 10.5px;
    letter-spacing: 0.01em;
    max-width: 96px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ==========================================================================
   v32: Highlighted KPI / Matrix Cards — Distinct Light Colors + Symbols
   ========================================================================== */
.kpi-grid .kpi-card {
    position: relative;
    overflow: hidden;
    padding-right: 66px;
}

.kpi-matrix-sym {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Wingdings", "Webdings", "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
    font-size: 20px;
    font-weight: 900;
    border: 1.5px solid transparent;
    pointer-events: none;
}

/* Card 1 (Sales): Soft Mint Green + Symbol */
.kpi-grid .kpi-card:nth-child(4n+1) {
    background: #eefaf2 !important;
    border: 1.5px solid #86efac !important;
    border-left: 5px solid #16a34a !important;
}
.kpi-grid .kpi-card:nth-child(4n+1) .kpi-value { color: #14532d !important; }
.kpi-grid .kpi-card:nth-child(4n+1) .kpi-matrix-sym {
    background: #dcfce7;
    color: #15803d;
    border-color: #4ade80;
}

/* Card 2 (Gross Margin): Soft Sky Blue + Symbol */
.kpi-grid .kpi-card:nth-child(4n+2) {
    background: #eff8ff !important;
    border: 1.5px solid #7dd3fc !important;
    border-left: 5px solid #0284c7 !important;
}
.kpi-grid .kpi-card:nth-child(4n+2) .kpi-value { color: #0c4a6e !important; }
.kpi-grid .kpi-card:nth-child(4n+2) .kpi-matrix-sym {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #38bdf8;
}

/* Card 3 (Active Stock): Soft Lavender/Lilac + Symbol */
.kpi-grid .kpi-card:nth-child(4n+3) {
    background: #f5f3ff !important;
    border: 1.5px solid #c4b5fd !important;
    border-left: 5px solid #7c3aed !important;
}
.kpi-grid .kpi-card:nth-child(4n+3) .kpi-value { color: #4c1d95 !important; }
.kpi-grid .kpi-card:nth-child(4n+3) .kpi-matrix-sym {
    background: #ede9fe;
    color: #6d28d9;
    border-color: #a78bfa;
}

/* Card 4 (Expiry Watch): Soft Warm Amber/Peach + Symbol */
.kpi-grid .kpi-card:nth-child(4n+4) {
    background: #fffbeb !important;
    border: 1.5px solid #fcd34d !important;
    border-left: 5px solid #d97706 !important;
}
.kpi-grid .kpi-card:nth-child(4n+4) .kpi-value { color: #78350f !important; }
.kpi-grid .kpi-card:nth-child(4n+4) .kpi-matrix-sym {
    background: #fef3c7;
    color: #b45309;
    border-color: #fbbf24;
}


/* ==========================================================================
   v35: Right-Side Symbol Badge Inside Each Highlighted KPI / Matrix Card
   ========================================================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.kpi-grid .kpi-card {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 15px 16px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

.kpi-grid .kpi-card-content {
    min-width: 0;
    flex: 1 1 auto;
}

.kpi-matrix-sym {
    position: static !important;
    transform: none !important;
    flex: 0 0 46px !important;
    width: 46px !important;
    height: 46px !important;
    margin-left: auto !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", "Arial Unicode MS", sans-serif !important;
    font-size: 21px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    border: 1.5px solid transparent !important;
    pointer-events: none !important;
}

/* 1. Today's Sales -> Soft Mint Green + ★ */
.kpi-grid .kpi-card:nth-child(4n+1) {
    background: #ecfdf5 !important;
    border: 1.5px solid #86efac !important;
    border-left: 5px solid #16a34a !important;
}
.kpi-grid .kpi-card:nth-child(4n+1) .kpi-value { color: #14532d !important; }
.kpi-grid .kpi-card:nth-child(4n+1) .kpi-matrix-sym {
    background: #d1fae5 !important;
    color: #15803d !important;
    border-color: #4ade80 !important;
}

/* 2. Today's Gross Margin -> Soft Sky Blue + ⚡ */
.kpi-grid .kpi-card:nth-child(4n+2) {
    background: #f0f9ff !important;
    border: 1.5px solid #7dd3fc !important;
    border-left: 5px solid #0284c7 !important;
}
.kpi-grid .kpi-card:nth-child(4n+2) .kpi-value { color: #0c4a6e !important; }
.kpi-grid .kpi-card:nth-child(4n+2) .kpi-matrix-sym {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border-color: #38bdf8 !important;
}

/* 3. Active Stock Units -> Soft Lavender + ▣ */
.kpi-grid .kpi-card:nth-child(4n+3) {
    background: #f5f3ff !important;
    border: 1.5px solid #c4b5fd !important;
    border-left: 5px solid #7c3aed !important;
}
.kpi-grid .kpi-card:nth-child(4n+3) .kpi-value { color: #4c1d95 !important; }
.kpi-grid .kpi-card:nth-child(4n+3) .kpi-matrix-sym {
    background: #ede9fe !important;
    color: #6d28d9 !important;
    border-color: #a78bfa !important;
}

/* 4. Expiry Watch (60 Days) -> Soft Warm Amber + ⚠ */
.kpi-grid .kpi-card:nth-child(4n+4) {
    background: #fffbeb !important;
    border: 1.5px solid #fcd34d !important;
    border-left: 5px solid #d97706 !important;
}
.kpi-grid .kpi-card:nth-child(4n+4) .kpi-value { color: #78350f !important; }
.kpi-grid .kpi-card:nth-child(4n+4) .kpi-matrix-sym {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border-color: #fbbf24 !important;
}


/* ==========================================================================
   v40: Reference Dashboard Layout — White KPI Cards with Large Right Symbol
   ========================================================================== */
.kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
    margin-bottom: 18px !important;
}

@media (max-width: 1100px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .kpi-grid {
        grid-template-columns: 1fr !important;
    }
}

.kpi-grid .kpi-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 18px 20px !important;
    min-height: 112px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
    box-sizing: border-box !important;
}

.kpi-grid .kpi-card .kpi-card-content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.kpi-grid .kpi-card .kpi-matrix-sym {
    position: static !important;
    transform: none !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 56px !important;
    height: auto !important;
    margin: 0 0 0 8px !important;
    padding: 0 4px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", "Arial Unicode MS", sans-serif !important;
    font-size: clamp(36px, 3.6vw, 52px) !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    pointer-events: none !important;
}

.kpi-grid .kpi-card:nth-child(4n+1) .kpi-matrix-sym { color: #1e3a8a !important; }
.kpi-grid .kpi-card:nth-child(4n+2) .kpi-matrix-sym { color: #eab308 !important; }
.kpi-grid .kpi-card:nth-child(4n+3) .kpi-matrix-sym { color: #1d4ed8 !important; }
.kpi-grid .kpi-card:nth-child(4n+4) .kpi-matrix-sym { color: #1e293b !important; }


/* ==========================================================================
   v41: Cool Elevated Top Action Buttons Applied Across All Top Header Links
   ========================================================================== */
.nav-links,
.top-action-bar,
.header-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
}

.nav-links a,
.nav-links a.top-action-btn,
.nav-links a.top-square-btn,
a.top-action-btn,
a.top-square-btn {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-width: 112px !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    line-height: 1.2 !important;
    letter-spacing: 0.01em !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    color: #1e293b !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease !important;
}

.nav-links a:hover,
a.top-action-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12) !important;
    border-color: #64748b !important;
}

.nav-links a .top-btn-sym,
.nav-links a .top-sq-sym,
a.top-action-btn .top-btn-sym,
a.top-square-btn .top-sq-sym {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 28px !important;
    height: 24px !important;
    padding: 0 6px !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    background: rgba(15, 23, 42, 0.06) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

/* Primary / POS Billing button */
.nav-links a.primary,
.nav-links a.top-btn-tone-pos,
a.top-action-btn.primary,
a.top-action-btn.top-btn-tone-pos {
    background: linear-gradient(180deg, #68933d 0%, #4e722b 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #3f5e21 !important;
    box-shadow: 0 3px 10px rgba(78, 114, 43, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.nav-links a.primary:hover,
.nav-links a.top-btn-tone-pos:hover,
a.top-action-btn.primary:hover,
a.top-action-btn.top-btn-tone-pos:hover {
    background: linear-gradient(180deg, #5d8534 0%, #426223 100%) !important;
    box-shadow: 0 6px 16px rgba(78, 114, 43, 0.36) !important;
}

.nav-links a.primary .top-btn-sym,
.nav-links a.top-btn-tone-pos .top-btn-sym,
a.top-action-btn.primary .top-btn-sym,
a.top-action-btn.top-btn-tone-pos .top-btn-sym {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Inventory & FEFO button */
.nav-links a.top-btn-tone-inv,
a.top-action-btn.top-btn-tone-inv {
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%) !important;
    color: #1e3a8a !important;
    border-color: #93c5fd !important;
}

.nav-links a.top-btn-tone-inv .top-btn-sym,
a.top-action-btn.top-btn-tone-inv .top-btn-sym {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border-color: #60a5fa !important;
}

/* Sales & Audit Logs button */
.nav-links a.top-btn-tone-rep,
.nav-links a.top-btn-tone-1,
a.top-action-btn.top-btn-tone-rep,
a.top-action-btn.top-btn-tone-1 {
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%) !important;
    color: #166534 !important;
    border-color: #86efac !important;
}

.nav-links a.top-btn-tone-rep .top-btn-sym,
.nav-links a.top-btn-tone-1 .top-btn-sym,
a.top-action-btn.top-btn-tone-rep .top-btn-sym,
a.top-action-btn.top-btn-tone-1 .top-btn-sym {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #4ade80 !important;
}

/* Users & Geofence / Setup buttons */
.nav-links a.top-btn-tone-2,
.nav-links a.top-btn-tone-3,
.nav-links a.top-btn-tone-4,
.nav-links a.top-btn-tone-5,
a.top-action-btn.top-btn-tone-2,
a.top-action-btn.top-btn-tone-3,
a.top-action-btn.top-btn-tone-4,
a.top-action-btn.top-btn-tone-5 {
    background: linear-gradient(180deg, #ffffff 0%, #f5f3ff 100%) !important;
    color: #3730a3 !important;
    border-color: #c4b5fd !important;
}

.nav-links a.top-btn-tone-2 .top-btn-sym,
.nav-links a.top-btn-tone-3 .top-btn-sym,
.nav-links a.top-btn-tone-4 .top-btn-sym,
.nav-links a.top-btn-tone-5 .top-btn-sym,
a.top-action-btn.top-btn-tone-2 .top-btn-sym,
a.top-action-btn.top-btn-tone-3 .top-btn-sym,
a.top-action-btn.top-btn-tone-4 .top-btn-sym,
a.top-action-btn.top-btn-tone-5 .top-btn-sym {
    background: #ede9fe !important;
    color: #5b21b6 !important;
    border-color: #a78bfa !important;
}

/* Logout button */
.nav-links a.logout,
.nav-links a.top-btn-tone-logout,
a.top-action-btn.logout,
a.top-action-btn.top-btn-tone-logout {
    background: linear-gradient(180deg, #fff5f5 0%, #fee2e2 100%) !important;
    color: #991b1b !important;
    border-color: #fca5a5 !important;
}

.nav-links a.logout .top-btn-sym,
.nav-links a.top-btn-tone-logout .top-btn-sym,
a.top-action-btn.logout .top-btn-sym,
a.top-action-btn.top-btn-tone-logout .top-btn-sym {
    background: #fecaca !important;
    color: #b91c1c !important;
    border-color: #f87171 !important;
}



/* ==========================================================================
   v53: Reference Left Sidebar, Logo Alignment & Native Dropdown Tree
   ========================================================================== */
.wrap.app-shell {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.workspace-body {
    display: flex !important;
    align-items: stretch !important;
    min-height: 100vh !important;
    width: 100% !important;
}

.ref-left-sidebar {
    width: 224px !important;
    min-width: 224px !important;
    flex: 0 0 224px !important;
    background: #17632d !important;
    color: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    border-right: 1px solid #0f4620 !important;
}

.ref-brand-card {
    background: #ffffff !important;
    border-bottom: 2px solid #0f4620 !important;
    padding: 10px 12px !important;
}

.ref-brand-link {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    color: #14532d !important;
}

.ref-brand-logo {
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    flex: 0 0 44px !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 6px !important;
}

.ref-brand-text-wrap {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.ref-brand-title {
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.18 !important;
    color: #14532d !important;
    text-transform: uppercase !important;
}

.ref-brand-sub {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #15803d !important;
    margin-top: 2px !important;
}

.ref-sidebar-tree {
    display: flex !important;
    flex-direction: column !important;
    padding: 6px 0 14px 0 !important;
}

.ref-tree-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
}

.ref-tree-summary,
.ref-tree-leaf {
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 11px 14px !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: background 0.14s ease !important;
}

.ref-tree-summary::-webkit-details-marker {
    display: none !important;
}

.ref-tree-summary:hover,
.ref-tree-leaf:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

.ref-tree-group.is-current > .ref-tree-summary,
.ref-tree-leaf.is-current {
    background: #22843d !important;
    box-shadow: inset 4px 0 0 #86efac !important;
}

.ref-tree-icon {
    width: 22px !important;
    height: 22px !important;
    flex: 0 0 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    line-height: 1 !important;
}

.ref-tree-label {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.ref-tree-chevron {
    font-size: 11px !important;
    color: #bbf7d0 !important;
    transition: transform 0.15s ease !important;
}

.ref-tree-group[open] > .ref-tree-summary .ref-tree-chevron {
    transform: rotate(180deg) !important;
}

.ref-tree-children {
    list-style: none !important;
    margin: 0 !important;
    padding: 4px 0 8px 0 !important;
    background: #104920 !important;
}

.ref-tree-children li a {
    display: block !important;
    padding: 7px 14px 7px 46px !important;
    color: #dcfce7 !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    border-bottom: none !important;
}

.ref-tree-children li a:hover,
.ref-tree-children li a.is-sub-current {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
}

.ref-tree-children li a.ref-tree-parent-jump {
    color: #86efac !important;
    font-weight: 700 !important;
}

.theme-logo {
    max-height: 38px !important;
    max-width: 120px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.workspace-content.theme-main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 16px 20px !important;
    background: #f4f7f4 !important;
}

@media (max-width: 860px) {
    .workspace-body {
        flex-direction: column !important;
    }
    .ref-left-sidebar {
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
    }
}


/* ==========================================================================
   v59: Modern SaaS Sidebar, Large Menu Items & Spacious Form Inputs
   ========================================================================== */
.ref-left-sidebar {
    width: 268px !important;
    min-width: 268px !important;
    flex: 0 0 268px !important;
    background: linear-gradient(180deg, #155e2b 0%, #0f4720 100%) !important;
    color: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    border-right: 1px solid #0b3618 !important;
    box-shadow: 2px 0 12px rgba(15, 23, 42, 0.08) !important;
}

.ref-brand-card {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 14px 16px !important;
}

.ref-brand-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-decoration: none !important;
    color: #0f172a !important;
}

.ref-brand-logo {
    width: 46px !important;
    height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;
    flex: 0 0 46px !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 10px !important;
    padding: 3px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.ref-brand-title {
    font-size: 12.5px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    color: #0f172a !important;
    letter-spacing: 0.01em !important;
}

.ref-brand-sub {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: #15803d !important;
    margin-top: 3px !important;
}

.ref-sidebar-tree {
    display: flex !important;
    flex-direction: column !important;
    padding: 10px 10px 18px 10px !important;
    gap: 4px !important;
}

.ref-tree-group {
    border-bottom: none !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

.ref-tree-summary,
.ref-tree-leaf {
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 13px 14px !important;
    min-height: 46px !important;
    color: #f0fdf4 !important;
    text-decoration: none !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: background-color 0.16s ease, transform 0.14s ease !important;
}

.ref-tree-summary:hover,
.ref-tree-leaf:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
}

.ref-tree-group.is-current > .ref-tree-summary,
.ref-tree-leaf.is-current {
    background: #22c55e !important;
    color: #052e16 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18) !important;
}

.ref-tree-icon {
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 17px !important;
    line-height: 1 !important;
}

.ref-tree-label {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
}

.ref-tree-chevron {
    font-size: 13px !important;
    opacity: 0.9 !important;
}

.ref-tree-children {
    list-style: none !important;
    margin: 4px 0 6px 0 !important;
    padding: 6px 6px 6px 14px !important;
    background: rgba(0, 0, 0, 0.18) !important;
    border-radius: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.ref-tree-children li a {
    display: flex !important;
    align-items: center !important;
    padding: 10px 12px 10px 26px !important;
    min-height: 38px !important;
    color: #dcfce7 !important;
    text-decoration: none !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    border-radius: 8px !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
}

.ref-tree-children li a:hover,
.ref-tree-children li a.is-sub-current {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Modern Form Shell, Spacious Fields & Large Controls */
.workspace-content.theme-main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 24px 28px !important;
    background: #f1f5f9 !important;
}

.clean-form-shell {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 28px 32px !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 4px 10px -2px rgba(15, 23, 42, 0.04) !important;
    width: 100% !important;
    max-width: 100% !important;
}

.clean-form-header {
    margin-bottom: 24px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.clean-form-title {
    margin: 0 0 6px 0 !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.015em !important;
}

.clean-form-subtitle {
    margin: 0 !important;
    font-size: 14px !important;
    color: #64748b !important;
}

.simple-left-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
}

.left-field-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
}

.left-field-label {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    letter-spacing: 0.005em !important;
}

.left-field-control {
    width: 100% !important;
}

.clean-form-shell input[type="text"],
.clean-form-shell input[type="number"],
.clean-form-shell input[type="email"],
.clean-form-shell input[type="password"],
.clean-form-shell input[type="date"],
.clean-form-shell input[type="search"],
.clean-form-shell select,
.clean-form-shell textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 46px !important;
    padding: 11px 15px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    color: #0f172a !important;
    background-color: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    outline: none !important;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease !important;
}

.clean-form-shell input:focus,
.clean-form-shell select:focus,
.clean-form-shell textarea:focus {
    background-color: #ffffff !important;
    border-color: #16a34a !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16) !important;
}

.clean-form-shell input[type="file"] {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    color: #334155 !important;
    background: #f8fafc !important;
    border: 1.5px dashed #94a3b8 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
}

.clean-form-shell input[type="file"]::file-selector-button {
    margin-right: 14px !important;
    padding: 9px 16px !important;
    border: none !important;
    border-radius: 8px !important;
    background: #15803d !important;
    color: #ffffff !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
}

.clean-form-shell input[type="file"]::file-selector-button:hover {
    background: #166534 !important;
}

.clean-submit-row {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin-top: 22px !important;
    padding-top: 18px !important;
    border-top: 1px solid #e2e8f0 !important;
}

.clean-form-shell .btn-primary,
.clean-form-shell .btn-secondary,
.clean-form-shell button[type="submit"],
.clean-form-shell button[type="button"] {
    min-height: 46px !important;
    padding: 11px 22px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: transform 0.14s ease, box-shadow 0.16s ease, background-color 0.16s ease !important;
}

.clean-form-shell .btn-primary,
.clean-form-shell button.btn-primary {
    background: linear-gradient(180deg, #16a34a 0%, #15803d 100%) !important;
    color: #ffffff !important;
    border: 1px solid #15803d !important;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.25) !important;
}

.clean-form-shell .btn-primary:hover,
.clean-form-shell button.btn-primary:hover {
    transform: translateY(-1px) !important;
    background: linear-gradient(180deg, #15803d 0%, #166534 100%) !important;
}

.clean-form-shell .btn-secondary {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1.5px solid #cbd5e1 !important;
    text-decoration: none !important;
}

.clean-form-shell .btn-secondary:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
}


/* ==========================================================================
   v63: Global Modern SaaS Form Inputs, Labels & Panels Across All Pages
   ========================================================================== */
.panel {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 24px 28px !important;
    margin-bottom: 22px !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 4px 10px -2px rgba(15, 23, 42, 0.03) !important;
}

.panel-title {
    font-size: 19px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.01em !important;
}

.panel-sub {
    font-size: 13.5px !important;
    color: #64748b !important;
    margin-top: 4px !important;
}

.form-grid-2 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px 20px !important;
}

.form-grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px 20px !important;
}

@media (max-width: 820px) {
    .form-grid-2, .form-grid-3 {
        grid-template-columns: 1fr !important;
    }
}

.field {
    margin-bottom: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
}

.field label,
form label:not(.ref-tree-summary):not(.ref-tree-leaf) {
    display: inline-block !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    line-height: 1.35 !important;
    margin-bottom: 2px !important;
}

.workspace-content input[type="text"],
.workspace-content input[type="number"],
.workspace-content input[type="email"],
.workspace-content input[type="password"],
.workspace-content input[type="date"],
.workspace-content input[type="datetime-local"],
.workspace-content input[type="time"],
.workspace-content input[type="search"],
.workspace-content input[type="tel"],
.workspace-content select,
.workspace-content textarea,
.login-page input[type="text"],
.login-page input[type="password"],
.login-page input[type="email"],
.login-page select {
    min-height: 46px !important;
    padding: 11px 15px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    color: #0f172a !important;
    background-color: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    outline: none !important;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease !important;
}

.workspace-content input:focus,
.workspace-content select:focus,
.workspace-content textarea:focus,
.login-page input:focus,
.login-page select:focus {
    background-color: #ffffff !important;
    border-color: #16a34a !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16) !important;
}

.workspace-content input[type="file"] {
    padding: 10px 12px !important;
    font-size: 14px !important;
    color: #334155 !important;
    background: #f8fafc !important;
    border: 1.5px dashed #94a3b8 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
}

.workspace-content input[type="file"]::file-selector-button {
    margin-right: 14px !important;
    padding: 9px 16px !important;
    border: none !important;
    border-radius: 8px !important;
    background: #15803d !important;
    color: #ffffff !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.workspace-content .btn-primary,
.workspace-content .btn-secondary,
.login-page .btn-primary,
.login-page .btn-secondary {
    min-height: 46px !important;
    padding: 11px 22px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.workspace-content .btn-primary,
.login-page .btn-primary {
    background: linear-gradient(180deg, #16a34a 0%, #15803d 100%) !important;
    color: #ffffff !important;
    border: 1px solid #15803d !important;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.24) !important;
}

.workspace-content .btn-secondary,
.login-page .btn-secondary {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1.5px solid #cbd5e1 !important;
    text-decoration: none !important;
}


/* Item Photo Next to Product Name & Interactive Image Magnifier */
.med-name-with-img {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    vertical-align: middle;
    max-width: 100%;
}

.med-name-with-img strong {
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

img.med-prod-thumb {
    width: auto !important;
    height: auto !important;
    max-width: 52px !important;
    max-height: 34px !important;
    object-fit: contain !important;
    display: inline-block !important;
    flex: 0 0 auto !important;
    vertical-align: middle !important;
}

img.med-thumb-zoomable {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    cursor: zoom-in;
    touch-action: manipulation;
}

#med-hover-magnifier {
    position: fixed;
    display: none;
    pointer-events: none;
    z-index: 99999;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.3);
    max-width: 440px;
    max-height: 380px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
}
#med-hover-magnifier.is-visible {
    display: inline-flex;
}
#med-hover-magnifier .med-mag-viewport {
    width: 390px;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}
#med-hover-magnifier img {
    width: auto;
    height: auto;
    max-width: 390px;
    max-height: 300px;
    object-fit: contain;
    display: block;
    border: none;
    background: transparent;
    padding: 0;
    transform-origin: center center;
    transition: transform 0.08s ease-out;
}
#med-hover-magnifier .med-hover-caption {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    max-width: 390px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ==========================================================================
   FRESH ROOT THEME ARCHITECTURE (PSD-to-HTML Slice Match - v80)
   ========================================================================== */

/* 1. Eliminate duplicate logos in topbar and footer; logo lives ONLY in sidebar top-left */
.brand-left .theme-logo,
.theme-footer .theme-footer-logo {
    display: none !important;
}

/* 2. Full-bleed App Shell */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #f1f5f9 !important;
}

.wrap.app-shell {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh !important;
    position: relative !important;
}

/* 3. Desktop Two-Column Root Grid: Fixed 268px Left Sidebar from Top-Left + Right Workspace */
@media (min-width: 861px) {
    .ref-left-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 268px !important;
        min-width: 268px !important;
        max-width: 268px !important;
        z-index: 1000 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        background: linear-gradient(180deg, #166534 0%, #0f4720 100%) !important;
        border-right: 1px solid #0b3618 !important;
        box-shadow: 2px 0 12px rgba(15, 23, 42, 0.08) !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .topbar.theme-header {
        margin-left: 268px !important;
        width: calc(100% - 268px) !important;
        max-width: calc(100% - 268px) !important;
        border-radius: 0 !important;
        border-top: none !important;
        border-right: none !important;
        border-left: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        margin-bottom: 0 !important;
        padding: 14px 24px !important;
        background: #ffffff !important;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04) !important;
    }

    .workspace-body {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .theme-main.workspace-content {
        margin-left: 268px !important;
        width: calc(100% - 268px) !important;
        max-width: calc(100% - 268px) !important;
        padding: 20px 24px 36px !important;
        background: #f1f5f9 !important;
        min-height: calc(100vh - 130px) !important;
    }

    .theme-footer {
        margin-left: 268px !important;
        width: calc(100% - 268px) !important;
        max-width: calc(100% - 268px) !important;
        border-radius: 0 !important;
    }
}

/* 4. Top-Left Brand Card: Single Large Full-Width Logo (No Small Square Box) */
.ref-left-sidebar .ref-brand-card,
.ref-left-sidebar .ref-brand-card.ref-single-large-brand {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 8px 10px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 124px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.ref-left-sidebar .ref-brand-link,
.ref-left-sidebar .ref-brand-link.ref-single-large-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
}

.ref-left-sidebar img.ref-brand-logo,
.ref-left-sidebar img.ref-brand-logo.ref-single-large-logo {
    width: 100% !important;
    max-width: 248px !important;
    height: auto !important;
    max-height: 116px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    flex: 0 1 auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* 5. Sidebar Navigation Tree Sequence */
.ref-left-sidebar .ref-sidebar-tree {
    padding: 12px 10px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

/* ==========================================================================
   COMPLETE SELF-CONTAINED ROOT THEME (v81)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    min-height: 100vh;
}

.wrap.app-shell {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
}

/* Hide duplicate logos in header/footer; logo lives exclusively in left sidebar top */
.brand-left .theme-logo,
.theme-footer .theme-footer-logo {
    display: none !important;
}

/* Fixed 268px Left Sidebar + Offset Topbar, Main Workspace & Footer on Desktop */
@media (min-width: 861px) {
    .ref-left-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 268px;
        min-width: 268px;
        max-width: 268px;
        z-index: 1000;
        overflow-y: auto;
        overflow-x: hidden;
        background: linear-gradient(180deg, #166534 0%, #0f4720 100%);
        border-right: 1px solid #0b3618;
        box-shadow: 2px 0 12px rgba(15, 23, 42, 0.08);
        display: flex;
        flex-direction: column;
    }

    .topbar.theme-header {
        margin-left: 268px;
        width: calc(100% - 268px);
        max-width: calc(100% - 268px);
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #e2e8f0;
        margin-bottom: 0;
        padding: 14px 24px;
        background: #ffffff;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 14px;
        flex-wrap: wrap;
    }

    .workspace-body {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .theme-main.workspace-content {
        margin-left: 268px;
        width: calc(100% - 268px);
        max-width: calc(100% - 268px);
        padding: 20px 24px 36px;
        background: #f1f5f9;
        min-height: calc(100vh - 130px);
    }

    .theme-footer {
        margin-left: 268px;
        width: calc(100% - 268px);
        max-width: calc(100% - 268px);
        border-radius: 0;
    }
}

/* Top-Left Brand Card: Single Large Logo Fitted to 268px Sidebar Width (No Small Box) */
.ref-left-sidebar .ref-brand-card,
.ref-left-sidebar .ref-brand-card.ref-single-large-brand {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 10px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 124px;
    overflow: hidden;
    flex-shrink: 0;
}

.ref-left-sidebar .ref-brand-link,
.ref-left-sidebar .ref-brand-link.ref-single-large-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    padding: 0;
    margin: 0;
}

.ref-left-sidebar img.ref-brand-logo,
.ref-left-sidebar img.ref-brand-logo.ref-single-large-logo {
    width: 100%;
    max-width: 248px;
    height: auto;
    max-height: 116px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* Sidebar Navigation Tree */
.ref-left-sidebar .ref-sidebar-tree {
    padding: 12px 10px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ref-left-sidebar .ref-tree-group {
    border-radius: 8px;
    overflow: hidden;
}

.ref-left-sidebar .ref-tree-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    color: #ecfdf5;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    user-select: none;
}

.ref-left-sidebar .ref-tree-summary::-webkit-details-marker { display: none; }
.ref-left-sidebar .ref-tree-summary:hover { background: rgba(255, 255, 255, 0.1); }
.ref-left-sidebar .ref-tree-group.is-current > .ref-tree-summary {
    background: #16a34a;
    color: #ffffff;
    font-weight: 700;
}

.ref-left-sidebar .ref-tree-chevron {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.85;
}

.ref-left-sidebar .ref-tree-children {
    list-style: none;
    margin: 4px 0 6px 0;
    padding: 0 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ref-left-sidebar .ref-tree-children a {
    display: block;
    padding: 8px 12px;
    color: #dcfce7;
    text-decoration: none;
    font-size: 13px;
    border-radius: 6px;
}

.ref-left-sidebar .ref-tree-children a:hover,
.ref-left-sidebar .ref-tree-children a.is-sub-current {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-weight: 600;
}

.ref-left-sidebar .ref-tree-leaf {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    color: #ecfdf5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
}

.ref-left-sidebar .ref-tree-leaf:hover,
.ref-left-sidebar .ref-tree-leaf.is-current {
    background: #16a34a;
    color: #ffffff;
}

/* Header Title, Badge, Meta & Action Buttons */
.brand-title {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-master {
    background: #dcfce7;
    color: #166534;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}

.meta-line {
    font-size: 12px;
    color: #475569;
    margin-top: 3px;
}

.top-action-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.top-action-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    padding: 7px 10px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    gap: 3px;
}

.top-action-btn.top-btn-tone-1,
.top-action-btn.top-btn-tone-pos { background: #4d7c0f; border-color: #3f6212; color: #ffffff; }
.top-action-btn.top-btn-tone-2,
.top-action-btn.top-btn-tone-inv { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.top-action-btn.top-btn-tone-3,
.top-action-btn.top-btn-tone-rep { background: #4d7c0f; border-color: #3f6212; color: #ffffff; }
.top-action-btn.top-btn-tone-4 { background: #f5f3ff; border-color: #c4b5fd; color: #6d28d9; }
.top-action-btn.top-btn-tone-logout { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* KPI Grid & Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

@media (max-width: 1100px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.kpi-label { font-size: 11px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-size: 22px; font-weight: 800; color: #0f172a; margin-top: 6px; }
.kpi-sub { font-size: 12px; color: #64748b; margin-top: 4px; }

/* Panels & Tables */
.panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.panel-title { font-size: 16px; font-weight: 800; color: #0f172a; }
.panel-sub { font-size: 12px; color: #64748b; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f1f5f9; font-size: 13px; vertical-align: middle; }
th { font-size: 11px; font-weight: 800; color: #64748b; text-transform: uppercase; background: #f8fafc; }

/* Inline Compact Item Thumbnail (Borderless, Aligned Beside Name) */
.med-thumb-inline {
    max-width: 52px;
    max-height: 34px;
    width: auto;
    height: auto;
    object-fit: contain;
    border: none;
    border-radius: 0;
    background: transparent;
    vertical-align: middle;
    margin-right: 10px;
}

.theme-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 12px 24px;
    font-size: 12px;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* ==========================================================================
   MODERN THIN LIGHT SIDEBAR SCROLLBAR (v83)
   ========================================================================== */
.ref-left-sidebar {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255, 255, 255, 0.34) transparent !important;
}

.ref-left-sidebar::-webkit-scrollbar {
    width: 5px !important;
    height: 5px !important;
}

.ref-left-sidebar::-webkit-scrollbar-track {
    background: transparent !important;
}

.ref-left-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.32) !important;
    border-radius: 999px !important;
    border: none !important;
}

.ref-left-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.52) !important;
}

.ref-left-sidebar::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* ==========================================================================
   SIDEBAR ADJUSTMENT & DROPDOWN-ONLY THIN LIGHT SCROLLBAR (v84)
   ========================================================================== */
@media (min-width: 861px) {
    .ref-left-sidebar {
        overflow-y: hidden !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    .ref-left-sidebar::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    .ref-left-sidebar.has-open-dropdown,
    .ref-left-sidebar:has(details.ref-tree-group[open]) {
        overflow-y: auto !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(255, 255, 255, 0.36) transparent !important;
        -ms-overflow-style: auto !important;
    }

    .ref-left-sidebar.has-open-dropdown::-webkit-scrollbar,
    .ref-left-sidebar:has(details.ref-tree-group[open])::-webkit-scrollbar {
        display: block !important;
        width: 5px !important;
        height: 5px !important;
    }

    .ref-left-sidebar.has-open-dropdown::-webkit-scrollbar-track,
    .ref-left-sidebar:has(details.ref-tree-group[open])::-webkit-scrollbar-track {
        background: transparent !important;
    }

    .ref-left-sidebar.has-open-dropdown::-webkit-scrollbar-thumb,
    .ref-left-sidebar:has(details.ref-tree-group[open])::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.34) !important;
        border-radius: 999px !important;
        border: none !important;
    }

    .ref-left-sidebar.has-open-dropdown::-webkit-scrollbar-thumb:hover,
    .ref-left-sidebar:has(details.ref-tree-group[open])::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.54) !important;
    }

    .ref-left-sidebar.has-open-dropdown::-webkit-scrollbar-button,
    .ref-left-sidebar:has(details.ref-tree-group[open])::-webkit-scrollbar-button {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}

/* Balanced sidebar spacing so items fit cleanly and expand smoothly on dropdown */
.ref-left-sidebar .ref-brand-card,
.ref-left-sidebar .ref-brand-card.ref-single-large-brand {
    min-height: 108px !important;
    padding: 8px 10px !important;
}

.ref-left-sidebar img.ref-brand-logo,
.ref-left-sidebar img.ref-brand-logo.ref-single-large-logo {
    max-height: 98px !important;
}

.ref-left-sidebar .ref-sidebar-tree {
    padding: 8px 10px 14px !important;
    gap: 2px !important;
}

.ref-left-sidebar .ref-tree-summary,
.ref-left-sidebar .ref-tree-leaf {
    padding: 8px 12px !important;
    font-size: 13.5px !important;
}

.ref-left-sidebar .ref-tree-children {
    margin: 2px 0 4px 0 !important;
    padding: 0 0 0 14px !important;
    gap: 1px !important;
}

.ref-left-sidebar .ref-tree-children a {
    padding: 6px 10px !important;
    font-size: 12.5px !important;
}

/* ==========================================================================
   FULL-WIDTH EDGE-TO-EDGE SIDEBAR BRAND LOGO (v85)
   ========================================================================== */
.ref-left-sidebar .ref-brand-card,
.ref-left-sidebar .ref-brand-card.ref-single-large-brand {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 2px 4px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 118px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.ref-left-sidebar .ref-brand-link,
.ref-left-sidebar .ref-brand-link.ref-single-large-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
}

.ref-left-sidebar img.ref-brand-logo,
.ref-left-sidebar img.ref-brand-logo.ref-single-large-logo {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 116px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* ==========================================================================
   AUTO-ADJUSTING FULL-WIDTH EDGE-TO-EDGE LOGO (ZERO WHITESPACE - v86)
   ========================================================================== */
.ref-left-sidebar .ref-brand-card,
.ref-left-sidebar .ref-brand-card.ref-single-large-brand {
    background: #ffffff !important;
    border: none !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.ref-left-sidebar .ref-brand-link,
.ref-left-sidebar .ref-brand-link.ref-single-large-link {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 0 !important;
}

.ref-left-sidebar img.ref-brand-logo,
.ref-left-sidebar img.ref-brand-logo.ref-single-large-logo {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* ==========================================================================
   SEAMLESS WHITE TOP BAND AT STARTUP & DISTINCT SCROLL SEPARATION (v87)
   ========================================================================== */
@media (min-width: 861px) {
    /* Unified white top band spanning from left edge (logo) to right corner at startup */
    body:not(.page-scrolled)::before { display: none !important; content: none !important; }

    /* Keep sidebar above or aligned cleanly without a vertical seam line at the top */
    .ref-left-sidebar {
        border-right: none !important;
        box-shadow: none !important;
        z-index: 1000 !important;
    }

    body.page-scrolled .ref-left-sidebar {
        border-right: 1px solid rgba(15, 23, 42, 0.12) !important;
        box-shadow: 2px 0 12px rgba(15, 23, 42, 0.08) !important;
    }

    /* Remove dividing line & border between logo and topbar at startup */
    .ref-left-sidebar .ref-brand-card,
    .ref-left-sidebar .ref-brand-card.ref-single-large-brand {
        background: #ffffff !important;
        border: none !important;
        border-bottom: none !important;
        box-shadow: none !important;
        position: relative;
        z-index: 1002;
    }

    .topbar.theme-header {
        position: relative;
        z-index: 1001;
        margin-left: 268px !important;
        width: calc(100% - 268px) !important;
        max-width: calc(100% - 268px) !important;
        background: #ffffff !important;
        border: none !important;
        border-left: none !important;
        border-bottom: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        transition: box-shadow 0.2s ease, border-color 0.2s ease;
    }

    /* When scrolled, separate cleanly into two distinct parts */
    body.page-scrolled .topbar.theme-header {
        border-bottom: 1px solid #e2e8f0 !important;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
    }

    body.page-scrolled .ref-left-sidebar .ref-brand-card,
    body.page-scrolled .ref-left-sidebar .ref-brand-card.ref-single-large-brand {
        border-bottom: 1px solid #e2e8f0 !important;
    }
}

/* ==========================================================================
   PREVENT TEXT CLIPPING / TRUNCATION ACROSS BUTTONS, INPUTS & LABELS (v89)
   ========================================================================== */
.top-action-btn {
    width: auto !important;
    min-width: 96px !important;
    max-width: none !important;
    padding: 8px 14px !important;
    overflow: visible !important;
}

.top-action-btn .top-btn-label {
    white-space: nowrap !important;
    text-overflow: clip !important;
    overflow: visible !important;
    max-width: none !important;
}

input[type="text"],
input[type="search"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
    max-width: 100% !important;
    text-overflow: clip !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.panel-title,
.brand-title,
label,
.left-field-label,
th,
td {
    text-overflow: clip !important;
    overflow: visible !important;
}

/* ==========================================================================
   FULL UNCLIPPED VISIBILITY FOR "BARCODE SCAN & ADD MEDICINE TO BILL" (v90)
   ========================================================================== */
.pos-workspace-grid,
.pos-forms-stack,
.panel,
.panel-header,
.panel-title {
    overflow: visible !important;
}

.panel-header {
    display: block !important;
    padding-top: 2px !important;
    margin-bottom: 14px !important;
}

.panel-title {
    display: block !important;
    font-size: 19px !important;
    line-height: 1.35 !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 !important;
    padding: 2px 0 !important;
    white-space: normal !important;
    text-overflow: clip !important;
}

/* ==========================================================================
   GUARANTEED FULL VISIBILITY OF "BARCODE SCAN & ADD MEDICINE TO BILL" (v91)
   ========================================================================== */
body:not(.page-scrolled)::before,
body::before {
    display: none !important;
    content: none !important;
}

.theme-main.workspace-content {
    position: relative !important;
    z-index: 1 !important;
    padding-top: 28px !important;
    overflow: visible !important;
}

.pos-workspace-grid,
.pos-forms-stack,
.pos-forms-stack .panel,
.pos-forms-stack .panel-header,
.pos-forms-stack .panel-title {
    position: relative !important;
    z-index: 2 !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
}

.pos-forms-stack .panel {
    margin-top: 0 !important;
    padding-top: 24px !important;
}

.pos-forms-stack .panel-header {
    display: block !important;
    margin-top: 0 !important;
    padding-top: 4px !important;
    padding-bottom: 12px !important;
    margin-bottom: 16px !important;
}

.pos-forms-stack .panel-title {
    display: block !important;
    font-size: 20px !important;
    line-height: 1.4 !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
}

/* ==========================================================================
   SKU EXPIRY COLOR CODING: RED FOR EXPIRED, GRAY FOR NEAR EXPIRY (v93)
   ========================================================================== */
.sku-expired,
.sku-expired a,
a.sku-expired {
    color: #dc2626 !important;
    font-weight: 700 !important;
}

.sku-near-expiry,
.sku-near-expiry a,
a.sku-near-expiry {
    color: #64748b !important;
    font-weight: 700 !important;
}

/* ==========================================================================
   REDESIGNED POS WORKSPACE LAYOUT MATCHING SAMPLE STRUCTURE (v94)
   ========================================================================== */
.pos-sample-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.52fr) minmax(320px, 410px) !important;
    gap: 18px !important;
    align-items: start !important;
}

.pos-left-col,
.pos-right-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    min-width: 0 !important;
}

.pos-checkout-stack {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.pos-sample-card {
    background: #ffffff !important;
    border: 1px solid #dbe4ee !important;
    border-radius: 12px !important;
    padding: 16px 18px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

.pos-sample-card-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 12px !important;
}

.pos-sample-card-title {
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.pos-urdu-sub {
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #475569 !important;
}

.pos-urdu-inline {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #64748b !important;
}

.pos-urdu-tiny {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    line-height: 1.2 !important;
}

.pos-search-bar-row {
    display: flex !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
}

.pos-search-input-wrap {
    position: relative !important;
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
}

.pos-search-leading-icon {
    position: absolute !important;
    left: 12px !important;
    color: #64748b !important;
    pointer-events: none !important;
    font-size: 14px !important;
}

.pos-search-bar-row input#barcode_query {
    width: 100% !important;
    padding: 10px 14px 10px 36px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 13.5px !important;
    background: #ffffff !important;
    color: #0f172a !important;
}

.pos-barcode-icon-btn {
    width: 44px !important;
    min-width: 44px !important;
    height: 40px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    font-size: 18px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.pos-selector-strip {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 115px !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
    align-items: end !important;
}

.pos-mini-label {
    display: block !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    margin-bottom: 4px !important;
}

.pos-med-detail-card {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 12px 14px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    margin-bottom: 14px !important;
}

.pos-med-thumb-box {
    width: 78px !important;
    height: 78px !important;
    flex: 0 0 78px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.pos-med-thumb-box img {
    max-width: 72px !important;
    max-height: 72px !important;
    object-fit: contain !important;
}

.pos-med-placeholder-txt {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #64748b !important;
}

.pos-med-meta-col {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.pos-med-title-line {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin-bottom: 3px !important;
}

.pos-med-name-strong {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.pos-fefo-pill {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #15803d !important;
    background: #dcfce7 !important;
    padding: 2px 8px !important;
    border-radius: 999px !important;
}

.pos-med-code-line,
.pos-med-rates-line {
    font-size: 12.5px !important;
    color: #334155 !important;
    margin-bottom: 3px !important;
}

.pos-rate-sep {
    color: #94a3b8 !important;
    margin: 0 4px !important;
}

.pos-med-batch-line {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin-top: 5px !important;
}

.pos-batch-chip,
.pos-expiry-chip {
    font-size: 11.5px !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    background: #fef3c7 !important;
    color: #92400e !important;
    font-weight: 600 !important;
}

.pos-stock-box {
    text-align: right !important;
    flex: 0 0 auto !important;
}

.pos-stock-num {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.pos-unit-qty-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) !important;
    gap: 14px !important;
    margin-bottom: 14px !important;
    align-items: start !important;
}

.pos-field-heading {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 6px !important;
}

.pos-unit-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

.pos-unit-btn {
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    border-radius: 7px !important;
    padding: 6px 10px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    min-width: 72px !important;
    transition: all 0.15s ease !important;
}

.pos-unit-btn .pos-unit-main {
    font-size: 12px !important;
    font-weight: 700 !important;
}

.pos-unit-btn.is-active {
    background: #16a34a !important;
    border-color: #15803d !important;
    color: #ffffff !important;
}

.pos-unit-btn.is-active .pos-urdu-tiny {
    color: #dcfce7 !important;
}

.pos-stepper-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.pos-step-btn,
.pos-preset-btn {
    height: 36px !important;
    padding: 0 11px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 7px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.pos-qty-readout {
    min-width: 34px !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.pos-primary-actions-row {
    display: grid !important;
    grid-template-columns: 1.35fr 1fr 0.72fr !important;
    gap: 10px !important;
}

.pos-btn-add-cart {
    background: #16a34a !important;
    color: #ffffff !important;
    border: 1px solid #15803d !important;
    border-radius: 8px !important;
    padding: 9px 12px !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.pos-btn-scan-add {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1.5px solid #94a3b8 !important;
    border-radius: 8px !important;
    padding: 9px 12px !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.pos-btn-clear-sel {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 9px 12px !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.pos-btn-en {
    font-size: 13px !important;
    font-weight: 800 !important;
}

.pos-btn-ur {
    font-size: 11px !important;
    font-weight: 600 !important;
    opacity: 0.9 !important;
}

.pos-cart-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin-bottom: 10px !important;
}

.pos-cart-top-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.pos-btn-clear-cart {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #b91c1c !important;
    border-radius: 7px !important;
    padding: 6px 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.pos-btn-hold-sale {
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    color: #15803d !important;
    border-radius: 7px !important;
    padding: 6px 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.pos-cart-table-wrap {
    overflow-x: auto !important;
}

.pos-cart-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 12.5px !important;
}

.pos-cart-table th {
    background: #f8fafc !important;
    color: #334155 !important;
    font-weight: 700 !important;
    padding: 8px 6px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    text-align: left !important;
}

.pos-cart-table td {
    padding: 8px 6px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
}

.pos-urdu-th {
    display: block !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    color: #64748b !important;
}

.pos-cart-med-cell {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.pos-cart-med-thumb {
    width: 34px !important;
    height: 34px !important;
    object-fit: contain !important;
    border-radius: 5px !important;
    background: #f8fafc !important;
}

.pos-cart-med-name {
    font-weight: 700 !important;
    color: #0f172a !important;
}

.pos-cart-med-sku {
    font-size: 11px !important;
    color: #64748b !important;
}

.pos-batch-pill {
    background: #dcfce7 !important;
    color: #166534 !important;
    padding: 2px 6px !important;
    border-radius: 5px !important;
    font-weight: 700 !important;
    font-size: 11.5px !important;
}

.pos-mini-stepper {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.pos-row-qty-btn {
    width: 22px !important;
    height: 22px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.pos-row-qty-val {
    min-width: 18px !important;
    text-align: center !important;
    font-weight: 700 !important;
}

.pos-row-amt {
    font-weight: 700 !important;
    color: #0f172a !important;
}

.pos-row-actions {
    display: inline-flex !important;
    gap: 4px !important;
}

.pos-row-edit-btn,
.pos-row-del-btn {
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    border-radius: 5px !important;
    padding: 3px 6px !important;
    cursor: pointer !important;
    font-size: 12px !important;
}

.pos-empty-cart-td {
    text-align: center !important;
    padding: 20px 10px !important;
    color: #64748b !important;
}

.pos-right-field {
    margin-bottom: 12px !important;
}

.pos-right-label {
    display: block !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 4px !important;
}

.pos-customer-input-row {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
}

.pos-icon-input-box {
    position: relative !important;
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
}

.pos-input-prefix-icon {
    position: absolute !important;
    left: 10px !important;
    color: #64748b !important;
    pointer-events: none !important;
    font-size: 13px !important;
}

.pos-icon-input-box input,
.pos-icon-input-box select {
    width: 100% !important;
    padding: 8px 10px 8px 32px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 7px !important;
    font-size: 13px !important;
    background: #ffffff !important;
    color: #0f172a !important;
}

.pos-plus-square-btn {
    width: 36px !important;
    height: 36px !important;
    flex: 0 0 36px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 7px !important;
    background: #f8fafc !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.pos-summary-rows {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.pos-summary-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.pos-sum-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
}

.pos-sum-val {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.pos-sum-minus {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #dc2626 !important;
}

.pos-summary-right-ctrl {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.pos-pct-box {
    position: relative !important;
    width: 78px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.pos-pct-box input {
    width: 100% !important;
    padding: 5px 22px 5px 8px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    text-align: right !important;
}

.pos-pct-icon {
    position: absolute !important;
    right: 6px !important;
    font-size: 11px !important;
    color: #64748b !important;
    pointer-events: none !important;
}

.pos-grand-total-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 0 14px 0 !important;
}

.pos-grand-label {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.pos-grand-val {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #15803d !important;
}

.pos-complete-sale-btn {
    width: 100% !important;
    background: #16a34a !important;
    border: 1px solid #15803d !important;
    color: #ffffff !important;
    border-radius: 9px !important;
    padding: 11px 14px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.pos-sale-icon {
    font-size: 20px !important;
}

.pos-sale-txt-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    flex: 1 1 auto !important;
}

.pos-sale-en {
    font-size: 14px !important;
    font-weight: 800 !important;
}

.pos-sale-ur {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #dcfce7 !important;
}

.pos-sale-chev {
    font-size: 18px !important;
    font-weight: 800 !important;
}

@media (max-width: 1024px) {
    .pos-sample-grid {
        grid-template-columns: 1fr !important;
    }
    .pos-unit-qty-grid {
        grid-template-columns: 1fr !important;
    }
    .pos-primary-actions-row {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   POS WORKSPACE FIT & ZERO RIGHT-EDGE CLIPPING FIX (v95)
   ========================================================================== */
.theme-main.workspace-content,
.pos-workspace-grid.pos-sample-grid,
.pos-left-col,
.pos-right-col,
.pos-sample-card,
.pos-checkout-stack {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.pos-workspace-grid.pos-sample-grid {
    grid-template-columns: minmax(0, 1.38fr) minmax(285px, 360px) !important;
    gap: 14px !important;
}

.pos-sample-card {
    padding: 14px 15px !important;
}

.pos-unit-qty-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(210px, 1fr) !important;
    gap: 12px !important;
}

.pos-unit-pills {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
}

.pos-unit-btn {
    min-width: 0 !important;
    width: 100% !important;
    padding: 6px 6px !important;
}

.pos-primary-actions-row {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, 0.72fr) !important;
    gap: 8px !important;
}

@media (max-width: 1180px) {
    .pos-workspace-grid.pos-sample-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 720px) {
    .pos-unit-pills {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .pos-unit-qty-grid,
    .pos-selector-strip,
    .pos-primary-actions-row {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   POS INPUT PREFIX ICON SPACING FIX - NO OVERLAP OVER TEXT (v98)
   ========================================================================== */
.pos-icon-input-box {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.pos-icon-input-box .pos-input-prefix-icon {
    position: absolute !important;
    left: 11px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    line-height: 1 !important;
    color: #475569 !important;
    pointer-events: none !important;
    z-index: 2 !important;
}

.pos-icon-input-box input,
.pos-icon-input-box select {
    width: 100% !important;
    padding: 9px 12px 9px 38px !important;
    text-indent: 0 !important;
    box-sizing: border-box !important;
}

.pos-search-input-wrap .pos-search-leading-icon {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    line-height: 1 !important;
    pointer-events: none !important;
    z-index: 2 !important;
}

.pos-search-input-wrap input#barcode_query {
    padding: 10px 14px 10px 38px !important;
    text-indent: 0 !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   POS ICONS PLACED OUTSIDE TEXT BOXES (v99)
   ========================================================================== */
.pos-search-bar-row,
.pos-customer-input-row,
.pos-outside-field-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.pos-outside-icon {
    position: static !important;
    transform: none !important;
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    line-height: 1 !important;
    color: #334155 !important;
    flex: 0 0 24px !important;
}

.pos-icon-input-box input,
.pos-icon-input-box select,
.pos-search-input-wrap input#barcode_query {
    padding: 9px 12px !important;
}

/* ==========================================================================
   LIVE CAMERA SCANNER AT TOP OF RIGHT COLUMN (v100)
   ========================================================================== */
.pos-right-col > #posWebcamCard {
    order: -1 !important;
    margin-top: 0 !important;
    margin-bottom: 14px !important;
}

/* Clean sample theme sizing: single-line English labels, compact buttons & clean KPI cards */
body { font-size: 13.5px !important; }
table th { font-size: 12px !important; }
table td { font-size: 13px !important; }
.panel-title { font-size: 16px !important; }
.kpi-grid { gap: 12px !important; }
.kpi-card { padding: 12px 14px !important; }
.kpi-label { font-size: 11px !important; font-weight: 800 !important; line-height: 1.25 !important; letter-spacing: 0.02em !important; }
.kpi-label .uf-bi-label { display: flex !important; flex-direction: column !important; gap: 2px !important; font-size: 11px !important; line-height: 1.25 !important; }
.kpi-label .uf-bi-en { white-space: nowrap !important; font-size: 11px !important; font-weight: 800 !important; }
.kpi-label .uf-bi-ur { white-space: nowrap !important; font-size: 12.5px !important; font-weight: 700 !important; line-height: 1.25 !important; }
.kpi-value { font-size: 22px !important; font-weight: 800 !important; line-height: 1.15 !important; margin-top: 6px !important; white-space: nowrap !important; }
.kpi-sub { font-size: 11.5px !important; line-height: 1.3 !important; margin-top: 4px !important; }
.ref-tree-summary, .ref-tree-leaf { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 6px !important; padding: 8px 10px !important; font-size: 13px !important; overflow: hidden !important; }
.ref-tree-label { flex: 1 1 auto !important; min-width: 0 !important; }
.uf-sb-row-bi { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 6px !important; width: 100% !important; min-width: 0 !important; }
.uf-sb-en-side { white-space: nowrap !important; font-weight: 700 !important; font-size: 12.5px !important; min-width: 0 !important; overflow: hidden !important; text-overflow: ellipsis !important; }
.uf-sb-ur-side { flex: 0 0 auto !important; margin-left: auto !important; font-size: 13px !important; font-weight: 700 !important; line-height: 1.2 !important; white-space: nowrap !important; text-align: right !important; unicode-bidi: isolate; }
.ref-tree-children a { display: flex !important; align-items: center !important; padding: 6px 8px !important; font-size: 12.5px !important; }
a.top-action-btn.top-square-btn { min-width: 64px !important; min-height: 48px !important; padding: 4px 8px !important; gap: 2px !important; }
.top-btn-sym.top-sq-sym { width: 20px !important; height: 20px !important; font-size: 12px !important; }
a.top-action-btn.top-square-btn .top-btn-label { max-width: none !important; white-space: nowrap !important; overflow: visible !important; font-size: 11px !important; }
.uf-bi-label { display: inline-flex; flex-direction: column; line-height: 1.2; gap: 1px; }
.uf-bi-en { white-space: nowrap !important; font-size: 12px !important; font-weight: 700 !important; }
.uf-bi-ur { white-space: nowrap !important; font-size: 12.5px !important; font-weight: 700 !important; line-height: 1.2 !important; unicode-bidi: isolate; }
.btn-primary, .btn-secondary, button[type="submit"] { padding: 5px 10px !important; font-size: 12px !important; }
.pill.pill-danger, .pill-danger, .pill.pill-expired, .pill-expired { background: #fee2e2 !important; color: #b91c1c !important; border: 1px solid #fca5a5 !important; font-size: 11.5px !important; font-weight: 700 !important; }

/* Fold only side menu tree; keep brand logo constantly in place */
.app-shell.uf-menu-folded .ref-sidebar-tree { display: none !important; }
.app-shell.uf-menu-folded .ref-brand-card { display: block !important; }
.uf-menu-fold-link { display: inline-flex !important; align-items: center !important; justify-content: center !important; cursor: pointer !important; text-decoration: none !important; }
@media (min-width: 861px) {
    .app-shell.uf-menu-folded .ref-left-sidebar { position: static !important; width: auto !important; min-width: 0 !important; max-width: 268px !important; height: auto !important; bottom: auto !important; z-index: 2 !important; overflow: visible !important; background: transparent !important; border-right: none !important; box-shadow: none !important; padding: 12px 24px 0 !important; }
    .app-shell.uf-menu-folded .topbar.theme-header, .app-shell.uf-menu-folded .theme-main.workspace-content, .app-shell.uf-menu-folded .theme-footer { margin-left: 0 !important; width: 100% !important; max-width: 100% !important; }
}

/* Top dropdown navigation & dashboard-only side menu without side button */
.uf-side-menu-bar,
.uf-side-menu-trigger,
.uf-menu-fold-link {
    display: none !important;
}

.app-shell:not(.is-dashboard-page) .ref-left-sidebar,
.app-shell.uf-menu-folded .ref-left-sidebar {
    display: none !important;
}

.app-shell:not(.is-dashboard-page) .topbar.theme-header,
.app-shell:not(.is-dashboard-page) .theme-main.workspace-content,
.app-shell:not(.is-dashboard-page) .workspace-content,
.app-shell:not(.is-dashboard-page) .theme-footer,
.app-shell.uf-menu-folded .topbar.theme-header,
.app-shell.uf-menu-folded .theme-main.workspace-content,
.app-shell.uf-menu-folded .workspace-content,
.app-shell.uf-menu-folded .theme-footer {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.app-shell,
.topbar.theme-header,
.workspace-body,
.theme-main.workspace-content,
.theme-footer {
    direction: ltr !important;
    text-align: left !important;
}

.uf-header-top-logo-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    text-decoration: none !important;
    margin-right: 12px !important;
}

.uf-header-top-logo {
    width: auto !important;
    max-width: none !important;
    height: 76px !important;
    max-height: 76px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    object-fit: contain !important;
    display: block !important;
    background: #ffffff !important;
    padding: 2px 4px !important;
    border-radius: 6px !important;
}

.app-shell:not(.is-dashboard-page) .topbar.theme-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 16px 10px !important;
}

.header-top-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    direction: ltr !important;
}

.header-top-row .brand-left {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    direction: ltr !important;
}

.header-main-menubar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    padding: 3px 8px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
    direction: ltr !important;
    overflow: visible !important;
}

.uf-top-dropdown-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    width: 100% !important;
    overflow: visible !important;
    direction: ltr !important;
}

.uf-top-dd-group {
    position: relative !important;
    flex: 0 0 auto !important;
    direction: ltr !important;
}

.uf-top-dd-trigger {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    padding: 5px 8px !important;
    border-radius: 6px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #0f172a !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: background 0.14s ease, color 0.14s ease !important;
    direction: ltr !important;
}

.uf-top-dd-trigger:hover,
.uf-top-dd-group:hover .uf-top-dd-trigger,
.uf-top-dd-trigger.is-active {
    background: #ecfdf5 !important;
    color: #14532d !important;
    box-shadow: inset 0 -2px 0 #16a34a !important;
}

.uf-dd-ico {
    font-size: 12px !important;
    color: #15803d !important;
    line-height: 1 !important;
}

.uf-dd-label {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    direction: ltr !important;
}

.uf-dd-en {
    color: inherit !important;
}

.uf-dd-ur {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    unicode-bidi: isolate !important;
}

.uf-top-dd-trigger:hover .uf-dd-ur,
.uf-top-dd-group:hover .uf-top-dd-trigger .uf-dd-ur,
.uf-top-dd-trigger.is-active .uf-dd-ur {
    color: #166534 !important;
}

.uf-dd-caret {
    font-size: 9.5px !important;
    color: #64748b !important;
    margin-left: 1px !important;
}

.uf-top-dd-menu {
    display: none;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    min-width: 270px !important;
    margin-top: 4px !important;
    padding: 6px !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16) !important;
    z-index: 3500 !important;
    direction: ltr !important;
    text-align: left !important;
}

.uf-top-dd-group:last-child .uf-top-dd-menu,
.uf-top-dd-group:nth-last-child(2) .uf-top-dd-menu {
    left: auto !important;
    right: 0 !important;
}

.uf-top-dd-group:hover .uf-top-dd-menu,
.uf-top-dd-group:focus-within .uf-top-dd-menu {
    display: block !important;
}

.uf-top-dd-menu a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 7px 10px !important;
    border-radius: 6px !important;
    color: #0f172a !important;
    text-decoration: none !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    direction: ltr !important;
    text-align: left !important;
}

.uf-top-dd-menu a:hover,
.uf-top-dd-menu a.is-sub-current {
    background: #ecfdf5 !important;
    color: #14532d !important;
    font-weight: 600 !important;
}

.uf-dd-sub-en {
    text-align: left !important;
}

.uf-dd-sub-ur {
    font-size: 11px !important;
    color: #64748b !important;
    unicode-bidi: isolate !important;
}

.uf-dd-parent-link {
    border-bottom: 1px solid #e2e8f0 !important;
    margin-bottom: 4px !important;
    padding-bottom: 8px !important;
    font-weight: 700 !important;
    color: #14532d !important;
}

/* Match reference dashboard layout: single-line action buttons, two-line heading, full sidebar & KPI spacing */
.uf-hero-title {
    display: block;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.uf-hero-subtitle {
    display: block;
    margin-top: 4px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
}

.app-shell.is-dashboard-page .topbar.theme-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    flex-wrap: nowrap !important;
}

.app-shell.is-dashboard-page .top-action-bar,
.app-shell.is-dashboard-page .nav-links.top-action-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

.app-shell.is-dashboard-page .top-square-btn {
    min-width: 96px !important;
    padding: 8px 10px !important;
    flex-shrink: 0 !important;
}

.ref-left-sidebar.uf-dashboard-sidebar {
    width: 274px !important;
    min-width: 274px !important;
    max-width: 274px !important;
}

.ref-sidebar-tree .ref-tree-label,
.ref-sidebar-tree .uf-sb-en-side,
.ref-sidebar-tree .uf-sb-ur-side {
    white-space: nowrap !important;
}

.kpi-grid .kpi-card {
    overflow: hidden !important;
    min-width: 0 !important;
}

.kpi-grid .kpi-card .kpi-sub,
.kpi-grid .kpi-card .kpi-title,
.kpi-grid .kpi-card [lang="ur"] {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Match required subpage header layout: stacked title/subtitle/badge, single-row top action buttons & tall logo */
.uf-header-badge-row {
    display: block;
    margin-top: 4px;
}

.app-shell.is-subpage .uf-header-top-logo {
    height: 92px !important;
    max-height: 92px !important;
}

.app-shell.is-subpage .brand-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
}

.app-shell.is-subpage .uf-hero-title {
    font-size: 28px !important;
    font-weight: 800 !important;
    line-height: 1.05 !important;
    letter-spacing: -0.02em !important;
    color: #0f172a !important;
}

.app-shell.is-subpage .uf-hero-subtitle {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-top: 2px !important;
    color: #0f172a !important;
}

.app-shell.is-subpage .meta-line {
    display: none !important;
}

.app-shell.is-subpage .header-top-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

.app-shell.is-subpage .top-action-bar,
.app-shell.is-subpage .nav-links.top-action-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
}

.app-shell.is-subpage a.top-action-btn.top-square-btn {
    min-width: 78px !important;
    min-height: 76px !important;
    padding: 6px 8px !important;
    gap: 3px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
}

.app-shell.is-subpage a.top-action-btn.top-square-btn .top-btn-label {
    font-size: 11px !important;
    line-height: 1.15 !important;
}

/* Tighten vertical distance between page sections on subpages as shown in 2nd reference image */
.app-shell.is-subpage .topbar.theme-header {
    padding-bottom: 6px !important;
    margin-bottom: 0 !important;
    gap: 6px !important;
}

.app-shell.is-subpage .workspace-body,
.app-shell.is-subpage .workspace-content,
.app-shell.is-subpage .theme-main.workspace-content {
    padding-top: 8px !important;
    padding-bottom: 10px !important;
    gap: 8px !important;
}

.app-shell.is-subpage .theme-main.workspace-content > * + *,
.app-shell.is-subpage .workspace-content > * + *,
.app-shell.is-subpage .card + .card,
.app-shell.is-subpage section + section {
    margin-top: 8px !important;
}

.app-shell.is-subpage .card,
.app-shell.is-subpage .panel,
.app-shell.is-subpage .section-card {
    margin-bottom: 8px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}
