:root {
    --min-font: 16px;
    --navy: #05235a;
    --navy-soft: #0a347a;
    --sky: #87ceeb;
    --page-bg: #f5f5f5;
    --yellow: #ffe566;
    --text: #1a1a1a;
}

html {
    font-size: 16px;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    background: var(--page-bg);
    color: var(--text);
}

a { color: inherit; text-decoration: none; }

.app-shell {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-navbar {
    background: var(--navy);
    color: whitesmoke;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    border-bottom: 1px solid lightgrey;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    min-height: 40px;
    box-sizing: border-box;
}

.app-content {
    flex: 1;
    min-height: 0;
    padding: 1.25rem 1.5rem 2rem;
    overflow-y: auto;
}

.app-content:has(.product-list-page) {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-content:has(.perm-page) {
    padding: 0;
}

.app-content:has(.user-page) {
    padding: 0;
}

.app-content:has(.pi-page) {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-content:has(.sr-page) {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pr-title {
    color: #c00 !important;
}

.pr-header-grid {
    grid-template-columns: repeat(5, minmax(140px, 1fr));
}

/* ===== WPF-style top menu ===== */
.wpf-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
    padding: 4px .5rem;
    min-height: 40px;
    box-sizing: border-box;
}

.menu-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 36px;
    padding: 0;
    margin: 0 4px 0 0;
    border-radius: 4px;
    line-height: 0;
    text-decoration: none;
    box-sizing: border-box;
}

.menu-home:hover {
    background: rgba(255, 255, 255, .18);
}

.menu-home img {
    display: block;
    object-fit: contain;
}

.menu-root {
    position: relative;
    display: flex;
    align-items: center;
}

.menu-root-btn {
    background: transparent;
    border: 0;
    color: whitesmoke;
    font-size: 14px;
    height: 32px;
    padding: 0 12px;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    box-sizing: border-box;
}

.menu-root:hover > .menu-root-btn,
.menu-root:focus-within > .menu-root-btn {
    background: whitesmoke;
    color: var(--navy);
}

.menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: #fff;
    color: #222;
    border: 1px solid #cfcfcf;
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
    padding: .25rem 0;
}

.menu-root:hover > .menu-dropdown,
.menu-root:focus-within > .menu-dropdown {
    display: block;
}

/* After a menu item is clicked, keep dropdown closed until mouse leaves the root. */
.menu-root.is-suppressed > .menu-dropdown,
.menu-root.is-suppressed:hover > .menu-dropdown,
.menu-root.is-suppressed:focus-within > .menu-dropdown {
    display: none !important;
}

.menu-root.is-suppressed > .menu-root-btn,
.menu-root.is-suppressed:hover > .menu-root-btn,
.menu-root.is-suppressed:focus-within > .menu-root-btn {
    background: transparent;
    color: whitesmoke;
}

.menu-dropdown-right {
    right: 0;
    left: auto;
}

.menu-user {
    margin-left: auto;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: .45rem .9rem;
    font-size: 14px;
    color: #222;
    white-space: nowrap;
    box-sizing: border-box;
    border-bottom: 1px solid #e0e0e0;
    border-left: 6px solid transparent;
}

.menu-dropdown > .menu-item:last-child,
.menu-dropdown > .menu-item-btn:last-child,
.menu-dropdown > .menu-sub:last-child > .menu-item,
.menu-submenu > .menu-item:last-child,
.menu-submenu > .menu-item-btn:last-child {
    border-bottom: 0;
}

.menu-item:hover,
.menu-item-btn:hover {
    background: #05235a;
    color: #efefef;
    border-left: 6px solid #6ec4f5;
}

.menu-item:hover .menu-shortcut,
.menu-item:hover .sub-arrow {
    color: #efefef;
}

.menu-item.disabled {
    opacity: .45;
    pointer-events: none;
}

.menu-item-btn {
    width: 100%;
    background: none;
    border-top: 0;
    border-right: 0;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.wpf-menu .menu-item:hover,
.wpf-menu .menu-item-btn:hover,
.wpf-menu .menu-sub:hover > .menu-item.has-sub {
    background: #05235a;
    color: #efefef;
    border-left: 6px solid #6ec4f5;
}

.menu-shortcut {
    color: #888;
    font-size: 14px;
}

.menu-sep {
    height: 1px;
    background: #e0e0e0;
    margin: .25rem 0;
}

.menu-sub {
    position: relative;
}

.menu-sub .has-sub {
    cursor: default;
}

.sub-arrow {
    color: #888;
}

.menu-submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 240px;
    background: #fff;
    border: 1px solid #cfcfcf;
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
    padding: .25rem 0;
}

.menu-sub:hover > .menu-submenu {
    display: block;
}

/* ===== Login (WPF-like) ===== */
.login-layout, .login-page {
    min-height: 100vh;
    min-height: 100dvh;
}

.login-page {
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: var(--sky);
    box-sizing: border-box;
    overflow-x: hidden;
}

.login-header, .login-footer {
    background: var(--navy);
    color: white;
    display: flex;
    align-items: center;
    padding: .75rem 1.5rem;
    gap: .75rem 1.5rem;
    box-sizing: border-box;
}

.login-header {
    min-height: 100px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-logo {
    object-fit: contain;
    border-radius: 4px;
}

.brand-name {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--yellow);
    letter-spacing: .5px;
    line-height: 1.15;
    word-break: break-word;
}

.brand-slogan {
    color: var(--sky);
    font-size: clamp(.95rem, 2.2vw, 1.1rem);
    line-height: 1.3;
    text-align: right;
}

.login-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    min-width: 0;
}

.login-form-panel {
    width: min(350px, 100%);
    justify-self: center;
    min-width: 0;
}

.login-form-panel label {
    display: block;
    font-size: 1.15rem;
    margin: .4rem 0;
}

.login-input {
    width: 100%;
    height: 44px;
    font-size: 1.25rem;
    padding: 0 12px;
    border: 1px solid #9bb8d3;
    box-sizing: border-box;
    text-transform: uppercase;
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
}

.login-input[type="password"] {
    text-transform: none;
}

.login-btn {
    width: 100%;
    height: 50px;
    margin-top: 1.5rem;
    border: 0;
    cursor: pointer;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(180deg, #1e5bb8, #05235a);
    border-radius: 2px;
    -webkit-tap-highlight-color: transparent;
}

.login-btn:disabled {
    opacity: .7;
    cursor: wait;
}

.login-error {
    margin-top: .75rem;
    color: #8b0000;
    background: #ffe8e8;
    border: 1px solid #f5b5b5;
    padding: .5rem .75rem;
}

.login-welcome-panel {
    text-align: center;
    color: var(--navy);
    min-width: 0;
    padding: 0 .5rem;
}

.login-welcome-panel h1 {
    font-size: clamp(1.6rem, 4vw, 3rem);
    font-weight: 800;
    margin: 0 0 .5rem;
    line-height: 1.15;
}

.login-welcome-panel p {
    margin: 0;
    font-size: clamp(.95rem, 2.5vw, 1.1rem);
}

.welcome-badge {
    display: inline-block;
    margin-top: 1.25rem;
    padding: .5rem 1rem;
    background: var(--navy);
    color: white;
    font-weight: 600;
}

.login-footer {
    min-height: 50px;
    justify-content: space-around;
    flex-wrap: wrap;
    font-size: 1rem;
    text-align: center;
}

.login-footer span {
    word-break: break-word;
}

/* ===== Dashboard / Coming soon ===== */
.dashboard {
    max-width: 1280px;
}

.coming-soon {
    max-width: 1100px;
}

.dash-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dash-toolbar h1 {
    margin: 0;
    color: var(--navy);
    font-size: 1.75rem;
}

.dash-client-name {
    animation: dash-client-blink 2.5s ease-in-out infinite;
}

@keyframes dash-client-blink {
    0%, 100% { opacity: 1; color: var(--navy); }
    50% { opacity: 0.45; color: #007acc; }
}

.dash-toolbar-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.dash-date {
    height: 36px;
    border: 1px solid #c5d0de;
    padding: 0 .5rem;
}

.dash-refresh {
    height: 36px;
    border: 0;
    background: #007acc;
    color: white;
    padding: 0 .9rem;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.dash-refresh:disabled {
    opacity: .7;
    cursor: wait;
}

.dash-loading-bar {
    height: 4px;
    margin-bottom: .75rem;
    background: linear-gradient(90deg, #007acc, #87ceeb, #007acc);
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
}

/* ===== Stylish page loader (refresh / data load) ===== */
.page-loader {
    margin-bottom: .75rem;
}

.page-loader-overlay {
    position: relative;
    min-height: 120px;
}

.page-loader-overlay .page-loader-panel {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(3px);
    border-radius: 8px;
    margin: 0;
}

.page-loader-track {
    height: 3px;
    background: rgba(5, 35, 90, .12);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: .65rem;
}

.page-loader-bar {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #05235a, #ffd700, #05235a);
    background-size: 200% 100%;
    border-radius: 3px;
    animation: page-loader-slide 1.1s ease-in-out infinite;
}

@keyframes page-loader-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

.page-loader-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: 1.25rem 1rem;
    animation: es-busy-pop .22s ease-out;
}

.page-loader-orbit {
    position: relative;
    width: 48px;
    height: 48px;
}

.page-loader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #05235a;
    border-right-color: #05235a;
    animation: es-spin .9s linear infinite;
}

.page-loader-ring-2 {
    inset: 7px;
    border-top-color: #ffd700;
    border-right-color: #ffd700;
    animation: es-spin-reverse 1.2s linear infinite;
}

.page-loader-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    background: #05235a;
    border-radius: 50%;
    animation: es-pulse 1s ease-in-out infinite;
}

.page-loader-text {
    margin: 0;
    color: #05235a;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .03em;
}

.page-loader-dots {
    display: flex;
    gap: .35rem;
}

.page-loader-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #05235a;
    animation: page-dot-bounce .9s ease-in-out infinite;
}

.page-loader-dots span:nth-child(2) { animation-delay: .15s; }
.page-loader-dots span:nth-child(3) { animation-delay: .3s; }

@keyframes page-dot-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: .45; }
    40% { transform: translateY(-5px); opacity: 1; }
}

.pl-grid-wrap {
    position: relative;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Stylish busy loader ===== */
.es-busy-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    pointer-events: all;
}

.es-busy-page {
    position: fixed;
    inset: 0;
    background: #F5F5F5;
}

/* Nav loader must stay hidden until explicitly shown (.es-busy-overlay display:flex beats [hidden]) */
#es-nav-loader {
    display: none !important;
    z-index: 3000;
}

#es-nav-loader.is-visible {
    display: flex !important;
}

.es-busy-inline {
    position: absolute;
    inset: 0;
    background: rgba(135, 206, 250, .55);
    backdrop-filter: blur(1px);
}

.es-busy-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .85rem;
    padding: 1.35rem 1.75rem;
    background: rgba(255, 255, 255, .96);
    border: 2px solid #05235a;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(5, 35, 90, .35);
    min-width: 180px;
    animation: es-busy-pop .25s ease-out;
}

@keyframes es-busy-pop {
    from { opacity: 0; transform: scale(.92) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.es-busy-spinner {
    position: relative;
    width: 56px;
    height: 56px;
}

.es-busy-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #05235a;
    border-right-color: #05235a;
    animation: es-spin .85s linear infinite;
}

.es-busy-ring-inner {
    inset: 8px;
    border-top-color: #ffd700;
    border-right-color: #ffd700;
    animation: es-spin-reverse 1.1s linear infinite;
}

.es-busy-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    background: #05235a;
    border-radius: 50%;
    animation: es-pulse 1s ease-in-out infinite;
}

@keyframes es-spin {
    to { transform: rotate(360deg); }
}

@keyframes es-spin-reverse {
    to { transform: rotate(-360deg); }
}

@keyframes es-pulse {
    0%, 100% { transform: scale(.85); opacity: .65; }
    50% { transform: scale(1.15); opacity: 1; }
}

.es-busy-text {
    margin: 0;
    color: #05235a;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    letter-spacing: .02em;
}

.dgs-page.is-busy {
    position: relative;
}

.dgs-page.is-busy .pl-tool:disabled,
.dgs-page.is-busy .dgs-new-btn:disabled,
.dgs-page.is-busy .dgs-edit-btn:disabled {
    opacity: .55;
    cursor: wait;
}

/* ===== Toastr-style notifications (top-right) ===== */
.toast-host {
    position: fixed;
    top: 58px;
    right: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    max-width: min(380px, calc(100vw - 28px));
    pointer-events: none;
}

.toast-item {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    min-width: 280px;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .25);
    pointer-events: auto;
    animation: toast-in .32s cubic-bezier(.21, 1.02, .73, 1);
    border: 1px solid rgba(255, 255, 255, .18);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(110%) scale(.96); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

.toast-body {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .85rem 2.1rem .85rem .85rem;
    flex: 1;
}

