html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root{
    --er-bg: #f3f5f9;
    --er-card-bg: #ffffff;
    --er-text: #1f2a37;
    --er-muted: #6b7280;
    --er-primary: #5b6bff;
    --er-sidebar-bg: #ffffff;
    --er-sidebar-text: #6b7280;
    --er-sidebar-active-bg: #e9ecff;
    --er-border: #e5e7eb;
    --er-radius: 14px;
}

html, body{
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    background: var(--er-bg);
    color: var(--er-text);
}

.er-sidebar-toggle{
    position: fixed;
    left: -10000px;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
}

#er-sidebar-toggle:checked ~ .page .er-item-icon{
    display: none;
}

#er-sidebar-toggle:checked ~ .page .er-icon{
    width: 18px;
    height: 18px;
    color: #6b7280;
}

#er-sidebar-toggle:checked ~ .page .er-hamburger{
    width: 40px;
    height: 40px;
}

.er-shell > .page{
    min-height: 100vh;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
}

.er-shell > .page > main{
    flex: 1 1 auto;
    min-width: 0;
}

.er-shell > .page > main{
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: visible;
}

.er-shell > .page > main > .top-row{
    position: sticky;
    top: 0;
    z-index: 3000;
    flex: 0 0 auto;
}

.er-shell > .page > main > article.content{
    flex: 1 1 auto;
    overflow: auto;
}

.er-shell > .page > .sidebar{
    width: 270px;
    flex: 0 0 270px;
    height: 100vh;
    position: relative;
    z-index: 10;
    overflow: auto;
}

/* Sidebar collapsed state (toggle) */
.er-shell #er-sidebar-toggle:checked ~ .page > .sidebar{
    width: 56px !important;
    flex: 0 0 56px !important;
}

.er-shell #er-sidebar-toggle:checked ~ .page .er-store-meta,
.er-shell #er-sidebar-toggle:checked ~ .page .er-chevron,
.er-shell #er-sidebar-toggle:checked ~ .page .er-side-search,
.er-shell #er-sidebar-toggle:checked ~ .page .er-item-text,
.er-shell #er-sidebar-toggle:checked ~ .page .er-parent-chevron,
.er-shell #er-sidebar-toggle:checked ~ .page .er-children{
    display: none !important;
}

.er-shell #er-sidebar-toggle:checked ~ .page .er-store-dd{
    display: none !important;
}

.er-shell #er-sidebar-toggle:checked ~ .page .er-side-header{
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.er-shell #er-sidebar-toggle:checked ~ .page .er-hamburger{
    display: flex;
}

.er-shell #er-sidebar-toggle:checked ~ .page .er-item,
.er-shell #er-sidebar-toggle:checked ~ .page .er-parent{
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.er-shell #er-sidebar-toggle:checked ~ .page .er-nav{
    padding-left: 6px;
    padding-right: 6px;
}

@media (max-width: 640.98px){
    .er-shell > .page{
        flex-direction: column !important;
    }

    .er-shell > .page > .sidebar{
        width: 100%;
        flex-basis: auto;
        height: auto;
    }
}

.sidebar{
    background: var(--er-sidebar-bg) !important;
    border-right: 1px solid var(--er-border);
    transition: width .2s ease;
}

.nav-scrollable{
    padding-bottom: 14px;
}

.nav-scrollable{
    height: 100%;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.er-side-header{
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--er-sidebar-bg) !important;
}

#blazor-error-ui{
    display: none !important;
}

.er-pos-layout{
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    min-height: 0;
    background: #eef3fb;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.er-pos-shell{
    height: 100%;
    min-height: 0;
    padding: 6px;
    box-sizing: border-box;
    font-size: 13px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 8px;
    overflow: hidden;
}

.er-pos-shell,
.er-pos-shell *{
    font-weight: 400 !important;
}

.er-pos-shell strong{
    font-weight: 400 !important;
}

.er-pos-shell .form-control,
.er-pos-shell .form-select,
.er-pos-shell button{
    font-size: 13px;
}

.er-pos-header{
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    padding: 6px;
    display: grid;
    grid-template-columns: 460px 1fr 360px;
    gap: 8px;
    align-items: center;
}

