/* Buyoji POS Premium UI layer */
:root{
  --pos-green:#123f31;
  --pos-green-deep:#0d3025;
  --pos-green-soft:#e8f0ec;
  --pos-cream:#f6f3eb;
  --pos-surface:#fffefa;
  --pos-line:#dce5e0;
  --pos-muted:#789086;
  --pos-gold:#d9ad55;
  --pos-danger:#cf2e2e;
  --pos-shadow:0 18px 50px rgba(18,63,49,.09);
  --pos-shadow-soft:0 7px 22px rgba(18,63,49,.07);
}

/* premium application shell */
body{background:var(--pos-cream);color:var(--pos-green-deep)}
.sidebar{
  width:238px;
  background:linear-gradient(180deg,#123f31 0%,#10382c 100%);
  box-shadow:12px 0 34px rgba(10,44,34,.08);
}
.main-shell{margin-left:238px}
.brand{padding:20px 18px;gap:11px;min-height:78px}
.brand-mark{
  width:44px;height:44px;border-radius:14px;font-size:24px;
  box-shadow:0 8px 22px rgba(0,0,0,.12)
}
.brand-copy{min-width:0}
.brand strong{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand span{font-size:9px;letter-spacing:.18em;margin-top:4px}
.side-nav{padding:18px 12px!important;gap:6px!important}
.side-nav a{
  min-height:44px;padding:11px 13px!important;border-radius:13px!important;
  font-size:13px!important;font-weight:800!important
}
.side-nav .nav-icon{width:22px;display:inline-grid;place-items:center;opacity:.78}
.side-nav a.active{box-shadow:0 9px 24px rgba(0,0,0,.12)}
.signed-card{
  margin:14px!important;padding:12px!important;border-radius:18px!important;
  display:grid;grid-template-columns:38px minmax(0,1fr) 34px;align-items:center;gap:9px
}
.signed-avatar{
  width:38px;height:38px;border-radius:12px;background:rgba(255,255,255,.14);
  display:grid;place-items:center;font-weight:900;font-size:15px
}
.signed-copy{min-width:0}
.signed-card small{font-size:8px!important;letter-spacing:.13em!important}
.signed-card strong{
  margin-top:3px!important;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.signed-card span{font-size:10px!important;margin-top:1px!important}
.signed-card form{margin:0!important}
.logout-button{
  width:34px!important;height:34px;border-radius:11px!important;padding:0!important;
  display:grid;place-items:center;font-size:15px
}

.topbar{
  height:76px;padding:0 22px;background:rgba(255,254,250,.96);
  backdrop-filter:blur(14px);border-bottom:1px solid var(--pos-line)
}
.topbar-title small{font-size:9px!important;color:#82978e!important}
.topbar h1{font-size:24px;margin-top:2px}
.topbar-right{display:flex;align-items:center;gap:10px}
.live-clock{
  min-width:88px;text-align:right;padding-left:12px;border-left:1px solid var(--pos-line)
}
.live-clock strong{display:block;font-size:13px;line-height:1.1}
.live-clock span{display:block;font-size:8px;color:var(--pos-muted);margin-top:3px;font-weight:800;letter-spacing:.08em}
.content{height:calc(100vh - 76px);padding:14px 18px;overflow:auto}
.flash{margin-bottom:8px;border:1px solid rgba(31,112,79,.12);box-shadow:var(--pos-shadow-soft)}

/* terminal workspace */
.premium-pos{
  height:calc(100vh - 104px);
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 438px;
  gap:14px;
}
.cashier-workspace{
  min-width:0;min-height:0;
  display:flex;flex-direction:column;gap:8px
}

/* shift controls */
.shift-command{
  min-height:60px;border-radius:18px;padding:10px 12px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  box-shadow:var(--pos-shadow-soft)
}
.shift-command.open{background:linear-gradient(135deg,#123f31,#184b3a);color:white}
.shift-command.closed{background:#fffaf0;border:1px solid #ecd594;color:var(--pos-green-deep)}
.shift-state{display:flex;align-items:center;gap:10px;min-width:0}
.shift-state>div{min-width:0}
.shift-dot{width:9px;height:9px;border-radius:50%;background:#66d49a;box-shadow:0 0 0 5px rgba(102,212,154,.13);flex:0 0 auto}
.shift-command.closed .shift-dot{background:#e2ae45;box-shadow:0 0 0 5px rgba(226,174,69,.13)}
.shift-state small{display:block;font-size:8px;letter-spacing:.15em;font-weight:1000;opacity:.72}
.shift-state strong{display:block;font-size:13px;margin-top:2px}
.shift-meta{font-size:9px;opacity:.62;white-space:nowrap}
.shift-command-actions{display:flex;gap:6px;flex:0 0 auto}
.ghost-button{
  border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.09);color:white;
  border-radius:11px;padding:8px 10px;font-size:10px;font-weight:900
}
.ghost-button:hover{background:rgba(255,255,255,.15)}
.ghost-button b{display:inline-grid;place-items:center;min-width:18px;height:18px;margin-left:4px;border-radius:999px;background:rgba(255,255,255,.14)}

.premium-shift-form{
  flex:1;max-width:720px;
  display:grid!important;grid-template-columns:150px minmax(190px,1fr) auto!important;gap:7px!important
}
.field-with-label{
  height:42px;border:1px solid #ead797;border-radius:12px;background:white;
  display:flex;flex-direction:column;justify-content:center;padding:4px 10px
}
.field-with-label span{font-size:7px;font-weight:900;letter-spacing:.11em;color:#9a7b36}
.field-with-label input{
  border:0!important;padding:1px 0!important;border-radius:0!important;
  box-shadow:none!important;font-size:12px;font-weight:800;background:transparent!important
}
.open-shift-button{border-radius:12px!important;padding-inline:18px!important}

/* summary bar */
.pos-summary-strip{
  min-height:38px;display:flex;align-items:center;gap:6px;padding:4px 6px;
  background:rgba(255,255,255,.82);border:1px solid rgba(18,63,49,.06);
  border-radius:14px;box-shadow:var(--pos-shadow-soft);overflow-x:auto
}
.summary-chip{
  display:flex;align-items:center;gap:5px;white-space:nowrap;border-radius:999px;
  background:#eff5f2;padding:6px 9px;font-size:9px;color:#688078;font-weight:800
}
.summary-chip strong{font-size:10px;color:var(--pos-green-deep)}
.summary-chip.attention{background:#fff4dc;color:#9e6517}
.summary-chip.held{background:#eef3ff;color:#4266a9}
.summary-link{margin-left:auto;white-space:nowrap;padding:6px 9px;font-size:9px;font-weight:900;color:var(--pos-green)}

/* catalog */
.catalog-panel{
  min-height:0;flex:1;display:flex;flex-direction:column;
  background:rgba(255,254,250,.94);border:1px solid rgba(18,63,49,.07);
  border-radius:22px;padding:12px;box-shadow:var(--pos-shadow)
}
.catalog-header{display:flex;align-items:flex-end;justify-content:space-between;gap:14px}
.catalog-title small{font-size:8px;font-weight:900;letter-spacing:.17em;color:#82978e}
.catalog-title-row{display:flex;align-items:center;gap:8px;margin-top:2px}
.catalog-title-row h2{font-size:20px;margin:0}
.catalog-title-row span{font-size:9px;color:#8ca097;background:#edf3ef;border-radius:999px;padding:5px 8px;font-weight:800}
.catalog-search{display:flex;gap:7px;width:min(64%,620px)}
.search-control{
  flex:1;min-width:0;height:42px;border:1px solid var(--pos-line);border-radius:13px;background:white;
  display:flex;align-items:center;gap:8px;padding:0 10px;transition:.18s ease
}
.search-control:focus-within{border-color:#3d785f;box-shadow:0 0 0 4px rgba(61,120,95,.09)}
.search-icon{font-size:19px;color:#7e938a;line-height:1}
.search-control input{border:0!important;outline:0!important;box-shadow:none!important;padding:0!important;background:transparent!important;flex:1;min-width:0;font-size:12px;color:var(--pos-green-deep)}
.search-shortcut{font-size:8px;color:#91a198;background:#f1f4f2;border-radius:7px;padding:4px 6px;font-weight:800}
.search-add-button{height:42px;border-radius:13px!important;padding:0 17px!important}

.category-toolbar{display:flex;align-items:center;gap:8px;margin:9px 0 10px;min-height:31px}
.category-scroll{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;flex:1}
.category-scroll::-webkit-scrollbar{display:none}
.category-pill,.category-reset{
  border:1px solid var(--pos-line);background:white;border-radius:999px;white-space:nowrap;
  padding:7px 10px;font-size:9px;font-weight:850;color:#60786f
}
.category-pill:hover{border-color:#8eb2a3}
.category-pill.active{background:var(--pos-green);color:white;border-color:var(--pos-green)}
.category-reset{border:0;background:transparent;color:#9aaaa3;padding-right:3px}

.premium-product-grid{
  flex:1;min-height:0;overflow:auto;padding:1px 3px 4px 1px;
  display:grid!important;grid-template-columns:repeat(auto-fill,minmax(205px,1fr))!important;
  grid-auto-rows:minmax(88px,auto);align-content:start;gap:8px!important;
  scrollbar-width:thin;scrollbar-color:#b8c8c1 transparent
}
.premium-product-card{
  position:relative;min-height:88px;border:1px solid var(--pos-line)!important;border-radius:16px!important;
  background:white!important;padding:8px!important;gap:9px!important;align-items:center!important;
  box-shadow:0 1px 0 rgba(18,63,49,.02);overflow:hidden
}
.premium-product-card:hover{
  transform:translateY(-1px)!important;border-color:#8eb2a3!important;
  box-shadow:0 9px 24px rgba(18,63,49,.09)!important
}
.premium-product-card:active{transform:scale(.987)!important}
.premium-product-image{
  width:54px!important;height:54px!important;border-radius:13px!important;
  background:linear-gradient(145deg,#f6f2e8,#eeece5)!important;border:1px solid rgba(18,63,49,.04)
}
.product-fallback{
  width:100%;height:100%;display:grid!important;place-items:center;
  font-size:21px!important;font-weight:950!important;font-style:normal;color:#356451!important
}
.premium-product-info{height:100%;display:flex;flex-direction:column;justify-content:space-between;min-width:0}
.product-copy{min-width:0;padding-right:20px}
.premium-product-info .product-copy>strong{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  overflow:hidden;font-size:12px;line-height:1.18;color:#123f31
}
.premium-product-info .product-copy>small{
  display:block;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  font-size:8px;color:#8da098
}
.product-price-row{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:7px}
.product-price-row b{font-size:12px;white-space:nowrap}
.stock-badge{
  border-radius:999px;background:#e8f1ec!important;color:#396b56!important;
  padding:4px 7px!important;font-size:8px!important;font-weight:900!important;white-space:nowrap
}
.quick-add{
  position:absolute;right:8px;top:8px;width:20px;height:20px;border-radius:7px;
  background:#edf4f0;color:#2c674f;display:grid;place-items:center;font-size:14px;font-weight:900
}
.premium-product-card:hover .quick-add{background:var(--pos-green);color:white}
.empty-products{grid-column:1/-1;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#8ca097}
.empty-products strong{color:#526d62}
.empty-products span{font-size:10px;margin-top:5px}

/* billing rail */
.premium-billing{
  min-height:0;height:100%;border-radius:22px!important;
  border:1px solid rgba(18,63,49,.07);
  background:var(--pos-surface)!important;box-shadow:var(--pos-shadow)!important
}
.premium-bill-head{min-height:68px;padding:11px 13px!important;background:rgba(255,255,255,.76)}
.bill-title>small{font-size:8px!important;letter-spacing:.16em!important}
.bill-title>div{display:flex;align-items:center;gap:7px;margin-top:2px}
.bill-title h2{font-size:19px!important;margin:0!important}
.premium-bill-head .count-badge{margin:0!important;padding:5px 7px!important}
.bill-head-actions{gap:5px!important}
.customer-button{
  border:1px solid var(--pos-line);background:white;color:var(--pos-green);border-radius:11px;
  height:34px;padding:0 9px;display:flex;align-items:center;gap:5px;font-size:9px;font-weight:900
}
.customer-icon{font-size:14px;line-height:1}
.clear-bill{padding:7px!important}
.premium-bill-items-wrap{padding:8px 10px!important;overflow:hidden}
.premium-bill-items{flex:1;min-height:0;overflow:auto!important;-webkit-overflow-scrolling:touch}
.premium-empty-cart{
  border:1px dashed #cedbd5!important;background:linear-gradient(180deg,#fff,#fbfaf6);
  min-height:0!important;height:100%;padding:20px
}
.empty-cart-icon{
  width:42px;height:42px;border-radius:14px;background:#edf4f0;color:#3d755d;
  display:grid;place-items:center;font-size:18px;margin-bottom:10px
}
.premium-empty-cart strong{font-size:13px!important}
.premium-empty-cart span{max-width:240px;font-size:9px!important;line-height:1.5}
.bill-columns{padding:7px 9px!important;font-size:8px!important}
.bill-item{padding:8px 9px!important;min-height:62px}
.bill-item-name strong{font-size:11px!important}
.bill-item-name small{font-size:8px!important}
.bill-item-name .remove{font-size:8px!important;margin-top:1px!important}
.qty-control{border-radius:9px!important}
.qty-control button{height:29px!important;width:26px!important}
.line-total{font-size:10px!important}

.premium-bill-footer{
  flex:0 0 auto;padding:10px 12px!important;background:#fbfaf6!important;
  box-shadow:0 -10px 28px rgba(18,63,49,.035)
}
.totals-block{display:grid;gap:4px}
.premium-bill-footer .summary-row{font-size:10px!important}
.discount-input{
  min-width:108px;height:32px;border:1px solid var(--pos-line);border-radius:10px;background:white;
  display:flex!important;align-items:center!important;gap:4px!important;padding:0 8px
}
.discount-input span{font-size:9px;color:#92a29c}
.discount-input input{
  width:72px!important;border:0!important;padding:0!important;background:transparent!important;
  font-size:11px!important;outline:0;text-align:right
}
.premium-grand-total{margin-top:3px!important;padding-top:8px!important}
.premium-grand-total small{font-size:8px!important}
.premium-grand-total>strong{font-size:26px!important;letter-spacing:-.03em}
.payment-section{margin-top:8px}
.payment-label{font-size:8px;font-weight:900;color:#849990;letter-spacing:.12em;margin-bottom:5px}
.premium-payment-tabs{margin:0!important;gap:5px!important}
.premium-payment-tabs button{height:34px;padding:0!important;border-radius:10px!important}
.premium-cash-row{margin-top:7px!important}
.premium-cash-row label small{font-size:7px!important}
.premium-cash-row input{height:36px;padding:7px 9px!important}
.exact-button{
  height:36px;border:1px solid var(--pos-line);background:white;border-radius:10px;color:var(--pos-green);
  padding:0 10px;font-size:9px;font-weight:900
}
.premium-cash-row .due-box{min-width:92px;padding:7px 9px!important}
.premium-shift-required{
  margin-top:8px!important;display:flex;align-items:center;justify-content:center;gap:6px
}
.premium-shift-required span{
  border-radius:999px;background:#f7e7b9;color:#95621c;padding:4px 7px;font-size:8px
}
.premium-checkout-actions{grid-template-columns:120px minmax(0,1fr)!important;gap:7px!important;margin-top:8px!important}
.hold-button,.charge-button{
  height:44px;border-radius:12px;border:1px solid var(--pos-line);font-weight:900;font-size:11px
}
.hold-button{background:white;color:var(--pos-green)}
.charge-button{background:var(--pos-green);border-color:var(--pos-green);color:white;box-shadow:0 8px 20px rgba(18,63,49,.16)}
.charge-button:hover:not(:disabled){background:var(--pos-green-deep)}
.checkout-error{min-height:12px!important;margin:4px 0 0!important;font-size:8px!important}

/* premium modals */
.premium-modal{border:1px solid rgba(255,255,255,.4)}
.modal-intro{margin:-5px 0 12px;color:#81948d;font-size:10px}

/* mobile cart */
.premium-mobile-cart{
  box-shadow:0 16px 40px rgba(18,63,49,.26)!important;
  justify-content:space-between!important;padding:13px 16px!important
}

/* login polish */
.login-card{border:1px solid rgba(255,255,255,.32)}
.pin-hint{font-size:9px;color:#8ba097;margin:-4px 0 12px}

/* responsive */
@media (max-width:1360px){
  .premium-pos{grid-template-columns:minmax(0,1fr) 400px}
  .premium-product-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))!important}
  .catalog-search{width:min(60%,540px)}
}

@media (max-width:1099px){
  .sidebar{width:238px}
  .main-shell{margin-left:0}
  .topbar{height:70px;padding:0 13px}
  .content{height:calc(100vh - 70px);padding:9px;overflow:hidden}
  .premium-pos{display:block;height:calc(100vh - 88px)}
  .cashier-workspace{height:100%}
  .shift-command{min-height:56px}
  .premium-shift-form{grid-template-columns:135px minmax(0,1fr) auto!important}
  .catalog-panel{min-height:0}
  .premium-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .premium-billing{
    position:fixed!important;inset:58px 8px 8px!important;z-index:80;
    height:auto!important;border-radius:22px!important;
    transform:translateY(115%);transition:transform .25s ease
  }
  .premium-billing.open{transform:translateY(0)}
  .premium-bill-items-wrap{flex:1;min-height:0}
  .premium-bill-items{min-height:0;overflow:auto!important}
  .bill-close{display:inline-grid!important;place-items:center}
  .premium-mobile-cart{display:flex!important}
}

@media (max-width:760px){
  .topbar{height:66px}
  .content{height:calc(100vh - 66px);padding:7px;overflow:auto}
  .live-clock{display:none}
  .topbar-title small{font-size:8px!important}
  .topbar h1{font-size:20px!important}
  .premium-pos{height:auto}
  .cashier-workspace{height:auto;min-height:100%}
  .shift-command{padding:9px;align-items:stretch}
  .shift-command.closed{display:block}
  .premium-shift-form{
    margin-top:8px!important;grid-template-columns:1fr 1fr!important;
    max-width:none!important
  }
  .premium-shift-form .open-shift-button{grid-column:1/-1;height:40px}
  .shift-command.open{flex-wrap:wrap}
  .shift-command-actions{width:100%}
  .shift-command-actions button{flex:1}
  .shift-meta{display:none}
  .pos-summary-strip{min-height:36px}
  .catalog-panel{min-height:520px;padding:9px;border-radius:18px}
  .catalog-header{display:block}
  .catalog-search{width:100%;margin-top:8px}
  .category-toolbar{margin:7px 0 8px}
  .premium-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  .premium-product-card{min-height:94px!important;align-items:flex-start!important}
  .premium-product-image{width:44px!important;height:44px!important}
  .premium-product-info .product-copy>strong{font-size:10px}
  .product-price-row{align-items:flex-end}
  .product-price-row b{font-size:10px}
  .stock-badge{font-size:7px!important;padding:3px 5px!important}
  .quick-add{right:6px;top:6px}
  .premium-billing{inset:55px 5px 5px!important}
  .premium-bill-head{min-height:62px}
  .customer-button span:last-child{display:none}
  .premium-checkout-actions{grid-template-columns:105px minmax(0,1fr)!important}
}

@media (max-width:430px){
  .premium-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .premium-product-card{display:block!important;min-height:126px!important;padding:7px!important}
  .premium-product-image{width:48px!important;height:48px!important;margin-bottom:5px}
  .product-copy{padding-right:18px}
  .product-price-row{margin-top:5px}
  .product-price-row b{font-size:10px}
  .premium-bill-head{padding:9px!important}
  .bill-columns,.bill-item{grid-template-columns:minmax(0,1fr) 76px 78px!important}
  .premium-grand-total>strong{font-size:23px!important}
  .premium-cash-row{grid-template-columns:minmax(0,1fr) auto!important}
  .premium-cash-row .due-box{grid-column:1/-1}
}

/* scrollbars */
.premium-product-grid::-webkit-scrollbar,.premium-bill-items::-webkit-scrollbar{width:7px}
.premium-product-grid::-webkit-scrollbar-thumb,.premium-bill-items::-webkit-scrollbar-thumb{background:#c2d0ca;border-radius:999px}
.premium-product-grid::-webkit-scrollbar-track,.premium-bill-items::-webkit-scrollbar-track{background:transparent}

/* POS notifications float above the workspace instead of changing its height */
.content:has(.premium-pos) > .flash{
  position:fixed;
  top:84px;
  right:18px;
  z-index:120;
  width:min(380px,calc(100vw - 36px));
  margin:0;
  box-shadow:0 18px 50px rgba(18,63,49,.16);
}
@media(max-width:1099px){
  .content:has(.premium-pos) > .flash{top:76px;right:10px}
}


/* POS operations management */
.signed-pin-link{display:block;margin-top:3px;font-size:8px;color:rgba(255,255,255,.58);font-weight:800}
.signed-pin-link:hover{color:white}

.management-page{max-width:1500px;margin:0 auto;display:flex;flex-direction:column;gap:14px}
.management-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px}
.management-head small,.form-card-head small{font-size:9px;letter-spacing:.16em;color:#849990;font-weight:950}
.management-head h2,.form-card-head h2{font-size:26px;margin:3px 0 0;letter-spacing:-.025em}
.management-head p,.form-card-head p{margin:5px 0 0;color:#83978e;font-size:10px}
.management-primary{white-space:nowrap;border-radius:12px!important;padding:11px 15px!important}

.staff-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px}
.staff-card{background:#fff;border:1px solid rgba(18,63,49,.07);border-radius:19px;padding:14px;box-shadow:var(--pos-shadow-soft)}
.staff-card-top{display:grid;grid-template-columns:43px minmax(0,1fr) auto;gap:10px;align-items:center}
.staff-avatar{width:43px;height:43px;border-radius:13px;background:#e7f0eb;color:#245c46;display:grid;place-items:center;font-weight:950;font-size:16px}
.staff-identity{min-width:0}.staff-identity strong,.staff-identity span{display:block}.staff-identity strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.staff-identity span{font-size:9px;color:#91a29b;margin-top:2px}
.staff-role{font-size:8px;font-weight:950;text-transform:uppercase;letter-spacing:.08em;padding:6px 8px;border-radius:999px;background:#edf3ef;color:#4b7060}.staff-role.role-owner{background:#fff0cf;color:#90631a}.staff-role.role-manager{background:#e7efff;color:#41619b}
.permission-list{display:flex;gap:5px;flex-wrap:wrap;margin:13px 0 10px;padding-top:10px;border-top:1px solid var(--pos-line)}
.permission-list span{font-size:8px;font-weight:850;padding:5px 7px;border-radius:999px;background:#f2f3f2;color:#9aa39f}.permission-list span.on{background:#e5f2eb;color:#2d6a51}
.staff-card-actions{display:flex;align-items:center;gap:7px;min-height:32px}.staff-card-actions form{margin:0}

.form-page{max-width:1000px;margin:0 auto}.compact-form-page{max-width:500px}
.form-card{background:#fff;border-radius:22px;border:1px solid rgba(18,63,49,.07);padding:18px;box-shadow:var(--pos-shadow)}
.large-form-card{padding:20px}
.form-card-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;margin-bottom:16px}
.settings-form{display:flex;flex-direction:column;gap:15px}
.settings-form label{font-size:9px;font-weight:900;color:#62796f;display:flex;flex-direction:column;gap:5px}
.settings-form input:not([type=checkbox]),.settings-form select,.settings-form textarea{width:100%;border:1px solid var(--pos-line);border-radius:11px;background:#fff;padding:10px 11px;color:#153f31;font:inherit;font-size:11px;outline:0}
.settings-form input:focus,.settings-form select:focus,.settings-form textarea:focus{border-color:#60917c;box-shadow:0 0 0 4px rgba(61,120,95,.08)}
.form-section{padding-top:15px;border-top:1px solid var(--pos-line)}.form-section:first-of-type{padding-top:0;border-top:0}
.form-section-title{display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin-bottom:10px}.form-section-title strong{font-size:12px}.form-section-title span{font-size:9px;color:#91a29b}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.full-field{grid-column:1/-1}
.pin-setting-field{max-width:220px}
.permission-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.permission-check-grid>label{flex-direction:row;align-items:flex-start;gap:9px;padding:11px;border:1px solid var(--pos-line);border-radius:12px;background:#fbfcfb;cursor:pointer}
.permission-check-grid input[type=checkbox]{margin-top:2px;width:16px;height:16px;accent-color:var(--pos-green)}
.permission-check-grid span{display:block}.permission-check-grid strong,.permission-check-grid small{display:block}.permission-check-grid strong{font-size:10px;color:#234f3e}.permission-check-grid small{margin-top:2px;font-size:8px;color:#8ca097;line-height:1.35}
.form-actions{display:flex;gap:8px;align-items:center}.field-error{display:block;color:#c62d2d!important;font-size:8px!important;margin-top:3px}
.pin-change-card input{text-align:center;font-size:20px!important;letter-spacing:.35em;font-weight:900}

.history-summary{text-align:right;background:#fff;border-radius:15px;padding:10px 13px;box-shadow:var(--pos-shadow-soft)}.history-summary span,.history-summary strong{display:block}.history-summary span{font-size:8px;color:#8ba097}.history-summary strong{font-size:17px;margin-top:3px}
.history-filters{display:grid;grid-template-columns:minmax(220px,2fr) repeat(5,minmax(105px,1fr)) auto auto;gap:7px;align-items:end;background:#fff;border:1px solid rgba(18,63,49,.06);border-radius:17px;padding:10px;box-shadow:var(--pos-shadow-soft)}
.history-filters label{display:flex;flex-direction:column;gap:4px}.history-filters label>span{font-size:7px;letter-spacing:.1em;font-weight:900;color:#80958c}.history-filters input,.history-filters select{height:36px;border:1px solid var(--pos-line);border-radius:10px;background:#fff;padding:0 9px;color:#234f3e;font-size:9px;outline:0}
.history-filter-button{height:36px!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:0 12px!important;border-radius:10px!important}
.sales-history-card,.shift-history-card{background:#fff;border:1px solid rgba(18,63,49,.07);border-radius:19px;overflow:hidden;box-shadow:var(--pos-shadow)}
.sales-history-head,.sales-history-row{display:grid;grid-template-columns:1.3fr 1.25fr 1fr .8fr .65fr .75fr;gap:10px;align-items:center;padding:10px 13px}
.sales-history-head{background:#f7f5ef;color:#849990;font-size:8px;font-weight:950;letter-spacing:.1em}
.sales-history-row{min-height:60px;border-top:1px solid var(--pos-line);color:#244f3e;transition:.15s ease}
.sales-history-row:hover{background:#fbfcfa}.sales-history-row>span{min-width:0}.sales-history-row strong,.sales-history-row small{display:block}.sales-history-row strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sales-history-row small{font-size:8px;color:#8fa199;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history-total{text-align:right;font-size:11px;font-weight:950}

.shift-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.shift-kpi-grid>div{background:#fff;border-radius:17px;padding:13px;box-shadow:var(--pos-shadow-soft);border:1px solid rgba(18,63,49,.06)}.shift-kpi-grid small,.shift-kpi-grid strong{display:block}.shift-kpi-grid small{font-size:8px;letter-spacing:.1em;color:#81958d;font-weight:900}.shift-kpi-grid strong{font-size:18px;margin-top:5px}
.difference-negative{color:#bd3030!important}.difference-positive{color:#28704f!important}
.shift-history-head,.shift-history-row{display:grid;grid-template-columns:1.2fr .9fr 1.1fr .9fr .9fr .7fr;gap:10px;align-items:center;padding:10px 13px}
.shift-history-head{background:#f7f5ef;color:#849990;font-size:8px;font-weight:950;letter-spacing:.08em}
.shift-history-row{min-height:62px;border-top:1px solid var(--pos-line)}.shift-history-row strong,.shift-history-row small{display:block}.shift-history-row strong{font-size:10px}.shift-history-row small{font-size:8px;color:#8fa199;margin-top:3px}
.shift-close-summary{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:12px}.shift-close-summary>div{padding:9px;border:1px solid var(--pos-line);border-radius:11px;background:#fbfcfa}.shift-close-summary span,.shift-close-summary strong{display:block}.shift-close-summary span{font-size:8px;color:#849990}.shift-close-summary strong{font-size:11px;margin-top:3px}.shift-close-summary .expected{background:#edf4f0;border-color:#d5e4dd}

.receipt-number-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.receipt-number-row small{font-size:8px;letter-spacing:.12em;color:#849990}.receipt-number-row h2{margin:2px 0 0}.receipt-meta{display:flex;flex-direction:column;gap:2px;margin:9px 0 11px;color:#748a80;font-size:9px}.receipt-brand span{display:block}.receipt-note{display:flex;flex-direction:column;gap:2px;margin-top:9px;padding:8px;border-radius:9px;background:#f7f7f4;font-size:9px}.receipt-footer-message{text-align:center;margin-top:13px;padding-top:10px;border-top:1px dashed #cbd7d1;font-size:9px;color:#637a70}
.discount-input.locked{background:#f2f3f2;opacity:.7}.discount-input.locked input{cursor:not-allowed}

@media(max-width:1180px){
  .history-filters{grid-template-columns:repeat(4,minmax(120px,1fr))}.history-search{grid-column:span 2}
  .sales-history-card,.shift-history-card{overflow-x:auto}.sales-history-head,.sales-history-row{min-width:880px}.shift-history-head,.shift-history-row{min-width:860px}
}
@media(max-width:760px){
  .management-head{align-items:flex-start;flex-direction:column}.management-primary{width:100%;text-align:center}
  .staff-grid{grid-template-columns:1fr}.form-grid,.permission-check-grid{grid-template-columns:1fr}.full-field{grid-column:auto}
  .form-section-title{display:block}.form-section-title span{display:block;margin-top:3px}
  .history-filters{grid-template-columns:1fr 1fr}.history-search{grid-column:1/-1}.history-filter-button{width:100%}
  .shift-kpi-grid{grid-template-columns:1fr 1fr}.history-summary{text-align:left}
}
@media(max-width:430px){
  .history-filters{grid-template-columns:1fr}.history-search{grid-column:auto}
  .shift-kpi-grid{grid-template-columns:1fr 1fr}.shift-kpi-grid strong{font-size:14px}
  .staff-card{padding:11px}
}

@media print{
  body{background:white!important}
  .sidebar,.topbar,.receipt-actions,.flash{display:none!important}
  .main-shell{margin:0!important}.content{padding:0!important;height:auto!important;overflow:visible!important}
  .receipt-page{padding:0!important;display:block!important}.receipt{box-shadow:none!important;border:0!important;margin:0 auto!important;padding:2mm!important}
  .receipt.receipt-width-58{width:58mm!important;max-width:58mm!important;font-size:9px}.receipt.receipt-width-80{width:80mm!important;max-width:80mm!important}
  .receipt table{font-size:9px!important}.receipt h2{font-size:12px!important}
  @page{margin:2mm}
}


/* Return desk */
.receipt-page{display:flex;align-items:flex-start;justify-content:center;gap:14px;flex-wrap:wrap}
.receipt-operations{width:min(560px,100%);background:#fff;border:1px solid rgba(18,63,49,.08);border-radius:20px;padding:16px;box-shadow:var(--pos-shadow)}
.receipt-operations-head small{font-size:8px;letter-spacing:.15em;font-weight:950;color:#9a6c2a}.receipt-operations-head h3{margin:3px 0 0;font-size:18px}.receipt-operations-head p{margin:5px 0 12px;color:#82968d;font-size:9px}
.return-form{display:flex;flex-direction:column;gap:12px}.return-items{border:1px solid var(--pos-line);border-radius:14px;overflow:hidden}
.return-item-row{display:grid;grid-template-columns:minmax(0,1fr) 120px;gap:10px;align-items:center;padding:10px 11px;border-top:1px solid var(--pos-line)}.return-item-row:first-child{border-top:0}
.return-item-row strong,.return-item-row small{display:block}.return-item-row strong{font-size:10px}.return-item-row small{font-size:8px;color:#8da098;margin-top:3px}
.return-item-row label,.return-options label,.full-refund-form label{display:flex;flex-direction:column;gap:4px}.return-item-row label span,.return-options label span,.full-refund-form label span{font-size:7px;color:#82968d;font-weight:900;letter-spacing:.08em}
.return-item-row input,.return-options input,.return-options select,.full-refund-form select{height:34px;border:1px solid var(--pos-line);border-radius:9px;background:white;padding:0 9px;color:#244f3e;font-size:9px}
.fully-returned{font-size:8px;color:#307052;background:#e7f2ec;border-radius:999px;padding:6px 8px;text-align:center;font-weight:900}
.return-options{display:grid;grid-template-columns:120px minmax(0,1fr) auto;gap:7px;align-items:end}.return-options button{height:34px;border-radius:10px;padding:0 11px;font-size:9px;font-weight:900}
.full-refund-form{display:flex;align-items:end;justify-content:flex-end;gap:7px;margin-top:10px;padding-top:10px;border-top:1px solid var(--pos-line)}.full-refund-form select{min-width:120px}.danger-outline{border:1px solid #e6bebe!important;color:#b62e2e!important;background:#fff8f8!important}
.receipt-refund-history{margin-top:10px;padding:8px;border-top:1px dashed #ccd7d2;border-bottom:1px dashed #ccd7d2}.receipt-refund-history>strong{display:block;font-size:9px;margin-bottom:4px}.receipt-refund-history span{display:block;font-size:8px;color:#6f867b;padding:2px 0}.receipt-returned{color:#b05b22!important;font-weight:800!important}
@media(max-width:760px){.receipt-page{display:block}.receipt-operations{margin:12px auto}.return-options{grid-template-columns:1fr 1fr}.return-options button{grid-column:1/-1}.full-refund-form{align-items:stretch;flex-direction:column}}
@media print{.receipt-operations{display:none!important}.receipt-page{display:block!important}}


/* Split payments */
.premium-payment-tabs.four-methods{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.split-payment-row{margin-top:7px;padding:8px;border:1px solid var(--pos-line);border-radius:12px;background:#f8faf8}
.split-payment-row[hidden]{display:none!important}
.split-payment-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.split-payment-grid label{display:flex;flex-direction:column;gap:3px}
.split-payment-grid small{font-size:7px;color:#83978e;font-weight:900;letter-spacing:.08em}
.split-payment-grid input{height:34px;border:1px solid var(--pos-line);border-radius:9px;padding:0 8px;background:#fff;color:#153f31;font-size:10px;outline:0}
.split-balance-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:7px}
.split-fill-card{height:30px!important;padding:0 9px!important;font-size:8px!important;border-radius:9px!important}
.split-balance{text-align:right}.split-balance small,.split-balance strong{display:block}.split-balance small{font-size:7px;color:#8ba097;font-weight:900}.split-balance strong{font-size:11px;margin-top:2px;color:#b24a32}.split-balance.good strong{color:#26704d}
@media(max-width:430px){.split-payment-grid{grid-template-columns:1fr 1fr}.split-balance-row{align-items:stretch}.split-fill-card{height:auto!important}}


/* Stock receiving */
.inventory-receive-button{white-space:nowrap}
.receive-card,.receive-history{background:#fff;border:1px solid rgba(18,63,49,.07);border-radius:20px;padding:15px;box-shadow:var(--pos-shadow)}
.receive-meta-grid{display:grid;grid-template-columns:1fr 1fr 1.4fr;gap:8px}
.receive-meta-grid label,.receive-line label{display:flex;flex-direction:column;gap:4px}
.receive-meta-grid span,.receive-line span{font-size:7px;font-weight:900;letter-spacing:.08em;color:#81958d}
.receive-meta-grid input,.receive-line input,.receive-line select{height:36px;border:1px solid var(--pos-line);border-radius:10px;background:#fff;padding:0 9px;color:#234f3e;font-size:9px;outline:0}
.receive-lines-head,.receive-history-head{display:flex;align-items:end;justify-content:space-between;gap:10px;margin:15px 0 8px}
.receive-lines-head small,.receive-history-head small{display:block;font-size:8px;letter-spacing:.13em;color:#849990;font-weight:950}
.receive-lines-head strong,.receive-history-head h3{display:block;margin:3px 0 0;font-size:14px}
.receive-lines{display:flex;flex-direction:column;gap:6px}
.receive-line{display:grid;grid-template-columns:minmax(220px,1.8fr) minmax(100px,.55fr) minmax(110px,.65fr) 32px;gap:7px;align-items:end;padding:8px;border:1px solid var(--pos-line);border-radius:12px;background:#fbfcfa}
.receive-remove{width:32px;height:36px;border:1px solid #ead1d1;border-radius:9px;background:#fff8f8;color:#b73333;font-size:17px}
.receive-submit-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}.receive-hint{font-size:8px;color:#869990;max-width:520px}.receive-submit{min-width:135px}
.receive-history{padding:0;overflow:hidden}.receive-history-head{margin:0;padding:12px 14px;background:#f7f5ef}
.receive-history-row{display:grid;grid-template-columns:1.2fr 1fr 1fr auto;gap:10px;align-items:center;padding:11px 14px;border-top:1px solid var(--pos-line);color:#244f3e}
.receive-history-row:hover{background:#fbfcfa}.receive-history-row strong,.receive-history-row small{display:block}.receive-history-row strong{font-size:10px}.receive-history-row small{font-size:8px;color:#8fa199;margin-top:3px}
.stock-receipt-card{max-width:880px;margin:0 auto}.receipt-actions-inline{display:flex;gap:6px;flex-wrap:wrap}
.stock-receipt-meta{display:grid;grid-template-columns:1fr 1fr 1.4fr;gap:8px;margin-bottom:12px}.stock-receipt-meta>div{padding:10px;border-radius:11px;background:#f7f9f7;border:1px solid var(--pos-line)}.stock-receipt-meta small,.stock-receipt-meta strong{display:block}.stock-receipt-meta small{font-size:7px;color:#849990;font-weight:900}.stock-receipt-meta strong{font-size:10px;margin-top:3px}
.stock-receipt-lines{border:1px solid var(--pos-line);border-radius:13px;overflow:hidden}.stock-receipt-head,.stock-receipt-row{display:grid;grid-template-columns:1.5fr .55fr .7fr .7fr;gap:8px;align-items:center;padding:9px 11px}.stock-receipt-head{background:#f6f5f0;font-size:8px;color:#82978e;font-weight:950}.stock-receipt-row{border-top:1px solid var(--pos-line);font-size:9px}.stock-receipt-row strong,.stock-receipt-row small{display:block}.stock-receipt-row small{font-size:8px;color:#8fa199;margin-top:2px}
.stock-receipt-total{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:10px;padding:10px;border-radius:11px;background:#edf4f0}.stock-receipt-total span{font-size:9px;color:#637c71}.stock-receipt-total strong{font-size:15px}
@media(max-width:760px){.receive-meta-grid{grid-template-columns:1fr}.receive-line{grid-template-columns:1fr 1fr 32px}.receive-product{grid-column:1/-1}.receive-submit-row{align-items:stretch;flex-direction:column}.receive-history{overflow-x:auto}.receive-history-list{min-width:680px}.stock-receipt-meta{grid-template-columns:1fr}.stock-receipt-lines{overflow-x:auto}.stock-receipt-head,.stock-receipt-row{min-width:620px}}
@media print{.receipt-actions-inline{display:none!important}.stock-receipt-card{box-shadow:none!important;border:0!important}}


/* Network and customer picker */
.network-banner{
  position:fixed;left:50%;top:10px;z-index:500;transform:translate(-50%,-140%);
  display:flex;align-items:center;gap:8px;max-width:calc(100vw - 24px);
  padding:8px 12px;border-radius:999px;background:#9b342e;color:#fff;
  box-shadow:0 12px 32px rgba(77,18,18,.2);font-size:9px;transition:transform .22s ease
}
.network-banner strong{font-size:9px;text-transform:uppercase;letter-spacing:.08em}
.network-banner span{opacity:.86;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.network-banner.show{transform:translate(-50%,0)}
body.offline .charge-button,body.offline .hold-button{opacity:.5;cursor:not-allowed}
.customer-search-results{display:flex;flex-direction:column;gap:4px;max-height:190px;overflow:auto;margin:-2px 0 7px}
.customer-result{border:1px solid var(--pos-line);border-radius:10px;background:#fbfcfa;padding:8px 9px;text-align:left;color:#234f3e}
.customer-result:hover{background:#edf4f0;border-color:#acc6ba}
.customer-result strong,.customer-result span{display:block}.customer-result strong{font-size:10px}.customer-result span{font-size:8px;color:#81958d;margin-top:2px}
.customer-search-empty,.customer-search-loading{padding:8px 9px;border-radius:10px;background:#f7f7f4;color:#82968d;font-size:8px}
.cashier-shortcuts{display:flex;gap:5px;flex-wrap:wrap;justify-content:center;margin-top:5px}
.cashier-shortcuts span{font-size:7px;color:#91a19a;background:#f0f3f1;border-radius:999px;padding:3px 6px}
@media(max-width:760px){.network-banner{top:6px}.network-banner span{max-width:245px}.cashier-shortcuts{display:none}}


/* Customer records */
.customer-search-bar{display:flex;gap:7px;align-items:center;background:#fff;border:1px solid rgba(18,63,49,.07);border-radius:15px;padding:8px;box-shadow:var(--pos-shadow-soft)}
.customer-search-bar input{flex:1;min-width:0;height:38px;border:1px solid var(--pos-line);border-radius:10px;padding:0 10px;font-size:10px;color:#234f3e;outline:0}
.customer-table-card{background:#fff;border:1px solid rgba(18,63,49,.07);border-radius:18px;overflow:hidden;box-shadow:var(--pos-shadow)}
.customer-table-head,.customer-table-row{display:grid;grid-template-columns:1.35fr 1fr 1.25fr .75fr auto;gap:10px;align-items:center;padding:10px 13px}
.customer-table-head{background:#f7f5ef;color:#849990;font-size:8px;font-weight:950;letter-spacing:.09em}
.customer-table-row{min-height:56px;border-top:1px solid var(--pos-line);color:#244f3e}
.customer-table-row:hover{background:#fbfcfa}.customer-table-row strong,.customer-table-row small{display:block}.customer-table-row strong{font-size:10px}.customer-table-row small{font-size:8px;color:#8da098;margin-top:2px}.customer-table-row>span{font-size:9px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-profile-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.customer-profile-identity{display:flex;align-items:center;gap:12px}.customer-profile-avatar{width:54px;height:54px;border-radius:17px;background:#e7f0eb;color:#245c46;display:grid;place-items:center;font-size:22px;font-weight:950}.customer-profile-identity small{font-size:8px;letter-spacing:.15em;color:#849990;font-weight:950}.customer-profile-identity h2{font-size:25px;margin:2px 0 0}.customer-profile-identity p{margin:4px 0 0;font-size:9px;color:#82968d}
.customer-profile-actions{display:flex;gap:7px}.customer-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.customer-kpi-grid>div{background:#fff;border:1px solid rgba(18,63,49,.06);border-radius:16px;padding:12px;box-shadow:var(--pos-shadow-soft)}.customer-kpi-grid small,.customer-kpi-grid strong{display:block}.customer-kpi-grid small{font-size:7px;color:#82968d;font-weight:950;letter-spacing:.1em}.customer-kpi-grid strong{font-size:17px;margin-top:4px}
.customer-note-card{background:#fff;border:1px solid rgba(18,63,49,.06);border-radius:14px;padding:11px 13px}.customer-note-card small{font-size:7px;color:#82968d;font-weight:950;letter-spacing:.1em}.customer-note-card p{margin:4px 0 0;font-size:10px;line-height:1.5;color:#536e63}
.customer-sales-head,.customer-sales-row{grid-template-columns:1.25fr 1fr 1fr .75fr .75fr}
@media(max-width:760px){.customer-table-card{overflow-x:auto}.customer-table-head,.customer-table-row{min-width:720px}.customer-profile-head{align-items:flex-start;flex-direction:column}.customer-profile-actions{width:100%}.customer-profile-actions a{flex:1;text-align:center}.customer-kpi-grid{grid-template-columns:1fr 1fr}.customer-sales-head,.customer-sales-row{min-width:680px}}

.product-card[hidden],.premium-product-card[hidden]{display:none!important}
#new-category-field[hidden]{display:none!important}
#scan-feedback{font-size:12px;color:#315d46;min-height:16px}