.toast-success { background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%); }
.toast-error { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }
.toast-warning { background: linear-gradient(135deg, #f39c12 0%, #d68910 100%); }
.toast-info { background: linear-gradient(135deg, #3498db 0%, #2471a3 100%); }

.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
}

.toast-title {
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .92;
}

.toast-text {
    line-height: 1.4;
    font-weight: 600;
    word-break: break-word;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, .55);
    transform-origin: left;
    animation: toast-progress linear forwards;
}

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

.toast-close {
    position: absolute;
    top: .45rem;
    right: .45rem;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, .85);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: .1rem .25rem;
    border-radius: 4px;
}

.toast-close:hover {
    color: #fff;
    background: rgba(0, 0, 0, .12);
}

/* Supplier / Staff modal — WPF layout */
.staff-modal-box {
    width: min(680px, 96vw);
}

/* City / Area utility modal — WPF AddCityWindow / AddAreaWindow */
.utility-modal-box {
    width: min(400px, 92vw);
    background: skyblue;
    border: 1px solid #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
    display: flex;
    flex-direction: column;
}

.utility-modal-body {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.utility-search-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin: .5rem 0 .75rem;
    padding: 0 .25rem;
}

.utility-search-label {
    font-size: 1rem;
    font-weight: 600;
    color: #05235a;
}

.utility-search-input {
    width: min(280px, 100%);
    height: 35px;
    border: 1px solid #9bb8d3;
    padding: 4px 8px;
    font-size: 1rem;
}

.utility-entry-count {
    margin: .5rem .25rem 0;
    font-size: 1rem;
    color: #636e72;
}

/* ===== Locations (WPF LocationWindow layout) ===== */
.loc-page .loc-toolbar {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: .35rem;
    margin: .35rem 0 .5rem;
    flex-wrap: wrap;
}

.loc-details {
    margin: .5rem .25rem .85rem;
    padding: .75rem 1rem 1rem;
    border: 1px solid #9bb8d3;
    border-radius: 4px;
    background: aliceblue;
}

.loc-details legend {
    font-weight: 700;
    color: #05235a;
    padding: 0 .4rem;
}

.loc-details-grid {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr) auto;
    gap: .75rem 1.25rem;
    align-items: end;
}

.loc-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-size: 1rem;
    font-weight: 600;
    color: #05235a;
}

.loc-input {
    height: 34px;
    border: 1px solid #9bb8d3;
    padding: 0 .55rem;
    font-size: 1rem;
    background: #fff;
}

.loc-input-readonly {
    background: #d3d3d3;
    color: #333;
}

.loc-check {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    color: #05235a;
    padding-bottom: .45rem;
    white-space: nowrap;
}

.loc-row-selected {
    background: #d1e8ff !important;
}