.er-pos-header-leftpanel{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.er-pos-hdr-select{
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    width: 100%;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    padding: 0 10px;
    background: #ffffff;
}

.er-pos-header-search{
    min-width: 0;
    position: relative;
}

.er-pos-header-right{
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
}

.er-pos-hdr-input{
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    width: 100%;
    min-width: 0;
}

.er-pos-hdr-text{
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.er-pos-hdr-icon{
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: #94a3b8;
    flex: 0 0 auto;
}

.er-pos-hdr-select .er-pos-store-select{
    border: 0;
    background: transparent;
    height: 38px;
    padding-left: 0;
    font-weight: 700;
    color: #0f172a;
}

.er-pos-hdr-select .er-pos-store-select:focus{
    box-shadow: none;
}

.er-pos-search-ico{
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: #94a3b8;
}

.er-pos-search-input{
    height: 40px;
    padding-left: 44px;
    border-radius: 12px;
}

.er-pos-fn-btn{
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 0;
    color: #fff;
    position: relative;
    display: grid;
    place-items: center;
}

.er-pos-fn-svg{
    width: 24px;
    height: 24px;
    display: block;
    fill: currentColor;
    stroke: none;
}

.er-pos-fn-ico{
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: rgba(255,255,255,.95);
}

.er-pos-fn-btn-blue{ background: #4f7cff; }
.er-pos-fn-btn-pink{ background: #ff5b8f; }
.er-pos-fn-btn-indigo{ background: #5468ff; }
.er-pos-fn-btn-green{ background: #22c55e; }
.er-pos-fn-btn-teal{ background: #10b981; }
.er-pos-fn-btn-purple{ background: #7c3aed; }
.er-pos-fn-btn-slate{ background: #64748b; }
.er-pos-fn-btn-violet{ background: #6366f1; }

.er-pos-lock-wrap{
    position: relative;
}

.er-pos-dropdown-backdrop{
    position: fixed;
    inset: 0;
    z-index: 1040;
}

.er-pos-dropdown-menu{
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    min-width: 180px;
    background: var(--er-card-bg);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    border: 1px solid var(--er-border);
    z-index: 1050;
    padding: 6px 0;
}

.er-pos-dropdown-item{
    display: block;
    width: 100%;
    padding: 10px 14px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--er-text);
}

.er-pos-dropdown-item:hover{
    background: var(--er-sidebar-active-bg);
}

.er-pos-body{
    min-height: 0;
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 10px;
    height: 100%;
    overflow: hidden;
}

.er-pos-left,
.er-pos-right{
    min-height: 0;
    height: 100%;
}

.er-pos-cart{
    height: 100%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.er-pos-cart-top{
    padding: 10px;
    display: grid;
    gap: 10px;
}

.er-pos-top-row{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.er-pos-top-row-2{
    grid-template-columns: 1fr 1fr;
}

.er-pos-input{
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    color: #0f172a;
    font-weight: 700;
    font-size: 14px;
    width: 100%;
}

.er-pos-input-select{
    padding: 0 10px;
}

.er-pos-input-select .er-pos-store-select{
    border: 0;
    background: transparent;
    height: 38px;
    padding-left: 0;
    font-weight: 700;
    color: #0f172a;
}

.er-pos-input-select .er-pos-store-select:focus{
    box-shadow: none;
}

.er-pos-input-icon{
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: #94a3b8;
    flex: 0 0 auto;
}

.er-pos-input-text{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.er-pos-input-action{
    width: 44px;
    height: 40px;
    border-radius: 12px;
    border: 0;
    background: #4f46e5;
    display: grid;
    place-items: center;
}

.er-pos-input-action-icon{
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: rgba(255,255,255,.9);
}

.er-pos-cart-header{
    padding: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.er-pos-pill{
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 13px;
    height: 38px;
}

.er-pos-pill-muted{
    background: #f1f5f9;
    color: #334155;
}

.er-pos-cart-table{
    padding: 8px;
    flex: 1 1 auto;
    overflow: auto;
    min-height: clamp(180px, 32vh, 320px);
}

.er-pos-cart-head{
    display: grid;
    grid-template-columns: 1.3fr .55fr .6fr .8fr;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: .03em;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.er-pos-cart-empty{
    padding: 14px 0;
    color: #64748b;
    font-weight: 600;
    text-align: center;
}

.er-pos-cart-row{
    display: grid;
    grid-template-columns: 1.3fr .55fr .6fr .8fr;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.er-pos-cart-prod{
    min-width: 0;
}

.er-pos-cart-img,
.er-pos-cart-img-placeholder{
    width: 50px;
    height: 50px;
    min-width: 50px;
    max-width: 50px;
    max-height: 50px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.er-pos-cart-img-placeholder{
    background: rgba(148, 163, 184, 0.2);
    display: block;
}

.er-pos-cart-prod-name{
    font-weight: 800;
    color: #0f172a;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.er-pos-cart-prod-meta{
    margin-top: 4px;
}

.er-pos-cart-sku{
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.12);
    color: #4f46e5;
}

.er-pos-cart-qty{
    display: grid;
    grid-template-columns: 26px 1fr 26px;
    gap: 4px;
    justify-content: end;
    align-items: center;
}

.er-pos-qty-btn{
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 0;
    background: #e6e9ff;
    color: #4f46e5;
    font-weight: 900;
    line-height: 1;
}

.er-pos-qty-val{
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #0f172a;
    background: rgba(148, 163, 184, 0.14);
}

.er-pos-qty-input{
    width: 56px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: #ffffff;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    padding: 0 4px;
}

.er-pos-qty-input:focus{
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    border-color: rgba(79, 70, 229, 0.55);
}

.er-pos-cart-price,
.er-pos-cart-sub{
    font-weight: 800;
    color: #0f172a;
    font-size: 12px;
}

.er-pos-cart-sub{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.er-pos-cart-del{
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 0;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    display: grid;
    place-items: center;
    font-size: 14px;
}

.er-pos-totals{
    padding: 8px;
    background: #fff;
}

/* Customer display (popup) */
.er-pos-cd-shell{
    padding: 10px;
}

.er-pos-cd-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.er-pos-cd-title{
    font-weight: 800;
    color: #0f172a;
}

.er-pos-cd-time{
    font-size: 12px;
    color: #64748b;
}

.er-pos-cd-body{
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.er-pos-cd-left,
.er-pos-cd-right{
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 10px;
}

.er-pos-cd-customer{
    font-weight: 700;
    margin-bottom: 8px;
}

.er-pos-cd-table{
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    overflow: hidden;
    margin-bottom: 10px;
}

.er-pos-cd-head{
    display: grid;
    grid-template-columns: 2fr 0.6fr 0.8fr 0.6fr 0.9fr;
    padding: 6px 10px;
    font-weight: 700;
    font-size: 12px;
    background: #f9fafb;
}

.er-pos-cd-empty{
    padding: 10px;
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
}

.er-pos-cd-summary-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 6px;
}

.er-pos-cd-summary-col{
    background: #f9fafb;
    border-radius: 8px;
    padding: 8px 10px;
}

.er-pos-cd-summary-row{
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
}

.er-pos-cd-summary-total strong{
    color: #16a34a;
}

.er-pos-cd-footer-row{
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 6px;
}

.er-pos-cd-footer-cell{
    background: #e5e7eb;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
}

.er-pos-cd-footer-cell strong{
    display: block;
    margin-top: 2px;
}

.er-pos-cd-right{
    display: flex;
    align-items: center;
    justify-content: center;
}

.er-pos-cd-banner{
    width: 100%;
    height: 100%;
    min-height: 260px;
    border-radius: 10px;
    background: #d3a15b;
    position: relative;
    overflow: hidden;
}

.er-pos-cd-banner-tag{
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 6px 12px;
    background: #111827;
    color: #fff;
    font-weight: 800;
    border-radius: 6px;
}

.er-pos-cd-banner-circle{
    position: absolute;
    left: 24px;
    bottom: 70px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
}

.er-pos-cd-banner-label{
    position: absolute;
    right: 18px;
    bottom: 24px;
    padding: 8px 18px;
    background: #111827;
    color: #fff;
    font-weight: 800;
    border-radius: 999px;
}

.er-pos-field-row{
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.er-pos-input-group{
    display: grid;
    grid-template-columns: 1fr 46px;
    gap: 10px;
    align-items: center;
}

.er-pos-input-group-main{
    height: 40px;
}

.er-pos-input-group-suffix{
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #64748b;
}

.er-pos-bottom-grid{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: start;
}

.er-pos-bottom-left{
    min-width: 0;
}

.er-pos-half-input{
    height: 40px;
    width: 50%;
    min-width: 160px;
    max-width: 220px;
}

/* Center-align numeric totals inputs (tax, discount, shipping) */
.er-pos-bottom-left input[type="number"]{
    text-align: center;
}

.er-pos-field-row .form-control,
.er-pos-search-input,
.er-pos-store-select{
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.er-pos-field label{
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
}

.er-pos-discount{
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.er-pos-discount-options{
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: nowrap;
}

.er-pos-field-inline{
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.er-pos-field-inline-label{
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin: 0;
    line-height: 1.2;
}

.er-pos-field-inline-control{
    min-width: 0;
}

.er-pos-tax-control{
    max-width: 220px; /* match discount input max */
    grid-template-columns: 1fr 34px; /* tighter % button */
    gap: 6px;
    justify-self: start;
}

.er-pos-tax-control .er-pos-input-group-suffix{
    width: 34px;
}

.er-pos-discount-options-compact{
    margin-left: 70px; /* align under the discount input */
    gap: 12px;
}

.er-pos-discount-label{
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
}

.er-pos-radio{
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #334155;
    font-weight: 600;
}

.er-pos-radio input[type="radio"]{
    accent-color: #4f46e5;
}

.er-pos-summary{
    display: grid;
    gap: 6px;
    margin: 10px 0;
}

@media (max-width: 900px){
    .er-pos-bottom-grid{ grid-template-columns: 1fr; }
    .er-pos-half-input{ width: 100%; max-width: none; }
    .er-pos-field-inline{ grid-template-columns: 80px 1fr; }
    .er-pos-discount-options-compact{ margin-left: 0; }
}

.er-pos-summary-row{
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    font-weight: 700;
    color: #0f172a;
    font-size: 12px;
}

.er-pos-summary-row span{
    color: #64748b;
    font-weight: 700;
}

.er-pos-sub strong{
    color: #4f46e5;
}

.er-pos-total strong{
    color: #16a34a;
}

.er-pos-actions{
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 8px;
}

.er-pos-btn{
    border: 0;
    border-radius: 10px;
    padding: 12px 12px;
    font-weight: 700;
    color: #fff;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.er-pos-btn-ico{
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    display: block;
}

.er-pos-btn-hold{ background: #ff5c93; }
.er-pos-btn-reset{ background: #ff244e; }
.er-pos-btn-pay{ background: #22c55e; }

.er-pos-modal-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: grid;
    place-items: center;
    z-index: 1000;
    padding: 16px;
}

.er-pos-modal{
    width: min(520px, 100%);
    max-height: min(70vh, 560px);
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
}

.er-pos-modal-header{
    padding: 12px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.er-pos-modal-title{
    font-weight: 900;
    color: #0f172a;
}

.er-pos-modal-close{
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    font-size: 20px;
    line-height: 1;
}

.er-pos-modal-body{
    padding: 10px;
    overflow: auto;
    display: grid;
    gap: 8px;
}

.er-pos-modal-footer{
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--er-border);
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

.er-pos-modal-item{
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
    text-align: left;
}

.er-pos-modal-item-name{
    font-weight: 800;
    color: #0f172a;
}

/* Hold List modal */
.er-pos-modal-holdlist .er-pos-modal-body{
    display: block;
    max-height: 60vh;
    overflow: auto;
}

.er-pos-holdlist-table{
    width: 100%;
    border-collapse: collapse;
}

.er-pos-holdlist-head{
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr auto;
    gap: 8px;
    padding: 8px 10px;
    font-weight: 700;
    font-size: 12px;
    color: #0f172a;
    background: #f8fafc;
    border-radius: 8px 8px 0 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-bottom: none;
}

.er-pos-holdlist-empty{
    padding: 24px 10px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0 0 8px 8px;
}

.er-pos-holdlist-row{
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr auto;
    gap: 8px;
    padding: 10px 10px;
    align-items: center;
    font-size: 13px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-top: none;
}

.er-pos-holdlist-row:last-child{
    border-radius: 0 0 8px 8px;
}

/* Recent Sales modal */
.er-pos-modal-recentsales{
    width: min(90vw, 900px);
    max-height: 85vh;
}

.er-pos-modal-recentsales .er-pos-modal-body{
    display: block;
    overflow: auto;
    max-height: 70vh;
}

.er-pos-recentsales-loading{
    padding: 24px;
    text-align: center;
    color: #64748b;
}

.er-pos-recentsales-table{
    width: 100%;
}

.er-pos-recentsales-head{
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr 0.9fr 0.9fr 0.8fr 56px;
    gap: 8px;
    padding: 8px 10px;
    font-weight: 700;
    font-size: 12px;
    color: #0f172a;
    background: #f8fafc;
    border-radius: 8px 8px 0 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-bottom: none;
}

.er-pos-recentsales-row{
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr 0.9fr 0.9fr 0.8fr 56px;
    gap: 8px;
    padding: 8px 10px;
    align-items: center;
    font-size: 13px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-top: none;
}

.er-pos-recentsales-row:last-child{
    border-radius: 0 0 8px 8px;
}

.er-pos-status{
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.er-pos-status-paid{
    background: #dcfce7;
    color: #166534;
}

.er-pos-status-unpaid{
    background: #fee2e2;
    color: #991b1b;
}

.er-pos-status-partial{
    background: #fef3c7;
    color: #92400e;
}

.er-pos-payment-type{
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #dbeafe;
    color: #1e40af;
}

.er-pos-action-btn{
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.er-pos-action-btn:hover{
    background: #f1f5f9;
}

.er-pos-recentsales-loadmore{
    margin-top: 12px;
    text-align: center;
}

/* Register Details & Close Register modals */
.er-pos-modal-register,
.er-pos-modal-close-register{
    width: min(90vw, 420px);
}

.er-pos-modal-register .er-pos-modal-body,
.er-pos-modal-close-register .er-pos-modal-body{
    display: block;
}

.er-pos-register-table{
    width: 100%;
    border: 1px solid var(--er-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.er-pos-register-head{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 13px;
    color: var(--er-text);
    background: #f8fafc;
}

.er-pos-register-row{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    border-top: 1px solid var(--er-border);
}

.er-pos-register-totals{
    margin-bottom: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--er-border);
}

.er-pos-register-total-row{
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
    font-weight: 600;
}

.er-pos-register-total-amount{
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--er-border);
    font-weight: 700;
    font-size: 15px;
}

.er-pos-close-register-form{
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--er-border);
}

.er-pos-form-group{
    margin-bottom: 12px;
}

.er-pos-form-group label{
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--er-text);
}

.er-pos-form-group .form-control{
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--er-border);
    font-size: 14px;
}

/* Payment modal */
.er-pos-modal-payment{
    width: min(96vw, 900px);
}

.er-pos-modal-payment .er-pos-modal-body{
    display: block;
}

.er-pos-payment-layout{
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
    gap: 16px;
}

.er-pos-payment-two{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.er-pos-payment-method-row{
    display: flex;
    gap: 6px;
    align-items: center;
}

.er-pos-payment-add button,
.er-pos-payment-remove{
    width: 42px;
}

.er-pos-payment-summary{
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    font-size: 13px;
}

.er-pos-payment-row{
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.er-pos-payment-row-header{
    padding-bottom: 8px;
    border-bottom: 1px solid var(--er-border);
    margin-bottom: 4px;
    font-weight: 600;
}

.er-pos-payment-products{
    display: inline-flex;
    min-width: 40px;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #4f46e5;
    color: #fff;
    font-weight: 700;
}

.er-pos-payment-row-strong{
    font-weight: 700;
    border-top: 1px solid var(--er-border);
    margin-top: 4px;
    padding-top: 6px;
}

/* Calculator modal */
.er-pos-modal-calculator{
    width: min(90vw, 280px);
}

.er-pos-modal-calculator .er-pos-modal-body{
    display: block;
    padding: 12px;
}

.er-pos-calc-display{
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 600;
    text-align: right;
    background: #f1f5f9;
    border: 1px solid var(--er-border);
    border-radius: 10px;
    color: var(--er-text);
    box-sizing: border-box;
}

.er-pos-calc-buttons{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.er-pos-calc-btn{
    height: 48px;
    border-radius: 10px;
    border: 1px solid var(--er-border);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: var(--er-text);
}

.er-pos-calc-btn:hover{
    background: #f1f5f9;
}

.er-pos-calc-btn-num{
    background: #fff;
}

.er-pos-calc-btn-op{
    background: #e9ecff;
    color: var(--er-primary);
}

.er-pos-calc-btn-op:hover{
    background: #dde1ff;
}

.er-pos-calc-btn-eq{
    background: var(--er-primary);
    color: #fff;
    border-color: var(--er-primary);
}

.er-pos-calc-btn-eq:hover{
    background: #4a5bef;
}

/* Variant selection modal */
.er-pos-modal-variants .er-pos-modal-body{
    max-height: 70vh;
}

.er-pos-variant-list{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.er-pos-variant-item{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.er-pos-variant-item:hover{
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.35);
}

.er-pos-variant-item-img,
.er-pos-variant-item-img-placeholder{
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.er-pos-variant-item-img-placeholder{
    background: rgba(148, 163, 184, 0.2);
    display: block;
}

.er-pos-variant-item-info{
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.er-pos-variant-item-label{
    font-weight: 700;
    color: #0f172a;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.er-pos-variant-item-price{
    font-weight: 800;
    color: #4f46e5;
    font-size: 12px;
}

.er-pos-right{
    background: transparent;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

.er-pos-browser{
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    padding: 8px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.er-pos-icon-btn{
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 0;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.35);
    position: relative;
}

.er-pos-bubble{
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #4f46e5;
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    display: grid;
    place-items: center;
    padding: 0 6px;
    border: 2px solid #eef3fb;
}

.er-pos-ico{
    display: block;
    width: 18px;
    height: 18px;
    margin: 0 auto;
    background: #64748b;
    border-radius: 4px;
}

.er-pos-search-input{
    height: 40px;
}

.er-pos-tabs{
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 6px;
    flex: 0 0 auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
}

.er-pos-tabs::-webkit-scrollbar{
    width: 0;
    height: 0;
}

.er-pos-tabs.er-pos-dragging{
    cursor: grabbing;
}

.er-pos-tab{
    border: 0;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 11px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.9);
    color: #334155;
    border: 1px solid rgba(148, 163, 184, 0.35);
    white-space: nowrap;
}

.er-pos-tab.er-active{
    background: #4f46e5;
    color: #fff;
    border-color: transparent;
}

.er-pos-tabs-secondary .er-pos-tab{
    font-weight: 700;
}

.er-pos-grid{
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    align-content: start;
    padding-right: 2px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: max-content;
    align-items: start;
    gap: 8px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-x;
}

.er-pos-grid.er-pos-dragging{
    cursor: grabbing;
}

.er-pos-card{
    position: relative;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.35);
    overflow: hidden;
    padding: 0;
    text-align: left;
    min-height: 132px;
}

.er-pos-badge{
    position: absolute;
    top: 8px;
    left: 8px;
    background: #4f46e5;
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
}

/* Fixed square image area in product card - same size regardless of image */
.er-pos-card-img-wrap{
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.er-pos-card-img-wrap .er-pos-img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.er-pos-card-img-wrap .er-pos-img-placeholder{
    width: 100%;
    height: 100%;
    min-height: 100%;
    background: rgba(148, 163, 184, 0.2);
    display: block;
}

/* Product card image (direct child of card - original design) */
.er-pos-card > .er-pos-img{
    width: 100%;
    height: 84px;
    object-fit: cover;
    display: block;
}

.er-pos-card > .er-pos-img-placeholder{
    width: 100%;
    height: 84px;
    background: rgba(148, 163, 184, 0.2);
    display: block;
}

.er-pos-img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.er-pos-img-placeholder{
    width: 100%;
    aspect-ratio: 1;
    background: rgba(148, 163, 184, 0.2);
    display: block;
}

.er-pos-card-body{
    padding: 8px;
}

.er-pos-name{
    font-weight: 800;
    color: #0f172a;
    font-size: 12px;
}

.er-pos-sku{
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    margin-top: 2px;
}

@media (max-width: 1200px){
    .er-pos-header{
        grid-template-columns: 360px 1fr 320px;
    }
    .er-pos-grid{
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px){
    .er-pos-shell{ height: auto; }
    .er-pos-header{ grid-template-columns: 1fr; }
    .er-pos-body{ grid-template-columns: 1fr; }
    .er-pos-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: 280px;
    }
}

.er-side-header{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 10px;
}

 .er-store-dd{
     position: relative;
     flex: 1;
 }

 .er-store-dd > summary{
     list-style: none;
 }

 .er-store-dd > summary::-webkit-details-marker{ display:none; }

 .er-store-dd[open] .er-chevron{
     transform: rotate(180deg);
 }

 .er-store-menu{
     position: absolute;
     left: 0;
     top: calc(100% + 8px);
     width: 220px;
     background: #fff;
     border: 1px solid var(--er-border);
     border-radius: 12px;
     box-shadow: 0 20px 40px rgba(17,24,39,.12);
     padding: 8px;
     z-index: 2000;
 }

 .er-store-item{
     width: 100%;
     display: flex;
     align-items: center;
     gap: 10px;
     border: 0;
     background: transparent;
     padding: 8px 10px;
     border-radius: 10px;
     font-size: 14px;
     color: #374151;
 }

 .er-store-item:hover{
     background: rgba(17,24,39,.05);
 }

 .er-store-item.er-active{
     color: #2b3cff;
 }

 .er-store-radio{
     width: 10px;
     height: 10px;
     border-radius: 999px;
     border: 2px solid #cbd5e1;
     display: inline-block;
 }

 .er-store-radio.er-checked{
     border-color: #2b3cff;
     box-shadow: inset 0 0 0 3px #2b3cff;
 }

.er-store-btn{
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
}

.er-store-icon{
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.er-store-meta{
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.er-store-label{
    font-size: 11px;
    color: var(--er-muted);
    font-weight: 500;
}

.er-store-name{
    font-size: 13px;
    font-weight: 600;
    color: var(--er-primary);
}

.er-chevron{
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #9ca3af;
    margin-left: 6px;
}

.er-hamburger{
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
}

.er-hamburger:hover{
    background: rgba(17,24,39,.06);
}

.er-hamburger span{
    width: 16px;
    height: 2px;
    background: #6b7280;
    border-radius: 2px;
}

.er-side-search{
    padding: 0 14px 12px;
}

.er-search{
    height: 34px;
    border-radius: 8px;
    font-size: 15px;
}

.er-nav{
    padding: 0 10px 14px;
}

.er-item,
.er-parent{
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-size: 15px;
    font-weight: 500;
}

button.er-parent{
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}

button.er-parent:focus{
    outline: none;
}

.er-icon{
    width: 16px;
    height: 16px;
    color: #6b7280;
    flex: 0 0 16px;
    display: inline-block;
}

.er-item.active .er-icon,
.er-child.active .er-icon,
.er-item:hover .er-icon,
.er-parent:hover .er-icon{
    color: #2b3cff;
}

.er-item:hover,
.er-parent:hover{
    background: rgba(17,24,39,.05);
}

.er-item.active{
    background: var(--er-sidebar-active-bg);
    color: #2b3cff;
}

.er-item-icon{
    display: none;
}

.er-item-text{
    flex: 1;
}

.er-group{
    border: 0;
    margin: 2px 0;
}

.er-group > summary{
    list-style: none;
    cursor: pointer;
}

.er-group > summary::-webkit-details-marker{ display:none; }

.er-parent-chevron{
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid #9ca3af;
    opacity: .9;
}

.er-group[open] .er-parent-chevron{
    transform: rotate(90deg);
}

.er-parent[aria-expanded="true"] .er-parent-chevron{
    transform: rotate(90deg);
}

.er-children{
    padding: 2px 0 6px 26px;
    display: grid;
    gap: 2px;
}

.er-child{
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--er-sidebar-text);
    font-size: 15px;
}

.er-child:hover{
    background: rgba(17,24,39,.05);
    color: #374151;
}

.er-child.active{
    background: var(--er-sidebar-active-bg);
    color: #2b3cff;
}

/* RTL: nav parent and item layout */
html[dir="rtl"] .er-nav .er-item,
html[dir="rtl"] .er-nav .er-parent{
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] button.er-parent{
    text-align: right;
}

/* RTL: parent chevron points left when collapsed, down when expanded */
html[dir="rtl"] .er-parent-chevron{
    border-left: 5px solid transparent;
    border-right: 6px solid #9ca3af;
}

html[dir="rtl"] .er-parent[aria-expanded="true"] .er-parent-chevron,
html[dir="rtl"] .er-group[open] .er-parent-chevron{
    transform: rotate(-90deg);
}

/* RTL: indent children from the start (right side in RTL) */
html[dir="rtl"] .er-children{
    padding: 2px 26px 6px 0;
}

main{
    background: var(--er-bg);
}

.top-row{
    background: #ffffff !important;
    border-bottom: 1px solid var(--er-border) !important;
    box-shadow: 0 1px 0 rgba(0,0,0,.02);
}

.er-topbar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 3.5rem;
}

.er-topbar-left{
    display: flex;
    align-items: center;
    gap: 12px;
}

 .er-add-dd{
     position: relative;
 }

 .er-add-dd > summary{
     list-style: none;
 }

 .er-add-dd > summary::-webkit-details-marker{ display:none; }

 .er-add-menu{
     position: absolute;
     left: 0;
     top: calc(100% + 10px);
     width: 190px;
     background: #fff;
     border: 1px solid var(--er-border);
     border-radius: 12px;
     box-shadow: 0 20px 40px rgba(17,24,39,.12);
     padding: 8px;
     z-index: 2000;
 }

 html[dir="rtl"] .er-add-menu{
     left: auto;
     right: 0;
 }

 .er-add-item{
     display: flex;
     align-items: center;
     gap: 10px;
     padding: 8px 10px;
     border-radius: 10px;
     text-decoration: none;
     color: #374151;
     font-weight: 500;
     font-size: 14px;
 }

 html[dir="rtl"] .er-add-menu .er-add-item{
     width: 100%;
     justify-content: flex-end;
 }

 html[dir="rtl"] .er-add-menu .er-add-item > .er-add-bullet{
     order: 2;
 }

 html[dir="rtl"] .er-add-menu .er-add-item > span:last-child{
     order: 1;
     flex: 1 1 auto;
     text-align: right;
 }

 .er-add-item:hover{
     background: rgba(17,24,39,.05);
 }

 .er-add-bullet{
     width: 14px;
     height: 14px;
     border-radius: 3px;
     background: #16a34a;
     position: relative;
     flex: 0 0 14px;
 }

 .er-add-bullet::before,
 .er-add-bullet::after{
     content: "";
     position: absolute;
     background: #fff;
     left: 50%;
     top: 50%;
     transform: translate(-50%, -50%);
 }

 .er-add-bullet::before{
     width: 8px;
     height: 2px;
 }

 .er-add-bullet::after{
     width: 2px;
     height: 8px;
 }

.er-topbar-add{
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: var(--er-primary);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.er-topbar-title{
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.er-topbar-right{
    display: flex;
    align-items: center;
    gap: 10px;
}

 .er-user-dd{
     position: relative;
 }

 .er-user-dd > summary{
     list-style: none;
 }

 .er-user-dd > summary::-webkit-details-marker{ display:none; }

 .er-user-trigger{
     display: inline-flex;
     align-items: center;
     gap: 8px;
     cursor: pointer;
 }

 .er-avatar{
     width: 32px;
     height: 32px;
     border-radius: 999px;
     background: #5b6bff;
     color: #fff;
     font-weight: 700;
     font-size: 13px;
     display: inline-flex;
     align-items: center;
     justify-content: center;
 }

 .er-user-name{
     font-size: 14px;
     font-weight: 600;
     color: #374151;
 }

 .er-user-caret{
     width: 0;
     height: 0;
     border-left: 5px solid transparent;
     border-right: 5px solid transparent;
     border-top: 6px solid #9ca3af;
 }

 .er-user-dd[open] .er-user-caret{
     transform: rotate(180deg);
 }

 .er-user-menu{
     position: absolute;
     right: 0;
     top: calc(100% + 10px);
     width: 260px;
     background: #fff;
     border: 1px solid var(--er-border);
     border-radius: 14px;
     box-shadow: 0 24px 50px rgba(17,24,39,.14);
     overflow: hidden;
     z-index: 2000;
 }

 html[dir="rtl"] .er-user-menu{
     left: 0;
     right: auto;
 }

 .er-user-card{
     padding: 16px;
     text-align: center;
     border-bottom: 1px solid var(--er-border);
 }

 .er-user-card-avatar{
     width: 56px;
     height: 56px;
     border-radius: 999px;
     margin: 0 auto 10px;
     background: #5b6bff;
     color: #fff;
     font-weight: 800;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .er-user-card-name{
     font-weight: 700;
     color: #111827;
 }

 .er-user-card-email{
     font-size: 12px;
     color: var(--er-muted);
     margin-top: 2px;
 }

 .er-user-item{
     display: flex;
     align-items: center;
     gap: 10px;
     padding: 10px 14px;
     text-decoration: none;
     color: #374151;
     font-weight: 500;
     font-size: 14px;
 }

 button.er-user-item{
     width: 100%;
     background: transparent;
     border: 0;
     text-align: left;
     cursor: pointer;
     font-family: inherit;
 }

 html[dir="rtl"] button.er-user-item{
     text-align: right;
 }

 .er-user-item:hover{
     background: rgba(17,24,39,.05);
 }

 .er-user-icon{
     width: 18px;
     height: 18px;
     color: #6b7280;
 }

.er-topbar-time{
    font-size: 14px;
    color: var(--er-muted);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}

 html[dir="rtl"] .er-topbar-time{
    align-items: flex-start;
 }

 .er-topbar-date{
    font-size: 12px;
 }

 .er-topbar-clock{
    font-size: 14px;
    color: #111827;
 }

.er-chip{
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #2b3cff;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .05s ease;
}

.er-chip:focus-visible{
    outline: none;
    box-shadow: 0 0 0 3px rgba(43,60,255,.22);
}

.er-chip-pos{
    height: 34px;
    padding: 0 14px;
    background: var(--er-primary);
    color: #fff;
    box-shadow: 0 10px 22px rgba(17,24,39,.12);
}

.er-chip-pos:hover{
    background: #2435ff;
    color: #fff;
    box-shadow: 0 14px 28px rgba(17,24,39,.16);
}

.er-chip-pos:active{
    transform: translateY(1px);
    box-shadow: 0 8px 18px rgba(17,24,39,.14);
}

html[dir="rtl"] .er-chip-pos{
    letter-spacing: 0;
}

.er-user{
    font-size: 14px;
    color: #374151;
    font-weight: 600;
}

.content{
    padding-top: 18px !important;
}

.er-page{
    max-width: 1320px;
}

.er-page-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.er-page-title{
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.er-page-subtitle{
    color: var(--er-muted);
    font-size: 13px;
    margin-top: 3px;
}

.er-stats-grid{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

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

@media (max-width: 576px){
    .er-stats-grid{
        grid-template-columns: 1fr;
    }
}

.er-stat-card{
    background: var(--er-card-bg);
    border: 1px solid var(--er-border);
    border-radius: var(--er-radius);
    padding: 14px 16px;
}

.er-stat-label{
    color: var(--er-muted);
    font-size: 12px;
    font-weight: 500;
}

.er-stat-value{
    font-size: 22px;
    font-weight: 600;
    margin-top: 6px;
}

/* Dashboard (InfyPOS-style) */
.er-dash{ max-width: 1320px; }
.er-dash-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}
.er-dash-title{ font-size: 22px; font-weight: 600; margin: 0; }
.er-dash-subtitle{ color: var(--er-muted); font-size: 13px; margin-top: 3px; }
.er-dash-kpi{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 1200px){ .er-dash-kpi{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px){ .er-dash-kpi{ grid-template-columns: 1fr; } }
.er-dash-kpi-card{
    border-radius: 12px;
    padding: 18px 20px;
    color: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 90px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.er-dash-kpi-card .er-dash-kpi-label{ font-size: 12px; font-weight: 500; opacity: .95; }
.er-dash-kpi-card .er-dash-kpi-value{ font-size: 22px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; }
.er-dash-kpi-icon{ width: 44px; height: 44px; opacity: .9; flex-shrink: 0; }
.er-dash-kpi-card--sales{ background: linear-gradient(135deg, #6eb5e8 0%, #4caf50 100%); }
.er-dash-kpi-card--purchases{ background: linear-gradient(135deg, #9c27b0 0%, #e91e63 100%); }
.er-dash-kpi-card--sales-returns{ background: linear-gradient(135deg, #ff9800 0%, #f44336 100%); }
.er-dash-kpi-card--purchases-returns{ background: linear-gradient(135deg, #e91e63 0%, #673ab7 100%); }
.er-dash-kpi-card--today-sales{ background: linear-gradient(135deg, #ff6b9d 0%, #ff9800 100%); }
.er-dash-kpi-card--today-received{ background: linear-gradient(135deg, #66bb6a 0%, #2e7d32 100%); }
.er-dash-kpi-card--today-purchases{ background: linear-gradient(135deg, #f44336 0%, #512da8 100%); }
.er-dash-kpi-card--today-expense{ background: linear-gradient(135deg, #ec407a 0%, #7b1fa2 100%); }

.er-dash-charts{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
@media (max-width: 992px){ .er-dash-charts{ grid-template-columns: 1fr; } }
.er-dash-chart-card{
    background: var(--er-card-bg);
    border: 1px solid var(--er-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.er-dash-chart-title{ font-weight: 600; font-size: 15px; margin-bottom: 16px; color: var(--er-text); }
.er-dash-bar-wrap{ display: flex; align-items: flex-end; gap: 8px; height: 200px; padding: 10px 0; }
.er-dash-bar-group{ flex: 1; display: flex; gap: 4px; align-items: flex-end; justify-content: center; min-height: 40px; }
.er-dash-bar{ border-radius: 6px 6px 0 0; min-height: 4px; transition: height .2s ease; }
.er-dash-bar--sales{ background: linear-gradient(180deg, #6eb5e8 0%, #42a5f5 100%); }
.er-dash-bar--purchases{ background: linear-gradient(180deg, #81c784 0%, #66bb6a 100%); }
.er-dash-bar-legend{ display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--er-muted); }
.er-dash-bar-legend span{ display: inline-flex; align-items: center; gap: 6px; }
.er-dash-bar-legend .er-dash-legend-dot{ width: 10px; height: 10px; border-radius: 3px; }
.er-dash-pie-wrap{ display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.er-dash-pie-placeholder{ width: 160px; height: 160px; border-radius: 50%; background: conic-gradient(#42a5f5 0deg 120deg, #66bb6a 120deg 200deg, #ffb74d 200deg 280deg, #ef5350 280deg 360deg); flex-shrink: 0; }
.er-dash-pie-legend{ list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--er-text); }
.er-dash-pie-legend li{ display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.er-dash-pie-legend .er-dash-legend-dot{ width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.er-dash-section{ margin-bottom: 24px; }
.er-dash-table-card{
    background: var(--er-card-bg);
    border: 1px solid var(--er-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.er-dash-table-card .er-dash-chart-title{ padding: 16px 20px 0; margin-bottom: 12px; }
.er-dash-table{ width: 100%; border-collapse: collapse; font-size: 13px; }
.er-dash-table th{ text-align: left; padding: 12px 20px; background: #f8f9fa; color: var(--er-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.er-dash-table td{ padding: 12px 20px; border-top: 1px solid var(--er-border); color: var(--er-text); }
.er-dash-table tbody tr:hover{ background: #fafafa; }
.er-dash-pill{ display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.er-dash-pill--green{ background: #e8f5e9; color: #2e7d32; }
.er-dash-pill--orange{ background: #fff3e0; color: #e65100; }
.er-dash-pill--blue{ background: #e3f2fd; color: #1565c0; }
.er-dash-pill--red{ background: #ffebee; color: #c62828; }

.er-card{
    background: var(--er-card-bg);
    border: 1px solid var(--er-border);
    border-radius: var(--er-radius);
}

.er-card-header{
    padding: 14px 16px;
    border-bottom: 1px solid var(--er-border);
}

.er-card-title{
    font-weight: 600;
}

.er-card-subtitle{
    color: var(--er-muted);
    font-size: 12px;
    margin-top: 2px;
}

.er-card-body{
    padding: 16px;
}

/* List pages (Customers) */
.er-page-toolbar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--er-border);
    border-radius: 12px;
    margin-bottom: 14px;
}

.er-toolbar-left{
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.er-toolbar-right{
    display: flex;
    align-items: center;
    gap: 10px;
}

.er-searchbox{
    display: flex;
    align-items: center;
    gap: 8px;
    width: 260px;
}

.er-searchbox-icon{
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid #9ca3af;
    position: relative;
    display: inline-block;
}

.er-searchbox-icon::after{
    content: "";
    position: absolute;
    width: 7px;
    height: 2px;
    background: #9ca3af;
    right: -6px;
    bottom: -2px;
    transform: rotate(45deg);
    border-radius: 2px;
}

.er-searchbox-input{
    height: 36px;
    border-radius: 8px;
    font-size: 14px;
}

.er-btn{
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 14px;
}

.er-btn-primary{
    background: var(--er-primary);
    color: #fff;
    border: 1px solid var(--er-primary);
}

.er-btn-primary:hover{
    background: #4a5cff;
    border-color: #4a5cff;
    color: #fff;
}

.er-btn-light{
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    color: #2b3cff;
}

.er-btn-outline{
    background: transparent;
    border: 1px solid #93a0ff;
    color: #2b3cff;
}

.er-card-table{
    border-radius: 12px;
}

.er-table{
    font-size: 14px;
}

.er-table thead th{
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    border-bottom: 1px solid var(--er-border);
    background: #f9fafb;
    padding: 12px 14px;
}

.er-table tbody td{
    padding: 12px 14px;
    vertical-align: middle;
    border-top: 1px solid #f0f2f6;
}

.er-customer-name{
    font-weight: 600;
    color: #2b3cff;
}

.er-customer-sub{
    font-size: 12px;
    color: #6b7280;
}

.er-pill{
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    line-height: 1.1;
    text-align: center;
}
.er-pill-ref { background: #fee2e2; color: #b91c1c; }
.er-pill-success { background: #dcfce7; color: #166534; }
.er-pill-warning { background: #fef3c7; color: #92400e; }
.er-pill-danger { background: #fee2e2; color: #b91c1c; }
.er-pill-secondary { background: #f3f4f6; color: #4b5563; }

.er-row-actions{
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.er-action{
    text-decoration: none;
    font-size: 14px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eef2ff;
    color: #2b3cff;
}

.er-action:hover{
    background: #e0e7ff;
}

.er-action.er-danger{
    background: #fee2e2;
    color: #b91c1c;
}

.er-action.er-danger:hover{
    background: #fecaca;
}

/* Create Customer form */
.er-form-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.er-form-title{
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.er-card-form{
    border-radius: 12px;
}

.er-required{
    color: #ef4444;
    margin-left: 2px;
}

.er-form-actions{
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

/* Login */
.er-login{
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(91,107,255,.12), rgba(16,185,129,.08));
}

.er-login-card{
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--er-border);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(17,24,39,.12);
    padding: 22px;
}

.er-login-brand{
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.er-login-mark{
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(91,107,255,.25);
    flex: 0 0 44px;
}

.er-login-mark img{
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.er-login-brand-text{ min-width: 0; }

.er-login-app{
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
}

.er-login-subtitle{
    font-size: 13px;
    font-weight: 700;
    color: rgba(15,23,42,.62);
    margin-top: 2px;
}

.er-login-form{
    display: grid;
    gap: 12px;
}

.er-field{ display: grid; gap: 6px; }

.er-input{
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,.55);
    padding-left: 12px;
    padding-right: 12px;
}

.er-input:focus{
    border-color: rgba(91,107,255,.75);
    box-shadow: 0 0 0 0.2rem rgba(91,107,255,.18);
}

.er-login-btn{
    height: 44px;
    border-radius: 12px;
    font-weight: 700;
    margin-top: 4px;
}

.er-recaptcha-field{
    min-height: 78px;
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
}

html[dir="rtl"] .er-recaptcha-field{
    justify-content: flex-end;
}

html[dir="rtl"] .er-login-card{ text-align: right; }

.er-login-title{
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #111827;
}

.er-placeholder-chart{
    height: 280px;
    border-radius: 12px;
    border: 1px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--er-muted);
    background: #fafafa;
}

.er-quick-actions{
    display: grid;
    gap: 10px;
}

.er-quick-action{
    display: block;
    padding: 12px 12px;
    border: 1px solid var(--er-border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: #fff;
}

.er-quick-action:hover{
    border-color: rgba(101,113,255,.6);
    box-shadow: 0 10px 30px rgba(31,41,55,.07);
}

.er-quick-action-title{
    font-weight: 600;
}

.er-quick-action-desc{
    color: var(--er-muted);
    font-size: 12px;
    margin-top: 2px;
}

/* Toasts - above modals so they stay visible and not blurred */
.er-toast-host{
    position: fixed;
    right: 18px;
    top: 18px;
    display: grid;
    gap: 12px;
    z-index: 10000;
}

html[dir="rtl"] .er-toast-host{
    right: auto;
    left: 18px;
}

.er-toast{
    width: 360px;
    max-width: calc(100vw - 36px);
    border-radius: 14px;
    padding: 12px 12px;
    display: grid;
    grid-template-columns: 36px 1fr 32px;
    gap: 10px;
    align-items: start;
    color: #0f172a;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(15,23,42,.10);
    box-shadow: 0 18px 45px rgba(2,6,23,.18);
    backdrop-filter: blur(10px);
    transform: translateX(120%);
    animation: er-toast-in .28s cubic-bezier(.2,.9,.2,1) forwards;
}

html[dir="rtl"] .er-toast{
    transform: translateX(-120%);
    animation: er-toast-in-rtl .28s cubic-bezier(.2,.9,.2,1) forwards;
}

@keyframes er-toast-in{
    from{ transform: translateX(120%); opacity: 0; }
    to{ transform: translateX(0); opacity: 1; }
}

@keyframes er-toast-in-rtl{
    from{ transform: translateX(-120%); opacity: 0; }
    to{ transform: translateX(0); opacity: 1; }
}

.er-toast-icon{
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
    margin-top: 1px;
}

.er-toast-body{
    min-width: 0;
}

.er-toast-title{
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.1;
}

.er-toast-message{
    margin-top: 3px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(15,23,42,.78);
    line-height: 1.25;
    word-break: break-word;
}

.er-toast-close{
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 0;
    background: transparent;
    color: rgba(15,23,42,.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 2px;
}

.er-toast-close:hover{
    background: rgba(15,23,42,.06);
    color: rgba(15,23,42,.75);
}

.er-toast::after{
    content: "";
    grid-column: 1 / -1;
    height: 3px;
    border-radius: 999px;
    margin-top: 10px;
    background: rgba(15,23,42,.08);
    overflow: hidden;
}

.er-toast::before{
    content: "";
    position: absolute;
    width: calc(100% - 24px);
    left: 12px;
    bottom: 12px;
    height: 3px;
    border-radius: 999px;
    transform-origin: left;
    animation: er-toast-progress 5s linear forwards;
}

html[dir="rtl"] .er-toast::before{
    transform-origin: right;
}

@keyframes er-toast-progress{
    from{ transform: scaleX(1); }
    to{ transform: scaleX(0); }
}

.er-toast-success{
    border-left: 5px solid #16a34a;
}

.er-toast-error{
    border-left: 5px solid #dc2626;
}

.er-toast-warning{
    border-left: 5px solid #d97706;
}

.er-toast-info{
    border-left: 5px solid #0ea5e9;
}

 html[dir="rtl"] .er-toast-success,
 html[dir="rtl"] .er-toast-error,
 html[dir="rtl"] .er-toast-warning,
 html[dir="rtl"] .er-toast-info{
     border-left: 0;
     border-right-width: 5px;
     border-right-style: solid;
 }

 html[dir="rtl"] .er-toast-success{ border-right-color: #16a34a; }
 html[dir="rtl"] .er-toast-error{ border-right-color: #dc2626; }
 html[dir="rtl"] .er-toast-warning{ border-right-color: #d97706; }
 html[dir="rtl"] .er-toast-info{ border-right-color: #0ea5e9; }

.er-toast-success .er-toast-icon{ background: rgba(22,163,74,.14); color: #16a34a; }
.er-toast-error .er-toast-icon{ background: rgba(220,38,38,.14); color: #dc2626; }
.er-toast-warning .er-toast-icon{ background: rgba(217,119,6,.14); color: #d97706; }
.er-toast-info .er-toast-icon{ background: rgba(14,165,233,.14); color: #0ea5e9; }

.er-toast-success::before{ background: #16a34a; }
.er-toast-error::before{ background: #dc2626; }
.er-toast-warning::before{ background: #d97706; }
.er-toast-info::before{ background: #0ea5e9; }

 .er-btn-danger{
     background: #dc2626;
     border: 1px solid #dc2626;
     color: #fff;
 }

 .er-btn-danger:hover{
     background: #b91c1c;
     border-color: #b91c1c;
     color: #fff;
 }

 .er-grid-row{
     cursor: pointer;
     transition: background-color .12s ease-in-out;
 }

 .er-grid-row:hover{
     background: rgba(91, 107, 255, 0.06);
 }

 .er-grid-row:hover td{
     background: transparent;
 }

 .er-modal-backdrop {
     position: fixed;
     inset: 0;
     background: rgba(15, 23, 42, 0.55);
     backdrop-filter: blur(3px);
     z-index: 9999;
     display: flex;
     align-items: center;
     justify-content: center;
     padding: 16px;
 }

 .er-modal {
     width: 100%;
     max-width: 520px;
     background: rgba(255, 255, 255, 0.92);
     border: 1px solid rgba(148, 163, 184, 0.35);
     border-radius: 14px;
     box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
     overflow: hidden;
     animation: er-modal-in 160ms ease-out;
 }
 .er-modal.er-modal-lg {
     max-width: 900px;
 }

 .er-modal-header {
     display: flex;
     align-items: center;
     justify-content: space-between;
     padding: 14px 16px;
     border-bottom: 1px solid rgba(148, 163, 184, 0.25);
 }

 .er-modal-title {
     font-weight: 700;
     color: #0f172a;
 }

 .er-modal-close {
     border: none;
     background: transparent;
     color: #334155;
     font-size: 20px;
     line-height: 1;
     padding: 4px 8px;
     border-radius: 10px;
 }

 .er-modal-close:hover {
     background: rgba(148, 163, 184, 0.25);
 }

 .er-modal-body {
     padding: 14px 16px;
 }

 .er-modal-message {
     color: #334155;
 }

 .er-modal-footer {
     display: flex;
     justify-content: flex-end;
     gap: 10px;
     padding: 14px 16px;
     border-top: 1px solid rgba(148, 163, 184, 0.25);
 }

 @keyframes er-modal-in {
     from {
         transform: translateY(10px);
         opacity: 0;
     }
     to {
         transform: translateY(0);
         opacity: 1;
     }
 }

/* Modern SaaS Landing Page Styles */
.er-landing-modern {
    min-height: 100vh;
    background: #ffffff;
    color: #1f2937;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Navigation Bar Styles */
.er-navbar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.er-nav-menu-modern {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.er-nav-brand-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: #1f2937;
    text-decoration: none;
}

.er-nav-brand-modern i {
    color: #3b82f6;
    font-size: 1.6rem;
}

.er-nav-links-modern {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.er-nav-link-modern {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.er-nav-link-modern:hover,
.er-nav-link-modern.active {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.er-nav-actions-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
}

.er-language-selector-modern {
    position: relative;
}

.er-language-btn-modern {
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.er-language-btn-modern:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.er-language-dropdown-modern {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 8px 0;
    min-width: 150px;
}

.er-language-dropdown-modern .dropdown-item {
    color: #374151;
    padding: 8px 16px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.er-language-dropdown-modern .dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.er-nav-buttons-modern {
    display: flex;
    align-items: center;
    gap: 12px;
}

.er-nav-btn-ghost-modern {
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
}

.er-nav-btn-ghost-modern:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.er-nav-btn-primary-modern {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.er-nav-btn-primary-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    background: linear-gradient(45deg, #1d4ed8, #1e40af);
}

/* Mobile Navigation Styles */
@media (max-width: 991px) {
    .er-navbar-modern {
        padding: 12px 0;
    }
    
    .er-nav-menu-modern {
        flex-direction: column;
        gap: 1rem;
    }
    
    .er-nav-links-modern {
        display: none;
    }
    
    .er-nav-actions-modern {
        gap: 0.5rem;
    }
    
    .er-nav-buttons-modern {
        gap: 8px;
    }
    
    .er-language-btn-modern {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    .er-nav-btn-ghost-modern,
    .er-nav-btn-primary-modern {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .er-navbar-modern {
        padding: 10px 0;
    }
    
    .er-nav-brand-modern {
        font-size: 1.2rem;
    }
    
    .er-nav-brand-modern i {
        font-size: 1.4rem;
    }
    
    .er-nav-actions-modern {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .er-nav-buttons-modern {
        justify-content: center;
    }
}

.er-hero-modern {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

.er-hero-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.er-hero-content-modern {
    position: relative;
    z-index: 1;
}

.er-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #3b82f6;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.er-hero-title-modern {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #1f2937;
    letter-spacing: -0.025em;
}

.er-highlight-modern {
    background: linear-gradient(45deg, #3b82f6, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.er-hero-description-modern {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    color: #6b7280;
    max-width: 500px;
}

.er-hero-actions-modern {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.er-btn-primary-modern {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.er-btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(45deg, #1d4ed8, #1e40af);
}

.er-btn-ghost-modern {
    background: transparent;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 13px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
}

.er-btn-ghost-modern:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.er-hero-visual-modern {
    position: relative;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.er-app-preview-modern {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.er-app-preview-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 100px rgba(0, 0, 0, 0.15);
}

.er-app-header-modern {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.er-app-dots-modern {
    display: flex;
    gap: 8px;
}

.er-app-dots-modern span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
}

.er-app-dots-modern span:first-child {
    background: #ef4444;
}

.er-app-dots-modern span:nth-child(2) {
    background: #f59e0b;
}

.er-app-dots-modern span:last-child {
    background: #10b981;
}

.er-app-title-modern {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.er-app-content-modern {
    display: flex;
    height: 400px;
}

.er-app-sidebar-modern {
    width: 70px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-right: 1px solid #e5e7eb;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.er-app-nav-item-modern {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e5e7eb;
    transition: all 0.3s ease;
}

.er-app-nav-item-modern.active {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    transform: scale(1.1);
}

.er-app-main-modern {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.er-dashboard-cards-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.er-card-modern {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.er-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.er-card-primary::before {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
}

.er-card-success::before {
    background: linear-gradient(45deg, #10b981, #059669);
}

.er-card-info::before {
    background: linear-gradient(45deg, #06b6d4, #0891b2);
}

.er-card-warning::before {
    background: linear-gradient(45deg, #f59e0b, #d97706);
}

.er-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.er-card-icon-modern {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.er-card-primary .er-card-icon-modern {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    color: white;
}

.er-card-success .er-card-icon-modern {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
}

.er-card-info .er-card-icon-modern {
    background: linear-gradient(45deg, #06b6d4, #0891b2);
    color: white;
}

.er-card-warning .er-card-icon-modern {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    color: white;
}

.er-card-value-modern {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 4px;
}

.er-card-label-modern {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.er-chart-container-modern {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #f1f5f9;
    flex: 1;
}

.er-chart-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: #374151;
}

.er-chart-period-modern {
    font-size: 0.8rem;
    color: #6b7280;
    background: #f8fafc;
    padding: 4px 8px;
    border-radius: 6px;
}

.er-chart-placeholder-modern {
    height: 120px;
    position: relative;
}

.er-chart-svg-modern {
    width: 100%;
    height: 100%;
}

.er-features-modern {
    padding: 100px 0;
    background: #ffffff;
}

.er-section-title-modern {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -0.025em;
}

.er-section-subtitle-modern {
    font-size: 1.2rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto 3rem;
    text-align: center;
    line-height: 1.6;
}

.er-feature-card-modern {
    background: #ffffff;
    padding: 3rem 2.5rem;
    border-radius: 16px;
    text-align: center;
    height: 100%;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.er-feature-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #e5e7eb;
}

.er-feature-icon-modern {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.er-icon-primary {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
}

.er-icon-success {
    background: linear-gradient(45deg, #10b981, #059669);
}

.er-icon-info {
    background: linear-gradient(45deg, #06b6d4, #0891b2);
}

.er-icon-warning {
    background: linear-gradient(45deg, #f59e0b, #d97706);
}

.er-icon-purple {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
}

.er-icon-orange {
    background: linear-gradient(45deg, #f97316, #ea580c);
}

.er-feature-card-modern:hover .er-feature-icon-modern {
    transform: scale(1.1);
}

.er-feature-title-modern {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.er-feature-description-modern {
    color: #6b7280;
    line-height: 1.6;
    font-size: 1rem;
}

.er-cta-modern {
    padding: 100px 0;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.er-cta-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 70%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(16, 185, 129, 0.2) 0%, transparent 50%);
}

.er-cta-content-modern {
    position: relative;
    z-index: 1;
}

.er-cta-title-modern {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.er-cta-description-modern {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.er-btn-primary-large-modern {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 15px;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.er-btn-primary-large-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
    background: linear-gradient(45deg, #1d4ed8, #1e40af);
}

.er-btn-primary-large {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 15px;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.er-btn-primary-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
    background: linear-gradient(45deg, #7c8cf5, #8a5bb8);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .er-hero-refined {
        padding: 80px 0 60px;
        text-align: center;
    }
    
    .er-hero-title-refined {
        font-size: 2.5rem;
    }
    
    .er-hero-visual-refined {
        margin-top: 3rem;
        animation: fadeInUp 1s ease-out 0.5s both;
    }
    
    .er-dashboard-refined {
        transform: none;
    }
    
    .er-hero-stats-refined {
        justify-content: center;
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .er-section-title-refined {
        font-size: 2.2rem;
    }
    
    .er-cta-title-refined {
        font-size: 2.2rem;
    }
    
    .er-hero-actions-refined {
        flex-direction: column;
        gap: 1rem;
    }
    
    .er-btn-primary-refined,
    .er-btn-secondary-refined {
        width: 100%;
        justify-content: center;
    }
    
    .er-metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* Product search (barcode/code autocomplete) */
.er-product-search {
    max-width: 100%;
}
.er-product-search .form-control {
    padding-right: 2rem;
}
.er-product-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 280px;
    overflow-y: auto;
    margin-top: 2px;
    border-radius: var(--er-radius, 8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.er-product-search-dropdown .list-group-item {
    white-space: normal;
    overflow: visible;
    word-wrap: break-word;
    line-height: 1.35;
    padding: 0.5rem 0.75rem;
    min-height: 2.7em;
}
.er-product-search-dropdown .list-group-item .d-flex {
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
}
.er-product-search-dropdown .list-group-item .d-flex .fw-medium {
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
    flex: 1 1 auto;
}
.er-product-search-dropdown .list-group-item .d-flex .text-muted.small {
    flex-shrink: 0;
}
.er-product-search-dropdown .list-group-item .small {
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}
.er-product-search-dropdown .list-group-item .small:not(:last-child) {
    margin-bottom: 0.125rem;
}
.er-product-search-loading {
    pointer-events: none;
}

/* Product lines grid (purchase/sales/transfer/returns) */
.er-lines-grid table {
    table-layout: fixed;
}
.er-lines-grid .er-lines-grid-qty,
.er-lines-grid .er-lines-grid-cost,
.er-lines-grid .er-lines-grid-total {
    width: 100px;
}
.er-lines-grid .er-lines-grid-remove {
    width: 44px;
}

/* Print Barcode page */
.er-product-search-wrap {
    width: 100%;
}
.er-product-search-wrap .input-group-text {
    border-end: 0;
}
.er-product-search-wrap .er-product-search {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
}
.er-product-search-wrap .er-product-search .form-control {
    border-start-start-radius: 0;
    width: 100%;
}
.er-barcode-toggle.form-check-input:checked,
.er-barcode-opt-toggle.form-check-input:checked {
    background-color: var(--er-primary, #5b6bff);
    border-color: var(--er-primary, #5b6bff);
}
.er-barcode-preview {
    min-height: 120px;
}
.er-barcode-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.er-barcode-preview-grid .barcode-label {
    padding: 8px;
    width: 180px;
    text-align: center;
    background: #fff;
    border-radius: 6px;
}
.er-barcode-preview-grid .barcode-label-border {
    border: 1px solid #ddd;
}
.er-barcode-preview-grid .barcode-store {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.er-barcode-preview-grid .barcode-name {
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
}
.er-barcode-preview-grid .barcode-sku {
    color: #666;
    font-size: 10px;
    margin-top: 2px;
}
.er-barcode-preview-grid .barcode-svg {
    max-width: 100%;
    height: 40px;
}
.er-btn-success {
    background: #22c55e;
    border: 1px solid #22c55e;
    color: #fff;
}
.er-btn-success:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

/* Report export/print toolbar */
.er-report-toolbar {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--er-border);
    border-radius: var(--er-radius);
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.er-report-toolbar .er-report-toolbar-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.er-report-toolbar .er-report-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.er-report-toolbar .er-report-toolbar-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.er-report-toolbar .er-report-toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}
.er-report-toolbar .er-report-toolbar-btn .er-report-toolbar-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.er-report-toolbar .er-report-toolbar-btn-excel {
    background: linear-gradient(180deg, #217346 0%, #1e6b40 100%);
    color: #fff;
    border-color: #1a5a36;
}
.er-report-toolbar .er-report-toolbar-btn-excel:hover:not(:disabled) {
    background: linear-gradient(180deg, #1e6b40 0%, #185a32 100%);
    color: #fff;
    border-color: #164d2a;
}
.er-report-toolbar .er-report-toolbar-btn-pdf {
    background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    border-color: #991b1b;
}
.er-report-toolbar .er-report-toolbar-btn-pdf:hover:not(:disabled) {
    background: linear-gradient(180deg, #b91c1c 0%, #991b1b 100%);
    color: #fff;
    border-color: #7f1d1d;
}
.er-report-toolbar .er-report-toolbar-btn-print {
    background: linear-gradient(180deg, #475569 0%, #334155 100%);
    color: #fff;
    border-color: #1e293b;
}
.er-report-toolbar .er-report-toolbar-btn-print:hover:not(:disabled) {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
    color: #fff;
    border-color: #0f172a;
}
.er-report-toolbar .er-report-toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.er-report-toolbar .er-report-toolbar-btn-excel .spinner-border,
.er-report-toolbar .er-report-toolbar-btn-pdf .spinner-border,
.er-report-toolbar .er-report-toolbar-btn-print .spinner-border {
    border-color: rgba(255, 255, 255, 0.3);
    border-right-color: #fff;
}

@media print {
    .no-print {
        display: none !important;
    }
    /* Hide layout chrome when printing (reports, invoices, etc.) */
    .er-shell .sidebar,
    .er-shell .top-row {
        display: none !important;
    }
    .er-shell .page main {
        display: block !important;
    }
    .er-shell .content {
        max-width: none !important;
        padding: 0 !important;
    }
}

/* Sales invoice list */
.er-invoice-toolbar .er-searchbox-input {
    padding-left: 2rem;
}
.er-invoice-ref {
    color: #c65353;
    text-decoration: none;
    font-weight: 500;
}
.er-invoice-ref:hover {
    text-decoration: underline;
}
.er-badge {
    display: inline-block;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
}
.er-badge-status-completed {
    background: #22c55e;
}
.er-badge-status-ordered {
    background: #93c5fd;
    color: #1e40af;
}
.er-badge-status-pending {
    background: #e5e7eb;
    color: #374151;
}
.er-badge-payment-paid {
    background: #22c55e;
}
.er-badge-payment-partial {
    background: #eab308;
}
.er-badge-payment-unpaid {
    background: #dc3545;
}
