@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  --purple: #5149b9;
  --purple-2: #6966d8;
  --ink: #17171d;
  --muted: #999ba4;
  --page: #f5f7ff;
  --line: #dce5ff;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: 'Nunito Sans', Arial, sans-serif; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 93px; flex: 0 0 93px; background: #fff; display: flex; flex-direction: column; align-items: center; z-index: 3; }
.brand { height: 103px; width: 100%; display: flex; justify-content: center; align-items: flex-start; padding-top: 21px; }
.brand-mark { width: 35px; height: 35px; border-radius: 4px; background: #ed1685; color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; line-height: 1; }
.brand-mark i { font-size: 20px; }
.brand-mark small { font-size: 6px; font-weight: 900; margin-top: -1px; }
.side-nav { width: 100%; display: flex; flex-direction: column; gap: 27px; }
.side-nav .nav-link { color: #b9b9b9; font-size: 16px; display: flex; align-items: center; flex-direction: column; gap: 4px; padding: 0; }
.nav-icon { width: 65px; height: 37px; display: flex; justify-content: center; align-items: center; border-radius: 22px; font-size: 30px; }
.side-nav .nav-link.active { color: #4f4bc0; }
.side-nav .nav-link.active .nav-icon { background: #dce7ff; color: #819ef8; }
.main-content { flex: 1; min-width: 0; padding: 12px 20px 20px 23px; display: flex; flex-direction: column; gap: 23px; }
.welcome-banner { height: 151px; min-height: 151px; border-radius: 20px; background: linear-gradient(110deg, #7c9bf9 0%, #3ab9ed 100%); color: #fff; position: relative; overflow: hidden; padding: 19px 19px; display: flex; justify-content: space-between; }
.welcome-copy, .top-actions { position: relative; z-index: 1; }
.current-date { font-size: 16px; font-weight: 800; margin-bottom: 5px; }
.welcome-copy h1 { font-size: 25px; line-height: 1.25; font-weight: 900; margin: 0 0 5px; letter-spacing: -.4px; }
.store-info { font-size: 16px; font-weight: 800; }
.store-info span { padding: 0 7px; }
.banner-pattern { position: absolute; width: 275px; height: 260px; right: -6px; top: -62px; opacity: .14; border: 22px solid #fff; border-radius: 48% 52% 40% 60%; transform: rotate(30deg); }
.banner-pattern:before, .banner-pattern:after { content: ''; position: absolute; border: 19px solid #fff; border-radius: 60% 40% 55% 45%; transform: rotate(25deg); }
.banner-pattern:before { width: 100px; height: 230px; top: 12px; left: 28px; }
.banner-pattern:after { width: 70px; height: 190px; top: 38px; left: 115px; }
.top-actions { display: flex; align-items: flex-start; gap: 11px; }
.action-btn, .profile-btn { border: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.22); font-size: 25px; }
.action-btn:hover { background: rgba(255,255,255,.36); }
.profile-btn { background: #f4b5df; color: #8b4779; font-size: 34px; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.summary-card { min-height: 107px; border-radius: 17px; padding: 17px 19px; display: flex; align-items: center; gap: 12px; box-shadow: 0 7px 17px rgba(43, 54, 100, .035); }
.revenue-today { background: linear-gradient(110deg, #4e48b3, #6c68d8); color: #fff; box-shadow: 0 8px 15px rgba(76, 72, 175, .25); }
.revenue-month { background: #fff; color: #111; }
.summary-icon { width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.24); color: #58c9e5; font-size: 24px; }
.revenue-month .summary-icon { background: #e4edff; color: #4b80ed; }
.summary-copy { position: relative; padding-top: 5px; }
.currency { position: absolute; top: 0; left: 0; transform: translateY(-2px); font-size: 13px; font-weight: 900; }
.amount { font-size: clamp(25px, 2vw, 33px); font-weight: 800; line-height: 1.12; letter-spacing: .2px; padding-left: 19px; white-space: nowrap; }
.summary-label { font-size: 16px; font-weight: 700; margin-top: 5px; }
.round-arrow { display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: #fff; color: #514bb7; margin-left: 9px; font-size: 12px; vertical-align: -2px; }
.revenue-month .summary-label { font-weight: 500; }
.revenue-month .round-arrow { background: #514bb7; color: #fff; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; flex: 1; min-height: 400px; }
.panel { background: #fff; border-radius: 18px; padding: 18px 18px 20px; min-width: 0; box-shadow: 0 8px 24px rgba(49, 61, 111, .035); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.panel-heading h2 { font-size: 25px; font-weight: 500; margin: 0; letter-spacing: -.6px; }
.show-all { border: 0; border-radius: 22px; background: #e6efff; color: #4d4abd; padding: 6px 13px; white-space: nowrap; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; }
.show-all:hover { background: #d7e4ff; }
.show-all i { font-size: 19px; }
.transaction-list { display: flex; flex-direction: column; gap: 11px; }
.transaction-item { min-height: 86px; background: #f4f7ff; border: 1px solid #d8e3ff; border-radius: 12px; padding: 8px 8px 7px; position: relative; }
.transaction-meta { display: flex; justify-content: space-between; gap: 10px; color: #81838c; font-size: 12px; font-weight: 900; letter-spacing: .3px; }
.transaction-meta time { color: #9b9da4; font-size: 12px; white-space: nowrap; }
.transaction-name { font-size: 16px; font-weight: 900; margin-top: 1px; }
.transaction-amount { text-align: right; color: #514bb7; font-size: 18px; line-height: 1.2; font-weight: 900; margin-top: 2px; }
.promo-panel { display: flex; flex-direction: column; }
.empty-state { flex: 1; min-height: 260px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-bottom: 12px; }
.empty-icon { width: 77px; height: 77px; border: 1.5px solid #aaa; border-radius: 24px; color: #a4a4a4; display: grid; place-items: center; font-size: 29px; position: relative; margin-bottom: 14px; }
.small-x { position: absolute; right: 14px; bottom: 17px; background: white; font-size: 13px; }
.empty-state h3 { font-size: 18px; font-weight: 700; margin: 0 0 1px; }
.empty-state p { color: #a1a1a1; font-size: 16px; margin: 0; }
@media (min-width: 1500px) { .main-content { padding-top: 12px; } }
@media (max-width: 1100px) {
  .sidebar { width: 76px; flex-basis: 76px; }
  .main-content { padding: 12px; gap: 16px; }
  .content-grid { gap: 14px; }
  .panel-heading h2 { font-size: 21px; }
  .show-all { font-size: 13px; padding: 6px 10px; }
  .summary-card { padding: 14px; }
  .top-actions { gap: 6px; }
  .action-btn, .profile-btn { width: 43px; height: 43px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; padding-bottom: 72px; }
  .sidebar { position: fixed; bottom: 0; left: 0; right: 0; height: 66px; width: 100%; flex-direction: row; justify-content: center; box-shadow: 0 -3px 15px rgba(0,0,0,.06); }
  .brand { display: none; }
  .side-nav { flex-direction: row; justify-content: space-around; gap: 0; height: 100%; align-items: center; }
  .side-nav .nav-link { font-size: 11px; gap: 0; min-width: 56px; }
  .nav-icon { height: 31px; width: 48px; font-size: 23px; }
  .main-content { padding: 10px; gap: 14px; }
  .welcome-banner { height: auto; min-height: 155px; padding: 17px; border-radius: 16px; }
  .welcome-copy { max-width: 75%; }
  .current-date, .store-info { font-size: 12px; }
  .welcome-copy h1 { font-size: 20px; }
  .top-actions { position: absolute; top: 12px; right: 12px; gap: 5px; }
  .action-btn { display: none; }
  .profile-btn { width: 38px; height: 38px; font-size: 26px; }
  .summary-grid, .content-grid { grid-template-columns: 1fr; gap: 12px; }
  .summary-card { min-height: 94px; }
  .amount { font-size: 28px; }
  .panel { padding: 15px; }
  .panel-heading { margin-bottom: 16px; align-items: flex-start; }
  .panel-heading h2 { font-size: 19px; }
  .show-all { font-size: 11px; padding: 6px 9px; gap: 4px; }
  .content-grid { min-height: 0; }
  .transactions-panel { min-height: 360px; }
  .promo-panel { min-height: 330px; }
  .empty-state p { font-size: 13px; }
}

.action-btn.is-refreshing i { animation: spin .5s linear; }
@keyframes spin { to { transform: rotate(360deg); } }
.transaction-list.show-all-transactions .transaction-item { min-height: 96px; }
.button-clicked { transform: scale(.98); }

/* Sidebar navigation with collapsible submenus */
.side-nav { gap: 20px; padding: 0 7px 20px; }
.side-nav .nav-link { width: 100%; text-decoration: none; background: transparent; border: 0; cursor: pointer; }
.nav-group { width: 100%; display: flex; flex-direction: column; align-items: center; }
.nav-group-toggle { font: inherit; }
.nav-group-toggle .nav-icon { position: relative; }
.nav-group-toggle::after { content: ''; }
.nav-group-toggle[aria-expanded="true"] .nav-icon { background: #dce7ff; color: #819ef8; }
.submenu { width: 100%; padding: 7px 0 0 9px; }
.submenu-link { display: flex; align-items: flex-start; gap: 7px; color: #9295a1; text-decoration: none; font-size: 12px; line-height: 1.25; padding: 7px 2px; text-align: left; }
.submenu-link:hover, .submenu-link:focus { color: #514bb7; }
.submenu-dot { width: 5px; height: 5px; flex: 0 0 5px; margin-top: 5px; border-radius: 50%; background: #b9c7f5; }
.submenu-link:hover .submenu-dot { background: #514bb7; }
@media (max-width: 760px) {
  .app-shell { padding-bottom: 82px; }
  .sidebar {
    position: fixed;
    z-index: 1050;
    display: flex;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    height: 74px;
    min-height: 74px;
    flex: none;
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #e7eaf4;
    box-shadow: 0 -4px 18px rgba(40, 50, 90, .10);
  }
  .brand { display: none; }
  .side-nav {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-around;
    gap: 0;
    overflow: visible;
  }
  .side-nav > .nav-link,
  .side-nav > .nav-group {
    min-width: 0;
    width: 20%;
    flex: 1 1 20%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .side-nav .nav-link {
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 2px 0;
    gap: 1px;
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
  }
  .nav-group { position: relative; }
  .nav-group-toggle { width: 100% !important; }
  .nav-icon {
    width: 44px;
    height: 34px;
    flex: 0 0 34px;
    font-size: 22px;
  }
  .nav-group-toggle[aria-expanded="true"] .nav-icon {
    background: #dce7ff;
    color: #819ef8;
  }
  .submenu {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: auto;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e5e9f6;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(30, 40, 80, .16);
    z-index: 1060;
  }
  .submenu.show { display: block !important; }
  .submenu-link {
    padding: 11px 8px;
    font-size: 13px;
    align-items: center;
    border-bottom: 1px solid #f0f2f8;
  }
  .submenu-link:last-child { border-bottom: 0; }
}


/* ===== POS transaction page ===== */
.pos-transaction-page { overflow: hidden; }
.pos-shell { min-height: 100vh; display: flex; }
.pos-main { flex: 1; min-width: 0; padding: 11px 15px 0 17px; display: flex; flex-direction: column; }
.transaction-toolbar { height: 72px; flex: 0 0 72px; display: flex; align-items: flex-start; justify-content: space-between; }
.transaction-tabs { height: 57px; width: 345px; max-width: 50%; display: flex; background: #fff; border-radius: 32px; padding: 6px; box-shadow: 0 3px 12px rgba(44,54,100,.025); }
.transaction-tab { flex: 1; border: 0; border-radius: 27px; background: transparent; color: #4d49b6; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 13px; font-size: 15px; }
.transaction-tab i { font-size: 22px; }
.transaction-tab.active { background: #504bb5; color: #fff; }
.device-actions { display: flex; gap: 10px; align-items: center; }
.device-btn { position: relative; width: 49px; height: 49px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 3px 12px rgba(44,54,100,.025); display: grid; place-items: center; color: #222; font-size: 23px; }
.status-device { width: 53px; border-radius: 28px; }
.status-dot { position: absolute; width: 17px; height: 17px; border-radius: 50%; right: 4px; bottom: 3px; color: white; display: grid; place-items: center; font-size: 12px; border: 1px solid #fff; }
.status-dot.ok { background: #4caf50; }
.status-dot.error { background: #f04438; }
.transaction-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(390px, 32.4%); gap: 10px; }
.transaction-workspace { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; padding-bottom: 47px; }
.sale-summary { min-height: 202px; border-radius: 16px; padding: 11px 12px; color: #fff; background: linear-gradient(110deg, #7c9bf9 0%, #25b9ed 100%); position: relative; overflow: hidden; }
.sale-total-label { font-size: 15px; font-weight: 900; letter-spacing: 4px; }
.sale-total-value { line-height: 1; font-weight: 900; font-size: clamp(32px, 2.7vw, 47px); letter-spacing: -.5px; }
.sale-total-value span { font-size: 14px; vertical-align: top; letter-spacing: 0; }
.sale-total-value strong { font-weight: 900; }
.sale-details { border-top: 1px solid rgba(255,255,255,.35); margin-top: 9px; padding-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sale-customer > strong, .sale-scm > strong { display: block; font-size: 14px; margin-bottom: 5px; }
.customer-options { display: flex; align-items: center; gap: 9px; }
.customer-symbol, .scm-icon { width: 36px; height: 35px; border-radius: 9px; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: 23px; flex: 0 0 auto; }
.customer-pill { height: 34px; padding: 0 15px; border: 1px solid rgba(255,255,255,.9); border-radius: 12px; background: transparent; color: #fff; font-weight: 700; white-space: nowrap; }
.customer-pill.selected { background: #fff; color: #514bb7; }
.circle-next { border: 1px solid rgba(255,255,255,.9); width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: transparent; }
.customer-name { font-size: 14px; font-weight: 800; margin: 8px 0 0 44px; white-space: nowrap; }
.customer-name span { padding: 0 8px; }
.scm-value { display: flex; align-items: center; gap: 10px; font-weight: 800; line-height: 1.4; }
.scm-value .circle-next { margin-left: 4px; }
.sale-meta { position: absolute; right: 13px; top: 12px; display: flex; flex-direction: column; gap: 6px; text-align: right; padding-left: 12px; }
.sale-meta > div { display: grid; grid-template-columns: auto 23px; column-gap: 10px; align-items: center; }
.sale-meta strong { grid-column: 1; font-size: 12px; line-height: 1.1; }
.sale-meta span { grid-column: 1; font-size: 14px; font-weight: 900; max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sale-meta i { grid-column: 2; grid-row: 1 / span 2; font-size: 22px; }
.product-search-row { display: flex; gap: 10px; margin: 10px 0 12px; height: 53px; flex: 0 0 53px; }
.product-search { background: #fff; border: 1px solid #bfc1c8; border-radius: 12px; display: flex; align-items: center; gap: 13px; padding: 0 14px; flex: 1; min-width: 0; }
.product-search i { font-size: 23px; color: #222; }
.product-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 15px; color: #222; }
.utility-btn { flex: 0 0 51px; width: 51px; border: 1px solid #c7c8ce; border-radius: 12px; background: #fff; color: #292929; font-size: 23px; }
.cart-list { display: flex; flex-direction: column; gap: 9px; overflow-y: auto; }
.cart-item { min-height: 74px; display: flex; align-items: center; gap: 9px; padding: 8px 9px; background: #fff; border: 2px solid #e4edff; border-radius: 12px; }
.product-thumb { width: 44px; height: 44px; border-radius: 9px; flex: 0 0 44px; background: #fde7f2; color: #ef92c3; display: flex; align-items: center; justify-content: center; flex-direction: column; background-image: radial-gradient(#f4bad7 2px, transparent 3px); background-size: 12px 12px; }
.product-thumb i { font-size: 20px; }
.product-thumb small { font-size: 5px; font-weight: 900; }
.product-info { display: flex; flex-direction: column; min-width: 100px; flex: 1; gap: 5px; }
.product-info strong { font-size: 15px; font-weight: 900; color: #222; }
.product-info span { color: #999; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-info b { padding: 0 4px; }
.quantity-control { display: flex; align-items: center; justify-content: space-between; width: 132px; flex: 0 0 132px; height: 39px; border-radius: 22px; border: 1px solid #e1e1e7; background: #fff; padding: 0 7px; }
.quantity-control button { border: 0; background: transparent; padding: 0; color: #6592ff; font-size: 23px; display: grid; place-items: center; }
.qty-value { font-size: 14px; }
.discount-box { min-width: 64px; height: 48px; border-radius: 12px; background: #f5f7ff; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; }
.discount-box span, .item-subtotal span { font-size: 14px; color: #b4b4b4; font-weight: 700; }
.discount-box strong { font-size: 14px; font-weight: 500; }
.item-subtotal { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 102px; }
.item-subtotal strong { font-size: 14px; white-space: nowrap; }
.remove-item { border: 0; background: transparent; color: #f04438; font-size: 22px; padding: 3px; }
.transaction-footer { position: absolute; bottom: 0; left: 0; right: 0; min-height: 39px; display: flex; align-items: center; gap: 10px; padding: 4px 10px; background: #dce8ff; border-radius: 16px 16px 0 0; overflow: hidden; white-space: nowrap; }
.transaction-footer span { background: #f7f9ff; border-radius: 20px; padding: 4px 12px; font-size: 11px; font-weight: 800; color: #858995; letter-spacing: .3px; }
.transaction-footer strong { color: #4a4b54; padding-left: 5px; }
.checkout-panel { background: #fff; border-radius: 17px; padding: 21px 18px 17px; align-self: start; min-width: 0; box-shadow: 0 6px 18px rgba(38,49,96,.025); }
.checkout-panel h2 { font-size: 16px; font-weight: 900; margin: 0 0 18px; }
.market-share-card { min-height: 105px; border: 1.5px solid #7e9bff; background: #f5f7ff; border-radius: 11px; padding: 13px; display: flex; align-items: center; gap: 14px; color: #3b3b43; font-size: 16px; line-height: 1.55; }
.market-share-card > i { color: #4f4bb7; font-size: 35px; flex: 0 0 auto; }
.market-share-card strong { display: block; color: #4f4bb7; font-size: 14px; margin-top: 4px; }
.voucher-section { margin-top: 22px; }
.voucher-section h3, .transaction-recap h3 { font-size: 16px; font-weight: 900; margin: 0 0 12px; }
.voucher-button { display: flex; align-items: center; gap: 11px; width: 100%; height: 48px; border: 0; border-radius: 12px; padding: 0 13px; background: #fbe4ed; color: #25232a; text-align: left; font-size: 12px; }
.voucher-button > i:first-child { font-size: 24px; color: #ff2672; }
.voucher-button span { flex: 1; }
.voucher-arrow { border-left: 1px dashed #ff2672; padding-left: 12px; font-size: 23px; color: #ff2672; }
.checkout-toggle-row { min-height: 62px; border-bottom: 1px solid #dedee2; display: flex; align-items: center; justify-content: space-between; font-size: 15px; }
.switch { position: relative; width: 57px; height: 35px; flex: 0 0 auto; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; background: #e9e4ec; border: 2px solid #88818e; border-radius: 30px; cursor: pointer; transition: .2s; }
.switch span:before { content: ''; position: absolute; width: 18px; height: 18px; left: 6px; top: 6px; border-radius: 50%; background: #827d86; transition: .2s; }
.switch input:checked + span { background: #514bb7; border-color: #514bb7; }
.switch input:checked + span:before { transform: translateX(22px); background: #fff; }
.transaction-note { width: 100%; margin-top: 10px; border: 1px solid #d9e4ff; border-radius: 9px; padding: 9px; font-size: 13px; resize: vertical; }
.transaction-recap { border: 2px solid #dce7ff; border-radius: 11px; background: #f5f7ff; padding: 12px 11px 9px; margin-top: 18px; }
.transaction-recap h3 { margin-bottom: 14px; }
.transaction-recap > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin: 7px 0; }
.transaction-recap > div span { color: #7b7c85; }
.transaction-recap > div strong { font-weight: 500; white-space: nowrap; }
.transaction-recap hr { border-color: #bfc0ca; margin: 11px 0; }
.transaction-recap .recap-total { margin-bottom: 0; }
.transaction-recap .recap-total strong { font-weight: 900; font-size: 16px; }
.pay-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 87px; border: 0; border-radius: 12px; background: #504bb5; color: #fff; margin-top: 6px; padding: 13px 17px; text-align: left; }
.pay-button span { display: flex; flex-direction: column; }
.pay-button small { font-size: 12px; font-weight: 800; }
.pay-button span strong { font-size: 21px; line-height: 1.1; font-weight: 900; }
.pay-button span strong b { font-weight: 900; }
.pay-button > b { font-size: 23px; font-weight: 900; }
.pos-toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 18px; border-radius: 12px; color: #fff; background: #29283b; box-shadow: 0 5px 20px #0002; transition: .2s; z-index: 100; }
.pos-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1250px) {
  .transaction-layout { grid-template-columns: minmax(0, 1fr) 370px; }
  .sale-meta { transform: scale(.9); transform-origin: top right; }
  .sale-customer { max-width: 100%; overflow: hidden; }
  .customer-options { gap: 5px; }
  .customer-pill { padding: 0 9px; }
  .product-info span { font-size: 12px; }
  .quantity-control { width: 100px; flex-basis: 100px; }
  .discount-box { min-width: 55px; }
  .item-subtotal { min-width: 90px; }
}
@media (max-width: 950px) {
  .pos-transaction-page { overflow: auto; }
  .pos-main { padding: 10px; }
  .transaction-layout { display: flex; flex-direction: column; }
  .transaction-workspace { min-height: 420px; }
  .checkout-panel { width: 100%; }
  .sale-meta { position: static; transform: none; display: flex; flex-direction: row; justify-content: space-between; text-align: left; margin-top: 8px; padding: 0; }
  .sale-meta > div { text-align: left; }
  .sale-summary { padding: 12px; }
  .sale-details { grid-template-columns: 1fr; }
  .sale-scm { display: none; }
  .sale-customer { padding-bottom: 4px; }
  .transaction-footer { position: static; margin-top: 12px; flex-wrap: wrap; }
  .transaction-workspace { padding-bottom: 0; }
}
@media (max-width: 600px) {
  .pos-shell { display: block; padding-bottom: 68px; }
  .pos-transaction-page .sidebar { position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; height: 66px; width: 100%; flex-direction: row; justify-content: center; box-shadow: 0 -3px 15px rgba(0,0,0,.06); }
  .pos-transaction-page .brand, .pos-transaction-page .logout-btn { display: none; }
  .pos-transaction-page .side-nav { flex-direction: row; justify-content: space-around; gap: 0; height: 100%; align-items: center; }
  .pos-transaction-page .side-nav .nav-link { font-size: 11px; gap: 0; min-width: 56px; }
  .pos-transaction-page .nav-icon { height: 31px; width: 48px; font-size: 23px; }
  .transaction-toolbar { height: 62px; flex-basis: 62px; }
  .transaction-tabs { max-width: none; width: 240px; height: 47px; padding: 4px; }
  .transaction-tab { font-size: 12px; gap: 6px; }
  .transaction-tab i { font-size: 17px; }
  .device-actions { gap: 5px; }
  .device-btn { width: 38px; height: 38px; font-size: 18px; }
  .status-device { display: none; }
  .sale-total-value { font-size: 35px; }
  .sale-summary { min-height: 0; }
  .sale-details { margin-top: 8px; }
  .customer-options { overflow-x: auto; padding-bottom: 2px; }
  .customer-name { margin-left: 0; font-size: 12px; }
  .customer-pill { padding: 0 10px; font-size: 12px; height: 31px; }
  .sale-meta { font-size: 11px; gap: 12px; }
  .sale-meta span { max-width: 160px; font-size: 11px; }
  .sale-meta strong { font-size: 10px; }
  .sale-meta i { font-size: 17px; }
  .product-search-row { height: 46px; flex-basis: 46px; gap: 6px; }
  .utility-btn { flex-basis: 43px; width: 43px; font-size: 20px; }
  .cart-item { flex-wrap: wrap; gap: 7px; padding: 8px; }
  .product-info { flex-basis: calc(100% - 60px); }
  .product-info strong { font-size: 13px; }
  .product-info span { font-size: 11px; }
  .quantity-control { margin-left: 50px; width: 95px; flex-basis: 95px; }
  .discount-box { height: 39px; min-width: 53px; }
  .discount-box span, .item-subtotal span { font-size: 11px; }
  .item-subtotal { min-width: 80px; }
  .item-subtotal strong { font-size: 12px; }
  .remove-item { margin-left: auto; }
  .transaction-footer { gap: 5px; }
  .transaction-footer span { font-size: 9px; padding: 4px 7px; }
  .checkout-panel { padding: 16px 13px; }
  .market-share-card { font-size: 14px; }
  .transaction-recap > div { font-size: 12px; }
  .pay-button { min-height: 72px; }
}

/* ===== Product search modal ===== */
.product-search-trigger { border: 0; background: transparent; color: #17171d; padding: 0; margin: 0 0 0 1px; width: 27px; height: 100%; flex: 0 0 27px; display: grid; place-items: center; font-size: 23px; }
.product-search input[readonly] { cursor: pointer; }
.product-search-modal { --bs-modal-bg: #f5f7ff; }
.product-search-modal .modal-content { border: 0; border-radius: 0; background: #f5f7ff; color: #202027; }
.product-modal-topbar { display: flex; align-items: center; gap: 24px; padding: 20px 20px 15px; }
.product-modal-back { width: 61px; height: 61px; border: 0; border-radius: 50%; background: #fff; color: #45454d; box-shadow: 0 5px 20px rgba(30,35,75,.05); flex: 0 0 61px; font-size: 27px; display: grid; place-items: center; }
.product-modal-search { height: 68px; border-radius: 40px; background: #fff; display: flex; align-items: center; gap: 24px; padding: 0 28px; flex: 1; box-shadow: 0 7px 22px rgba(30,35,75,.045); }
.product-modal-search > i { font-size: 26px; }
.product-modal-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 18px; color: #33313a; }
.product-modal-search input::placeholder { color: #57545f; opacity: 1; }
.product-modal-body { padding: 20px; overflow: auto; }
.product-modal-body > h2 { font-size: 18px; font-weight: 900; margin: 0 0 13px; }
.product-results-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; align-items: start; }
.product-result-card { min-width: 0; background: #fff; border: 1px solid #e0e9ff; border-radius: 13px; overflow: hidden; }
.product-result-image { aspect-ratio: 1 / .91; margin: 12px 12px 0; border-radius: 11px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-direction: column; background: #f9dfee; color: #ed8fc1; }
.pattern-clothes { position: absolute; inset: -12px; font-size: 34px; line-height: 2.3; letter-spacing: 3px; opacity: .65; transform: rotate(-8deg); overflow: hidden; text-align: center; }
.rabbani-art { position: relative; z-index: 1; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; font-size: clamp(46px, 4.3vw, 82px); font-weight: 900; line-height: .85; text-shadow: 0 1px #fbd8ea; }
.rabbani-art strong { font-size: clamp(20px, 1.6vw, 31px); letter-spacing: -1.5px; }
.add-product-btn { position: absolute; top: 7px; right: 7px; z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 13px; color: #fff; background: #514bb7; font-size: 24px; display: grid; place-items: center; }
.add-product-btn:hover { background: #403b9d; }
.product-result-info { padding: 10px 12px 12px; }
.product-result-info h3 { font-size: 16px; line-height: 1.25; font-weight: 900; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-result-info p { color: #818188; font-size: 14px; line-height: 1.35; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-result-info p b { padding: 0 4px; }
.result-bottom { display: flex; justify-content: space-between; align-items: center; gap: 7px; margin-top: 7px; font-size: 14px; }
.result-bottom span { color: #77777d; white-space: nowrap; }
.result-bottom strong { color: #504bb5; white-space: nowrap; font-size: 15px; }
.product-no-results { text-align: center; padding: 55px 10px; color: #777; }
@media (max-width: 1200px) { .product-results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 700px) {
  .product-modal-topbar { gap: 10px; padding: 12px; }
  .product-modal-back { width: 45px; height: 45px; flex-basis: 45px; font-size: 22px; }
  .product-modal-search { height: 48px; gap: 10px; padding: 0 14px; }
  .product-modal-search input { font-size: 14px; }
  .product-modal-search > i { font-size: 20px; }
  .product-modal-body { padding: 12px; }
  .product-results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-result-image { margin: 7px 7px 0; }
  .product-result-info { padding: 8px; }
  .product-result-info h3 { font-size: 13px; }
  .product-result-info p, .result-bottom { font-size: 11px; }
  .result-bottom strong { font-size: 12px; }
  .add-product-btn { width: 36px; height: 36px; font-size: 19px; border-radius: 10px; }
}

/* Product selection: whole card is clickable */
.product-result-card { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.product-result-card:hover { border-color: #aaaaff; box-shadow: 0 5px 16px rgba(79,75,183,.12); transform: translateY(-1px); }
.product-result-card .add-product-btn { cursor: pointer; }


/* Collapsible hover sidebar */
.pos-shell > .sidebar,
.app-shell > .sidebar {
  width: 88px;
  flex: 0 0 88px;
  overflow: visible;
  position: relative;
  transition: width .22s ease, flex-basis .22s ease, box-shadow .22s ease;
  z-index: 50;
}
.pos-shell > .sidebar:hover,
.pos-shell > .sidebar:focus-within,
.app-shell > .sidebar:hover,
.app-shell > .sidebar:focus-within {
  width: 236px;
  flex-basis: 236px;
  box-shadow: 8px 0 28px rgba(47, 53, 98, .12);
}
.pos-shell > .sidebar .side-nav,
.app-shell > .sidebar .side-nav {
  align-items: stretch;
  width: 100%;
  gap: 13px;
  padding: 0 10px;
}
.pos-shell > .sidebar .side-nav .nav-link,
.app-shell > .sidebar .side-nav .nav-link {
  position: relative;
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 16px;
  grid-template-rows: auto;
  align-items: center;
  justify-items: start;
  column-gap: 10px;
  padding: 4px 8px;
  border-radius: 14px;
  white-space: nowrap;
  overflow: hidden;
}
.pos-shell > .sidebar .side-nav .nav-icon,
.app-shell > .sidebar .side-nav .nav-icon {
  grid-column: 1;
  grid-row: 1;
  width: 44px;
  height: 38px;
  font-size: 25px;
  flex: 0 0 44px;
}
.pos-shell > .sidebar .side-nav .nav-link > span:last-child,
.app-shell > .sidebar .side-nav .nav-link > span:last-child {
  grid-column: 2;
  grid-row: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease;
  font-size: 14px;
}
.pos-shell > .sidebar:hover .side-nav .nav-link > span:last-child,
.pos-shell > .sidebar:focus-within .side-nav .nav-link > span:last-child,
.app-shell > .sidebar:hover .side-nav .nav-link > span:last-child,
.app-shell > .sidebar:focus-within .side-nav .nav-link > span:last-child {
  opacity: 1;
  visibility: visible;
}
.pos-shell > .sidebar .side-nav .nav-link.active,
.app-shell > .sidebar .side-nav .nav-link.active {
  background: transparent;
}
.pos-shell > .sidebar .side-nav .nav-link.active .nav-icon,
.app-shell > .sidebar .side-nav .nav-link.active .nav-icon {
  background: #dce7ff;
  color: #819ef8;
}
.pos-shell > .sidebar .nav-group,
.app-shell > .sidebar .nav-group {
  width: 100%;
}
.pos-shell > .sidebar .nav-group > .nav-link::after,
.app-shell > .sidebar .nav-group > .nav-link::after {
  content: '';
  grid-column: 3;
  grid-row: 1;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0;
  margin-top: -4px;
}
.pos-shell > .sidebar:hover .nav-group > .nav-link::after,
.pos-shell > .sidebar:focus-within .nav-group > .nav-link::after,
.app-shell > .sidebar:hover .nav-group > .nav-link::after,
.app-shell > .sidebar:focus-within .nav-group > .nav-link::after {
  opacity: .7;
}
.pos-shell > .sidebar .nav-submenu,
.app-shell > .sidebar .nav-submenu {
  display: none;
  padding: 0 0 0 61px;
  margin: -3px 0 3px;
}
.pos-shell > .sidebar:hover .nav-submenu,
.pos-shell > .sidebar:focus-within .nav-submenu,
.app-shell > .sidebar:hover .nav-submenu,
.app-shell > .sidebar:focus-within .nav-submenu {
  display: block;
}
.pos-shell > .sidebar .nav-submenu a,
.app-shell > .sidebar .nav-submenu a {
  display: block;
  color: #9297a6;
  font-size: 12px;
  text-decoration: none;
  padding: 6px 0;
  white-space: nowrap;
}
.pos-shell > .sidebar .nav-submenu a::before,
.app-shell > .sidebar .nav-submenu a::before {
  content: '•';
  color: #9eb5ff;
  margin-right: 8px;
}
.pos-shell > .sidebar .brand,
.app-shell > .sidebar .brand {
  width: 100%;
  flex: 0 0 96px;
}
.pos-shell > .sidebar .logout-btn,
.app-shell > .sidebar .logout-btn {
  margin-top: auto;
  align-self: center;
}
@media (max-width: 760px) {
  .pos-shell > .sidebar,
  .app-shell > .sidebar,
  .pos-shell > .sidebar:hover,
  .pos-shell > .sidebar:focus-within,
  .app-shell > .sidebar:hover,
  .app-shell > .sidebar:focus-within {
    width: 100%;
    flex-basis: auto;
    box-shadow: 0 -3px 15px rgba(0,0,0,.06);
  }
  .pos-shell > .sidebar .side-nav,
  .app-shell > .sidebar .side-nav {
    align-items: center;
    padding: 0;
    gap: 0;
  }
  .pos-shell > .sidebar .side-nav .nav-link,
  .app-shell > .sidebar .side-nav .nav-link {
    width: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-items: center;
    align-items: center;
    padding: 0;
    overflow: visible;
  }
  .pos-shell > .sidebar .side-nav .nav-link > span:last-child,
  .app-shell > .sidebar .side-nav .nav-link > span:last-child {
    opacity: 1;
    visibility: visible;
    font-size: 11px;
  }
  .pos-shell > .sidebar .nav-submenu,
  .app-shell > .sidebar .nav-submenu,
  .pos-shell > .sidebar .nav-group > .nav-link::after,
  .app-shell > .sidebar .nav-group > .nav-link::after {
    display: none !important;
  }
}


/* ===== Sidebar UX refinement: click-to-expand, aligned submenu ===== */
@media (min-width: 761px) {
  .pos-shell > .sidebar,
  .app-shell > .sidebar {
    width: 88px;
    flex: 0 0 88px;
    transition: width .22s ease, flex-basis .22s ease, box-shadow .22s ease;
  }

  /* Explicit state only; hovering no longer expands the sidebar. */
  .pos-shell > .sidebar:hover,
  .pos-shell > .sidebar:focus-within,
  .app-shell > .sidebar:hover,
  .app-shell > .sidebar:focus-within {
    width: 88px;
    flex-basis: 88px;
    box-shadow: none;
  }
  .pos-shell > .sidebar.is-expanded,
  .app-shell > .sidebar.is-expanded {
    width: 236px;
    flex-basis: 236px;
    box-shadow: 8px 0 24px rgba(47, 53, 98, .09);
  }
  .pos-shell > .sidebar .side-nav .nav-link > span:last-child,
  .app-shell > .sidebar .side-nav .nav-link > span:last-child {
    opacity: 0;
    visibility: hidden;
  }
  .pos-shell > .sidebar.is-expanded .side-nav .nav-link > span:last-child,
  .app-shell > .sidebar.is-expanded .side-nav .nav-link > span:last-child {
    opacity: 1;
    visibility: visible;
  }
  .pos-shell > .sidebar .nav-submenu,
  .app-shell > .sidebar .nav-submenu {
    display: none;
    padding: 0 0 0 43px;
    margin: 0 0 5px;
  }
  .pos-shell > .sidebar.is-expanded .nav-group.submenu-open > .nav-submenu,
  .app-shell > .sidebar.is-expanded .nav-group.submenu-open > .nav-submenu {
    display: block;
  }
  .pos-shell > .sidebar .nav-group > .nav-link::after,
  .app-shell > .sidebar .nav-group > .nav-link::after {
    opacity: 0;
  }
  .pos-shell > .sidebar.is-expanded .nav-group > .nav-link::after,
  .app-shell > .sidebar.is-expanded .nav-group > .nav-link::after {
    opacity: .65;
  }
  .pos-shell > .sidebar .nav-submenu a,
  .app-shell > .sidebar .nav-submenu a {
    min-height: 29px;
    padding: 6px 0;
    line-height: 1.35;
    font-size: 12px;
    color: #9297a6;
  }
  .pos-shell > .sidebar .nav-submenu a:hover,
  .app-shell > .sidebar .nav-submenu a:hover {
    color: #514bb7;
  }
  .pos-shell > .sidebar .brand,
  .app-shell > .sidebar .brand {
    cursor: pointer;
  }
}


/* ===== Final sidebar layout fix: stable collapsed / expanded states ===== */
@media (min-width: 761px) {
  .app-shell > aside.sidebar,
  .pos-shell > aside.sidebar {
    box-sizing: border-box !important;
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    flex: 0 0 88px !important;
    align-items: stretch !important;
    overflow: hidden !important;
    position: relative !important;
    background: #fff !important;
    transition: width .2s ease, min-width .2s ease, max-width .2s ease, flex-basis .2s ease, box-shadow .2s ease !important;
    box-shadow: none !important;
  }
  .app-shell > aside.sidebar.is-expanded,
  .pos-shell > aside.sidebar.is-expanded {
    width: 236px !important;
    min-width: 236px !important;
    max-width: 236px !important;
    flex: 0 0 236px !important;
    overflow-x: hidden !important;
    box-shadow: 5px 0 20px rgba(40, 48, 90, .07) !important;
  }
  .app-shell > aside.sidebar .brand,
  .pos-shell > aside.sidebar .brand {
    height: 88px !important;
    min-height: 88px !important;
    flex: 0 0 88px !important;
    padding: 20px 0 0 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    cursor: pointer !important;
  }
  .app-shell > aside.sidebar .side-nav,
  .pos-shell > aside.sidebar .side-nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    gap: 8px !important;
    padding: 10px 10px 16px !important;
    overflow: visible !important;
  }
  .app-shell > aside.sidebar .side-nav > .nav-link,
  .pos-shell > aside.sidebar .side-nav > .nav-link,
  .app-shell > aside.sidebar .side-nav > .nav-group > .nav-link,
  .pos-shell > aside.sidebar .side-nav > .nav-group > .nav-link {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 12px !important;
    grid-template-rows: 1fr !important;
    align-items: center !important;
    justify-items: start !important;
    gap: 9px !important;
    padding: 4px 5px !important;
    margin: 0 !important;
    border-radius: 12px !important;
    flex-direction: unset !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-decoration: none !important;
  }
  .app-shell > aside.sidebar .side-nav .nav-icon,
  .pos-shell > aside.sidebar .side-nav .nav-icon {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 25px !important;
    border-radius: 22px !important;
  }
  .app-shell > aside.sidebar .side-nav .nav-link > span:last-child,
  .pos-shell > aside.sidebar .side-nav .nav-link > span:last-child {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: block !important;
    min-width: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    transition: opacity .12s ease !important;
  }
  .app-shell > aside.sidebar.is-expanded .side-nav .nav-link > span:last-child,
  .pos-shell > aside.sidebar.is-expanded .side-nav .nav-link > span:last-child {
    opacity: 1 !important;
    visibility: visible !important;
  }
  .app-shell > aside.sidebar .nav-group,
  .pos-shell > aside.sidebar .nav-group {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .app-shell > aside.sidebar .nav-group > .nav-link::after,
  .pos-shell > aside.sidebar .nav-group > .nav-link::after {
    content: '' !important;
    grid-column: 3 !important;
    grid-row: 1 !important;
    width: 7px !important;
    height: 7px !important;
    border-right: 1.5px solid currentColor !important;
    border-bottom: 1.5px solid currentColor !important;
    transform: rotate(45deg) !important;
    opacity: 0 !important;
    margin: -4px 0 0 !important;
  }
  .app-shell > aside.sidebar.is-expanded .nav-group > .nav-link::after,
  .pos-shell > aside.sidebar.is-expanded .nav-group > .nav-link::after {
    opacity: .65 !important;
  }
  .app-shell > aside.sidebar .nav-submenu,
  .pos-shell > aside.sidebar .nav-submenu {
    display: none;
    width: auto !important;
    margin: 0 0 4px 0 !important;
    padding: 0 0 0 51px !important;
  }
  .app-shell > aside.sidebar.is-expanded .nav-group.submenu-open > .nav-submenu,
  .pos-shell > aside.sidebar.is-expanded .nav-group.submenu-open > .nav-submenu {
    display: block;
  }
  .app-shell > aside.sidebar .nav-submenu a,
  .pos-shell > aside.sidebar .nav-submenu a {
    display: block !important;
    width: 100% !important;
    min-height: 29px !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    color: #8e93a3 !important;
    text-decoration: none !important;
  }
  .app-shell > aside.sidebar .nav-submenu a::before,
  .pos-shell > aside.sidebar .nav-submenu a::before {
    content: '•' !important;
    color: #9eb5ff !important;
    margin-right: 8px !important;
  }
  .app-shell > aside.sidebar .logout-btn,
  .pos-shell > aside.sidebar .logout-btn {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: auto 0 16px !important;
  }
}
@media (max-width: 760px) {
  .app-shell > aside.sidebar,
  .pos-shell > aside.sidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
  }
}


/* No-flicker submenu state: visibility is driven by one CSS class only. */
@media (min-width: 761px) {
  .app-shell > aside.sidebar .nav-group > .nav-submenu,
  .pos-shell > aside.sidebar .nav-group > .nav-submenu {
    display: none !important;
    animation: none !important;
    transition: none !important;
  }
  .app-shell > aside.sidebar.is-expanded .nav-group.submenu-open > .nav-submenu,
  .pos-shell > aside.sidebar.is-expanded .nav-group.submenu-open > .nav-submenu {
    display: block !important;
  }
}


/* Sidebar menu typography — stronger weight to match the reference */
@media (min-width: 761px) {
  .sidebar .side-nav > .nav-link,
  .sidebar .side-nav > .nav-group > .nav-link {
    font-weight: 700 !important;
    letter-spacing: 0 !important;
  }

  .sidebar .side-nav .nav-link > span:last-child {
    font-weight: 700 !important;
  }

  .sidebar .nav-submenu a {
    font-weight: 600 !important;
    letter-spacing: 0 !important;
  }
}


/* ===== Sidebar typography, spacing and compact expanded width ===== */
@media (min-width: 761px) {
  .app-shell > aside.sidebar.is-expanded,
  .pos-shell > aside.sidebar.is-expanded {
    width: 210px !important;
    min-width: 210px !important;
    max-width: 210px !important;
    flex: 0 0 210px !important;
  }

  .app-shell > aside.sidebar .side-nav > .nav-link,
  .pos-shell > aside.sidebar .side-nav > .nav-link,
  .app-shell > aside.sidebar .side-nav > .nav-group > .nav-link,
  .pos-shell > aside.sidebar .side-nav > .nav-group > .nav-link {
    grid-template-columns: 42px minmax(0, 1fr) 10px !important;
    column-gap: 5px !important;
    padding-left: 4px !important;
    padding-right: 5px !important;
  }

  /* Main menu labels: bold 700, reference-like slate color */
  .app-shell > aside.sidebar .side-nav .nav-link > span:last-child,
  .pos-shell > aside.sidebar .side-nav .nav-link > span:last-child {
    color: #526b8e !important;
    font-weight: 700 !important;
  }

  /* Submenu labels use the same boldness and color */
  .app-shell > aside.sidebar .nav-submenu a,
  .pos-shell > aside.sidebar .nav-submenu a {
    color: #526b8e !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    padding-left: 0 !important;
    white-space: nowrap !important;
  }

  .app-shell > aside.sidebar .nav-submenu a::before,
  .pos-shell > aside.sidebar .nav-submenu a::before {
    color: #9bb5ff !important;
    margin-right: 7px !important;
  }

  /* Keep the arrow close to the label */
  .app-shell > aside.sidebar .nav-group > .nav-link::after,
  .pos-shell > aside.sidebar .nav-group > .nav-link::after {
    justify-self: end !important;
    margin-left: 0 !important;
  }
}


/* Match submenu typography size to the main menu */
@media (min-width: 761px) {
  .app-shell > aside.sidebar .nav-submenu a,
  .pos-shell > aside.sidebar .nav-submenu a {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #526b8e !important;
    line-height: 1.3 !important;
  }
}

/* Header background: match the supplied purple reference */
.home-header,
.dashboard-header,
.welcome-banner,
.hero-banner {
  background: #5b56bd !important;
  background-image: none !important;
}

/* Match transaction summary panel and sidebar background to brand purple */
.sale-summary,
.transaction-summary,
.transaction-header,
.pos-transaction-header {
  background: #5B56BD !important;
  background-image: none !important;
}
.sidebar,
.app-shell > aside.sidebar,
.pos-shell > aside.sidebar {
  background: #5B56BD !important;
}
.sidebar .side-nav .nav-link,
.sidebar .nav-submenu a,
.sidebar .brand,
.sidebar .logout-btn {
  color: #ffffff !important;
}
.sidebar .side-nav .nav-link .nav-icon {
  color: #ffffff !important;
  background: transparent !important;
}
.sidebar .side-nav .nav-link.active .nav-icon,
.sidebar .side-nav .nav-link.active {
  background: rgba(255, 255, 255, .18) !important;
  color: #ffffff !important;
  border-radius: 22px;
}
.sidebar .nav-submenu a::before {
  color: rgba(255, 255, 255, .75) !important;
}
.sidebar .nav-group > .nav-link::after {
  border-color: rgba(255,255,255,.8) !important;
}

/* Restore sidebar to white background while retaining purple transaction header */
.sidebar,
.app-shell > aside.sidebar,
.pos-shell > aside.sidebar {
  background: #ffffff !important;
}
.sidebar .side-nav .nav-link,
.sidebar .nav-submenu a,
.sidebar .brand,
.sidebar .logout-btn {
  color: #526b8e !important;
}
.sidebar .side-nav .nav-link .nav-icon {
  color: #aeb4bd !important;
  background: transparent !important;
}
.sidebar .side-nav .nav-link.active .nav-icon {
  background: #dce7ff !important;
  color: #819ef8 !important;
}
.sidebar .side-nav .nav-link.active {
  color: #4f49b7 !important;
  background: transparent !important;
}
.sidebar .nav-submenu a::before {
  color: #9bb5ff !important;
}
.sidebar .nav-group > .nav-link::after {
  border-color: #9ba3b1 !important;
}

/* Product movement dashboard */
.movement-panel {padding:20px!important; min-width:0}
.movement-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}
.movement-heading h2{font-size:23px;font-weight:800;letter-spacing:-.6px;margin:2px 0 4px}
.movement-heading p{font-size:12px;color:#9099ae;margin:0}
.movement-eyebrow{font-size:10px;letter-spacing:1.6px;color:#7771c7;font-weight:800}
.movement-period{width:112px;flex:none;border-radius:12px;font-size:12px;border-color:#e2e6f5;color:#4e4ab3;background-color:#f7f8ff;padding:9px 27px 9px 10px}
.movement-kpis{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:18px}
.movement-kpi{border:1px solid #e5e8f5;border-radius:15px;padding:14px;display:flex;align-items:center;gap:12px;background:#fafbff}
.movement-kpi.fast{background:#f0f8f6;border-color:#d8eee8}
.movement-kpi.dead{background:#fff8f3;border-color:#f8e7da}
.movement-kpi .kpi-icon{width:43px;height:43px;flex:none;border-radius:13px;display:grid;place-items:center;background:#d9f1e8;color:#168568;font-size:21px}
.movement-kpi.dead .kpi-icon{background:#ffebdb;color:#d88039}
.movement-kpi span{font-size:12px;font-weight:700;color:#647185;display:block}
.movement-kpi strong{display:block;font-size:26px;line-height:1.3;color:#1f2a40;letter-spacing:-.8px}
.movement-kpi strong small{font-size:12px;letter-spacing:0;color:#8893a4}
.movement-kpi em{font-style:normal;color:#8590a0;font-size:10px}
.movement-tabs{display:flex;gap:8px;border-bottom:1px solid #e9edf5;padding-bottom:10px;margin-bottom:10px}
.movement-tab{border:0;border-radius:9px;padding:9px 13px;background:transparent;color:#8893a8;font-weight:700;font-size:12px}
.movement-tab.active{background:#eeedff;color:#504ab5}
.movement-list{display:flex;flex-direction:column;gap:10px}
.movement-item{display:grid;grid-template-columns:27px minmax(0,1fr) 76px;align-items:center;gap:10px;padding:10px 11px;border:1px solid #edf0f8;border-radius:12px;background:#fff}
.movement-rank{width:25px;height:25px;display:grid;place-items:center;background:#f0f1fc;border-radius:8px;font-size:11px;color:#5653ac;font-weight:800}
.movement-name{font-size:12px;font-weight:750;color:#29334a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.movement-code{font-size:10px;color:#9aa2b1;margin:2px 0 7px}
.movement-track{height:5px;background:#edf0f8;border-radius:8px;overflow:hidden}
.movement-fill{height:100%;border-radius:8px;background:linear-gradient(90deg,#625ac5,#8d8af1)}
.movement-list.is-dead .movement-fill{background:linear-gradient(90deg,#e7a76d,#efc09b)}
.movement-volume{text-align:right;font-size:16px;font-weight:800;color:#34304f}
.movement-volume small{display:block;font-size:10px;color:#98a0af;font-weight:500}
.movement-footnote{font-size:10px;color:#9ca4b4;margin-top:13px;display:flex;gap:6px;align-items:center}
@media(max-width:500px){.movement-panel{padding:15px!important}.movement-heading h2{font-size:19px}.movement-kpi{padding:10px;gap:7px}.movement-kpi .kpi-icon{width:33px;height:33px;font-size:16px}.movement-kpi strong{font-size:22px}.movement-period{width:100px}.movement-item{grid-template-columns:24px minmax(0,1fr) 65px}}

/* Dashboard owner layout: product movement left, transactions and trend right */
.dashboard-content-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:stretch}
.dashboard-content-grid>.movement-panel{height:100%;min-width:0}
.dashboard-right-column{display:flex;flex-direction:column;gap:18px;min-width:0}
.dashboard-right-column>.panel{min-width:0}
.dashboard-right-column .transactions-panel{flex:0 0 auto}
.dashboard-right-column .transaction-item{padding:11px 12px}
.trend-panel{padding:20px!important}
.trend-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.trend-heading h2{font-size:20px;font-weight:800;margin:0 0 4px}
.trend-heading p{font-size:12px;color:#9099ae;margin:0}
.trend-chip{font-size:11px;color:#514bb7;background:#efefff;padding:7px 10px;border-radius:20px;white-space:nowrap}
.trend-summary{display:flex;justify-content:space-between;align-items:flex-end;margin:16px 0 8px}
.trend-summary>div:first-child span{display:block;color:#8e97a9;font-size:11px}
.trend-summary strong{font-size:27px;line-height:1.2;color:#222d42}
.trend-change{font-size:12px;font-weight:800;color:#159575;text-align:right}
.trend-change i{margin-right:3px}
.trend-change small{display:block;color:#9aa2b1;font-size:10px;font-weight:500;margin-top:2px}
.trend-chart{height:145px;display:flex;align-items:flex-end;justify-content:space-around;gap:9px;padding:10px 2px 0;border-bottom:1px solid #e9edf6;background:repeating-linear-gradient(to bottom,transparent 0,transparent 35px,#f0f2f8 36px)}
.trend-bar-wrap{height:100%;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;min-width:0}
.trend-value{font-size:10px;color:#777f94}
.trend-bar{width:min(28px,70%);min-height:4px;background:linear-gradient(180deg,#8b8af0,#5b56bd);border-radius:7px 7px 2px 2px;transition:height .2s ease}
.trend-bar.peak{background:linear-gradient(180deg,#45c3ec,#259fda)}
.trend-bar-wrap small{font-size:10px;color:#8992a4;transform:translateY(20px);height:18px}
.trend-footnote{display:flex;justify-content:space-between;gap:8px;margin-top:26px;font-size:10px;color:#9aa2b1}
.trend-footnote .bi-circle-fill{font-size:7px;color:#6a63cc;margin-right:5px}
@media(max-width:1100px){.dashboard-content-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}.movement-panel{padding:16px!important}.trend-panel{padding:16px!important}}
@media(max-width:850px){.dashboard-content-grid{grid-template-columns:1fr}.dashboard-right-column{gap:14px}.dashboard-content-grid>.movement-panel{height:auto}}

/* Actual cosmetics photos in product cards and cart */
.product-result-image { overflow:hidden; background:#fff7fb!important; position:relative; }
.product-result-image .cosmetic-product-photo { width:100%; height:100%; display:block; object-fit:contain; padding:10px; background:#fff7fb; }
.product-result-image .pattern-clothes,.product-result-image .rabbani-art { display:none!important; }
.product-thumb { overflow:hidden; background:#fff7fb; }
.product-thumb img { width:100%; height:100%; object-fit:contain; display:block; padding:3px; }

/* ===== Goods receiving page ===== */
.receiving-page { background:#f4f6ff; overflow:hidden; }
.receiving-page .pos-shell { min-height:100vh; height:100vh; }
.receiving-page .pos-main { background:#f4f6ff; padding:18px; gap:12px; overflow:auto; }
.receiving-main { display:flex; flex-direction:column; min-width:0; }
.receiving-summary { flex:0 0 auto; border-radius:20px; padding:15px 13px 12px; color:#fff; background:#5B56BD; box-shadow:none; }
.receiving-summary-top { display:flex; justify-content:space-between; align-items:center; min-height:84px; padding:0 3px 12px; border-bottom:1px solid rgba(255,255,255,.36); }
.receiving-eyebrow { font-size:12px; letter-spacing:4px; font-weight:800; color:rgba(255,255,255,.72); }
.receiving-total { display:flex; align-items:flex-start; gap:6px; margin-top:2px; }
.receiving-total small { font-size:13px; font-weight:800; margin-top:8px; }
.receiving-total strong { font-size:clamp(30px,3vw,49px); line-height:1.04; font-weight:900; letter-spacing:-1.5px; }
.receiving-counts { display:flex; align-items:center; gap:25px; }
.receiving-counts div { display:flex; flex-direction:column; align-items:center; min-width:85px; }
.receiving-counts span { font-size:12px; letter-spacing:4px; font-weight:800; color:rgba(255,255,255,.72); white-space:nowrap; }
.receiving-counts strong { font-size:43px; line-height:1.08; font-weight:900; }
.receiving-counts > i { width:1px; height:60px; background:rgba(255,255,255,.45); }
.receiving-summary-bottom { display:flex; align-items:center; justify-content:space-between; padding-top:11px; gap:12px; }
.receiving-date-trigger { display:flex; align-items:center; gap:10px; padding:5px 0; border:0; background:transparent; color:#fff; text-align:left; }
.receiving-calendar-icon { width:36px; height:36px; border-radius:10px; background:rgba(255,255,255,.2); display:grid; place-items:center; font-size:20px; }
.receiving-date-trigger > span:nth-child(2) { display:flex; flex-direction:column; gap:1px; }
.receiving-date-trigger small { font-size:12px; font-weight:800; color:rgba(255,255,255,.74); }
.receiving-date-trigger strong { font-size:13px; font-weight:800; }
.date-chevron { margin-left:1px; font-size:12px; }
.receiving-actions { display:flex; align-items:center; gap:10px; }
.receiving-action { position:relative; width:50px; height:50px; border:0; border-radius:14px; background:rgba(255,255,255,.2); color:#fff; font-size:23px; display:grid; place-items:center; }
.receiving-action .mini-x { position:absolute; right:6px; bottom:7px; border:1px solid #fff; border-radius:50%; background:#ed4d4d; width:16px; height:16px; font-size:13px; line-height:13px; }
.receiving-save { height:50px; min-width:141px; padding:0 19px; border:0; border-radius:13px; background:#fff; color:#5B56BD; font-size:15px; font-weight:900; display:flex; align-items:center; justify-content:center; gap:9px; }
.receiving-search-row { display:flex; align-items:center; gap:12px; flex:0 0 auto; }
.receiving-search { height:57px; flex:1; min-width:0; display:flex; align-items:center; gap:16px; border:1px solid #c8c8cf; background:#fff; border-radius:12px; padding:0 17px; color:#9a9a9a; box-shadow:0 1px 2px rgba(0,0,0,.02); }
.receiving-search > i { font-size:22px; }
.receiving-search input { width:100%; min-width:0; border:0; outline:0; background:transparent; font-size:16px; color:#24242b; }
.receiving-search input::placeholder { color:#999; }
.receiving-tool { flex:0 0 58px; width:58px; height:57px; border:1px solid #c8c8cf; background:#fff; color:#222; border-radius:12px; font-size:25px; display:grid; place-items:center; }
.receiving-table-wrap { width:100%; overflow-x:auto; }
.receiving-table { width:100%; border-collapse:separate; border-spacing:0 8px; white-space:nowrap; color:#222129; font-size:15px; }
.receiving-table th { height:41px; background:#fff; font-size:14px; font-weight:800; text-align:left; padding:0 10px; }
.receiving-table th:first-child { border-radius:12px 0 0 12px; padding-left:20px; }
.receiving-table th:last-child { border-radius:0 12px 12px 0; }
.receiving-table td { height:53px; background:#fff; padding:4px 10px; }
.receiving-table td:first-child { padding-left:20px; border-radius:13px 0 0 13px; width:55px; }
.receiving-table td:last-child { border-radius:0 13px 13px 0; padding-right:16px; }
.receiving-product-name { min-width:260px; font-weight:800; }
.receiving-qty { display:flex; align-items:center; gap:12px; justify-content:center; }
.receiving-qty button { width:37px; height:37px; border-radius:50%; border:1px solid #dedee3; background:#fff; color:#a9a9ad; font-size:22px; display:grid; place-items:center; padding:0; }
.receiving-qty .qty-plus { color:#6c91ff; }
.receiving-qty strong { min-width:16px; text-align:center; font-weight:800; }
.receiving-subtotal { text-align:right; font-weight:900; padding-right:14px !important; }
.receiving-remove { width:39px; height:39px; border-radius:50%; border:1px solid #dedee3; background:#fff; color:#ff4f4f; font-size:19px; display:grid; place-items:center; }
.receiving-empty { padding:28px; text-align:center; color:#777; background:#fff; border-radius:12px; }
/* Calendar modal styled to match the supplied date-picker reference */
.receiving-date-overlay { position:fixed; inset:0; z-index:2000; background:rgba(0,0,0,.58); display:none; align-items:center; justify-content:center; padding:16px; }
.receiving-date-overlay.show { display:flex; }
.receiving-date-modal { width:min(620px,96vw); min-height:432px; display:grid; grid-template-columns:190px minmax(0,1fr); background:#fff; border:1px solid #d4d4d4; border-radius:13px; overflow:hidden; box-shadow:0 12px 45px rgba(0,0,0,.25); color:#6e6e72; }
.date-picker-side { position:relative; background:#7d9cf7; color:#fff; padding:22px 19px; }
.date-picker-side > strong { display:block; font-size:12px; font-weight:800; }
.date-picker-side > div { margin-top:23px; font-size:28px; line-height:1.1; font-weight:400; white-space:nowrap; }
.date-edit-icon { position:absolute; left:19px; bottom:15px; font-size:23px; }
.date-picker-main { display:flex; flex-direction:column; min-width:0; padding:12px 10px 10px 20px; }
.calendar-header { display:grid; grid-template-columns:30px 1fr 30px; align-items:center; height:35px; gap:5px; }
.calendar-header button { border:0; background:transparent; color:#777; height:32px; display:grid; place-items:center; font-size:17px; }
.calendar-header .calendar-month-title { display:flex; justify-content:flex-start; gap:9px; align-items:center; font-size:16px; font-weight:800; white-space:nowrap; }
.calendar-header .calendar-month-title i { font-size:12px; }
.calendar-weekdays { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); margin-top:12px; text-align:center; font-size:12px; color:#626267; }
.calendar-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); grid-auto-rows:42px; align-items:center; justify-items:center; margin-top:3px; }
.calendar-day { width:39px; height:39px; border-radius:50%; border:1px solid transparent; background:transparent; color:#27272a; font-size:13px; display:grid; place-items:center; padding:0; }
.calendar-day.selected { background:#7d9cf7; color:#fff; border-color:#7d9cf7; }
.calendar-day.current:not(.selected) { border-color:#7d9cf7; color:#7d9cf7; }
.calendar-blank { width:39px; height:39px; }
.calendar-footer { margin-top:auto; display:flex; justify-content:flex-end; gap:10px; padding-top:10px; }
.calendar-footer button { height:41px; width:141px; border:0; border-radius:10px; background:#504bb5; color:#fff; font-size:14px; font-weight:700; }
.receiving-toast { position:fixed; z-index:2100; bottom:22px; left:50%; transform:translate(-50%,15px); background:#29283b; color:#fff; padding:11px 18px; border-radius:10px; font-size:13px; opacity:0; pointer-events:none; transition:.2s ease; }
.receiving-toast.show { opacity:1; transform:translate(-50%,0); }
@media (max-width:900px) {
 .receiving-page .pos-main { padding:12px; }
 .receiving-counts { gap:12px; }
 .receiving-counts div { min-width:62px; }
 .receiving-counts span { letter-spacing:2px; font-size:10px; }
 .receiving-counts strong { font-size:34px; }
 .receiving-table { min-width:1040px; }
}
@media (max-width:560px) {
 .receiving-summary { padding:12px 10px; border-radius:15px; }
 .receiving-summary-top { min-height:74px; }
 .receiving-total strong { font-size:32px; }
 .receiving-counts { gap:8px; }
 .receiving-counts div { min-width:48px; }
 .receiving-counts span { font-size:8px; letter-spacing:1px; }
 .receiving-counts strong { font-size:27px; }
 .receiving-counts > i { height:42px; }
 .receiving-action { width:38px; height:40px; font-size:19px; border-radius:10px; }
 .receiving-save { min-width:90px; height:40px; padding:0 10px; font-size:12px; }
 .receiving-search-row { gap:6px; }
 .receiving-search { height:48px; padding:0 10px; gap:8px; }
 .receiving-tool { flex-basis:42px; width:42px; height:48px; font-size:20px; }
 .receiving-date-modal { grid-template-columns:115px minmax(0,1fr); min-height:385px; }
 .date-picker-side { padding:16px 10px; }
 .date-picker-side > div { font-size:20px; white-space:normal; }
 .date-picker-main { padding:10px 6px 8px 8px; }
 .calendar-days { grid-auto-rows:37px; }
 .calendar-day,.calendar-blank { width:32px; height:32px; }
 .calendar-footer button { width:50%; }
}
/* Receiving page sidebar expands on click, not on hover */
.receiving-page .pos-shell > .sidebar { width:88px; flex-basis:88px; }
.receiving-page .pos-shell > .sidebar.is-expanded { width:236px; flex-basis:236px; box-shadow:8px 0 28px rgba(47,53,98,.12); }
.receiving-page .pos-shell > .sidebar:hover:not(.is-expanded), .receiving-page .pos-shell > .sidebar:focus-within:not(.is-expanded) { width:88px; flex-basis:88px; box-shadow:none; }
.receiving-page .pos-shell > .sidebar.is-expanded .side-nav .nav-link > span:last-child { opacity:1; visibility:visible; }
.receiving-page .pos-shell > .sidebar:not(.is-expanded) .side-nav .nav-link > span:last-child { opacity:0; visibility:hidden; }
.receiving-page .pos-shell > .sidebar.is-expanded .nav-submenu { display:block; }
.receiving-page .pos-shell > .sidebar:not(.is-expanded) .nav-submenu { display:none; }
.receiving-page .pos-shell > .sidebar.is-expanded .nav-group > .nav-link::after { opacity:.7; }
@media (max-width:760px) {
 .receiving-page .pos-shell > .sidebar, .receiving-page .pos-shell > .sidebar.is-expanded { width:100%; flex-basis:auto; }
}