@media (max-width: 720px) {
    .loc-details-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== UnAuthorize Document (WPF UnAuthorizedDocWindow) ===== */
.ua-page {
    min-height: calc(100vh - 42px);
    margin: -1.25rem -1.5rem -2rem;
    padding: 1rem 1rem 2rem;
    background: skyblue;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ua-page.is-busy {
    pointer-events: none;
}

.ua-top {
    width: min(500px, 96vw);
    margin-bottom: .75rem;
}

.ua-window {
    width: min(500px, 96vw);
    background: skyblue;
    border: 1px solid #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
}

.ua-titlebar {
    height: 40px;
    background: #05235a;
    color: yellow;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 .65rem 0 .85rem;
}

.ua-close {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
}

.ua-close:hover:not(:disabled) {
    background: rgba(255, 255, 255, .15);
}

.ua-body {
    padding: 1.25rem 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.ua-label {
    font-size: .95rem;
    font-weight: 600;
    color: #05235a;
    margin-bottom: .35rem;
}

.ua-select {
    height: 34px;
    border: 1px solid #9bb8d3;
    padding: 0 .5rem;
    font-size: 1rem;
    background: #fff;
    margin-bottom: .85rem;
}

.ua-docno-row {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
}

.ua-docno-label {
    width: 150px;
    font-weight: 600;
    color: #05235a;
    flex-shrink: 0;
}

.ua-prefix {
    min-width: 2rem;
    height: 30px;
    padding: 0 .55rem;
    border: 1px solid gray;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #05235a;
}

.ua-docno-input {
    width: 120px;
    height: 30px;
    border: 1px solid #9bb8d3;
    padding: 0 .5rem;
    font-size: 1rem;
    background: #fff;
}

.ua-actions {
    display: flex;
    justify-content: center;
    gap: .65rem;
    padding: .65rem 1rem 1rem;
}

.ua-btn-unauth {
    min-width: 120px;
    height: 35px;
    border: 1px solid #2980b9;
    border-radius: 5px;
    background: #05235a;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    padding: 0 1rem;
}

.ua-btn-unauth:hover:not(:disabled) {
    background: #2980b9;
}

.ua-btn-cancel {
    min-width: 100px;
    height: 35px;
    border: 1px solid #95a5a6;
    border-radius: 5px;
    background: lightgray;
    color: #000;
    font-weight: 700;
    cursor: pointer;
    padding: 0 .85rem;
}

.ua-btn-cancel:hover:not(:disabled) {
    background: #95a5a6;
    color: #fff;
}

.ua-btn-unauth:disabled,
.ua-btn-cancel:disabled,
.ua-close:disabled {
    opacity: .55;
    cursor: default;
}

@media (max-width: 520px) {
    .ua-docno-label {
        width: 100%;
    }

    .ua-docno-input {
        flex: 1;
        width: auto;
        min-width: 100px;
    }
}

/* ===== Refresh Balance & Stock (WPF) ===== */
.rb-page {
    min-height: calc(100vh - 42px);
    margin: -1.25rem -1.5rem -2rem;
    padding: 1rem;
    background: #f0f4f8;
}

.rb-page.is-busy { pointer-events: none; }

.rb-window {
    max-width: 1100px;
    margin: 0 auto;
    background: #f0f4f8;
    border: 1px solid #05235a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,.18);
}

.rb-titlebar {
    height: 42px;
    background: #05235a;
    color: yellow;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 .75rem 0 1rem;
}

.rb-close {
    width: 32px; height: 28px;
    border: none; background: transparent; color: #fff; cursor: pointer;
}

.rb-tabs {
    display: flex;
    gap: 0;
    background: #e8eef5;
    border-bottom: 1px solid #d0d7de;
    padding: .35rem .65rem 0;
}

.rb-tab {
    border: 1px solid transparent;
    border-bottom: none;
    background: transparent;
    padding: .45rem .9rem;
    font-weight: 600;
    color: #05235a;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
}

.rb-tab.active {
    background: #fff;
    border-color: #d0d7de;
}

.rb-panel { padding: .65rem .85rem; }

.rb-card {
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: .85rem 1rem;
}

.rb-help {
    margin: 0 0 .75rem;
    color: #444;
    font-size: .95rem;
}

.rb-radios {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1.25rem;
    margin-bottom: .75rem;
}

.rb-radios label {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-weight: 600;
    color: #05235a;
}

.rb-single-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: .55rem .85rem;
    align-items: end;
}

.rb-single-grid label {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-weight: 600;
    color: #05235a;
    font-size: .95rem;
}

.rb-single-grid .rb-span2 { grid-column: 1 / -1; }

.rb-single-grid input,
.rb-single-grid select {
    height: 32px;
    border: 1px solid #9bb8d3;
    padding: 0 .5rem;
}

.rb-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
    margin: .75rem 0 .5rem;
    padding: .55rem .75rem;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-weight: 600;
    color: #05235a;
}

.rb-filter-bar input[type="text"],
.rb-filter-bar input:not([type]) {
    height: 28px;
    width: min(260px, 100%);
    border: 1px solid #9bb8d3;
    padding: 0 .5rem;
    font-weight: 400;
}

.rb-chk { font-weight: 600; display: flex; align-items: center; gap: .3rem; }
.rb-count { color: #555; font-weight: 500; margin-left: auto; }
.rb-clear {
    height: 28px; width: 70px;
    border: 1px solid #9bb8d3;
    background: #f5f7fa;
    cursor: pointer;
}

.rb-grid-wrap {
    max-height: min(42vh, 420px);
    overflow: auto;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 4px;
}

.rb-table tbody tr:nth-child(even) { background: #f8fafc; }
.rb-changed { background: #fff6e5 !important; }

.rb-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .65rem;
}

.rb-status { color: #05235a; font-weight: 700; }

.rb-action {
    min-width: 140px;
    height: 34px;
    border: none;
    border-radius: 4px;
    background: #05235a;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.rb-bottom {
    display: flex;
    justify-content: flex-end;
    padding: .5rem .85rem .75rem;
}

.rb-close-btn {
    width: 100px;
    height: 34px;
    border: 1px solid #9bb8d3;
    background: #fff;
    cursor: pointer;
}

.st-guidance {
    background: #E8F4FD;
    border: 1px solid #007ACC;
    border-left: none;
    border-right: none;
    padding: .45rem .85rem;
    color: #05235a;
    font-size: .92rem;
}

@media (max-width: 720px) {
    .rb-single-grid { grid-template-columns: 1fr; }
}

.supplier-modal-box {
    width: min(820px, 96vw);
    max-height: 92vh;
    background: skyblue;
    border: 1px solid #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
    display: flex;
    flex-direction: column;
}

.supplier-modal-body {
    padding: 12px 16px;
    overflow: auto;
    flex: 1;
}

.supplier-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
}

.supplier-form-col {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.supplier-form-col-right {
    padding-right: 14px;
}

.supplier-form-col-right .sf-input,
.supplier-form-col-right select.sf-input,
.supplier-form-col-right textarea.sf-input {
    box-sizing: border-box;
}

.sf-row {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 5px;
    align-items: center;
    min-height: 30px;
}

.sf-row.sf-row-wide-label {
    grid-template-columns: 110px minmax(0, 1fr);
}

.sf-row.sf-row-top {
    align-items: start;
}

.sf-row.sf-row-top .sf-lbl {
    padding-top: 6px;
}

.sf-lbl {
    text-align: right;
    font-weight: 600;
    color: #05235a;
    font-size: .95rem;
    line-height: 1.2;
    padding-right: 2px;
}

.sf-req {
    color: #c00000;
    font-weight: 700;
}

.sf-upper {
    text-transform: uppercase;
}

.sf-label {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    font-weight: 600;
    color: #05235a;
    font-size: 1rem;
}

.sf-input {
    width: 100%;
    height: 30px;
    border: 1px solid #9bb8d3;
    padding: 4px 6px;
    font: inherit;
    background: #fff;
}

.sf-textarea {
    height: auto;
    min-height: 60px;
    resize: vertical;
}

.sf-readonly {
    background: #05235a;
    color: #ffd700;
    font-weight: 700;
    cursor: default;
}

.sf-check {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    color: #05235a;
    margin: 0;
}

.sf-row.sf-check-row .sf-check {
    justify-self: start;
}

.user-page.is-busy {
    position: relative;
}

@media (max-width: 760px) {
    .supplier-form-grid {
        grid-template-columns: 1fr;
    }
}

.dash-error {
    background: #ffe8e8;
    border: 1px solid #f5b5b5;
    color: #8b0000;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}

.muted { color: #66758a; font-size: 1rem; }

.quick-access {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: .35rem;
    background: #f7f7f7;
    border: 1px solid #e6e6e6;
    padding: .5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.qa-btn,
a.qa-btn,
button.qa-btn {
    box-sizing: border-box;
    flex: 0 0 96px;
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    height: 84px;
    min-height: 84px;
    max-height: 84px;
    margin: 0;
    padding: .25rem .2rem .2rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: .15rem;
    text-align: center;
    background: #fff;
    border: 1px solid #808080;
    border-radius: 4px;
    color: #222;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    cursor: pointer;
    text-decoration: none;
    appearance: none;
    -webkit-appearance: none;
    overflow: hidden;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.qa-btn img {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    max-width: 42px;
    max-height: 42px;
    object-fit: contain;
    display: block;
    flex: 0 0 42px;
    pointer-events: none;
}

.qa-btn span {
    display: block;
    width: 100%;
    height: 2.3em;
    max-height: 2.3em;
    padding: 0 .1rem;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    overflow: hidden;
    word-break: break-word;
}

.qa-btn:hover {
    background: rgba(5, 35, 90, 0.08);
    border-color: #05235a;
    color: var(--navy);
    box-shadow: 0 2px 6px rgba(5, 35, 90, .15);
}

.kpi-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.kpi-card {
    width: 260px;
    min-height: 150px;
    height: auto;
    padding: .85rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.kpi-card h2 {
    margin: 0 0 .5rem;
    font-size: 1.25rem;
    font-weight: 800;
}

.kpi-purchase { background: #ebe0cf; }
.kpi-purchase h2 { color: #b58032; }
.kpi-sale { background: #e2bfbb; }
.kpi-sale h2 { color: #bc1200; }
.kpi-stock { background: #cce9f4; }
.kpi-stock h2 { color: #05235a; }
.kpi-transfer { background: #9af1d4; }
.kpi-transfer h2 { color: #1a5249; }

.kpi-note {
    margin: 0 0 .75rem;
    font-size: 1rem;
    color: #666;
}

.period-btns {
    display: flex;
    gap: .25rem;
    margin-bottom: .5rem;
}

.period-btns button {
    flex: 1;
    border: 0;
    color: white;
    padding: .35rem .2rem;
    font-size: 14px;
    cursor: pointer;
    opacity: .75;
}

.kpi-purchase .period-btns button { background: #b58032; }
.kpi-sale .period-btns button { background: #bc1200; }
.kpi-transfer .period-btns button { background: #1a5249; }
.period-btns button.active { opacity: 1; outline: 2px solid rgba(0,0,0,.15); }

.kpi-rows {
    flex: 1 0 auto;
    font-size: 12px;
}

.kpi-empty {
    margin: .25rem 0;
    font-size: 12px;
    text-align: center;
}

.kpi-row {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    padding: .15rem 0;
}

.transfer-row .to { color: green; font-size: 10px; }
.transfer-row .from { color: #c00; font-size: 10px; }

.kpi-total {
    margin-top: auto;
    padding: .4rem .5rem;
    font-weight: 700;
    text-align: right;
    border-radius: 3px;
    font-size: 16px;
}

.kpi-purchase .kpi-total { background: #d8c6a7; }
.kpi-sale .kpi-total { background: #d4a9a3; }
.kpi-stock .kpi-total { background: #a8d8ea; }
.kpi-transfer .kpi-total { background: #7ad4b8; }

.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.chart-panel {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: .85rem 1rem 1rem;
}

.chart-panel h3 {
    margin: 0 0 .75rem;
    font-size: 1rem;
    color: #222;
}

.chart-wide { grid-column: 1 / -1; }

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: .45rem;
    min-height: 220px;
    padding-top: 1.5rem;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 200px;
    justify-content: flex-end;
}

.bar {
    width: 70%;
    min-height: 4px;
    background: linear-gradient(180deg, #1e5bb8, #05235a);
    border-radius: 3px 3px 0 0;
}

.bar-value {
    font-size: 1rem;
    color: #555;
    margin-bottom: .25rem;
}

.bar-label {
    margin-top: .35rem;
    font-size: 1rem;
    color: #444;
    text-align: center;
    word-break: break-word;
}

.hbar-chart { display: flex; flex-direction: column; gap: .45rem; }

.hbar-row {
    display: grid;
    grid-template-columns: 110px 1fr 70px;
    gap: .5rem;
    align-items: center;
    font-size: 1rem;
}

.hbar-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hbar-track {
    height: 12px;
    background: #eef2f7;
    border-radius: 2px;
    overflow: hidden;
}

.hbar-fill { height: 100%; }

.hbar-value { text-align: right; color: #444; }

/* ===== Product List ===== */
.product-list-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: skyblue;
    padding: 5px;
    overflow: hidden;
    box-sizing: border-box;
}

.product-list-page .pl-back,
.product-list-page .pl-tool,
.product-list-page .pl-page-btns button:not(:disabled),
.product-list-page .pl-table .actions a {
    cursor: pointer;
}

.product-list-page .pl-back {
    transition: background .15s ease, filter .15s ease;
}

.product-list-page .pl-back:hover {
    background: #0a347a;
    filter: brightness(1.08);
}

.product-list-page .pl-tool {
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}

.product-list-page .pl-tool:hover {
    background: #6ec4f5;
    border-color: #05235a;
    box-shadow: 0 2px 6px rgba(5, 35, 90, .25);
    transform: translateY(-1px);
}

.product-list-page .pl-tool:active {
    transform: translateY(0);
    box-shadow: none;
}

.product-list-page .pl-page-btns button:not(:disabled) {
    transition: background .15s ease, filter .15s ease, transform .12s ease;
}

.product-list-page .pl-page-btns button:hover:not(:disabled) {
    background: #0a347a;
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.product-list-page .pl-table .actions a {
    display: inline-flex;
    border-radius: 4px;
    transition: transform .12s ease, opacity .12s ease;
}

.product-list-page .pl-table .actions a:hover {
    transform: scale(1.08);
    opacity: .85;
}

.product-list-page .pl-topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.product-list-page .pl-topbar-left {
    justify-self: start;
    display: flex;
    align-items: center;
}

.product-list-page .pl-topbar-left h1 {
    line-height: 1;
    display: flex;
    align-items: center;
}

.product-list-page .pl-back {
    align-self: center;
}

.product-list-page .pl-search-center {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    justify-self: center;
}

.product-list-page .pl-toolbar {
    justify-self: end;
}

.pl-topbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: 5px;
    flex-shrink: 0;
    min-height: 58px;
    box-sizing: border-box;
}

.pl-topbar-left {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}

.pl-topbar-left h1 {
    margin: 0;
    font-size: 1.25rem;
    color: #05235a;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
}

.pl-search-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

/* Shared page/modal header — same vertical centering as Product List */
.pl-header,
.ap-header,
.psf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 5px;
    min-height: 58px;
    padding: 0 5px;
    box-sizing: border-box;
    background: skyblue;
}

.pl-header-left,
.ap-header-left {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex: 0 0 auto;
    min-height: 100%;
}

.pl-header-left h1,
.ap-header-left h1 {
    margin: 0;
    font-size: 1.25rem;
    color: #05235a;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
}

.pl-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    gap: .35rem;
    background: #05235a;
    color: yellow;
    border: 0;
    padding: .55rem .75rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: background .15s ease, filter .15s ease;
}

.pl-back:hover:not(:disabled) {
    background: #0a347a;
    filter: brightness(1.08);
}

.pl-back:disabled {
    opacity: .55;
    cursor: default;
}

.pl-search {
    flex: 1 1 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.pl-search-input {
    width: min(300px, 70vw);
    height: 35px;
    font-size: 16px;
    padding: 0 10px;
    border: 1px solid #9bb8d3;
    box-sizing: border-box;
}

.pl-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0 0 0 auto;
    padding: 0;
    flex: 0 0 auto;
}

.pl-tool {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #808080;
    margin: 0;
    padding: .25rem .4rem;
    min-width: 70px;
    min-height: 58px;
    box-sizing: border-box;
    color: #111;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.1;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}

.pl-tool:disabled {
    opacity: .55;
    cursor: default;
}

.pl-tool:hover:not(:disabled) {
    background: #6ec4f5;
    border-color: #05235a;
    box-shadow: 0 2px 6px rgba(5, 35, 90, .25);
    transform: translateY(-1px);
}

.pl-tool:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.pl-tool img {
    width: 50px;
    height: 40px;
    object-fit: contain;
    display: block;
    margin: 0;
}

.pl-tool span {
    display: block;
    margin: .15rem 0 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
}

.pl-tool-sm {
    font-size: 10px !important;
}

.pl-tool-export {
    border-color: whitesmoke !important;
}

.pl-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    margin: 0 0 5px;
    padding: 0;
    flex-shrink: 0;
}

.pl-loading span {
    color: #05235a;
    font-weight: 600;
    font-size: 1rem;
}

.user-page.is-busy {
    position: relative;
}

.pl-error {
    margin: 0 0 .75rem;
}

.pl-grid-wrap {
    background: white;
    border: 1px solid #b7c9db;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.pl-table th {
    position: sticky;
    top: 0;
    background: #05235a;
    color: yellow;
    padding: .55rem .45rem;
    text-align: left;
    white-space: nowrap;
    z-index: 1;
    font-weight: 600;
    border: 1px solid #3a5a8a;
}

.pl-table td {
    padding: .4rem .45rem;
    border: 1px solid #e4eaf1;
    vertical-align: middle;
}

.pl-table tbody tr:hover {
    background: #eef5fb;
    cursor: pointer;
}

.pl-table tr.inactive td {
    color: #c00;
    font-weight: 700;
}

.pl-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pl-table .ctr { text-align: center; font-variant-numeric: tabular-nums; }
.pl-table .urdu,
.pl-table th.urdu,
.pl-table td.urdu {
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;
}
.product-list-page .pl-table .urdu {
    text-align: right;
}
.pl-table .empty { text-align: center; color: #666; padding: 1.5rem; }
.pl-table .actions {
    display: flex;
    gap: .35rem;
    align-items: center;
}
.pl-table td.actions.ctr {
    justify-content: center;
}

.pl-icon-btn {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
}

.staff-list-page .staff-list-table .staff-actions-col {
    min-width: 160px;
    white-space: nowrap;
}

.pl-staff-actions,
.pl-table .actions.staff-actions-col {
    display: flex;
    gap: .35rem;
    align-items: center;
    justify-content: center;
}

.pl-staff-edit-btn {
    background: transparent;
    border: 0;
    padding: 2px 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #05235a;
    font-weight: 600;
    font-size: .9rem;
}

.pl-staff-edit-btn:hover {
    background: rgba(5, 35, 90, .08);
    border-radius: 4px;
}

.pl-staff-ledger-btn {
    background: #05235a;
    color: #fff;
    border: 0;
    border-radius: 3px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
}

.pl-staff-ledger-btn:hover {
    background: #0a347a;
}

.pl-staff-payrec {
    background: darkgreen !important;
    color: #fff !important;
    min-width: 58px;
    padding: 4px 6px !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

.pl-staff-payrec-top,
.pl-staff-payrec-bottom {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
}

.staff-list-page .pl-entry-count {
    margin: .35rem .5rem .75rem;
    color: #636e72;
    font-size: .92rem;
}

.pl-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 5px;
    padding: 0;
    flex-shrink: 0;
    background: skyblue;
}

.pl-page-size {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1rem;
    flex-wrap: wrap;
}

.pl-entry-count {
    margin-left: .75rem;
    color: gray;
    font-size: 1rem;
}

.pl-page-size select {
    height: 30px;
    width: 60px;
    padding: 0 6px;
}

.pl-page-btns {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.pl-page-btns button {
    background: #05235a;
    color: yellow;
    border: 0;
    padding: .35rem .7rem;
    cursor: pointer;
    min-width: 100px;
    height: 40px;
    font-size: 14px;
    font-weight: 600;
}

.pl-page-num {
    margin: 0 .25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #05235a;
    min-width: 1.5rem;
    text-align: center;
}

.pl-page-btns button:disabled {
    opacity: .45;
    cursor: default;
}

.pl-count {
    font-weight: 600;
    color: #05235a;
}

/* ===== Add Product ===== */
.add-product-page {
    background: skyblue;
    margin: -1.25rem -1.5rem -2rem;
    padding: 0 0 1.5rem;
    min-height: calc(100vh - 42px);
}

.ap-titlebar {
    background: #05235a;
    color: yellow;
    font-weight: 700;
    padding: .65rem 1rem;
    font-size: 1rem;
}

.ap-form {
    margin: 0 1rem;
    background: rgba(255,255,255,.35);
    border: 1px solid #9bb8d3;
    padding: .75rem 1rem 1rem;
}

.ap-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .55rem 1rem;
    align-items: end;
    margin-bottom: .75rem;
}

.ap-row label {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #05235a;
}

.ap-row label.chk {
    flex-direction: row;
    align-items: center;
    gap: .4rem;
    padding-bottom: .4rem;
}

.ap-row input,
.ap-row select {
    height: 34px;
    border: 1px solid #9bb8d3;
    padding: 0 .5rem;
    font-size: 1rem;
}

.ap-row input.wide { min-width: 220px; }
.ap-row input.readonly { background: #e8eef5; color: #444; }
.ap-row input.urdu-input { direction: rtl; text-align: right; }

.ap-success {
    margin: 0 1rem .75rem;
    background: #e6f7ea;
    border: 1px solid #9ed0ab;
    color: #146c2e;
    padding: .65rem .85rem;
}

.ap-prompt {
    margin: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #9bb8d3;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.ap-prompt p { margin: 0; }

.psf-overlay {
    align-items: flex-start;
    padding: 16px 8px;
    overflow: auto;
}

.psf-modal-box {
    width: min(1100px, 98vw);
    max-width: 98vw;
    background: skyblue;
    border: 10px solid #05235a;
    border-top-width: 0;
    border-radius: 10px;
    max-height: calc(100vh - 32px);
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

.psf {
    background: skyblue;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.psf-in-modal {
    max-width: 100%;
    overflow-x: hidden;
}

.psf-body {
    padding: 5px 10px 12px;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.psf-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-bottom: 10px;
}

.psf-dgs-block {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 10px;
    box-sizing: border-box;
}

.psf-dgs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 10px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.psf-dgs-cell {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    column-gap: 6px;
    min-width: 0;
}

.psf-dgs-cell .psf-lbl {
    min-width: 0;
    width: auto;
    text-align: right;
    justify-self: end;
}

.psf-dgs-cell > .psf-input,
.psf-dgs-cell > .psf-combo {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.psf-combo-with-btn {
    display: inline-flex;
    align-items: center;
    gap: 0;
    width: 100%;
    min-width: 0;
}

.psf-combo-with-btn .psf-combo {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

.psf-combo-with-btn .psf-plus {
    flex: 0 0 auto;
}

.psf-names-row {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) 78px minmax(0, 1fr);
    column-gap: 6px;
    align-items: center;
    width: 100%;
    margin-top: 10px;
    box-sizing: border-box;
}

.psf-names-row .psf-lbl {
    text-align: right;
}

.psf-names-row .psf-input {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}

.psf-eq-row {
    display: grid;
    width: 100%;
    column-gap: 6px;
    align-items: center;
    margin-top: 10px;
    box-sizing: border-box;
}

.psf-eq-row-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.psf-eq-cell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 4px;
    align-items: center;
    min-width: 0;
}

.psf-eq-cell .psf-lbl {
    text-align: right;
    white-space: nowrap;
}

.psf-eq-cell .psf-lbl .sf-req {
    color: #c00000;
    font-size: 16px;
    font-weight: 700;
}

.psf-eq-cell .psf-input {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}

.psf-lbl {
    font-size: 14px;
    font-weight: 600;
    color: #05235a;
    white-space: nowrap;
}

.psf-req-hint {
    padding: 4px 12px 0;
    font-size: 13px;
    font-weight: 600;
    color: #05235a;
}

.psf-w80 { width: 80px; text-align: right; }
.psf-w55 { width: 55px; }
.psf-w100 { width: 100px; }
.psf-w110 { width: 110px; }
.psf-w120 { width: 120px; }
.psf-w130 { width: 130px; }
.psf-w132 { width: 132px; }
.psf-w240 { width: 240px; }
.psf-w250 { width: 250px; }
.psf-w225 { width: 225px; }
.psf-w310 { width: 310px; }
.psf-w410 { width: 410px; max-width: 100%; }
.psf-w415 { width: 415px; max-width: 100%; }

.psf-input,
.psf-combo {
    height: 32px;
    border: 1px solid #9bb8d3;
    padding: 0 8px;
    font-size: 16px;
    /*font-weight: 600;*/
    box-sizing: border-box;
}

.psf-center { text-align: center; }
.psf-input.readonly { background: lightgray; }
.psf-avg { background: yellow; }
.psf-qty { background: green; color: #fff; }

.psf-plus {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.psf-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 20px;
    align-items: flex-start;
    margin-top: 6px;
}

.psf-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.psf-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}

.psf-check input {
    width: 18px;
    height: 18px;
}

.psf-image {
    width: 90px;
    height: 90px;
    border: 1px solid whitesmoke;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    background: #fafafa;
}

.psf-image img {
    object-fit: contain;
    max-width: 70px;
    max-height: 55px;
}

.psf-image-file {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.psf-image.is-disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: default;
}

.psf-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.psf-tax-sup {
    flex: 1;
    min-width: 280px;
}

.is-search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: end;
    margin: 0 1rem .75rem;
    padding: .75rem;
    background: rgba(255,255,255,.4);
    border: 1px solid #9bb8d3;
}

.is-search-bar label {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #05235a;
}

.is-search-bar input {
    height: 34px;
    border: 1px solid #9bb8d3;
    padding: 0 .5rem;
    min-width: 140px;
}

.is-search-bar input.wide { min-width: 240px; }

.is-hits {
    margin: 0 1rem .75rem;
    max-height: 220px;
}

.is-hint {
    margin: 1rem;
}

/* DGS List — WPF-style 3-column layout + modals */
.dgs-page {
    background: #F5F5F4;
    margin: -1.25rem -1.5rem -2rem;
    padding: 0;
    min-height: calc(100vh - 42px);
}

.dgs-page .pl-topbar {
    margin: 0;
    padding: 0 5px;
    min-height: 58px;
    background: skyblue;
    align-items: center;
}

.dgs-page .pl-topbar-left {
    gap: .5rem;
}

.dgs-page .pl-topbar-left h1 {
    font-size: 1.1rem;
}

.dgs-page .pl-toolbar {
    gap: .35rem;
    align-items: center;
    margin: 0;
}

.dgs-message {
    margin: 0;
    padding: .35rem .5rem;
}

.dgs-columns-header {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #05235a;
    margin: 0;
    padding: 0;
    border-bottom: 2px solid #05235a;
}

.dgs-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .25rem .5rem;
    color: #ffd700;
    font-weight: 600;
    border-right: 2px solid #ffd700;
}

.dgs-col-head:last-child {
    border-right: 0;
}

.dgs-new-btn {
    background: transparent;
    border: 0;
    padding: 2px;
    cursor: pointer;
    line-height: 0;
    border-radius: 4px;
    transition: background .15s ease, transform .12s ease;
}

.dgs-new-btn:hover {
    background: rgba(255, 255, 255, .18);
    transform: scale(1.05);
}

.dgs-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
}

.dgs-col {
    min-width: 0;
    border-right: 2px solid #05235a;
    background: #87cefa;
}

.dgs-col:last-child {
    border-right: 0;
}

.dgs-grid-wrap {
    max-height: calc(100vh - 130px);
    overflow: auto;
    margin: 0;
    border: 0;
    background: #87cefa;
}

.dgs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.dgs-table th {
    background: #F5F5F5;
    color: #05235a;
    font-weight: 700;
    height: 30px;
    padding: 0 .25rem;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 1;
}

.dgs-table td {
    padding: 0 .25rem;
    border-bottom: 1px solid #b8d4ea;
    vertical-align: middle;
    height: 35px;
}

.dgs-table tbody tr:nth-child(even) {
    background: #f7f7f7;
}

.dgs-table tbody tr:hover {
    background: #e0f0ff;
}

.dgs-table tr.selected {
    background: #ffff00 !important;
    color: #000;
}

.dgs-table .w-code { width: 50px; }
.dgs-table .w-pct { width: 50px; text-align: center; }
.dgs-table .w-area { width: 50px; text-align: center; }
.dgs-table .w-action { width: 40px; text-align: center; }
.dgs-table .num { text-align: center; }
.dgs-table .actions { text-align: center; padding: 0; }

.dgs-cell-input {
    width: 100%;
    max-width: 48px;
    height: 26px;
    border: 1px solid #9bb8d3;
    text-align: center;
    font: inherit;
    padding: 0 2px;
}

.dgs-edit-btn {
    background: transparent;
    border: 0;
    padding: 2px;
    cursor: pointer;
    line-height: 0;
    border-radius: 4px;
    transition: background .15s ease, transform .12s ease;
}

.dgs-edit-btn:hover {
    background: rgba(5, 35, 90, .12);
    transform: scale(1.08);
}

/* DGS toolbar + back button hover */
.dgs-page .pl-back {
    transition: background .15s ease, filter .15s ease;
}

.dgs-page .pl-back:hover {
    background: #0a347a;
    filter: brightness(1.08);
}

.dgs-page .pl-tool {
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}

.dgs-page .pl-tool:hover:not(:disabled) {
    background: #6ec4f5;
    border-color: #05235a;
    box-shadow: 0 2px 6px rgba(5, 35, 90, .25);
    transform: translateY(-1px);
}

.dgs-page .pl-tool:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

/* DGS Add/Edit modal — matches WPF AddDeptWindow */
.dgs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.dgs-modal-box {
    width: min(400px, 92vw);
    background: skyblue;
    border: 1px solid #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
}

.dgs-modal-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #05235a;
    color: #ffd700;
    font-weight: 600;
    font-size: 16px;
    padding: 0 .75rem;
    height: 40px;
}

.dgs-modal-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    line-height: 1;
}

.dgs-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    max-width: 300px;
    margin: 0 auto;
}

.dgs-modal-label {
    align-self: stretch;
    margin-bottom: .15rem;
}

.dgs-modal-input {
    width: 100%;
    height: 30px;
    padding: 5px;
    border: 1px solid #9bb8d3;
    margin-bottom: .5rem;
    font: inherit;
}

.dgs-modal-check {
    align-self: stretch;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.dgs-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px 16px;
}

.dgs-modal-save {
    width: 100px;
    height: 35px;
    background: #05235a;
    color: #fff;
    font-weight: 600;
    border: 1px solid #2980b9;
    border-radius: 5px;
    cursor: pointer;
}

.dgs-modal-save:hover {
    background: #2980b9;
}

.dgs-modal-save:disabled {
    opacity: .75;
    cursor: wait;
}

.dgs-modal-save-busy {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.dgs-modal-mini-spin {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: es-spin .7s linear infinite;
}

.dgs-modal-cancel:disabled {
    opacity: .65;
    cursor: wait;
}

.dgs-modal-cancel {
    width: 100px;
    height: 35px;
    background: #d3d3d3;
    color: #000;
    font-weight: 600;
    border: 1px solid #95a5a6;
    border-radius: 5px;
    cursor: pointer;
}

.dgs-modal-cancel:hover {
    background: #bbb;
}

.pwd-modal-box {
    width: min(420px, 94vw);
    background: #f0f4f8;
    border: 1px solid #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
}

.pwd-modal-body {
    background: skyblue;
    padding: 15px;
}

.pwd-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.pwd-row label {
    font-size: 16px;
}

.pwd-input {
    height: 32px;
    width: 100%;
    padding: 0 8px;
    border: 1px solid #9bb8d3;
    font-size: 16px;
    box-sizing: border-box;
}

.pwd-readonly {
    background: #E8E8E8;
}

.pwd-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* WPF CustomConfirmMessageBox / CustomMessageBox */
.confirm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.confirm-modal-box {
    width: min(400px, 92vw);
    background: skyblue;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
}

.confirm-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.confirm-modal-title {
    color: #000;
    font-weight: 600;
    font-size: 20px;
}

.confirm-modal-message {
    color: #05235a;
    font-size: 16px;
    margin: 10px 5px 16px;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.4;
}

.confirm-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.confirm-modal-btn {
    min-width: 80px;
    height: 30px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.confirm-modal-ok {
    background: forestgreen;
}

.confirm-modal-ok:hover {
    background: #2d8a2d;
}

.confirm-modal-cancel {
    background: #05235a;
}

.confirm-modal-cancel:hover {
    background: #031a3d;
}

.pl-table tr.selected {
    background: #007acc !important;
    color: #fff;
}

.pc-card {
    margin: 1rem;
    max-width: 480px;
    background: white;
    border: 1px solid #9bb8d3;
    padding: 1.25rem;
}

.pc-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: #05235a;
    margin-bottom: 1rem;
}

.pc-row {
    display: flex;
    justify-content: space-between;
    padding: .4rem 0;
    border-bottom: 1px solid #eef2f7;
}

.pc-price { color: #bc1200; font-size: 1.4rem; }

/* ===== Price Check (WPF PriceCheckWindow) ===== */
.pc-page {
    min-height: calc(100vh - 48px);
    background: lightskyblue;
    padding: 12px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

.pc-top {
    position: relative;
    text-align: center;
    padding: 4px 0 8px;
}

.pc-back {
    position: absolute;
    left: 0;
    top: 8px;
}

.pc-title {
    margin: 0;
    color: #05235a;
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: .02em;
}

.pc-search-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pc-barcode-input {
    width: min(900px, 72vw);
    height: 65px;
    background: #05235a;
    color: #ffd700;
    border: 2px solid #03153a;
    border-radius: 4px;
    font-size: clamp(1.4rem, 3vw, 2.5rem);
    font-weight: 700;
    padding: 8px 14px;
    box-sizing: border-box;
}

.pc-barcode-input:focus {
    outline: 2px solid #ffd700;
    outline-offset: 1px;
}

.pc-search-btn {
    min-width: 150px;
    height: 60px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, #2f80c8, #05235a);
    border: 1px solid #03153a;
    border-radius: 6px;
    cursor: pointer;
    padding: 0 20px;
}

.pc-search-btn:hover {
    filter: brightness(1.08);
}

.pc-status {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    box-sizing: border-box;
}

.pc-status.ok { background: green; }
.pc-status.fail { background: orange; }

.pc-panel {
    flex: 1;
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 12px;
    background: #05235a;
    border: 2px solid #000;
    border-radius: 10px;
    padding: 12px;
    min-height: 320px;
}

.pc-info {
    border: 2px solid lightskyblue;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.pc-page .pc-name {
    color: #ffd700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    margin: 0;
}

.pc-page .pc-price {
    color: #fff;
    font-size: clamp(1.4rem, 2.8vw, 2.5rem);
    font-weight: 700;
}

.pc-uan {
    color: skyblue;
    font-size: clamp(1.15rem, 2.2vw, 1.9rem);
    font-weight: 600;
}

.pc-qty {
    color: greenyellow;
    font-size: clamp(1.15rem, 2.2vw, 1.9rem);
    font-weight: 600;
}

.pc-loc {
    color: coral;
    font-size: clamp(1.15rem, 2.2vw, 1.9rem);
    font-weight: 600;
}

.pc-image-box {
    border: 2px solid #808080;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    min-height: 280px;
}

.pc-image {
    width: min(250px, 100%);
    height: 250px;
    object-fit: cover;
    border-radius: 6px;
    background: #fff;
}

.pc-image-placeholder {
    opacity: .85;
}

.pc-image-label {
    color: #9aa4b2;
    font-size: .9rem;
    font-weight: 700;
}

.pc-close-btn {
    align-self: center;
    width: min(500px, 100%);
    height: 50px;
    background: #c0392b;
    color: #fff;
    border: 1px solid #922b21;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
}

.pc-close-btn:hover {
    background: #e74c3c;
}

@media (max-width: 900px) {
    .pc-panel {
        grid-template-columns: 1fr;
    }

    .pc-barcode-input {
        width: 100%;
        height: 52px;
        font-size: 1.4rem;
    }

    .pc-search-btn {
        width: 100%;
        height: 48px;
    }
}

.bulk-wrap { margin: 0 1rem; max-height: calc(100vh - 240px); }
.bulk-table input, .bulk-table select {
    width: 100%;
    min-width: 70px;
    height: 28px;
    border: 1px solid #c5d0de;
    font-size: 16px;
}
.bulk-table tr.saved { background: #e8f8ec; }
.row-err { color: #a00; font-size: 16px; }

@media (max-width: 1100px) {
    .dgs-columns,
    .dgs-columns-header { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
    .pl-topbar {
        flex-direction: column;
        align-items: stretch;
        min-height: auto;
    }

    .product-list-page .pl-topbar {
        display: flex;
        grid-template-columns: none;
    }

    .pl-search-center {
        position: static;
        transform: none;
        display: flex;
        justify-content: center;
        order: 3;
        width: 100%;
    }

    .pl-toolbar {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 1100px) {
    .pl-header {
        flex-direction: column;
        align-items: stretch;
    }

    .pl-toolbar {
        margin-left: 0;
        justify-content: flex-end;
    }

    .pl-search {
        justify-content: flex-start;
    }
}

.coming-soon h1 {
    margin: 0 0 .5rem;
    color: var(--navy);
}

.dash-eyebrow {
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #5a6b86;
    font-size: 1rem;
    margin: 0 0 .35rem;
}

.path-chip {
    display: inline-block;
    margin-top: 1rem;
    padding: .4rem .7rem;
    background: #e9eef6;
    color: #334;
}

.coming-actions {
    margin-top: 1.25rem;
}

.btn-primary {
    display: inline-block;
    background: var(--navy);
    color: white;
    padding: .6rem 1rem;
    font-weight: 600;
    border: 0;
    cursor: pointer;
}

.btn-secondary {
    display: inline-block;
    background: #e8eef5;
    color: var(--navy);
    padding: .6rem 1rem;
    font-weight: 600;
    border: 1px solid #c5d0e0;
    cursor: pointer;
}

.user-page .user-form-narrow {
    max-width: 420px;
}

.user-editor {
    margin-bottom: 1rem;
    border: 1px solid #c5d0e0;
    background: #fff;
}

.user-editor-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    padding: 0 1rem 1rem;
}

/* Inventory User Management modal (WPF UserManagementWindow) */
.user-mgmt-modal-box {
    width: min(450px, 94vw);
    background: #f0f4f8;
    border: 1px solid #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
}

.user-mgmt-modal-box-wide {
    width: min(500px, 94vw);
}

.user-mgmt-modal-body {
    background: skyblue;
    padding: 12px 16px 18px;
}

.user-mgmt-toolbar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.user-mgmt-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.user-mgmt-form .sf-row {
    grid-template-columns: 110px minmax(0, 1fr);
    width: 100%;
}

.user-mgmt-form .sf-input,
.user-mgmt-form select.sf-input,
.user-mgmt-form input.sf-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.user-mgmt-actions {
    margin-top: 16px;
    justify-content: center;
}

.link-btn {
    background: none;
    border: 0;
    color: var(--navy);
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

/* ===== User / POS Permissions (WPF-style) ===== */
.perm-page .perm-topbar {
    background: skyblue;
    padding: 0 5px;
    border: 1px solid #9bb8d3;
    min-height: 58px;
}

.perm-roles-bar {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 1rem;
    align-items: start;
    margin-bottom: .5rem;
}

.perm-role-picker {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.perm-role-label {
    font-weight: 600;
    color: #05235a;
}

.perm-role-dropdown {
    width: 100%;
    max-width: 250px;
    height: 32px;
    padding: 0 .5rem;
    border: 1px solid #9bb8d3;
    font-size: 16px;
    background: #fff;
}

.perm-roles-table-wrap {
    min-width: 0;
    border: 1px solid #b7c9db;
    background: #fff;
    overflow: auto;
}

.perm-roles-table {
    margin: 0;
}

.perm-roles-table tbody tr {
    cursor: pointer;
}

.perm-roles-table tbody tr:hover {
    background: #eef5fc;
}

.perm-edit-btn {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

.perm-divider {
    border: 0;
    height: 3px;
    background: #808080;
    margin: .75rem 0 1rem;
}

.perm-groups-wrap {
    padding-left: 0;
}

.perm-hint {
    color: #666;
    margin: 1rem 0;
    font-size: 16px;
    text-align: center;
}

.perm-groups-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    align-items: flex-start;
    justify-content: center;
}

.perm-box {
    width: 300px;
    max-width: 100%;
    border: 2px solid #808080;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.perm-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    background: #05235a;
    color: yellow;
    padding: .45rem .55rem;
}

.perm-box-title {
    font-weight: 600;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.perm-select-all {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #adff2f;
    font-weight: 600;
    font-size: 16px;
    white-space: nowrap;
    cursor: pointer;
}

.perm-box-body {
    max-height: 150px;
    overflow-y: auto;
    padding: .15rem 0;
}

.perm-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .35rem .55rem;
    border-bottom: 1px solid #eef2f7;
}

.perm-item-row:last-child {
    border-bottom: 0;
}

.perm-item-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.perm-item-row input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .perm-roles-bar {
        grid-template-columns: 1fr;
    }

    .perm-role-dropdown {
        max-width: none;
    }

    .perm-box {
        width: 100%;
    }
}

.cell-input {
    width: 88px;
    padding: .2rem .3rem;
    border: 1px solid #c5d0e0;
    font: inherit;
    text-align: right;
}

.pl-table tbody tr:has(.cell-input:focus),
.pl-table tbody tr:has(.dgs-cell-input:focus),
.pl-table tbody tr:has(input:focus),
.pl-table tbody tr:has(select:focus),
.pl-table tbody tr:has(textarea:focus) {
    background: #fffacd;
}

.pl-table .cell-input:focus,
.pl-table .dgs-cell-input:focus,
.pl-grid-wrap .pl-table tbody input:focus,
.pl-grid-wrap .pl-table tbody select:focus,
.pl-grid-wrap .pl-table tbody textarea:focus {
    outline: 2px solid #05235a;
    border-color: #05235a;
    background: #fff;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none;
    left: 0;
    padding: .6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: .75rem;
    top: .5rem;
}

#blazor-error-ui .reload {
    margin-left: .5rem;
}

@media (max-width: 900px) {
    .login-header {
        min-height: 0;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 1rem 1.25rem;
        gap: .35rem;
    }

    .brand-slogan {
        text-align: left;
    }

    .login-body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 1.25rem;
        align-content: center;
    }

    .login-welcome-panel {
        order: -1;
    }

    .login-form-panel {
        width: min(400px, 100%);
    }

    .login-footer {
        min-height: 0;
        flex-direction: column;
        justify-content: center;
        padding: .85rem 1rem;
        gap: .35rem;
        font-size: .9rem;
    }

    .dash-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }

    .menu-user {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .login-header {
        padding: .85rem 1rem;
    }

    .brand-name {
        font-size: 1.45rem;
    }

    .brand-slogan {
        font-size: .9rem;
    }

    .login-body {
        gap: 1.15rem;
        padding: 1.15rem 1rem 1.5rem;
    }

    .login-welcome-panel h1 {
        font-size: 1.45rem;
    }

    .login-welcome-panel p {
        font-size: .9rem;
    }

    .welcome-badge {
        margin-top: .85rem;
        padding: .4rem .85rem;
        font-size: .9rem;
    }

    .login-form-panel label {
        font-size: 1rem;
    }

    .login-input {
        height: 46px;
        font-size: 16px; /* prevents iOS zoom on focus */
    }

    .login-btn {
        height: 48px;
        margin-top: 1.15rem;
        font-size: 1rem;
    }

    .login-footer {
        font-size: .8rem;
        padding: .75rem .85rem;
    }
}

.oc-page { max-width: 560px; }
.oc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin: 0 1rem .75rem;
    font-size: 1rem;
    color: #05235a;
}
.oc-tabs {
    display: flex;
    gap: .35rem;
    margin: 0 1rem .5rem;
}
.oc-tabs button {
    border: 1px solid #9bb8d3;
    background: #e8f0f8;
    color: #05235a;
    padding: .4rem .9rem;
    cursor: pointer;
    font-weight: 600;
}
.oc-tabs button.active {
    background: #05235a;
    color: #ffd700;
    border-color: #05235a;
}
.oc-form { max-width: 520px; }
.oc-table .oc-count {
    width: 100px;
    padding: .25rem .4rem;
    border: 1px solid #9bb8d3;
}
.oc-table tfoot td {
    border-top: 2px solid #05235a;
    padding-top: .5rem;
}

/* Dangerous utility pages */
.danger-banner {
    background: #fff1f1;
    border: 2px solid #c62828;
    color: #8b0000;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    border-radius: 2px;
}
.danger-banner h3 {
    margin: 0 0 .35rem;
    color: #b71c1c;
    font-size: 1.05rem;
}
.danger-banner p { margin: 0; font-size: 1rem; }
.btn-danger {
    background: #c62828;
    color: #fff;
    border: 1px solid #8e0000;
    padding: .45rem 1.1rem;
    cursor: pointer;
    font-weight: 600;
}
.btn-danger:disabled {
    opacity: .55;
    cursor: not-allowed;
}
.util-links {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: .75rem;
}
.util-links a {
    color: #05235a;
    font-weight: 600;
    text-decoration: underline;
}

/* Shortcut Keys help page */
.shortcut-keys-page .shortcut-intro {
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.shortcut-section {
    margin-bottom: 1.5rem;
}

.shortcut-section-title {
    margin: 0 0 .65rem;
    color: #05235a;
    font-size: 1.1rem;
    border-bottom: 2px solid #05235a;
    padding-bottom: .35rem;
}

.shortcut-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #b7c9db;
}

.shortcut-table th {
    background: #05235a;
    color: #fff;
    text-align: left;
    padding: .55rem .75rem;
    font-weight: 600;
}

.shortcut-table td {
    padding: .5rem .75rem;
    border-top: 1px solid #d8e4ef;
    vertical-align: top;
}

.shortcut-table tbody tr:nth-child(even) {
    background: #f7fafd;
}

.shortcut-detail {
    color: #445;
}

.shortcut-kbd {
    display: inline-block;
    min-width: 1.4rem;
    text-align: center;
    padding: .15rem .45rem;
    margin: 0 .15rem .15rem 0;
    border: 1px solid #9bb8d3;
    border-radius: 4px;
    background: linear-gradient(180deg, #fff, #e8eef5);
    box-shadow: 0 1px 0 #c5d4e4;
    font-family: Consolas, "Courier New", monospace;
    font-size: 1rem;
    color: #05235a;
    font-weight: 600;
}

.shortcut-keys-body {
    max-width: 1100px;
}

/* Minimum readable font — project-wide floor 16px (toolbar/list buttons use WPF sizes below) */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
button:not(.pl-tool):not(.pl-page-btns button):not(.pl-back):not(.menu-root-btn):not(.toast-close):not(.toast-action):not(.period-btns button):not(.dash-refresh) {
    font-size: max(var(--min-font), 1em);
}

/* Product Search picker (F2) — WPF ProductSearchWindow style */
.ps-search-overlay {
    z-index: 2100;
}

.ps-search-box {
    width: min(1100px, 96vw);
    height: min(650px, 92vh);
    background: skyblue;
    border: 10px solid #87cee2;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.ps-search-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    padding: .65rem .75rem;
    background: #05235a;
}

.ps-search-input {
    flex: 1 1 220px;
    min-width: 160px;
    height: 36px;
    font-size: 1rem;
    font-weight: 600;
    padding: 0 .65rem;
    border: 1px solid #6b8cce;
    border-radius: 4px;
    background: #05235a;
    color: #ff0;
}

.ps-search-input::placeholder {
    color: skyblue;
    font-weight: 500;
}

.ps-supplier-label {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: #ff0;
    font-weight: 600;
    font-size: .9rem;
    margin: 0;
}

.ps-supplier-select {
    min-width: 180px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid #ccc;
    padding: 0 .4rem;
    background: #fff;
    color: #05235a;
    font-weight: 600;
}

.ps-clear-btn {
    height: 36px;
    padding: 0 1rem;
}

.ps-count {
    color: skyblue;
    font-size: .85rem;
    white-space: nowrap;
}

.ps-search-grid-wrap {
    flex: 1;
    overflow: auto;
    position: relative;
    background: #e8f4fc;
    min-height: 0;
}

.ps-search-box .dgs-modal-actions {
    display: none;
}

.ps-search-table tbody tr {
    cursor: pointer;
}

.ps-search-table tbody tr:hover {
    background: #c5e4f7;
}

.ps-search-table tbody tr.ps-row-selected {
    background: #7ec8e8;
    font-weight: 600;
}

/* ===== Purchase Invoice (WPF parity) ===== */
.si-header-grid {
    grid-template-columns: repeat(6, minmax(85px, 1fr));
    gap: .28rem .4rem;
    padding: .4rem .5rem;
}

.si-header-grid .pi-hcol {
    gap: .28rem;
    min-width: 0;
}

.si-header-grid .pi-field > span {
    min-width: 62px;
    font-size: 13px;
}

.si-header-grid .pi-field input,
.si-header-grid .pi-field select {
    flex: 1 1 0;
    min-width: 0;
    height: 30px;
    font-size: 13px;
    padding: 0 .28rem;
}

.si-header-grid .pi-hcol:first-child .pi-field input {
    margin-right: 10px;
}

.si-header-grid .pi-hcol:nth-child(6) .pi-field input {
    margin-right: 10px;
}

.si-header-grid .si-new-cust {
    height: 28px;
    padding: 0 .35rem;
    font-size: 12px;
}

.si-header-grid .si-amt-col {
    display: none;
}

.si-new-cust {
    height: 30px;
    padding: 0 .45rem;
    background: #05235a;
    color: #ffd700;
    border: 0;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.si-footer {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 120px minmax(120px, 180px) minmax(480px, 1fr);
    gap: .5rem;
    margin: .5rem;
    min-height: 140px;
    flex: 0 0 auto;
    align-items: stretch;
}

.si-to-panel {
    background: #fff;
    border: 1px solid #05235a;
    padding: .5rem .65rem;
    font-weight: 700;
    color: #05235a;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    font-size: 16px;
}

.si-note-panel {
    background: #fff;
    border: 1px solid #05235a;
    padding: .4rem .5rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-size: 16px;
}

.si-note-panel label {
    font-weight: 700;
    color: #05235a;
}

.si-note-panel textarea {
    flex: 1;
    min-height: 80px;
    border: 1px solid #7aa;
    resize: vertical;
    font-weight: 600;
    color: #05235a;
    padding: .35rem;
}

.si-right-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .4rem;
    min-width: 0;
    min-height: 0;
    width: 100%;
}

.si-right-footer .pi-balance,
.si-right-footer .pi-pay {
    padding: .45rem .5rem;
    gap: .35rem;
    min-height: 0;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #05235a;
}

.si-right-footer .pi-bal-row,
.si-right-footer .pi-pay .pi-field {
    display: flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
}

.si-right-footer .pi-bal-row > span:first-child,
.si-right-footer .pi-pay .pi-field > span {
    min-width: 76px;
    flex: 0 0 76px;
    text-align: right;
}

.si-right-footer .pi-bal-row .pi-navy,
.si-right-footer .pi-pay .pi-field input,
.si-right-footer .pi-pay .pi-field .si-inv-bal {
    flex: 1 1 0;
    min-width: 0;
}

.si-right-footer .pi-pay .pi-field > span {
    min-width: 76px;
}

.si-inv-bal {
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
    color: #0a7a2f;
    background: #fff;
    border: 1px solid #05235a;
    padding: .25rem .4rem;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

@media (max-width: 1200px) {
    .si-header-grid {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
    .si-footer {
        grid-template-columns: 1fr 1fr;
    }
    .si-right-footer {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .si-footer {
        grid-template-columns: 1fr;
    }
}


.pi-page {
    background: skyblue;
    font-size: 14px;
    font-weight: 500;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.pi-page > .pl-header,
.pi-page > .pi-header-grid,
.pi-page > .pi-totals-bar,
.pi-page > .pi-footer,
.pi-page > .si-footer {
    flex: 0 0 auto;
}

.pi-header-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: .35rem .75rem;
    padding: .5rem .75rem;
    background: skyblue;
}

.pi-hcol {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.pi-field {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.pi-field > span {
    min-width: 78px;
    text-align: right;
    font-weight: 500;
    color: #05235a;
    font-size: 14px;
    white-space: nowrap;
}

.pi-field input,
.pi-field select {
    flex: 1;
    min-width: 0;
    height: 32px;
    border: 1px solid #7aa;
    border-radius: 2px;
    padding: 0 .4rem;
    font-weight: 500;
    font-size: 14px;
    color: #05235a;
    background: #fff;
}

.pi-supplier {
    background: lightyellow !important;
}

.pi-navy {
    background: #05235a !important;
    color: #ffd700 !important;
    border: 0 !important;
    text-align: center;
    font-weight: 500 !important;
    font-size: 14px !important;
    min-width: 90px;
    padding: .2rem .4rem;
    border-radius: 2px;
}

.pi-scan-row {
    padding: 0 .75rem .4rem;
}

.pi-scan-row label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 500;
    color: #05235a;
    font-size: 14px;
}

.pi-scan-row input {
    flex: 1;
    max-width: 420px;
    height: 32px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid #05235a;
    padding: 0 .5rem;
}

.pi-grid-wrap {
    margin: 0 .5rem;
    flex: 1 1 auto;
    min-height: 120px;
    max-height: none;
    overflow: auto;
    background: #fff;
    border: 1px solid #05235a;
}

.si-invoice-grid th:nth-child(7),
.si-invoice-grid td:nth-child(7),
.si-invoice-grid th:nth-child(9),
.si-invoice-grid td:nth-child(9) {
    display: none;
}

.si-invoice-grid {
    table-layout: fixed;
    width: 100%;
}

.si-invoice-grid th[class*="si-col-"],
.si-invoice-grid td[class*="si-col-"] {
    box-sizing: border-box;
    overflow: hidden;
}

.si-invoice-grid .si-col-uan {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}

.si-invoice-grid th.si-col-item,
.si-invoice-grid td.si-col-item {
    width: auto;
    min-width: 0;
    max-width: none;
    text-align: left !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.si-invoice-grid .si-col-csize,
.si-invoice-grid .si-col-psize {
    width: 55px;
    min-width: 55px;
    max-width: 55px;
}

.si-invoice-grid .si-col-ctn {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    padding-left: 1px;
    padding-right: 1px;
}

.si-invoice-grid .si-col-qty,
.si-invoice-grid .si-col-discper,
.si-invoice-grid .si-col-gst {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    padding-left: 1px;
    padding-right: 1px;
}

.si-invoice-grid .si-col-retail,
.si-invoice-grid .si-col-gross,
.si-invoice-grid .si-col-inv {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

.si-invoice-grid .si-col-disamt,
.si-invoice-grid .si-col-onhand {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

.si-invoice-grid .si-col-net {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

.si-invoice-grid .si-col-uan .cell-input,
.si-invoice-grid .si-col-ctn .cell-input,
.si-invoice-grid .si-col-qty .cell-input,
.si-invoice-grid .si-col-discper .cell-input,
.si-invoice-grid .si-col-retail .cell-input,
.si-invoice-grid .si-col-disamt .cell-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.si-invoice-grid th.si-col-onhand,
.si-invoice-grid td.si-col-onhand {
    box-sizing: border-box;
}

.si-invoice-grid th.si-col-action,
.si-invoice-grid td.si-col-action {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 0;
    box-sizing: border-box;
    text-align: center;
    vertical-align: middle;
    overflow: visible;
    position: sticky;
    right: 0;
    z-index: 1;
}

.si-invoice-grid thead th.si-col-action {
    background: #05235a !important;
    z-index: 2;
}

.si-invoice-grid tbody td.si-col-action {
    background: #fff;
}

.si-invoice-grid tbody tr:hover td.si-col-action {
    background: #eef5fb;
}

.si-invoice-grid tbody tr:has(.cell-input:focus) td.si-col-action,
.si-invoice-grid tbody tr:has(input:focus) td.si-col-action {
    background: #fffacd;
}

.si-invoice-grid td.si-col-action {
    display: table-cell;
}

.si-invoice-grid td.si-col-action .pi-del {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}

.si-invoice-grid td.si-col-action .pi-del img {
    width: 32px;
    height: 32px;
    display: block;
    object-fit: contain;
}

.pi-grid thead th {
    background: #05235a !important;
    color: #ffd700 !important;
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.pi-grid td {
    font-size: 14px;
    font-weight: 500;
    vertical-align: middle;
    text-align: center;
}

.pi-grid .num {
    text-align: center;
}

.pi-grid .cell-input {
    font-size: 14px;
    font-weight: 500;
    border: none !important;
    background: transparent !important;
    text-align: center;
    padding: 0 2px !important;
    margin: 0;
    box-shadow: none !important;
    outline: none !important;
    border-radius: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}

.pi-grid .cell-input::-webkit-outer-spin-button,
.pi-grid .cell-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pi-grid .pi-col-60 {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    box-sizing: border-box;
    padding-left: 1px;
    padding-right: 1px;
}

.pi-grid .pi-col-60 .cell-input,
.pi-grid .cell-input.pi-w60 {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    box-sizing: border-box;
    padding: 0 2px !important;
}

.pi-grid .cell-input:focus,
.pi-grid-wrap .pi-grid tbody input:focus,
.pi-grid-wrap .pi-grid tbody select:focus,
.pi-grid-wrap .pi-grid tbody textarea:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Override global pl-table focus white box inside purchase invoice grid */
.pl-table.pi-grid .cell-input:focus {
    outline: none !important;
    border: none !important;
    background: transparent !important;
}

.pi-grid tbody tr:has(.cell-input:focus),
.pi-grid tbody tr:has(input:focus) {
    background: #fffacd;
}

.pi-item,
.pi-grid th.pi-item {
    text-align: left !important;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.si-invoice-grid th.si-col-item.pi-item,
.si-invoice-grid td.si-col-item.pi-item {
    max-width: none;
}

.pi-grid td.actions {
    justify-content: center;
}

.pi-ro-cell {
    background: #05235a;
    color: #ffd700;
    font-weight: 500;
}

.pi-del {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

.pi-totals-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    background: #000;
    color: #fff;
    margin: .4rem .5rem 0;
    padding: .45rem .75rem;
    font-weight: 500;
    font-size: 14px;
    min-height: 35px;
}

.pi-totals-bar .pi-navy {
    min-width: 100px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pi-footer {
    display: grid;
    grid-template-columns: 1fr 280px 260px;
    gap: .5rem;
    margin: .4rem .5rem .5rem;
    min-height: 140px;
    max-height: 165px;
    font-size: 14px;
    font-weight: 500;
}

.pi-hist {
    overflow: auto;
    background: #fff;
    border: 1px solid #05235a;
    min-height: 0;
    height: 100%;
}

.pi-hist-table thead th {
    background: #05235a !important;
    color: #ffd700 !important;
    font-size: 14px;
    font-weight: 500;
}

.pi-hist-table td {
    font-size: 14px;
    font-weight: 500;
}

.pi-balance {
    background: #b8dceb;
    border: 2px solid #05235a;
    padding: .75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .55rem;
}

.pi-bal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: #05235a;
    gap: .5rem;
    font-size: 14px;
}

.pi-bal-row .pi-navy {
    min-width: 120px;
}

.pi-pay {
    background: skyblue;
    border: 1px solid #05235a;
    padding: .75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .65rem;
}

.pi-pay .pi-field > span {
    min-width: 90px;
}

/* Doc / Payment / Ledger modals */
.pi-doc-overlay,
.pi-pay-overlay,
.pi-ledger-overlay {
    z-index: 1200;
}

.pi-doc-box {
    width: min(750px, 96vw);
    max-height: 90vh;
    background: #05235a;
    border-radius: 10px;
    border: 1px solid #000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pi-doc-titlebar {
    background: #05235a !important;
    color: #ffd700 !important;
}

.pi-doc-search {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem .75rem;
    align-items: flex-end;
    padding: .75rem 1rem 0;
}

.pi-doc-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #ffd700;
    font-size: .78rem;
    font-weight: 700;
}

.pi-doc-date input[type="date"] {
    height: 36px;
    min-width: 150px;
    background: #05235a;
    color: #ffd700;
    border: 1px solid #889;
    border-radius: 5px;
    padding: 0 .5rem;
    font-weight: 700;
    font-size: .95rem;
}

.pi-doc-search-input {
    flex: 1 1 180px;
    min-width: 160px;
    height: 36px;
    background: #05235a;
    color: #ffd700;
    border: 1px solid #889;
    border-radius: 5px;
    padding: 0 .75rem;
    font-weight: 700;
    font-size: 1rem;
}

.si-header-grid .si-cust-picker,
.pi-supplier-picker {
    cursor: pointer;
}

.pi-cust-list-box {
    width: min(1100px, 96vw);
    background: #fff;
}

.pi-cust-list-box .pi-cust-list-toolbar {
    background: #fff;
}

.pi-cust-list-box .pi-cust-count {
    color: #05235a;
}

.pi-cust-list-box .pi-doc-search-input.pi-cust-search {
    background: #fff;
    color: #05235a;
    border: 1px solid #767676;
    width: 300px;
    max-width: 300px;
    flex: 0 0 300px;
}

.pi-cust-list-box .pi-doc-search-input.pi-cust-search::placeholder {
    color: #888;
}

.pi-cust-list-box .pi-doc-grid-wrap.pi-cust-grid-wrap {
    background: #fff;
}

.pi-cust-list-box .pi-cust-table tbody td {
    background: #fff;
    color: #111;
}

.pi-cust-list-box .pi-cust-table tbody tr:hover td {
    background: #eef5fb;
}

.pi-cust-list-box .pi-cust-table tbody tr.ps-row-selected td {
    background: #c5e4f7;
    font-weight: 600;
}

.pi-cust-list-box .dgs-modal-actions {
    background: #fff;
}

.pi-cust-list-toolbar {
    padding: .75rem 1rem 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .6rem .85rem;
}

.pi-cust-search {
    width: 300px;
    max-width: 300px;
    flex: 0 0 300px;
}

.pi-cust-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem .85rem;
    align-items: flex-end;
    flex: 1 1 auto;
}

.pi-cust-filters label {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 130px;
    font-size: 13px;
    font-weight: 600;
    color: #ffd700;
}

.pi-cust-filters select {
    height: 34px;
    border: 1px solid #889;
    border-radius: 3px;
    padding: 0 .4rem;
    background: #fff;
    color: #05235a;
    font-weight: 600;
}

.pi-cust-clear {
    height: 34px;
}

.pi-cust-count {
    color: #ffd700;
    font-weight: 700;
    font-size: 14px;
    margin-left: auto;
    white-space: nowrap;
    padding-bottom: .35rem;
}

.pi-cust-grid-wrap {
    min-height: 360px;
}

.pi-cust-table th.c,
.pi-cust-table td.c {
    text-align: center;
}

.pi-doc-search-input::placeholder {
    color: skyblue;
}

.pi-doc-grid-wrap {
    margin: .75rem 1rem;
    background: skyblue;
    flex: 1;
    overflow: auto;
    min-height: 280px;
    position: relative;
}

.pi-doc-table thead th {
    background: #05235a !important;
    color: #ffd700 !important;
}

.pi-doc-table td.c {
    text-align: center;
}

.pi-pay-box {
    width: min(950px, 96vw);
    max-height: 90vh;
    background: skyblue;
    border: 8px solid #05235a;
    border-radius: 8px;
    overflow: auto;
}

.pi-pay-wpf {
    padding-bottom: calc(.5rem + 20px);
}

.pi-pay-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem .75rem 0;
    background: skyblue;
}

.pi-pay-head-info {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.pi-pay-head-row {
    display: grid;
    grid-template-columns: 72px 120px 72px 140px;
    gap: 6px 10px;
    align-items: center;
}

.pi-pay-head-row .pi-pay-lbl-h {
    font-weight: 600;
    font-size: 13px;
    color: #05235a;
    text-align: right;
}

.pi-pay-head-row input {
    width: 100%;
    height: 30px;
    box-sizing: border-box;
}

.pi-pay-head-row input.pi-bal {
    color: #adff2f;
}

.pi-pay-form-panel {
    margin: .5rem .75rem;
    padding: .75rem;
    background: #b9e0f5;
    border: 1px inset #7eb8d4;
    border-radius: 4px;
}

.pi-pay-form-grid {
    display: grid;
    grid-template-columns: 100px 172px 36px 100px minmax(200px, 1fr) 168px;
    gap: 10px 4px;
    align-items: center;
}

.pi-pay-lbl {
    font-weight: 600;
    font-size: 13px;
    color: #05235a;
    text-align: right;
    padding-right: 4px;
    white-space: nowrap;
}

.pi-pay-lbl-empty {
    visibility: hidden;
}

.pi-pay-gap {
    display: block;
}

.pi-pay-cell-empty {
    display: block;
}

.pi-pay-inp {
    width: 100%;
    height: 30px;
    box-sizing: border-box;
    min-width: 0;
}

.pi-pay-inp-wide {
    grid-column: 5 / 6;
}

.pi-pay-inp-words {
    grid-column: 5 / 7;
}

.pi-pay-inp-readonly {
    background: #fff;
    font-weight: 700;
}

.pi-pay-inp-title {
    background: #d4ecff;
}

.pi-pay-pick {
    height: 32px;
    width: 100%;
    padding: 0 .35rem;
    border: none;
    border-radius: 3px;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    justify-self: stretch;
}

.pi-pay-pick:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.pi-pay-pick-k {
    background: #05235a;
}

.pi-pay-pick-j {
    background: #006400;
}

.pi-receipt-form .pi-pay-pick {
    font-weight: 500;
    font-size: 9px;
}

.pi-pay-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1.5rem;
    margin-bottom: .65rem;
}

.pi-pay-form-row label {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-weight: 600;
    font-size: 13px;
    color: #05235a;
    min-width: 0;
}

.pi-pay-form-row input,
.pi-pay-form-row select {
    height: 30px;
    min-width: 140px;
}

.pi-pay-form-row input[type="date"] {
    min-width: 150px;
}

.pi-pay-ac-row .pi-ac-code {
    width: 130px;
    background: #fff;
    font-weight: 700;
}

.pi-pay-ac-row .pi-ac-title {
    width: 200px;
    background: #d4ecff;
}

.pi-pay-words {
    flex: 1;
    min-width: 280px;
}

.pi-pay-words input {
    flex: 1;
    min-width: 260px;
    background: #d4ecff;
}

.pi-pay-narr {
    flex: 1;
    min-width: 280px;
}

.pi-pay-narr input {
    flex: 1;
    min-width: 260px;
}

.pi-pay-pick {
    height: 32px;
    padding: 0 .75rem;
    border: none;
    border-radius: 3px;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.pi-pay-pick:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.pi-pay-pick-k {
    background: #05235a;
}

.pi-pay-pick-j {
    background: #006400;
}

.pi-pay-toolbar {
    display: flex;
    gap: .35rem;
    padding: .5rem .75rem;
    background: skyblue;
}

.pi-pay-meta {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: .5rem .75rem 0;
    background: skyblue;
}

.pi-pay-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
}

.pi-pay-meta-row label {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    font-size: 13px;
    color: #05235a;
}

.pi-pay-meta-row input {
    width: 110px;
    height: 30px;
}

.pi-pay-meta-row input.pi-bal {
    color: #adff2f;
}

.ps-row-click {
    cursor: pointer;
}

.pi-pay-form {
    padding: 0 .75rem .5rem;
}

.pi-ledger-box {
    width: min(1100px, 98vw);
    max-height: 92vh;
    background: skyblue;
    border: 8px solid #05235a;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pi-ledger-grid {
    flex: 1;
    overflow: auto;
    margin: 0 .75rem .75rem;
    background: #fff;
    position: relative;
    min-height: 320px;
}

.cp-page {
    background: #f5f5f5;
}

.cp-panels {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1rem;
    max-width: 820px;
}

.cp-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: .75rem 1rem 1rem;
    margin: 0 0 10px;
    background: #fafafa;
}

.cp-box legend {
    font-weight: 700;
    color: #05235a;
    padding: 0 .4rem;
}

.cp-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    align-items: center;
}

.cp-row label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    color: #222;
}

.cp-row select {
    min-width: 150px;
    height: 28px;
}

.cp-hint {
    margin: .75rem 0 0;
    font-size: .85rem;
    color: #1a56b8;
}

/* ===== Control Panel (WPF ControlPanelWindow) ===== */
.cp-shell {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 48px);
    min-height: 520px;
    background: #fff;
    border: 2px solid #05235a;
    overflow: hidden;
}

.cp-titlebar {
    background: #05235a;
    color: #fff;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 16px;
    flex: 0 0 auto;
}

.cp-toolbar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    flex: 0 0 auto;
}

.cp-tb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #05235a;
    color: #fff;
    border: 1px solid #3a6fc8;
    border-radius: 6px;
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.cp-tb-btn:hover { background: #1a4bac; }
.cp-tb-btn:disabled { opacity: .55; cursor: not-allowed; }
.cp-tb-apply { background: #28a745; border-color: #1e7e34; }
.cp-tb-apply:hover { background: #218838; }
.cp-tb-reset { background: #6c757d; border-color: #5a6268; }
.cp-tb-reset:hover { background: #5a6268; }
.cp-tb-close { background: #dc3545; border-color: #c82333; }
.cp-tb-close:hover { background: #c82333; }

.cp-body {
    display: grid;
    grid-template-columns: 250px 1fr;
    flex: 1 1 auto;
    min-height: 0;
}

.cp-sidebar {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
    background: #fff;
    min-height: 0;
}

.cp-sidebar-head {
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 700;
    color: #05235a;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.cp-nav {
    flex: 1 1 auto;
    overflow: auto;
    padding: 15px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cp-nav-item {
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 12px 15px;
    margin: 2px 5px;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
}

.cp-nav-item:hover {
    background: #e3f2fd;
    color: #05235a;
}

.cp-nav-item.active {
    background: #05235a;
    color: #fff;
    border-color: #3a6fc8;
}

.cp-sidebar-foot {
    padding: 10px 15px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 11px;
    color: #6c757d;
}

.cp-sidebar-foot .muted {
    font-size: 10px;
    color: #adb5bd;
    margin-top: 2px;
}

.cp-content {
    background: #f8f9fa;
    padding: 20px;
    overflow: auto;
    min-height: 0;
}

.cp-content-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    min-height: 100%;
}

.cp-section-pad { padding: 20px; }

.cp-form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 5px;
}

.cp-label {
    width: 200px;
    font-weight: 600;
    color: #222;
    flex: 0 0 auto;
}

.cp-form-row select,
.cp-text {
    width: 150px;
    height: 28px;
    border: 1px solid #bbb;
    border-radius: 3px;
    padding: 2px 6px;
}

.cp-text { width: 300px; max-width: 100%; }

.cp-path-ok {
    margin: 6px 5px 0;
    font-size: 11px;
    color: darkgreen;
}

.cp-placeholder h3 {
    margin: 0 0 8px;
    color: #05235a;
}

.cp-placeholder p { color: #666; }

.cp-statusbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #05235a;
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    flex: 0 0 auto;
}

.cp-status-right { color: #adb5bd; font-size: 10px; }

/* Print options (WPF PdfExportWindow) */
.print-opt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12000;
}

.print-opt-box {
    width: 350px;
    background: skyblue;
    border-radius: 6px;
    padding: 18px 16px 14px;
    box-shadow: 0 8px 28px rgba(0,0,0,.25);
}

.print-opt-box h3 {
    margin: 0 0 14px;
    text-align: center;
    color: #05235a;
    font-size: 18px;
}

.print-opt-label {
    display: block;
    font-weight: 700;
    color: #05235a;
    margin: 0 0 4px;
}

.print-opt-box select {
    width: 100%;
    height: 30px;
    font-size: 14px;
    margin-bottom: 14px;
}

.print-opt-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
}

.print-opt-ok {
    background: #05235a;
    color: #fff;
    border: 0;
    border-radius: 5px;
    width: 120px;
    height: 35px;
    font-weight: 700;
    cursor: pointer;
}

.print-opt-cancel {
    background: gray;
    color: #fff;
    border: 0;
    border-radius: 5px;
    width: 80px;
    height: 35px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 900px) {
    .cp-body { grid-template-columns: 1fr; }
    .cp-sidebar { max-height: 220px; }
}

@media (max-width: 1200px) {
    .pi-header-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .pi-footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .pi-header-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Sales Report (WPF-style) ===== */
.sr-page {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    background: #fff;
}

.sr-app-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 50px;
    background: #05235a;
    color: #ff0;
}

.sr-app-header h1 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #ff0;
}

.sr-back-btn {
    position: absolute;
    left: 10px;
    background: #007acc;
    color: #ff0;
    border: none;
    padding: 4px 10px;
    cursor: pointer;
    font-weight: 600;
}

.sr-filter-panel {
    background: skyblue;
    padding: 4px 8px;
}

.sr-filter-grid {
    display: grid;
    grid-template-columns: auto auto auto 1fr auto auto;
    gap: 8px 12px;
    align-items: stretch;
}

.sr-filter-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: flex-start;
}

.sr-field {
    display: grid;
    align-items: center;
    column-gap: 5px;
}

/* Fixed label width per column so inputs align vertically */
.sr-filter-col-dates .sr-field {
    grid-template-columns: 72px 120px;
}

.sr-filter-col-loc .sr-field {
    grid-template-columns: 62px 140px;
}

.sr-filter-col-report .sr-field {
    grid-template-columns: 88px 190px;
}

.sr-filter-extra .sr-field {
    grid-template-columns: 82px 190px;
}

.sr-label {
    font-weight: 600;
    font-size: .82rem;
    white-space: nowrap;
    margin: 0;
    text-align: left;
}

.sr-input,
.sr-select {
    box-sizing: border-box;
    width: 100%;
    height: 28px;
    min-height: 28px;
    max-height: 28px;
    padding: 0 4px;
    line-height: 26px;
    font-size: 12px;
    border: 1px solid #767676;
    border-radius: 2px;
}

.sr-input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    padding: 0 3px;
}

.sr-select-wide {
    /* width controlled by grid column */
}

.sr-filter-options {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
}

.sr-radio-row {
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 28px;
}

.sr-radio {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: .82rem;
    margin: 0;
}

.sr-export-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
}

.sr-export-row .pl-tool {
    width: 52px;
    height: 40px;
    min-width: 52px;
    padding: 2px 4px;
}

.sr-export-row .pl-tool img {
    width: 28px;
    height: 22px;
}

.sr-export-row .pl-tool span,
.sr-export-row .pl-tool-sm {
    font-size: 9px;
}

.sr-filter-run {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}

.sr-get-report {
    width: 100px;
    height: 50px;
    background: #05235a;
    color: #ff0;
    border: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.15;
    padding: 4px 6px;
    cursor: pointer;
    white-space: normal;
    text-align: center;
}

.sr-get-report:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.sr-report-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.sr-logo-box {
    width: 80px;
    height: 60px;
    border: 2px solid #05235a;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #05235a;
    overflow: hidden;
    padding: 2px;
}

.sr-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sr-report-title-block {
    text-align: center;
}

.sr-report-main-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #05235a;
}

.sr-report-date-range {
    font-size: .9rem;
    font-weight: 600;
    color: #05235a;
}

.sr-report-meta {
    text-align: right;
    font-size: .75rem;
    color: #333;
    line-height: 1.4;
}

.sr-grid-wrap {
    position: relative;
    flex: 1 1 auto;
    overflow: auto;
    margin: 5px 0;
    min-height: 240px;
}

.sr-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    background: #f9f9f9;
    color: #666;
}

.sr-empty-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.sr-empty-sub {
    font-size: .8rem;
    color: #888;
}

.sr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}

.sr-table th {
    background: #05235a;
    color: #fff;
    font-weight: 700;
    padding: 6px 4px;
    border: 1px solid #ccc;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1;
}

.sr-table td {
    border: 1px solid #ddd;
    padding: 4px 6px;
    vertical-align: middle;
}

.sr-table td.num,
.sr-table th.num {
    text-align: right;
    white-space: nowrap;
}

.sr-table td.center {
    text-align: center;
}

.sr-row-header td {
    background: #e8f4ff;
    font-weight: 700;
}

.sr-row-detail td {
    background: #fff;
}

.sr-row-total td {
    background: #05235a;
    color: #fff;
    font-weight: 700;
}

.sr-row-total .return-val {
    color: #fff;
}

.return-val {
    color: #c00;
}

.sr-footer-totals {
    display: grid;
    grid-template-columns: 1.5fr repeat(5, 1fr);
    gap: 10px;
    align-items: center;
    background: #05235a;
    color: #fff;
    padding: 8px 12px;
}

.sr-footer-label {
    font-weight: 700;
    font-size: .95rem;
}

.sr-footer-stat {
    text-align: right;
}

.sr-footer-stat span {
    display: block;
    color: #ccc;
    font-size: .65rem;
}

.sr-footer-stat strong {
    font-size: .85rem;
}

.sr-page-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    background: #f0f0f0;
    border-top: 1px solid #e0e0e0;
    padding: 5px 10px;
    font-size: .65rem;
    color: #666;
}

.sr-page-footer span:last-child {
    text-align: right;
}

@media (max-width: 1200px) {
    .sr-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sr-footer-totals {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== Supplier Ledger (WPF-style) ===== */
.sl-filter-grid {
    display: grid;
    grid-template-columns: auto auto auto 1fr;
    gap: 8px 12px;
    align-items: center;
}

.sl-filter-supplier .sl-supplier-field {
    grid-template-columns: 62px 150px;
}

.sl-filter-right {
    justify-content: flex-end;
}

.sl-controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
}

.sl-controls-row .sr-radio-row {
    min-height: 28px;
    margin: 0;
}

.sl-controls-row .sr-export-row {
    margin: 0;
}

.sl-supplier-input {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    cursor: pointer;
    background: #fff;
}

.sl-supplier-search {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    height: 28px;
    padding: 0 6px;
    background: #007acc;
    color: #ff0;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.sl-controls-row .sr-get-report {
    width: 100px;
    height: 40px;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
}

.sl-add-payment {
    width: 110px;
    height: 40px;
    background: #b23a1e;
    color: #fff;
    border: none;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

.sl-add-payment:hover {
    filter: brightness(1.05);
}

.sl-table .sl-debit {
    color: #c00;
}

.sl-table .sl-credit {
    color: #080;
}

.sl-table .sl-balance {
    color: #00c;
    font-weight: 600;
}

.sl-row-opening td {
    background: #e3f2fd;
    font-weight: 700;
}

.sl-status-credit {
    background: #f08080;
    color: #111;
    font-weight: 600;
}

.sl-status-debit {
    background: #ffb6c1;
    color: #111;
    font-weight: 600;
}

@media (max-width: 1200px) {
    .sl-filter-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== POS Cash Sale (WPF POSWindow replica) ===== */

.pos-layout-shell {
    height: 100vh;
    overflow: hidden;
    background: skyblue;
}

.pos-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    background: skyblue;
    outline: none;
}

.pos-auth-wait { padding: 2rem; text-align: center; }

/* --- Header --- */
.pos-header {
    display: grid;
    grid-template-columns: 1fr 230px;
    border: 1px solid #05235a;
    background: skyblue;
    flex: 0 0 auto;
}

.pos-header-left {
    padding: 5px;
    min-width: 0;
}

.pos-meta-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0;
    width: 100%;
}

.pos-meta-right {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    margin-left: auto;
}

.pos-meta-item {
    position: relative;
    margin-right: 4px;
}

.pos-meta-label {
    display: block;
    font-weight: 600;
    color: #05235a;
    font-size: 14px;
    line-height: 1;
    margin-bottom: 2px;
    padding-left: 2px;
}

.pos-meta-value {
    display: block;
    background: #05235a;
    color: yellow;
    border: 0;
    height: 35px;
    font-size: 16px;
    text-align: center;
    padding: 0 4px;
    box-sizing: border-box;
}

.pos-meta-value.w150 { width: 150px; }
.pos-meta-value.w160 { width: 160px; }
.pos-meta-value.w85  { width: 85px; }
.pos-meta-value.w114 { width: 114px; }
.pos-meta-value.w100 { width: 100px; }

/* --- Input panels --- */
.pos-panels-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin-top: 6px;
    align-items: stretch;
}

.pos-panel {
    background: lightblue;
    padding: 4px 8px;
    box-shadow: 0 0 15px rgba(173, 216, 230, 0.8);
    height: 75px;
    min-height: 75px;
    box-sizing: border-box;
    overflow: hidden;
}

.pos-field-line {
    display: grid;
    grid-template-columns: 70px 1fr;
    align-items: center;
    margin-bottom: 4px;
}

.pos-field-line label {
    font-weight: 600;
    color: #05235a;
    font-size: 14px;
    text-align: right;
    padding-right: 4px;
}

.pos-edit {
    height: 28px;
    font-size: 16px;
    text-align: center;
    border: 1px solid #999;
    padding: 0 4px;
    box-sizing: border-box;
    width: 100%;
    max-width: 160px;
    justify-self: end;
}

.pos-edit-sm {
    max-width: 100px;
    font-size: 18px;
}

.pos-panel-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.pos-panel-center p {
    margin: 2px 0;
    color: #05235a;
    font-size: 14px;
    font-weight: 500;
}

.pos-disc-radios {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 600;
    color: #05235a;
}

.pos-disc-fields {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.pos-disc-left,
.pos-disc-right {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pos-disc-left label,
.pos-disc-right label {
    font-weight: 600;
    color: #05235a;
    font-size: 14px;
}

.pos-disc-right {
    align-items: flex-end;
}

/* --- Selected item preview --- */
.pos-preview-bar {
    display: flex;
    gap: 5px;
    background: #000;
    padding: 5px;
    margin-top: 6px;
}

.pos-preview-name {
    flex: 1;
    min-width: 200px;
    height: 50px;
    font-size: 30px;
    font-weight: 800;
    background: #05235a;
    color: yellow;
    border: 0;
    padding: 0 8px;
    box-sizing: border-box;
}

.pos-preview-cell {
    width: 120px;
    flex-shrink: 0;
    height: 50px;
    font-size: 30px;
    font-weight: 800;
    background: #05235a;
    color: yellow;
    border: 0;
    text-align: center;
    box-sizing: border-box;
}

/* --- Brand panel --- */
.pos-brand {
    background: #05235a;
    text-align: center;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 189px;
}

.pos-brand-logo { width: 50px; height: 50px; object-fit: contain; }

.pos-brand-name {
    font-size: 25px;
    font-weight: 600;
    color: yellow;
    font-family: Constantia, "Times New Roman", serif;
    line-height: 1.2;
}

.pos-brand-sub {
    font-size: 18px;
    font-weight: 600;
    color: whitesmoke;
}

.pos-brand-phone {
    font-size: 16px;
    font-weight: 600;
    color: skyblue;
}

/* --- Workspace: main column + sidebar --- */
.pos-workspace {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 273px;
    overflow: hidden;
}

.pos-main-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border-right: 1px solid #05235a;
}

.pos-grid-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    background: #F5F5F5;
    border-top: 1px solid #05235a;
}

.pos-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px;
    table-layout: fixed;
}

.pos-grid th {
    background: #05235a;
    color: whitesmoke;
    font-size: 16px;
    height: 35px;
    padding: 0 2px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1;
    font-weight: 600;
}

.pos-grid td {
    height: 35px;
    padding: 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-grid tbody tr:nth-child(even) { background: #ffffff; }
.pos-grid tbody tr:nth-child(odd)  { background: #F5F5F5; }
.pos-grid tbody tr.selected { outline: 2px solid #05235a; outline-offset: -2px; }
.pos-grid tbody tr.void-row   { background: #ff4444 !important; color: #fff; }
.pos-grid tbody tr.return-row { background: orange !important; }
.pos-grid .ctr { text-align: center; }

.pos-grid .c-sr   { width: 40px; }
.pos-grid .c-bar  { width: 80px; }
.pos-grid .c-uan  { width: 120px; }
.pos-grid .c-name { width: auto; }
.pos-grid .c-qty  { width: 60px; }
.pos-grid .c-ret  { width: 85px; }
.pos-grid .c-dp   { width: 60px; }
.pos-grid .c-da   { width: 80px; }
.pos-grid .c-amt  { width: 90px; }
.pos-grid .c-stk  { width: 65px; }

/* --- Bottom: totals + toolbar (fixed; maximize grid space) --- */
.pos-bottom {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    background: lightblue;
    border-top: 1px solid #05235a;
}

.pos-totals-bar {
    display: flex;
    align-items: center;
    background: #000;
    height: 45px;
    margin: 0;
    padding: 0 10px;
    gap: 0;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

.pos-totals-bar span {
    color: #fff;
    white-space: nowrap;
}

.pos-totals-bar span strong {
    color: greenyellow;
    font-size: 20px;
}

.pos-totals-lbl {
    color: greenyellow !important;
    margin-right: 20px;
}

.pos-totals-bar span:nth-child(2) { margin-right: auto; padding-left: 20px; }
.pos-totals-bar span:nth-child(3) { margin-right: 40px; }
.pos-totals-bar span:nth-child(4) { margin-right: 40px; }

.pos-toolbar-row {
    display: grid;
    grid-template-columns: 1fr 90px;
    gap: 0;
    margin: 0;
    padding: 0 2px;
    align-items: end;
    flex-shrink: 0;
}

.pos-toolbar-main {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: end;
    gap: 4px;
    overflow-x: auto;
    margin: 0;
    padding: 0;
}

.pos-toolbar-logout {
    display: flex;
    justify-content: center;
    align-items: end;
    margin: 0;
    padding: 0;
}

.pos-toolbar-secondary {
    display: none;
}

/* --- Sidebar --- */
.pos-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.pos-sidebar-extra { background: #000; }
.pos-sidebar-hold  { background: #05235a; }

.pos-sidebar-hdr {
    text-align: center;
    font-weight: 600;
    height: 35px;
    line-height: 35px;
    color: lawngreen;
    background: #000;
    flex-shrink: 0;
    font-size: 14px;
}

.pos-sidebar-hdr.hold {
    background: #05235a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 8px;
    position: relative;
}

.pos-hold-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 4px;
}

.pos-extra-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px 6px;
    padding: 8px 6px;
    background: lightblue;
    justify-content: stretch;
    align-content: start;
    overflow-y: auto;
    flex: 1 1 auto;
}

.pos-extra-grid .pos-btn-sm {
    width: 100%;
    max-width: none;
}

.pos-extra-grid .pos-btn-wide {
    grid-column: auto;
    width: 100%;
}

.pos-hold-table {
    width: 100%;
    border-collapse: collapse;
    background: lightblue;
    font-size: 14px;
    flex: 1 1 auto;
    overflow: auto;
}

.pos-hold-table th {
    background: yellow;
    color: #05235a;
    font-weight: 700;
    padding: 4px;
    text-align: center;
    position: sticky;
    top: 0;
}

.pos-hold-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #05235a;
}

.pos-hold-table tbody tr { cursor: pointer; }
.pos-hold-table tbody tr:hover { background: skyblue; }
.pos-hold-table .ctr { text-align: center; }

/* --- Buttons (WPF GradientButtonStyle) --- */
.pos-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    font-weight: 600;
    color: #05235a;
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    border-radius: 5px;
    padding: 3px;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.5);
    transition: background 0.12s, color 0.12s;
    box-sizing: border-box;
}

.pos-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #05235a 0%, #000 100%);
    color: #fff;
}

.pos-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pos-btn-lg {
    width: 88px;
    height: 90px;
    flex-shrink: 0;
}

.pos-btn-sm {
    width: 85px;
    height: 65px;
}

.pos-btn-wide {
    grid-column: span 2;
    width: 100%;
}

.pos-btn-logout {
    width: 90px;
    height: 90px;
}

.pos-btn-key {
    font-size: 12px;
    line-height: 1.1;
    font-weight: 600;
}

.pos-btn-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin: 2px 0;
}

.pos-btn-img-lg {
    width: 65px;
    height: 65px;
}

.pos-btn-sm .pos-btn-img {
    width: 35px;
    height: 35px;
}

.pos-btn-lbl {
    font-size: 12px;
    line-height: 1.1;
    text-align: center;
    font-weight: 600;
}

@media (max-width: 1400px) {
    .pos-workspace { grid-template-columns: 1fr 240px; }
    .pos-toolbar-row { grid-template-columns: 1fr 80px; }
}

@media (max-width: 1100px) {
    .pos-header { grid-template-columns: 1fr; }
    .pos-meta-row { flex-wrap: wrap; }
    .pos-workspace { grid-template-columns: 1fr; }
    .pos-sidebar { max-height: 200px; }
    .pos-toolbar-row { grid-template-columns: 1fr; }
    .pos-toolbar-main { flex-wrap: wrap; }
}

/* ===== POS Payment modal (WPF PaymentWindow) ===== */
.pos-pay-overlay { z-index: 2200; }

.pos-pay-box {
    width: min(600px, 96vw);
    background: lightskyblue;
    border: 1px solid #05235a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .4);
}

.pos-pay-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    padding: 0 10px;
    background: gray;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.pos-pay-net {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 20px;
    background: coral;
    color: #fff;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700;
}

.pos-pay-methods {
    display: flex;
    gap: 12px;
    padding: 12px 15px;
    flex-wrap: wrap;
}

.pos-pay-method {
    width: 130px;
    height: 60px;
    border: 0;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
}

.pos-pay-method.cash { background: green; }
.pos-pay-method.card { background: purple; }
.pos-pay-method.split,
.pos-pay-method.party { background: burlywood; color: #05235a; }
.pos-pay-method.party { opacity: .55; cursor: not-allowed; }
.pos-pay-method.active { outline: 3px solid #05235a; outline-offset: 1px; }

.pos-pay-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
}

.pos-pay-row label {
    width: 160px;
    text-align: right;
    color: darkblue;
    font-weight: 700;
    font-size: 16px;
}

.pos-pay-input,
.pos-pay-balance {
    flex: 1;
    height: 44px;
    font-size: 20px;
    font-weight: 700;
    text-align: right;
    padding: 0 10px;
    border: 1px solid #9bb8d3;
    box-sizing: border-box;
    color: darkblue;
}

.pos-pay-input.center { text-align: center; }

.pos-pay-balance {
    background: #05235a;
    color: #fff;
    border: 0;
}

.pos-pay-balance.due { color: #ff6b6b; }
.pos-pay-balance.change { color: #fff; }

.pos-pay-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 16px 10px 20px;
}

.pos-pay-btn {
    width: 100px;
    height: 50px;
    border: 0;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.pos-pay-btn.clear { background: blue; color: #fff; }
.pos-pay-btn.update { background: yellow; color: #000; }
.pos-pay-btn.save { background: green; color: #fff; }
.pos-pay-btn:disabled { opacity: .45; cursor: not-allowed; }

/* POS price override */
.pos-ovr-box {
    width: min(420px, 94vw);
    background: #f0f4f8;
    border: 1px solid #000;
    border-radius: 10px;
    overflow: hidden;
}

.pos-ovr-body {
    background: skyblue;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pos-ovr-body label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 700;
    color: #05235a;
}

.pos-ovr-body input {
    height: 36px;
    padding: 0 8px;
    border: 1px solid #9bb8d3;
    font-size: 18px;
    font-weight: 700;
}

/* POS calculator */
.pos-calc-box {
    width: min(280px, 92vw);
    background: #05235a;
    border-radius: 10px;
    padding: 12px;
    color: #fff;
}

.pos-calc-display {
    width: 100%;
    height: 48px;
    margin-bottom: 10px;
    text-align: right;
    font-size: 1.6rem;
    font-weight: 700;
    padding: 0 10px;
    box-sizing: border-box;
    background: #03153a;
    color: #ffd700;
    border: 1px solid #6b8cce;
}

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

.pos-calc-grid button {
    height: 44px;
    border: 0;
    background: #2f80c8;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
}

.pos-calc-grid button.op { background: #e67e22; }
.pos-calc-grid button.eq { background: green; }
.pos-calc-grid button.clr { background: #c0392b; }

/* ===== Report host modal (WPF maximized ShowDialog) ===== */
.rpt-host-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    background: rgba(3, 21, 58, 0.45);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.rpt-host-window {
    flex: 1;
    margin: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.rpt-host-window > .sr-page,
.rpt-host-window > .fr-page,
.rpt-host-window > .user-page {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.app-content:has(.fr-page) {
    padding: 0;
    overflow: hidden;
}

/* Financial / compact reports — WPF SkyBlue filter bar */
.fr-page {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    background: #fff;
}

.fr-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    background: skyblue;
    padding: 10px 15px;
}

.fr-filter-bar label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin: 0;
}

.fr-filter-bar input[type="date"],
.fr-filter-bar select,
.fr-filter-bar input[type="text"],
.fr-filter-bar input[type="number"] {
    height: 30px;
    min-width: 130px;
    padding: 2px 6px;
    border: 1px solid #7aa;
    background: #fff;
}

.fr-get-btn {
    height: 36px;
    min-width: 100px;
    padding: 0 14px;
    border: none;
    background: #05235a;
    color: #ff0;
    font-weight: 700;
    cursor: pointer;
}

.fr-get-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.fr-export-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fr-grid-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 10px;
    position: relative;
}
