:root {
    --pr: #F97316;
    --bg: #F9FAFB;
    --card: #fff;
    --tx: #111827;
    --mu: #6B7280;
    --bd: #E5E7EB;
    --sb: #111827;
    --ok: #16A34A;
    --dg: #DC2626;
    --hv: #F3F4F6;
    color-scheme: light;
  }
  @media(prefers-color-scheme:dark) {
    :root:not([data-theme="light"]) {
      --bg: #0B1220;
      --card: #1F2937;
      --tx: #F9FAFB;
      --mu: #9CA3AF;
      --bd: #374151;
      --sb: #0B1220;
      --hv: #2B3648;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg: #0B1220;
    --card: #1F2937;
    --tx: #F9FAFB;
    --mu: #9CA3AF;
    --bd: #374151;
    --sb: #0B1220;
    --hv: #2B3648;
    color-scheme: dark;
  }
  :root {
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top,0px);
    padding-bottom: env(safe-area-inset-bottom,0px);
  }
  html {
    scroll-padding-top: env(safe-area-inset-top,0px);
  }
  *,*:before,*:after {
    box-sizing: border-box;
  }
  body {
    margin: 0;
    font: 14px/1.5 Inter,system-ui,sans-serif;
    background: var(--bg);
    color: var(--tx);
    overflow-x: hidden;
  }
  body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: env(safe-area-inset-top,0px);
    background: var(--card);
    z-index: 60;
  }
  #sb {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 244px;
    background: var(--sb);
    color: #D1D5DB;
    padding: env(safe-area-inset-top,0px) 12px 12px;
    overflow-y: auto;
    z-index: 50;
    transition: .2s;
  }
  .logo {
    padding: 18px 8px;
    color: #fff;
    font-weight: 700;
    font-size: 19px;
    letter-spacing: .5px;
  }
  .logo b {
    color: var(--pr);
  }
  .logo small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #9CA3AF;
    letter-spacing: 0;
  }
  .gl {
    font-size: 11px;
    color: #6B7280;
    padding: 14px 10px 4px;
  }
  #sb a {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-weight: 500;
  }
  #sb a:hover {
    background: #1F2937;
  }
  #sb a.on {
    background: var(--pr);
    color: #fff;
  }
  #main {
    margin-left: 244px;
    min-width: 0;
    transition: .2s;
  }
  body.col #sb {
    width: 72px;
  }
  body.col #main {
    margin-left: 72px;
  }
  body.col #sb span,body.col .gl,body.col .logo small {
    display: none;
  }
  body.col .logo {
    font-size: 12px;
    padding-inline: 0;
    text-align: center;
  }
  header {
    position: sticky;
    top: env(safe-area-inset-top,0px);
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--card);
    border-bottom: 1px solid var(--bd);
  }
  .bc {
    font-weight: 600;
    white-space: nowrap;
  }
  .bc small {
    color: var(--mu);
    font-weight: 400;
  }
  .hs {
    flex: 1;
    max-width: 380px;
    margin-left: auto;
  }
  .ib {
    background: none;
    border: 1px solid var(--bd);
    color: var(--tx);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    flex: none;
  }
  .ib:hover {
    background: var(--hv);
  }
  .av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--pr);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    flex: none;
  }
  #view {
    padding: 20px;
    max-width: 1500px;
  }
  h1 {
    font-size: 20px;
    margin: 0;
  }
  .top {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  .top .sp {
    flex: 1;
  }
  .card {
    background: var(--card);
    border: 1px solid var(--bd);
    border-radius: 12px;
    padding: 16px;
  }
  .card h3 {
    margin: 0 0 12px;
    font-size: 14px;
  }
  .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(170px,1fr));
    gap: 12px;
    margin-bottom: 16px;
  }
  .stat small {
    color: var(--mu);
  }
  .stat b {
    display: block;
    font-size: 20px;
    margin-top: 2px;
  }
  .g2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
  }
  .g3 {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
  }
  .cv {
    position: relative;
    height: 240px;
  }
  input,select,textarea {
    font: inherit;
    color: var(--tx);
    background: var(--card);
    border: 1px solid var(--bd);
    border-radius: 8px;
    padding: 8px 10px;
    width: 100%;
    min-width: 0;
  }
  input:focus,select:focus,.btn:focus-visible,.ib:focus-visible {
    outline: 2px solid var(--pr);
    outline-offset: 1px;
  }
  label {
    display: block;
    font-size: 12px;
    color: var(--mu);
    margin: 10px 0 4px;
  }
  .btn {
    font: inherit;
    font-weight: 600;
    border: 1px solid var(--bd);
    background: var(--card);
    color: var(--tx);
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    white-space: nowrap;
  }
  .btn:hover {
    background: var(--hv);
  }
  .btn.p {
    background: var(--pr);
    border-color: var(--pr);
    color: #fff;
  }
  .btn.p:hover {
    filter: brightness(.95);
  }
  .btn.d {
    color: var(--dg);
  }
  .btn.sm {
    padding: 4px 8px;
    font-size: 12px;
  }
  .tw {
    overflow-x: auto;
  }
  table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
  }
  th,td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--bd);
  }
  th {
    font-size: 12px;
    color: var(--mu);
    font-weight: 600;
  }
  th[data-s] {
    cursor: pointer;
  }
  .r {
    text-align: right;
  }
  .mu {
    color: var(--mu);
  }
  .bdg {
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
  }
  .bdg.ok {
    background: #16A34A22;
    color: var(--ok);
  }
  .bdg.wr {
    background: #F9731622;
    color: var(--pr);
  }
  .bdg.dg {
    background: #DC262622;
    color: var(--dg);
  }
  .pos {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 12px;
    align-items: start;
  }
  .pg {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(150px,1fr));
    gap: 10px;
    margin-top: 12px;
  }
  .pi {
    border: 1px solid var(--bd);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    background: var(--card);
    text-align: left;
    color: var(--tx);
    font: inherit;
  }
  .pi:hover {
    border-color: var(--pr);
  }
  .pi:disabled {
    opacity: .5;
    cursor: not-allowed;
  }
  .th {
    height: 64px;
    border-radius: 8px;
    background: var(--hv);
    display: grid;
    place-items: center;
    color: var(--pr);
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 8px;
  }
  .pi b {
    display: block;
    font-size: 13px;
    line-height: 1.3;
    min-height: 34px;
  }
  .cart {
    position: sticky;
    top: 76px;
  }
  .ci {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bd);
  }
  .q {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .q button {
    width: 26px;
    height: 26px;
    border: 1px solid var(--bd);
    background: var(--card);
    color: var(--tx);
    border-radius: 6px;
    cursor: pointer;
  }
  .q span {
    min-width: 24px;
    text-align: center;
  }
  .tr {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
  }
  .tr.t {
    font-size: 18px;
    font-weight: 700;
    border-top: 1px dashed var(--bd);
    margin-top: 6px;
    padding-top: 8px;
  }
  .row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .row>* {
    flex: 1;
  }
  #modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
  }
  .mb {
    position: absolute;
    inset: 0;
    background: #0009;
    display: grid;
    place-items: center;
    padding: 16px;
  }
  .mc {
    background: var(--card);
    border-radius: 14px;
    width: 100%;
    max-width: 440px;
    max-height: 92vh;
    overflow: auto;
    border: 1px solid var(--bd);
  }
  .mc.w {
    max-width: 620px;
  }
  .mh {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--bd);
  }
  .mbd {
    padding: 6px 16px 16px;
  }
  .mf {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--bd);
  }
  .big {
    font-size: 28px;
    font-weight: 700;
    color: var(--pr);
    margin: 10px 0;
  }
  .rc {
    font: 12px/1.6 ui-monospace,Menlo,monospace;
    border: 1px dashed var(--bd);
    padding: 12px;
    margin-top: 10px;
  }
  .rc .tr {
    padding: 0;
  }
  .rc h4 {
    text-align: center;
    margin: 0;
  }
  .rc p {
    text-align: center;
    margin: 0;
  }
  #toasts {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom,0px));
    z-index: 200;
    display: grid;
    gap: 8px;
  }
  .ts {
    background: var(--sb);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 4px solid var(--ok);
    box-shadow: 0 4px 12px #0004;
  }
  .ts.dg {
    border-color: var(--dg);
  }
  .pgn {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
    padding-top: 12px;
  }
  .mt {
    display: none;
  }
  @media(max-width:1100px) {
    .pos,.g2,.g3 {
      grid-template-columns: 1fr;
    }
    .cart {
      position: static;
    }
  }
  @media(max-width:900px) {
    #sb {
      transform: translateX(-100%);
      width: 244px!important;
    }
    body.open #sb {
      transform: none;
    }
    #main,body.col #main {
      margin-left: 0;
    }
    .mt {
      display: inline-grid;
    }
    body.col #sb span,body.col .gl {
      display: inline;
    }
    header {
      padding: 10px 12px;
    }
    #view {
      padding: 12px;
    }
    .bc small,.hs {
      display: none;
    }
    .bc {
      flex: 1;
    }
  }
  @media(max-width:600px) {
    .row {
      flex-direction: column;
    }
    .stats {
      grid-template-columns: 1fr 1fr;
    }
    .pg {
      grid-template-columns: 1fr 1fr;
    }
  }
  @media print {
    body>*:not(#modal) {
      display: none!important;
    }
    .mb {
      position: static;
      background: none;
    }
    .mh,.mf {
      display: none;
    }
    .mc {
      border: 0;
    }
  }
  :root {
    --bg: #F3F4F6;
    --card: rgba(255,255,255,.62);
    --bd: rgba(17,24,39,.09);
    --gb: rgba(255,255,255,.6);
    --in: rgba(255,255,255,.7);
    --sg: #fff;
    --sheet: rgba(255,255,255,.88);
    --glow: .2;
    --hv: rgba(17,24,39,.06);
  }
  @media(prefers-color-scheme:dark) {
    :root:not([data-theme="light"]) {
      --bg: #0B1220;
      --card: rgba(17,24,39,.7);
      --bd: rgba(255,255,255,.1);
      --gb: rgba(255,255,255,.1);
      --in: rgba(255,255,255,.06);
      --sg: #374151;
      --sheet: rgba(17,24,39,.92);
      --glow: .14;
      --hv: rgba(255,255,255,.08);
    }
  }
  :root[data-theme="dark"] {
    --bg: #0B1220;
    --card: rgba(17,24,39,.7);
    --bd: rgba(255,255,255,.1);
    --gb: rgba(255,255,255,.1);
    --in: rgba(255,255,255,.06);
    --sg: #374151;
    --sheet: rgba(17,24,39,.92);
    --glow: .14;
    --hv: rgba(255,255,255,.08);
  }
  body {
    background: radial-gradient(900px 520px at 88% -6%,rgba(249,115,22,var(--glow)),transparent 62%),radial-gradient(760px 520px at -6% 108%,rgba(251,146,60,calc(var(--glow)*.7)),transparent 62%),var(--bg) fixed;
  }
  body::before {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
  .gls,#sb,header,.card,.mc,#bn {
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
  }
  #sb {
    top: 12px;
    left: 12px;
    bottom: 12px;
    width: 232px;
    border-radius: 24px;
    background: var(--card);
    color: var(--tx);
    border: 1px solid var(--gb);
    box-shadow: 0 8px 32px rgba(31,38,135,.1),inset 0 1px 0 rgba(255,255,255,.5);
    padding-top: env(safe-area-inset-top,0px);
  }
  .logo {
    color: var(--tx);
  }
  .gl {
    color: var(--mu);
  }
  #sb a:hover {
    background: var(--hv);
  }
  #sb a.on {
    background: linear-gradient(135deg,#F97316,#FB923C);
    color: #fff;
    box-shadow: 0 6px 16px rgba(249,115,22,.35);
  }
  #sb a {
    transition: background .2s,transform .2s;
  }
  #sb a:active {
    transform: scale(.97);
  }
  #main {
    margin-left: 256px;
  }
  body.col #main {
    margin-left: 96px;
  }
  header {
    top: calc(env(safe-area-inset-top,0px) + 12px);
    margin: 12px 20px 0;
    border-radius: 20px;
    border: 1px solid var(--gb);
    background: var(--card);
    box-shadow: 0 8px 32px rgba(31,38,135,.08),inset 0 1px 0 rgba(255,255,255,.5);
  }
  .card {
    border-radius: 22px;
    border: 1px solid var(--gb);
    box-shadow: 0 8px 32px rgba(31,38,135,.08),inset 0 1px 0 rgba(255,255,255,.5);
  }
  .cart {
    top: 96px;
  }
  .stat svg {
    display: block;
    color: var(--pr);
    width: 20px;
    height: 20px;
    margin-bottom: 6px;
  }
  .stat b {
    font-size: 24px;
    letter-spacing: -.5px;
  }
  input,select,textarea {
    background: var(--in);
    border-radius: 12px;
  }
  .btn {
    border-radius: 12px;
    transition: transform .15s,background .2s;
  }
  .btn:active,.ib:active {
    transform: scale(.96);
  }
  .ib {
    background: var(--in);
    border-radius: 12px;
  }
  .btn.p {
    background: linear-gradient(135deg,#F97316,#FB923C);
    box-shadow: 0 6px 16px rgba(249,115,22,.3);
  }
  .pi {
    background: var(--in);
    border-radius: 16px;
    transition: transform .2s,box-shadow .2s,border-color .2s;
  }
  .pi:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,.12);
  }
  .th {
    background: linear-gradient(135deg,rgba(249,115,22,.2),rgba(251,146,60,.05));
    border-radius: 12px;
  }
  .seg {
    display: inline-flex;
    background: var(--in);
    border: 1px solid var(--bd);
    border-radius: 12px;
    padding: 3px;
    gap: 2px;
  }
  .seg button {
    font: inherit;
    font-weight: 600;
    border: 0;
    background: none;
    color: var(--mu);
    padding: 6px 14px;
    border-radius: 9px;
    cursor: pointer;
    transition: .2s;
  }
  .seg button.on {
    background: var(--sg);
    color: var(--tx);
    box-shadow: 0 2px 8px rgba(0,0,0,.14);
  }
  .mb {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .mc {
    background: var(--sheet);
    border-radius: 26px;
    border: 1px solid var(--gb);
    box-shadow: 0 24px 64px rgba(0,0,0,.28);
    animation: sheet .32s cubic-bezier(.2,.9,.3,1.15);
  }
  @keyframes sheet {
    from {
      opacity: 0;
      transform: translateY(28px) scale(.96);
    }
  }
  @keyframes fi {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
  }
  #view>* {
    animation: fi .28s ease;
  }
  #bn {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom,0px));
    z-index: 45;
    padding: 6px;
    border-radius: 24px;
    background: var(--card);
    border: 1px solid var(--gb);
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
  }
  #bn a,#bn button {
    flex: 1;
    display: grid;
    justify-items: center;
    gap: 2px;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    color: var(--mu);
    text-decoration: none;
    background: none;
    border: 0;
    padding: 7px 0;
    border-radius: 18px;
    cursor: pointer;
    transition: .2s;
  }
  #bn .on {
    background: linear-gradient(135deg,#F97316,#FB923C);
    color: #fff;
  }
  @media(max-width:900px) {
    #sb {
      transform: translateX(-120%);
    }
    body.open #sb {
      transform: none;
    }
    #main,body.col #main {
      margin-left: 0;
    }
    header {
      margin: 8px 10px 0;
    }
    #bn {
      display: flex;
    }
    #view {
      padding-bottom: 100px;
    }
    #toasts {
      bottom: calc(92px + env(safe-area-inset-bottom,0px));
    }
  }
  @media(max-width:600px) {
    .mb {
      place-items: end center;
      padding: 8px;
    }
  }
  @media(prefers-reduced-motion:reduce) {
    * {
      animation: none!important;
      transition: none!important;
    }
  }
  :root {
    --pr: #2563EB;
    --bg: #F5F8FC;
    --card: rgba(255,255,255,.76);
    --tx: #172033;
    --mu: #7B8798;
    --bd: rgba(148,163,184,.2);
    --gb: rgba(255,255,255,.85);
    --in: rgba(255,255,255,.8);
    --sheet: rgba(255,255,255,.92);
    --sg: #fff;
    --glow: .14;
    --hv: rgba(37,99,235,.07);
  }
  @media(prefers-color-scheme:dark) {
    :root:not([data-theme="light"]) {
      --pr: #3B82F6;
      --bg: #0B1426;
      --card: rgba(17,26,46,.72);
      --tx: #F1F5F9;
      --mu: #94A3B8;
      --bd: rgba(255,255,255,.1);
      --gb: rgba(255,255,255,.1);
      --in: rgba(255,255,255,.06);
      --sheet: rgba(15,23,42,.94);
      --sg: #334155;
      --glow: .2;
      --hv: rgba(255,255,255,.08);
    }
  }
  :root[data-theme="dark"] {
    --pr: #3B82F6;
    --bg: #0B1426;
    --card: rgba(17,26,46,.72);
    --tx: #F1F5F9;
    --mu: #94A3B8;
    --bd: rgba(255,255,255,.1);
    --gb: rgba(255,255,255,.1);
    --in: rgba(255,255,255,.06);
    --sheet: rgba(15,23,42,.94);
    --sg: #334155;
    --glow: .2;
    --hv: rgba(255,255,255,.08);
  }
  body {
    background: radial-gradient(900px 520px at 88% -6%,rgba(37,99,235,var(--glow)),transparent 62%),radial-gradient(760px 520px at -6% 108%,rgba(6,182,212,calc(var(--glow)*.6)),transparent 62%),var(--bg) fixed;
  }
  #sb a.on,#bn .on {
    background: linear-gradient(135deg,#2563EB,#1D4ED8);
    box-shadow: 0 6px 16px rgba(37,99,235,.35);
  }
  .btn.p,.btn.p:hover {
    background: linear-gradient(135deg,#2563EB,#1D4ED8);
    border-color: #2563EB;
    box-shadow: 0 6px 16px rgba(37,99,235,.3);
  }
  .th {
    background: linear-gradient(135deg,rgba(37,99,235,.14),rgba(6,182,212,.06));
  }
  .bdg.wr {
    background: #F59E0B22;
    color: #D97706;
  }
  .sb {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--in);
    border: 1px solid var(--bd);
    border-radius: 99px;
    padding: 4px 16px;
  }
  .sb input {
    border: 0;
    background: none;
    padding: 10px 0;
    flex: 1;
  }
  .sb input:focus {
    outline: none;
  }
  .sb:focus-within {
    outline: 2px solid var(--pr);
  }
  .sb svg {
    color: var(--mu);
    flex: none;
  }
  .chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0 4px;
    scrollbar-width: none;
  }
  .chips::-webkit-scrollbar {
    display: none;
  }
  .chip {
    font: inherit;
    font-weight: 600;
    border: 1px solid var(--bd);
    background: var(--in);
    color: var(--tx);
    padding: 7px 14px;
    border-radius: 99px;
    cursor: pointer;
    white-space: nowrap;
    flex: none;
    transition: .2s;
  }
  .chip.on {
    background: var(--pr);
    border-color: var(--pr);
    color: #fff;
  }
  .pp {
    font-weight: 700;
    color: var(--pr);
  }
  .sk {
    font-size: 12px;
  }
  .cart {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
  }
  #cart {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
  }
  .cl {
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
  }
  .cf {
    flex: none;
    border-top: 1px solid var(--bd);
    margin-top: 6px;
  }
  .cx,.fab {
    display: none;
  }
  @media(min-width:821px) {
    .pos {
      grid-template-columns: minmax(310px,38%) 1fr;
    }
    .cart {
      order: -1;
      position: sticky;
      top: 96px;
    }
  }
  @media(max-width:820px) {
    .pos {
      grid-template-columns: 1fr;
    }
    .fab {
      display: flex;
      position: fixed;
      right: 16px;
      bottom: calc(88px + env(safe-area-inset-bottom,0px));
      z-index: 46;
      gap: 10px;
      align-items: center;
      border: 0;
      border-radius: 99px;
      padding: 10px 16px;
      background: linear-gradient(135deg,#2563EB,#1D4ED8);
      color: #fff;
      font: inherit;
      font-weight: 600;
      box-shadow: 0 8px 24px rgba(37,99,235,.4);
      cursor: pointer;
    }
    .fab b {
      background: #fff;
      color: #1D4ED8;
      border-radius: 99px;
      min-width: 22px;
      height: 22px;
      display: grid;
      place-items: center;
      font-size: 12px;
    }
    .cart {
      position: fixed;
      top: auto;
      left: 8px;
      right: 8px;
      bottom: calc(8px + env(safe-area-inset-bottom,0px));
      max-height: 82vh;
      z-index: 70;
      background: var(--sheet);
      transform: translateY(130%);
      transition: transform .3s cubic-bezier(.2,.9,.3,1);
    }
    body.cartopen .cart {
      transform: none;
    }
    .cx {
      display: grid;
      float: right;
    }
  }
  .pg.ls {
    grid-template-columns: 1fr;
  }
  .pg.ls .pi {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .pg.ls .th {
    width: 48px;
    height: 48px;
    margin: 0;
    flex: none;
    font-size: 14px;
  }
  .pg.ls .pi b {
    flex: 1;
    min-height: 0;
  }
  .pg.ls .sk {
    width: 84px;
  }
  .pg.ls .pp {
    width: 110px;
    text-align: right;
  }
  .ckr {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    font: inherit;
    color: var(--tx);
    background: none;
    border: 0;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
  }
  .ckr:hover {
    background: var(--hv);
  }
  .ckr.on {
    background: var(--hv);
    outline: 2px solid var(--pr);
  }
  .dz {
    display: grid;
    place-items: center;
    height: 160px;
    border: 2px dashed var(--bd);
    border-radius: 16px;
    cursor: pointer;
    text-align: center;
    padding: 8px;
    overflow: hidden;
  }
  .dz.ov {
    border-color: var(--pr);
    background: var(--hv);
  }
  .dz img {
    max-height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
  }
  .th {
    overflow: hidden;
  }
  .th img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .fs {
    font-weight: 700;
    margin: 18px 0 2px;
  }
  .rw {
    display: flex;
    gap: 8px;
  }
  .rw>input,.rw>select {
    flex: 1;
    min-width: 0;
  }
  .rw .btn {
    flex: none;
  }
  .pf {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--hv);
  }
  html {
    -webkit-text-size-adjust: 100%;
  }
  .pos>*,.g2>*,.g3>*,.stats>* {
    min-width: 0;
  }
  .cart {
    overflow-y: auto;
  }
  .tr {
    gap: 12px;
  }
  .tr>span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .bc {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mf {
    padding-bottom: calc(12px + env(safe-area-inset-bottom,0px));
  }
  body.col #sb a {
    justify-content: center;
  }
  #view {
    margin-inline: auto;
  }
  @media(min-width:901px) and (max-width:1180px) {
    #sb {
      width: 72px;
    }
    #sb span,#sb .gl,#sb .logo small {
      display: none;
    }
    #sb a {
      justify-content: center;
    }
    .logo {
      font-size: 12px;
      padding-inline: 0;
      text-align: center;
    }
    #main {
      margin-left: 96px;
    }
  }
  @media(min-width:1900px) {
    body {
      font-size: 15px;
    }
    #view {
      max-width: 1680px;
    }
  }
  @media(max-width:900px) {
    body.open::after,body.cartopen::after {
      content: "";
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.4);
      z-index: 49;
    }
    body.cartopen::after {
      z-index: 65;
    }
  }
  @media(max-width:600px) {
    .pos .row {
      flex-direction: row!important;
    }
    .stat b {
      font-size: 20px;
    }
    .top h1 {
      font-size: 18px;
    }
    .pgn {
      flex-wrap: wrap;
    }
    .th {
      height: 56px;
    }
  }
  @media(pointer:coarse) {
    .btn {
      min-height: 42px;
    }
    .btn.sm {
      min-height: 38px;
    }
    .ib {
      width: 40px;
      height: 40px;
    }
    .q button {
      width: 34px;
      height: 34px;
    }
    .chip {
      padding: 10px 16px;
    }
    .seg button {
      padding: 8px 14px;
    }
    input,select,textarea {
      font-size: 16px;
      min-height: 42px;
    }
  }
  @media(max-height:560px) {
    header {
      position: static;
    }
  }
  @media(max-height:560px) and (min-width:821px) {
    .cart {
      max-height: none;
    }
  }
  .av {
    border: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  .av:focus-visible {
    outline: 2px solid var(--pr);
    outline-offset: 2px;
  }
  /* Perbaikan footer modal di layar kecil: tombol tidak terpotong secara horizontal. */
  @media(max-width:600px) {
    .mf {
      flex-wrap: wrap;
      min-width: 0;
    }
    .mf .btn {
      max-width: 100%;
    }
  }
  /* Rapikan baris stok pada form produk: semua input sejajar di desktop/PC. */
  @media(min-width:601px) {
    .stock-fields>div {
      min-width: 0;
    }
    .stock-fields label {
      min-height: 36px;
      display: flex;
      align-items: flex-end;
      line-height: 1.35;
    }
  }
  /* APEX KASIR — halaman autentikasi */
  body.auth-locked {
    overflow: hidden;
  }
  body.auth-locked #sb,body.auth-locked #main,body.auth-locked #bn,body.auth-locked #modal,body.auth-locked #toasts {
    display: none!important;
  }
  #auth-screen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    padding: 28px;
    background: radial-gradient(900px 600px at 8% 8%,rgba(37,99,235,.17),transparent 60%),radial-gradient(700px 500px at 95% 95%,rgba(6,182,212,.13),transparent 62%),#eef3fb;
    color: #172033;
  }
  body.auth-locked #auth-screen {
    display: grid;
    place-items: center;
  }
  .auth-shell {
    width: min(1120px,100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: 1fr 480px;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 32px;
    overflow: hidden;
    background: rgba(255,255,255,.58);
    box-shadow: 0 32px 100px rgba(31,54,94,.16),inset 0 1px 0 rgba(255,255,255,.95);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
  }
  .auth-brand {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    color: #fff;
    background: linear-gradient(145deg,#102b59 0%,#174b91 52%,#1672ae 100%);
  }
  .auth-brand:before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: radial-gradient(circle at 75% 15%,rgba(112,195,255,.32),transparent 34%),linear-gradient(135deg,transparent 40%,rgba(255,255,255,.06));
  }
  .auth-brand-top,.auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: .08em;
  }
  .auth-brand-top b,.auth-mobile-brand b {
    font-weight: 800;
  }
  .auth-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg,#60a5fa,#2563eb);
    box-shadow: 0 8px 24px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.45);
  }
  .auth-mark svg {
    width: 22px;
    height: 22px;
  }
  .auth-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 460px;
    margin-top: 20px;
  }
  .auth-eyebrow {
    display: inline-block;
    color: #6e9ee3;
    font-size: 10px;
    line-height: 1.5;
    font-weight: 800;
    letter-spacing: .19em;
  }
  .auth-brand .auth-eyebrow {
    color: #9ac8ff;
  }
  .auth-brand h1 {
    margin: 18px 0 14px;
    font-size: clamp(36px,4.4vw,55px);
    line-height: 1.12;
    letter-spacing: -.055em;
    font-weight: 700;
  }
  .auth-brand h1 em {
    font-style: normal;
    color: #8dc8ff;
  }
  .auth-brand-copy p {
    max-width: 360px;
    margin: 0;
    color: rgba(235,245,255,.73);
    font-size: 14px;
    line-height: 1.8;
  }
  .auth-brand-foot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(235,245,255,.74);
    font-size: 11px;
    letter-spacing: .03em;
  }
  .auth-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 5px rgba(74,222,128,.13);
  }
  .auth-foot-line {
    height: 1px;
    flex: 1;
    max-width: 45px;
    background: rgba(255,255,255,.26);
  }
  .auth-orb {
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    pointer-events: none;
  }
  .auth-orb-one {
    width: 390px;
    height: 390px;
    right: -145px;
    top: 18%;
    box-shadow: 0 0 0 36px rgba(255,255,255,.025),0 0 0 78px rgba(255,255,255,.02);
  }
  .auth-orb-two {
    width: 190px;
    height: 190px;
    right: 8%;
    bottom: -105px;
    background: rgba(80,171,255,.13);
    filter: blur(1px);
  }
  .auth-panel-wrap {
    display: grid;
    place-items: center;
    padding: 54px 48px;
    background: rgba(255,255,255,.58);
  }
  .auth-panel {
    width: 100%;
    max-width: 360px;
  }
  .auth-mobile-brand {
    display: none;
    color: #172033;
    margin-bottom: 32px;
  }
  .auth-heading {
    margin-bottom: 30px;
  }
  .auth-heading .auth-eyebrow {
    color: #477ac0;
  }
  .auth-heading h2 {
    margin: 9px 0 7px;
    color: #172033;
    font-size: 29px;
    letter-spacing: -.045em;
    line-height: 1.2;
  }
  .auth-heading p {
    margin: 0;
    color: #748198;
    font-size: 13px;
  }
  .auth-form label {
    display: block;
    margin: 0 0 8px;
    color: #34445d;
    font-size: 12px;
    font-weight: 700;
  }
  .auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
  }
  .auth-label-row label {
    margin: 0 0 8px;
  }
  .auth-text-btn {
    border: 0;
    background: none;
    padding: 0 0 8px;
    color: #2563eb;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
  }
  .auth-input-wrap {
    height: 49px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 14px;
    border: 1px solid rgba(148,163,184,.3);
    border-radius: 13px;
    background: rgba(255,255,255,.78);
    box-shadow: inset 0 1px 2px rgba(15,23,42,.025);
    transition: border-color .2s,box-shadow .2s;
  }
  .auth-input-wrap:focus-within {
    border-color: #5b91e5;
    box-shadow: 0 0 0 4px rgba(37,99,235,.1);
  }
  .auth-input-wrap>svg {
    width: 17px;
    height: 17px;
    flex: none;
    color: #8a99ad;
  }
  .auth-input-wrap input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0!important;
    outline: 0!important;
    background: transparent!important;
    box-shadow: none!important;
    color: #172033;
    font: inherit;
    font-size: 13px;
  }
  .auth-input-wrap input::placeholder {
    color: #a5afbd;
  }
  .auth-eye {
    display: grid;
    place-items: center;
    flex: none;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8190a5;
    cursor: pointer;
  }
  .auth-eye:hover {
    background: #edf2f9;
    color: #355c97;
  }
  .auth-eye svg {
    width: 17px;
    height: 17px;
  }
  .auth-message {
    display: none;
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 11px;
    background: #fff1f2;
    color: #be123c;
    font-size: 11px;
    line-height: 1.55;
  }
  .auth-message.show {
    display: block;
  }
  .auth-message.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
  }
  .auth-message.info {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
  }
  .auth-submit {
    width: 100%;
    height: 49px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(110deg,#2563eb,#1d4ed8);
    box-shadow: 0 8px 18px rgba(37,99,235,.23);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s,box-shadow .18s,opacity .18s;
  }
  .auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 23px rgba(37,99,235,.3);
  }
  .auth-submit svg {
    width: 17px;
    height: 17px;
  }
  .auth-submit:disabled,.auth-google:disabled {
    opacity: .48;
    cursor: not-allowed;
  }
  .auth-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 23px 0 17px;
    color: #99a4b4;
    font-size: 10px;
    white-space: nowrap;
  }
  .auth-separator span {
    height: 1px;
    flex: 1;
    background: rgba(148,163,184,.25);
  }
  .auth-google {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: 1px solid rgba(148,163,184,.32);
    border-radius: 13px;
    background: rgba(255,255,255,.8);
    color: #34445d;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s,border-color .18s,transform .18s;
  }
  .auth-google:hover:not(:disabled) {
    background: #fff;
    border-color: rgba(100,116,139,.5);
    transform: translateY(-1px);
  }
  .auth-google svg {
    width: 17px;
    height: 17px;
    flex: none;
  }
  .auth-config-note {
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid #fcd7a5;
    border-radius: 11px;
    background: #fff8eb;
    color: #975a16;
    font-size: 11px;
    line-height: 1.6;
  }
  .auth-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 25px 0 0;
    color: #8a97a9;
    font-size: 10px;
  }
  .auth-privacy svg {
    width: 14px;
    height: 14px;
    color: #4b9b79;
  }
  .auth-copyright {
    margin: 17px 0 0;
    text-align: center;
    color: #a7b0bd;
    font-size: 9px;
    letter-spacing: .04em;
  }
  @media(max-width:800px) {
    #auth-screen {
      padding: 18px;
    }
    .auth-shell {
      max-width: 500px;
      min-height: 0;
      grid-template-columns: 1fr;
      border-radius: 26px;
    }
    .auth-brand {
      display: none;
    }
    .auth-panel-wrap {
      padding: 38px 34px 30px;
    }
    .auth-mobile-brand {
      display: flex;
    }
    .auth-heading h2 {
      font-size: 27px;
    }
  }
  @media(max-width:420px) {
    #auth-screen {
      padding: 0;
      place-items: stretch;
    }
    .auth-shell {
      width: 100%;
      min-height: 100%;
      border: 0;
      border-radius: 0;
      box-shadow: none;
    }
    .auth-panel-wrap {
      align-items: center;
      padding: 28px 24px 24px;
    }
    .auth-panel {
      max-width: 390px;
    }
    .auth-mobile-brand {
      margin-bottom: 40px;
    }
    .auth-heading {
      margin-bottom: 25px;
    }
  }
  @media(prefers-reduced-motion:reduce) {
    .auth-submit,.auth-google,.auth-input-wrap {
      transition: none;
    }
  }
  /* APEX KASIR — pilihan tema khusus halaman login */
  .auth-theme-switch {
    display: flex;
    align-items: center;
    gap: 3px;
    width: max-content;
    margin: 0 0 22px auto;
    padding: 4px;
    border: 1px solid rgba(148,163,184,.28);
    border-radius: 12px;
    background: rgba(255,255,255,.58);
    box-shadow: 0 4px 14px rgba(15,23,42,.05);
  }
  .auth-theme-switch button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 76px;
    height: 31px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #718096;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s,color .18s,box-shadow .18s;
  }
  .auth-theme-switch button svg {
    width: 14px;
    height: 14px;
  }
  .auth-theme-switch button:hover {
    background: rgba(148,163,184,.12);
    color: #334155;
  }
  .auth-theme-switch button.active {
    background: #fff;
    color: #1d4ed8;
    box-shadow: 0 2px 7px rgba(15,23,42,.1);
  }
  .auth-theme-switch button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
  }
  #auth-screen[data-auth-theme="dark"] {
    background: radial-gradient(900px 600px at 8% 8%,rgba(37,99,235,.22),transparent 60%),radial-gradient(700px 500px at 95% 95%,rgba(6,182,212,.1),transparent 62%),#09111f;
    color: #f1f5f9;
  }
  #auth-screen[data-auth-theme="dark"] .auth-shell {
    border-color: rgba(255,255,255,.12);
    background: rgba(17,26,46,.72);
    box-shadow: 0 32px 100px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.1);
  }
  #auth-screen[data-auth-theme="dark"] .auth-panel-wrap {
    background: rgba(7,15,29,.52);
  }
  #auth-screen[data-auth-theme="dark"] .auth-mobile-brand,#auth-screen[data-auth-theme="dark"] .auth-heading h2 {
    color: #f1f5f9;
  }
  #auth-screen[data-auth-theme="dark"] .auth-heading p,#auth-screen[data-auth-theme="dark"] .auth-form label {
    color: #aab8ca;
  }
  #auth-screen[data-auth-theme="dark"] .auth-heading .auth-eyebrow {
    color: #8ab8ff;
  }
  #auth-screen[data-auth-theme="dark"] .auth-input-wrap {
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.07);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
  }
  #auth-screen[data-auth-theme="dark"] .auth-input-wrap>svg {
    color: #9aabc1;
  }
  #auth-screen[data-auth-theme="dark"] .auth-input-wrap input {
    color: #f1f5f9;
  }
  #auth-screen[data-auth-theme="dark"] .auth-input-wrap input::placeholder {
    color: #718096;
  }
  #auth-screen[data-auth-theme="dark"] .auth-eye {
    color: #9aabc1;
  }
  #auth-screen[data-auth-theme="dark"] .auth-eye:hover {
    background: rgba(255,255,255,.1);
    color: #e5edf8;
  }
  #auth-screen[data-auth-theme="dark"] .auth-google {
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.07);
    color: #e5edf8;
  }
  #auth-screen[data-auth-theme="dark"] .auth-google:hover:not(:disabled) {
    background: rgba(255,255,255,.13);
    border-color: rgba(255,255,255,.25);
  }
  #auth-screen[data-auth-theme="dark"] .auth-text-btn {
    color: #8ab8ff;
  }
  #auth-screen[data-auth-theme="dark"] .auth-privacy,#auth-screen[data-auth-theme="dark"] .auth-copyright {
    color: #8593a8;
  }
  #auth-screen[data-auth-theme="dark"] .auth-separator {
    color: #8190a5;
  }
  #auth-screen[data-auth-theme="dark"] .auth-separator span {
    background: rgba(255,255,255,.12);
  }
  #auth-screen[data-auth-theme="dark"] .auth-config-note {
    border-color: rgba(245,158,11,.32);
    background: rgba(120,65,10,.2);
    color: #f6c77a;
  }
  #auth-screen[data-auth-theme="dark"] .auth-theme-switch {
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.07);
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
  }
  #auth-screen[data-auth-theme="dark"] .auth-theme-switch button {
    color: #9aabc1;
  }
  #auth-screen[data-auth-theme="dark"] .auth-theme-switch button:hover {
    background: rgba(255,255,255,.09);
    color: #e5edf8;
  }
  #auth-screen[data-auth-theme="dark"] .auth-theme-switch button.active {
    background: rgba(59,130,246,.22);
    color: #bfdbfe;
    box-shadow: inset 0 0 0 1px rgba(96,165,250,.28);
  }
  @media(max-width:800px) {
    .auth-theme-switch {
      margin-bottom: 20px;
    }
  }
  @media(prefers-reduced-motion:reduce) {
    .auth-theme-switch button {
      transition: none;
    }
  }
  /* APEX KASIR — perbaikan responsif halaman login di HP/tablet.
   Seluruh halaman menjadi area scroll agar kartu login tidak memotong isi
   ketika tinggi layar lebih pendek daripada konten form. */
  @media(max-width:800px) {
    #auth-screen {
      height: 100dvh;
      min-height: 0;
      padding: max(14px,env(safe-area-inset-top,0px)) 16px max(20px,env(safe-area-inset-bottom,0px));
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior-y: contain;
      -webkit-overflow-scrolling: touch;
    }
    body.auth-locked #auth-screen {
      display: block;
    }
    .auth-shell {
      width: 100%;
      height: auto;
      min-height: 0;
      margin: 0 auto;
      overflow: visible;
      grid-template-columns: minmax(0,1fr);
    }
    .auth-panel-wrap {
      display: block;
      min-width: 0;
      padding: 28px clamp(18px,5vw,34px) 26px;
    }
    .auth-panel {
      width: 100%;
      max-width: 440px;
      min-width: 0;
      margin: 0 auto;
    }
    .auth-mobile-brand {
      margin-bottom: 22px;
    }
    .auth-theme-switch {
      margin-bottom: 18px;
    }
    .auth-heading {
      margin-bottom: 22px;
    }
    .auth-label-row {
      margin-top: 16px;
    }
    .auth-submit {
      margin-top: 18px;
    }
    .auth-separator {
      margin: 19px 0 14px;
    }
    .auth-privacy {
      margin-top: 19px;
      flex-wrap: wrap;
      text-align: center;
    }
    .auth-copyright {
      margin-top: 11px;
    }
  }
  @media(max-width:420px) {
    #auth-screen {
      padding: max(12px,env(safe-area-inset-top,0px)) 14px max(20px,env(safe-area-inset-bottom,0px));
    }
    .auth-shell {
      width: 100%;
      min-height: 0;
      height: auto;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }
    .auth-panel-wrap {
      padding: 20px 4px 22px;
      background: transparent;
    }
    .auth-mobile-brand {
      margin-bottom: 19px;
      font-size: 17px;
    }
    .auth-mobile-brand .auth-mark {
      width: 38px;
      height: 38px;
      border-radius: 12px;
    }
    .auth-theme-switch {
      margin-bottom: 18px;
    }
    .auth-heading {
      margin-bottom: 20px;
    }
    .auth-heading h2 {
      font-size: clamp(24px,7vw,27px);
      line-height: 1.18;
    }
    .auth-heading p {
      font-size: 12px;
      line-height: 1.6;
    }
    .auth-form label {
      font-size: 12px;
    }
    .auth-input-wrap {
      height: 52px;
    }
    .auth-submit {
      height: 52px;
    }
    .auth-google {
      height: 50px;
    }
    .auth-config-note {
      font-size: 11px;
      line-height: 1.55;
      overflow-wrap: anywhere;
    }
  }
  @media(max-height:700px) and (max-width:800px) {
    #auth-screen {
      padding-top: max(10px,env(safe-area-inset-top,0px));
      padding-bottom: max(14px,env(safe-area-inset-bottom,0px));
    }
    .auth-panel-wrap {
      padding-top: 16px;
      padding-bottom: 18px;
    }
    .auth-mobile-brand {
      margin-bottom: 14px;
    }
    .auth-theme-switch {
      margin-bottom: 14px;
    }
    .auth-heading {
      margin-bottom: 16px;
    }
    .auth-heading h2 {
      margin-top: 6px;
    }
    .auth-label-row {
      margin-top: 13px;
    }
    .auth-submit {
      margin-top: 15px;
    }
    .auth-separator {
      margin: 15px 0 12px;
    }
    .auth-privacy {
      margin-top: 14px;
    }
    .auth-copyright {
      margin-top: 8px;
    }
  }
  /* APEX KASIR — penyelarasan visual tema dark halaman login mobile */
  #auth-screen[data-auth-theme="dark"] {
    background: radial-gradient(760px 440px at 10% 0%,rgba(37,99,235,.14),transparent 65%),
    radial-gradient(560px 420px at 100% 100%,rgba(14,165,233,.06),transparent 68%),
    #080f1d;
  }
  #auth-screen[data-auth-theme="dark"] .auth-shell {
    border-color: rgba(148,163,184,.14);
    background: rgba(13,22,39,.84);
    box-shadow: 0 28px 80px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.055);
  }
  #auth-screen[data-auth-theme="dark"] .auth-panel-wrap {
    background: rgba(9,17,31,.34);
  }
  #auth-screen[data-auth-theme="dark"] .auth-input-wrap {
    border-color: rgba(148,163,184,.19);
    background: rgba(26,39,61,.82);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  }
  #auth-screen[data-auth-theme="dark"] .auth-input-wrap:focus-within {
    border-color: rgba(96,165,250,.8);
    box-shadow: 0 0 0 3px rgba(37,99,235,.18),inset 0 1px 0 rgba(255,255,255,.03);
  }
  #auth-screen[data-auth-theme="dark"] .auth-input-wrap input {
    -webkit-text-fill-color: #eef4ff;
    caret-color: #93c5fd;
  }
  #auth-screen[data-auth-theme="dark"] .auth-input-wrap input::placeholder {
    color: #8998ad;
  }
  #auth-screen[data-auth-theme="dark"] .auth-google {
    border-color: rgba(148,163,184,.2);
    background: rgba(26,39,61,.72);
    color: #e8eef8;
  }
  #auth-screen[data-auth-theme="dark"] .auth-google:hover:not(:disabled) {
    background: rgba(39,56,82,.9);
    border-color: rgba(148,163,184,.3);
  }
  #auth-screen[data-auth-theme="dark"] .auth-config-note {
    border-color: rgba(245,180,75,.25);
    background: rgba(245,158,11,.075);
    color: #e8c98c;
  }
  #auth-screen[data-auth-theme="dark"] .auth-message {
    border-color: rgba(248,113,113,.3);
    background: rgba(127,29,29,.2);
    color: #fecaca;
  }
  #auth-screen[data-auth-theme="dark"] .auth-message.success {
    border-color: rgba(74,222,128,.28);
    background: rgba(20,83,45,.22);
    color: #bbf7d0;
  }
  #auth-screen[data-auth-theme="dark"] .auth-message.info {
    border-color: rgba(96,165,250,.3);
    background: rgba(30,64,175,.2);
    color: #bfdbfe;
  }
  #auth-screen[data-auth-theme="dark"] .auth-theme-switch {
    border-color: rgba(148,163,184,.18);
    background: rgba(15,25,43,.78);
  }
  #auth-screen[data-auth-theme="dark"] .auth-theme-switch button.active {
    background: rgba(37,99,235,.24);
    color: #c7ddff;
    box-shadow: inset 0 0 0 1px rgba(96,165,250,.32),0 2px 8px rgba(0,0,0,.14);
  }
  #auth-screen[data-auth-theme="dark"] .auth-separator span {
    background: rgba(148,163,184,.2);
  }
  #auth-screen[data-auth-theme="dark"] .auth-privacy {
    color: #a0aec0;
  }
  /* Kedua tema memakai struktur kartu, jarak, dan ukuran yang sama di layar kecil.
   Yang berubah saat Light/Dark hanya palet warna dan nuansa permukaannya. */
  @media(max-width:600px) {
    .auth-panel {
      padding: clamp(14px,4vw,19px);
      border: 1px solid rgba(148,163,184,.22);
      border-radius: 22px;
      background: linear-gradient(155deg,rgba(255,255,255,.96),rgba(247,250,255,.94));
      box-shadow: 0 18px 48px rgba(31,54,94,.11),inset 0 1px 0 rgba(255,255,255,.92);
    }
    .auth-panel-wrap {
      background: transparent;
    }
    #auth-screen[data-auth-theme="dark"] .auth-panel {
      border-color: rgba(148,163,184,.13);
      background: linear-gradient(155deg,rgba(18,30,51,.96),rgba(12,21,37,.96));
      box-shadow: 0 18px 48px rgba(0,0,0,.26),inset 0 1px 0 rgba(255,255,255,.045);
    }
    #auth-screen[data-auth-theme="dark"] .auth-mobile-brand {
      color: #f1f5f9;
    }
    #auth-screen[data-auth-theme="dark"] .auth-mark {
      box-shadow: 0 7px 18px rgba(37,99,235,.24),inset 0 1px 0 rgba(255,255,255,.38);
    }
  }
  @media(max-width:360px) {
    .auth-panel {
      padding: 13px;
      border-radius: 19px;
    }
    .auth-theme-switch button {
      min-width: 70px;
      padding-inline: 8px;
    }
  }
  /* Dialog terpusat: seluruh modal tetap berada di tengah layar, termasuk di HP. */
  #modal .mb {
    place-items: center;
    padding: max(14px,env(safe-area-inset-top,0px)) 14px max(14px,env(safe-area-inset-bottom,0px));
  }
  #modal .mc {
    display: flex;
    flex-direction: column;
    width: min(100%,460px);
    max-height: calc(100dvh - 28px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
    overflow: hidden;
    background: linear-gradient(155deg,var(--sheet),var(--card));
    animation: apex-modal-in .22s cubic-bezier(.2,.8,.2,1);
  }
  #modal .mc.w {
    width: min(100%,660px);
    max-width: 660px;
  }
  #modal .mh,#modal .mf {
    flex: none;
  }
  #modal .mbd {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  #modal .mf {
    background: linear-gradient(180deg,transparent,var(--sheet));
  }
  @keyframes apex-modal-in {
    from {
      opacity: 0;
      transform: translateY(8px) scale(.975);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  /* Toolbar seleksi massal produk dengan gaya glass yang mengikuti tema aktif. */
  .bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 12px;
    padding: 11px 13px;
    border: 1px solid var(--gb);
    border-radius: 16px;
    background: linear-gradient(135deg,var(--in),var(--card));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  }
  .bulk-toolbar-meta,.bulk-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .bulk-master {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--tx);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
  }
  .bulk-master input,.product-row-select {
    width: 18px!important;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    accent-color: var(--pr);
    cursor: pointer;
  }
  .bulk-count {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border: 1px solid var(--bd);
    border-radius: 999px;
    background: var(--hv);
    color: var(--mu);
    font-size: 12px;
    font-weight: 700;
  }
  .bulk-toolbar .btn.d {
    border-color: rgba(239,68,68,.28);
    background: rgba(239,68,68,.08);
    color: #ef4444;
  }
  .bulk-toolbar .btn:disabled {
    opacity: .42;
    cursor: not-allowed;
    filter: saturate(.35);
  }
  .product-select {
    width: 42px;
    text-align: center;
    padding-inline: 8px;
  }
  .product-select input {
    vertical-align: middle;
  }
  #pt tr.is-selected {
    background: rgba(37,99,235,.075);
  }
  #pt tr.is-selected td:first-child {
    box-shadow: inset 3px 0 0 var(--pr);
  }
  .product-actions {
    white-space: nowrap;
  }
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
  }
  @media(max-width:600px) {
    #modal .mb {
      place-items: center;
      padding: max(12px,env(safe-area-inset-top,0px)) 10px max(12px,env(safe-area-inset-bottom,0px));
    }
    #modal .mc {
      max-height: calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
      border-radius: 22px;
    }
    #modal .mc.w {
      max-width: 100%;
    }
    #modal .mh {
      padding: 12px 14px;
    }
    #modal .mbd {
      padding: 8px 14px 16px;
    }
    #modal .mf {
      padding: 10px 14px calc(10px + env(safe-area-inset-bottom,0px));
      flex-wrap: wrap;
    }
    #modal .mf .btn {
      flex: 1 1 auto;
      justify-content: center;
    }
    .bulk-toolbar {
      align-items: flex-start;
      padding: 10px;
    }
    .bulk-toolbar-meta {
      width: 100%;
      justify-content: space-between;
    }
    .bulk-toolbar-actions {
      width: 100%;
    }
    .bulk-toolbar-actions .btn {
      flex: 1;
      justify-content: center;
    }
    #pt table {
      min-width: 920px;
    }
  }
  /* APEX selection controls — custom liquid-glass checkbox for products, categories and brands. */
  .apex-check {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin: 0;
    cursor: pointer;
    vertical-align: middle;
    -webkit-tap-highlight-color: transparent;
  }
  .apex-check input {
    position: absolute!important;
    inset: 0!important;
    width: 100%!important;
    height: 100%!important;
    min-width: 0!important;
    min-height: 0!important;
    margin: 0!important;
    padding: 0!important;
    opacity: 0!important;
    cursor: pointer!important;
    z-index: 2;
    appearance: none;
    -webkit-appearance: none;
  }
  .apex-check-ui {
    position: relative;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1.5px solid color-mix(in srgb,var(--mu) 42%,var(--bd));
    border-radius: 7px;
    background: linear-gradient(145deg,var(--card),var(--in));
    box-shadow: inset 0 1px 1px rgba(255,255,255,.22),0 1px 3px rgba(15,23,42,.08);
    transition: background .18s,border-color .18s,box-shadow .18s,transform .18s;
    pointer-events: none;
  }
  .apex-check:hover .apex-check-ui {
    border-color: var(--pr);
    transform: scale(1.06);
  }
  .apex-check input:checked+.apex-check-ui {
    border-color: transparent;
    background: linear-gradient(135deg,#3B82F6,#1D4ED8);
    box-shadow: 0 4px 12px rgba(37,99,235,.28),inset 0 1px 0 rgba(255,255,255,.26);
  }
  .apex-check input:checked+.apex-check-ui:after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translateY(-1px) rotate(45deg);
  }
  .apex-check input:indeterminate+.apex-check-ui {
    border-color: var(--pr);
    background: linear-gradient(135deg,#3B82F6,#1D4ED8);
  }
  .apex-check input:indeterminate+.apex-check-ui:after {
    content: "";
    width: 9px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
  }
  .apex-check input:focus-visible+.apex-check-ui {
    outline: 3px solid color-mix(in srgb,var(--pr) 28%,transparent);
    outline-offset: 2px;
  }
  .apex-check input:disabled+.apex-check-ui {
    opacity: .35;
    filter: grayscale(1);
  }
  .bulk-master .apex-check {
    margin-right: 1px;
  }
  .product-select .apex-check,.mg-select-cell .apex-check {
    margin-inline: auto;
  }
  .mg-bulk-toolbar {
    margin: 0 0 10px;
  }
  .mg-bulk-toolbar .bulk-count {
    color: var(--pr);
    border-color: color-mix(in srgb,var(--pr) 20%,var(--bd));
    background: color-mix(in srgb,var(--pr) 8%,var(--card));
  }
  .mg-pick-col {
    width: 44px;
  }
  .mg-select-cell {
    width: 44px;
    text-align: center;
    padding-inline: 7px;
  }
  .mg-actions {
    white-space: nowrap;
  }
  #mt tr.is-selected {
    background: color-mix(in srgb,var(--pr) 8%,transparent);
  }
  #mt tr.is-selected td:first-child {
    box-shadow: inset 3px 0 0 var(--pr);
  }
  .mg-delete-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0 14px;
  }
  .mg-delete-summary>div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px;
    border: 1px solid var(--gb);
    border-radius: 15px;
    background: linear-gradient(145deg,var(--in),var(--card));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
  }
  .mg-delete-summary b {
    font-size: 24px;
    line-height: 1.1;
    color: var(--pr);
  }
  .mg-delete-summary span {
    font-size: 12px;
    color: var(--mu);
    font-weight: 600;
  }
  .mg-delete-list {
    max-height: 150px;
    overflow: auto;
    padding: 11px 14px;
    border: 1px solid var(--bd);
    border-radius: 13px;
    background: var(--in);
  }
  .mg-delete-list ul {
    margin: 7px 0 0;
    padding-left: 19px;
    color: var(--mu);
    font-size: 13px;
    line-height: 1.8;
  }
  .bulk-toolbar .btn.d {
    background: linear-gradient(135deg,rgba(239,68,68,.12),rgba(220,38,38,.07));
    border-color: rgba(239,68,68,.24);
  }
  @media(max-width:600px) {
    .mg-bulk-toolbar .bulk-toolbar-meta {
      align-items: flex-start;
      gap: 8px;
    }
    .mg-bulk-toolbar .bulk-count {
      white-space: nowrap;
    }
    #mt table {
      min-width: 700px;
    }
    .mg-actions .btn {
      min-height: 36px;
    }
    .mg-delete-summary>div {
      padding: 11px;
    }
  }
  @media(prefers-reduced-motion:reduce) {
    .apex-check-ui {
      transition: none;
    }
  }
  /* APEX KASIR — sweeping login transition adapted from the supplied Login reference */
  .auth-shell {
    position: relative;
    isolation: isolate;
  }
  .auth-transition-blade {
    position: absolute;
    z-index: 30;
    top: -24%;
    bottom: -24%;
    left: -70%;
    width: 70%;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-32%,0,0) skewX(-13deg);
    background: linear-gradient(105deg,transparent 0%,rgba(37,99,235,.08) 28%,rgba(29,78,216,.42) 42%,rgba(147,197,253,.96) 49.4%,rgba(219,234,254,.98) 50%,rgba(96,165,250,.9) 51%,rgba(37,99,235,.34) 59%,rgba(29,78,216,.08) 74%,transparent 100%);
    filter: drop-shadow(0 0 18px rgba(96,165,250,.48));
  }
  .auth-transition-blade:before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(180deg,transparent,rgba(239,246,255,.98) 18%,#fff 50%,rgba(219,234,254,.98) 82%,transparent);
    box-shadow: 0 0 26px 5px rgba(96,165,250,.7);
  }
  .auth-shell.is-sweeping .auth-transition-blade {
    animation: apexBladeSweep 1.12s cubic-bezier(.62,.02,.24,1) both;
  }
  .auth-shell.is-entering {
    animation: apexCardEnter .72s cubic-bezier(.22,1,.36,1) both;
  }
  .auth-shell.is-entering .auth-brand-copy,.auth-shell.is-entering .auth-brand-top,.auth-shell.is-entering .auth-brand-foot,.auth-shell.is-entering .auth-panel {
    animation: apexContentReveal .7s cubic-bezier(.22,1,.36,1) both;
  }
  .auth-shell.is-entering .auth-brand-top {
    animation-delay: .08s;
  }
  .auth-shell.is-entering .auth-brand-copy {
    animation-delay: .18s;
  }
  .auth-shell.is-entering .auth-brand-foot {
    animation-delay: .28s;
  }
  .auth-shell.is-entering .auth-panel {
    animation-delay: .22s;
  }
  .auth-shell.is-rejected {
    animation: apexLoginNudge .38s cubic-bezier(.22,1,.36,1);
  }
  @keyframes apexBladeSweep {
    0% {
      opacity: 0;
      transform: translate3d(-32%,0,0) skewX(-13deg);
    }
    12% {
      opacity: 1;
    }
    82% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      transform: translate3d(250%,0,0) skewX(-13deg);
    }
  }
  @keyframes apexCardEnter {
    0% {
      opacity: 0;
      transform: translate3d(0,20px,0) scale(.985);
    }
    100% {
      opacity: 1;
      transform: translate3d(0,0,0) scale(1);
    }
  }
  @keyframes apexContentReveal {
    0% {
      opacity: 0;
      transform: translate3d(0,14px,0);
    }
    100% {
      opacity: 1;
      transform: translate3d(0,0,0);
    }
  }
  @keyframes apexLoginNudge {
    0%,100% {
      transform: translateX(0);
    }
    22% {
      transform: translateX(-7px);
    }
    58% {
      transform: translateX(5px);
    }
    80% {
      transform: translateX(-2px);
    }
  }
  #auth-screen[data-auth-theme="dark"] .auth-transition-blade {
    background: linear-gradient(105deg,transparent 0%,rgba(30,64,175,.08) 28%,rgba(29,78,216,.48) 42%,rgba(96,165,250,.98) 49.4%,rgba(219,234,254,.98) 50%,rgba(59,130,246,.94) 51%,rgba(30,64,175,.38) 59%,rgba(29,78,216,.08) 74%,transparent 100%);
    filter: drop-shadow(0 0 20px rgba(59,130,246,.58));
  }
  @media(prefers-reduced-motion:reduce) {
    .auth-shell.is-entering,.auth-shell.is-entering .auth-brand-copy,.auth-shell.is-entering .auth-brand-top,.auth-shell.is-entering .auth-brand-foot,.auth-shell.is-entering .auth-panel,.auth-shell.is-rejected {
      animation: none!important;
    }
    .auth-shell.is-sweeping .auth-transition-blade {
      display: none;
    }
  }
  /* Pengaturan aplikasi: panel ringkas, konsisten dengan tema Liquid Glass */
  .settings-page {
    display: grid;
    gap: 18px;
    max-width: 900px;
  }
  .settings-group {
    display: grid;
    gap: 8px;
    min-width: 0;
  }
  .settings-group-label {
    padding: 0 4px;
    color: var(--mu);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
  }
  .settings-store-card,.settings-list {
    overflow: hidden;
    border: 1px solid var(--gb);
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 8px 28px rgba(31,38,135,.06),inset 0 1px 0 rgba(255,255,255,.45);
  }
  .settings-store-main {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 17px;
    min-width: 0;
  }
  .settings-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(37,99,235,.10);
    color: #2563eb;
  }
  .settings-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.9;
  }
  .settings-icon.store {
    background: rgba(37,99,235,.11);
    color: #2563eb;
  }
  .settings-store-copy,.settings-item-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1;
  }
  .settings-store-copy b,.settings-item-copy b {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
  }
  .settings-store-copy small,.settings-item-copy small {
    color: var(--mu);
    font-size: 12px;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .settings-edit {
    width: 36px;
    height: 36px;
    flex: none;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--mu);
    cursor: pointer;
  }
  .settings-edit:hover {
    background: var(--hv);
    color: var(--tx);
  }
  .settings-edit svg {
    width: 18px;
    height: 18px;
  }
  .settings-store-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 16px;
    border-top: 1px solid var(--bd);
  }
  .settings-local-status {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--mu);
    font-size: 12px;
  }
  .settings-local-status svg {
    width: 17px;
    height: 17px;
    flex: none;
    color: #16a34a;
  }
  .settings-item {
    width: 100%;
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid var(--bd);
    background: transparent;
    color: var(--tx);
    text-align: left;
    cursor: pointer;
    transition: background .18s;
  }
  .settings-item:last-child {
    border-bottom: 0;
  }
  .settings-item:hover {
    background: var(--hv);
  }
  .settings-item:active {
    background: var(--hv);
  }
  .settings-chevron {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--mu);
  }
  .settings-account,.settings-device-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0 16px;
    border-bottom: 1px solid var(--bd);
    margin-bottom: 8px;
  }
  .settings-account>div,.settings-device-card>div {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1;
  }
  .settings-account small,.settings-device-card small {
    color: var(--mu);
    font-size: 12px;
    overflow-wrap: anywhere;
  }
  .settings-account .bdg,.settings-device-card .bdg {
    flex: none;
  }
  .settings-note {
    margin: 14px 0 4px;
    padding: 12px 13px;
    border: 1px solid var(--bd);
    border-radius: 13px;
    background: var(--hv);
    color: var(--mu);
    font-size: 12px;
    line-height: 1.6;
  }
  .settings-note p {
    margin: 0;
  }
  .settings-note.warn {
    border-color: rgba(245,158,11,.3);
    background: rgba(245,158,11,.08);
    color: var(--tx);
  }
  .settings-note.warn b {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #b7791f;
  }
  .settings-note.warn b svg {
    width: 16px;
    height: 16px;
  }
  .settings-note.warn p {
    margin-top: 6px;
    color: var(--mu);
  }
  .settings-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--bd);
    font-size: 12px;
  }
  .settings-detail-row span {
    color: var(--mu);
  }
  .settings-detail-row b {
    text-align: right;
    font-size: 12px;
    overflow-wrap: anywhere;
  }
  .settings-backup-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
  }
  .settings-help {
    font-size: 11px;
    line-height: 1.55;
    margin: 12px 0 0;
  }
  .settings-toggle-list {
    display: grid;
    gap: 0;
    margin-top: 12px;
    border: 1px solid var(--bd);
    border-radius: 13px;
    overflow: hidden;
  }
  label.settings-toggle {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 48px;
    margin: 0;
    padding: 10px 12px;
    border-bottom: 1px solid var(--bd);
    color: var(--tx);
    font-size: 12px;
    cursor: pointer;
  }
  .settings-toggle:last-child {
    border-bottom: 0;
  }
  .settings-toggle input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    flex: none;
    margin: 0;
    accent-color: #2563eb;
  }
  .rc {
    width: 58mm;
    max-width: 100%;
    margin: 12px auto 0;
    background: #fff;
    color: #111827;
    border-color: #9ca3af;
  }
  .rc[data-paper="80"] {
    width: 80mm;
  }
  .rc-footer {
    margin-top: 12px!important;
    white-space: pre-wrap;
  }
  @media(max-width:600px) {
    .settings-page {
      gap: 15px;
    }
    .settings-store-main {
      padding: 14px;
    }
    .settings-store-foot {
      align-items: flex-start;
      flex-direction: column;
      padding: 10px 14px;
    }
    .settings-store-foot .btn {
      width: 100%;
      justify-content: center;
    }
    .settings-item {
      min-height: 78px;
      padding: 13px;
    }
    .settings-icon {
      width: 40px;
      height: 40px;
      flex-basis: 40px;
    }
    .settings-backup-actions {
      display: grid;
      grid-template-columns: 1fr;
    }
    .settings-backup-actions .btn {
      justify-content: center;
    }
  }
  @media print {
    #modal .mc {
      width: auto!important;
      max-width: none!important;
      max-height: none!important;
      overflow: visible!important;
      background: #fff!important;
      box-shadow: none!important;
      padding: 0!important;
    }
    #modal .mbd {
      padding: 0!important;
    }
    #modal .rc {
      margin: 0 auto!important;
      border: 0!important;
      box-shadow: none!important;
      break-inside: avoid;
    }
  }
  /* Laporan laba-rugi harian — mengikuti tema Liquid Glass Light/Dark */
  .pl-card {
    margin-bottom: 14px;
    padding: 18px 20px;
    border-radius: 18px;
    background: var(--card);
    border-color: var(--gb);
    box-shadow: 0 8px 28px rgba(31,38,135,.045),inset 0 1px 0 rgba(255,255,255,.35);
  }
  .pl-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--bd);
  }
  .pl-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .pl-heading>svg {
    width: 21px;
    height: 21px;
    flex: none;
    color: var(--pr);
  }
  .pl-heading h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
  }
  .pl-heading small,.pl-date-label {
    color: var(--mu);
    font-size: 11px;
  }
  .pl-heading small {
    display: block;
    margin-top: 2px;
  }
  .pl-date-label {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
  }
  .pl-date-label input {
    width: auto;
    min-width: 148px;
    padding: 7px 9px;
    border-radius: 10px;
    color: var(--tx);
    background: var(--in);
    border-color: var(--bd);
    font-size: 12px;
  }
  .pl-card-body {
    display: grid;
  }
  .pl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 2px;
    border-bottom: 1px solid var(--bd);
    font-size: 14px;
  }
  .pl-row>span {
    min-width: 0;
  }
  .pl-row>b {
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  .pl-income {
    color: #16A34A!important;
  }
  .pl-negative,.pl-cost>b {
    color: #EF4444!important;
  }
  .pl-emphasis {
    font-weight: 650;
  }
  .pl-result,.pl-net {
    padding: 12px 2px;
  }
  .pl-result>div:first-child,.pl-net>div:first-child {
    display: grid;
    gap: 2px;
  }
  .pl-result>div:first-child>b,.pl-net>div:first-child>b {
    font-size: 16px;
  }
  .pl-result small,.pl-net small {
    color: var(--mu);
    font-size: 12px;
  }
  .pl-value {
    display: grid;
    gap: 2px;
    text-align: right;
  }
  .pl-value>b {
    font-size: 18px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
  }
  .pl-value small {
    font-variant-numeric: tabular-nums;
  }
  .pl-net {
    border-bottom: 0;
    border-top: 1px solid var(--bd);
    margin-top: 2px;
    padding-top: 14px;
  }
  .pl-net>div:first-child>b {
    font-size: 17px;
  }
  .pl-net .pl-value>b {
    font-size: 21px;
  }
  .pl-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 8px;
    color: var(--mu);
    font-size: 11px;
  }
  .pl-note {
    margin: 10px 0 0;
    padding: 10px 11px;
    border: 1px solid var(--bd);
    border-radius: 11px;
    background: var(--hv);
    color: var(--mu);
    font-size: 11px;
    line-height: 1.55;
  }
  @media(max-width:600px) {
    .pl-card {
      padding: 15px 14px;
      border-radius: 16px;
    }
    .pl-head {
      align-items: flex-start;
      flex-direction: column;
      gap: 10px;
    }
    .pl-date-label {
      width: 100%;
      justify-content: space-between;
    }
    .pl-date-label input {
      min-width: 0;
      flex: 1;
      max-width: 190px;
    }
    .pl-row {
      font-size: 13px;
      padding: 9px 1px;
    }
    .pl-value>b {
      font-size: 17px;
    }
    .pl-net .pl-value>b {
      font-size: 19px;
    }
    .pl-foot {
      font-size: 10px;
    }
  }
  /* Pilihan tema aplikasi: Ikuti Sistem, Light, dan Dark */
  .theme-choice-list {
    display: grid;
    gap: 9px;
    margin: 14px 0 8px;
  }
  .theme-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid var(--bd);
    border-radius: 16px;
    background: var(--in);
    color: var(--tx);
    cursor: pointer;
    transition: border-color .18s,background .18s,box-shadow .18s;
  }
  .theme-choice:has(input:checked) {
    border-color: var(--pr);
    background: rgba(37,99,235,.08);
    box-shadow: inset 0 0 0 1px var(--pr);
  }
  .theme-choice .settings-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
  }
  .theme-choice-copy {
    display: grid;
    gap: 2px;
    flex: 1;
    min-width: 0;
  }
  .theme-choice-copy b {
    font-size: 13px;
    font-weight: 650;
  }
  .theme-choice-copy small {
    font-size: 11px;
    line-height: 1.45;
    color: var(--mu);
  }
  .theme-choice input[type=radio] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
    accent-color: var(--pr);
    cursor: pointer;
  }
  .theme-choice:focus-within {
    outline: 2px solid var(--pr);
    outline-offset: 2px;
  }
  @media(prefers-reduced-motion:reduce) {
    .theme-choice {
      transition: none;
    }
  }
  /* Pengaturan struk — halaman khusus dengan gaya Liquid Glass APEX */
  .receipt-settings-page {
    display: grid;
    gap: 16px;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding-bottom: 24px;
  }
  .receipt-page-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 0 4px;
    min-width: 0;
  }
  .receipt-back {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--gb);
    border-radius: 13px;
    background: var(--in);
    color: var(--tx);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15,23,42,.04);
  }
  .receipt-back svg {
    width: 20px;
    height: 20px;
  }
  .receipt-heading-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(37,99,235,.1);
    color: var(--pr);
  }
  .receipt-heading-icon svg {
    width: 21px;
    height: 21px;
    stroke-width: 2.2;
  }
  .receipt-page-heading h1 {
    font-size: 21px;
    letter-spacing: -.035em;
    line-height: 1.2;
  }
  .receipt-page-heading p {
    margin: 4px 0 0;
    color: var(--mu);
    font-size: 12px;
    line-height: 1.45;
  }
  .receipt-settings-card {
    padding: 18px 20px;
    border: 1px solid var(--gb);
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 8px 28px rgba(31,38,135,.055),inset 0 1px 0 rgba(255,255,255,.42);
    backdrop-filter: blur(22px) saturate(165%);
    -webkit-backdrop-filter: blur(22px) saturate(165%);
  }
  .receipt-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 64px;
    padding: 7px 0;
  }
  .receipt-option-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
    flex: 1;
  }
  .receipt-option-copy b {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--tx);
  }
  .receipt-option-copy small,.receipt-field-block>small,.receipt-section-title small,.receipt-footer-meta small {
    font-size: 12px;
    line-height: 1.55;
    color: var(--mu);
  }
  .receipt-switch {
    position: relative;
    display: block;
    flex: 0 0 50px;
    width: 50px;
    height: 28px;
    margin: 0;
    cursor: pointer;
  }
  .receipt-switch input {
    position: absolute!important;
    width: 1px!important;
    height: 1px!important;
    min-height: 1px!important;
    opacity: 0!important;
    pointer-events: none;
  }
  .receipt-switch>span {
    position: absolute;
    inset: 0;
    border-radius: 99px;
    background: var(--bd);
    transition: background .2s,box-shadow .2s;
    cursor: pointer;
  }
  .receipt-switch>span:before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15,23,42,.2);
    transition: transform .2s;
  }
  .receipt-switch input:checked+span {
    background: var(--pr);
    box-shadow: 0 3px 10px rgba(37,99,235,.2);
  }
  .receipt-switch input:checked+span:before {
    transform: translateX(22px);
  }
  .receipt-switch input:disabled+span {
    opacity: .42;
    cursor: not-allowed;
  }
  .receipt-switch input:focus-visible+span {
    outline: 3px solid rgba(59,130,246,.3);
    outline-offset: 3px;
  }
  .receipt-option-divider {
    height: 1px;
    margin: 7px 0;
    background: var(--bd);
  }
  .receipt-logo-control {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 5px 0 13px;
    min-width: 0;
  }
  .receipt-logo-preview {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--bd);
    border-radius: 12px;
    background: var(--hv);
    color: var(--pr);
  }
  .receipt-logo-preview svg {
    width: 20px;
    height: 20px;
  }
  .receipt-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
  }
  .receipt-logo-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1;
  }
  .receipt-logo-copy b {
    font-size: 12px;
    font-weight: 600;
  }
  .receipt-logo-copy small {
    font-size: 11px;
    line-height: 1.4;
    color: var(--mu);
  }
  .receipt-logo-control .btn {
    flex: none;
  }
  .receipt-icon-action {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--bd);
    border-radius: 10px;
    background: var(--in);
    color: #dc2626;
    cursor: pointer;
  }
  .receipt-icon-action svg {
    width: 16px;
    height: 16px;
  }
  .receipt-field-block {
    display: grid;
    gap: 5px;
    padding: 11px 0 5px;
  }
  .receipt-field-block>label,.receipt-field-title {
    margin: 0;
    color: var(--tx);
    font-size: 14px;
    font-weight: 600;
  }
  .receipt-field {
    height: 44px;
    background: var(--in)!important;
    color: var(--tx)!important;
    border-color: var(--bd)!important;
    border-radius: 12px!important;
  }
  .receipt-paper-choices {
    display: flex;
    gap: 8px;
    margin: 3px 0;
  }
  .receipt-paper-choice {
    min-width: 82px;
    padding: 8px 16px;
    border: 1px solid var(--bd);
    border-radius: 11px;
    background: var(--in);
    color: var(--tx);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s,border-color .18s,color .18s;
  }
  .receipt-paper-choice.on {
    background: rgba(37,99,235,.1);
    border-color: var(--pr);
    color: var(--pr);
    box-shadow: inset 0 0 0 1px rgba(37,99,235,.08);
  }
  .receipt-section-title {
    display: grid;
    gap: 3px;
    margin-bottom: 9px;
  }
  .receipt-section-title>b {
    font-size: 15px;
    font-weight: 650;
    color: var(--tx);
  }
  .receipt-section-title>small {
    font-size: 12px;
    line-height: 1.5;
    color: var(--mu);
  }
  .receipt-extra-card .receipt-option:first-of-type {
    padding-top: 4px;
  }
  .receipt-footer-card {
    display: grid;
    gap: 9px;
  }
  .receipt-footer-card .receipt-section-title {
    margin: 0;
  }
  .receipt-footer-input {
    min-height: 92px;
    resize: vertical;
    background: var(--in)!important;
    border-color: var(--bd)!important;
    border-radius: 13px!important;
    color: var(--tx)!important;
    line-height: 1.55;
  }
  .receipt-footer-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }
  .receipt-footer-meta small {
    max-width: 460px;
    font-size: 11px;
  }
  .receipt-footer-meta span {
    flex: none;
    color: var(--mu);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
  }
  .receipt-save-button {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    border-radius: 13px!important;
    font-size: 14px;
  }
  .receipt-save-button svg,.receipt-test-button svg {
    width: 17px;
    height: 17px;
  }
  .receipt-preview-section {
    display: grid;
    gap: 12px;
    padding-top: 3px;
  }
  .receipt-preview-section>.receipt-section-title {
    margin: 0 3px;
  }
  .receipt-preview-frame {
    padding: 14px;
    border: 1px dashed var(--bd);
    border-radius: 17px;
    background: var(--hv);
    overflow: hidden;
  }
  .receipt-test-button {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    background: var(--in);
  }
  .rc {
    font: 12px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    border: 1px dashed #d8dee8;
    border-radius: 12px;
    padding: 14px;
    margin: 12px auto 0;
    background: #fff;
    color: #172033;
    box-shadow: 0 4px 16px rgba(15,23,42,.04);
  }
  .rc[data-paper="58"] {
    width: 58mm;
    max-width: 100%;
  }
  .rc[data-paper="80"] {
    width: 80mm;
    max-width: 100%;
  }
  .rc.rc-preview {
    width: 100%;
    max-width: 430px;
    min-height: 245px;
    margin: 0 auto;
    padding: 22px 24px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.65;
    box-shadow: 0 6px 20px rgba(15,23,42,.06);
  }
  .rc h4 {
    margin: 0 0 3px;
    text-align: center;
    font-size: 14px;
    letter-spacing: .02em;
    font-weight: 700;
    overflow-wrap: anywhere;
  }
  .rc p {
    text-align: center;
    margin: 0;
    overflow-wrap: anywhere;
  }
  .rc hr {
    height: 0;
    border: 0;
    border-top: 1px dashed #cbd5e1;
    margin: 12px 0;
  }
  .rc .rc-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: 11px;
  }
  .rc .rc-product {
    margin: 9px 0;
  }
  .rc .rc-product>b {
    display: block;
    font-weight: 500;
    overflow-wrap: anywhere;
  }
  .rc .tr {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 1px 0;
    font-size: 11px;
  }
  .rc .tr>span:last-child,.rc .tr>b:last-child {
    text-align: right;
    white-space: nowrap;
  }
  .rc .rc-total {
    margin-top: 5px;
    padding-top: 7px;
    border-top: 1px dashed #cbd5e1;
    font-size: 13px;
    font-weight: 700;
  }
  .rc .rc-footer {
    margin-top: 18px!important;
    white-space: pre-wrap;
    font-size: 12px;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .rc .rc-watermark {
    margin-top: 13px;
    color: #94a3b8;
    font-size: 10px;
    letter-spacing: .1em;
    text-align: center;
  }
  .rc-logo {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 58px;
    object-fit: contain;
    margin: 0 auto 9px;
  }
  @media(max-width:600px) {
    .receipt-settings-page {
      gap: 13px;
      padding-bottom: 16px;
    }
    .receipt-page-heading {
      gap: 9px;
      margin-bottom: 2px;
    }
    .receipt-page-heading h1 {
      font-size: 19px;
    }
    .receipt-heading-icon {
      width: 39px;
      height: 39px;
      flex-basis: 39px;
    }
    .receipt-settings-card {
      padding: 14px 15px;
      border-radius: 17px;
    }
    .receipt-option {
      min-height: 72px;
      gap: 12px;
    }
    .receipt-option-copy b {
      font-size: 14px;
    }
    .receipt-option-copy small {
      font-size: 11px;
    }
    .receipt-logo-control {
      gap: 8px;
      flex-wrap: wrap;
    }
    .receipt-logo-copy {
      flex-basis: calc(100% - 60px);
    }
    .receipt-logo-control .btn {
      margin-left: 52px;
    }
    .receipt-icon-action {
      margin-left: auto;
    }
    .receipt-preview-frame {
      padding: 9px;
    }
    .rc.rc-preview {
      padding: 19px 15px;
      font-size: 11px;
    }
    .receipt-footer-meta {
      gap: 8px;
    }
  }
  @media print {
    .receipt-settings-page,.receipt-preview-section {
      display: none!important;
    }
    #modal .rc {
      width: 58mm;
      max-width: none;
      margin: 0 auto;
      border: 0;
      border-radius: 0;
      box-shadow: none;
      padding: 0;
      background: #fff;
      color: #111827;
    }
    #modal .rc[data-paper="80"] {
      width: 80mm;
    }
    #modal .rc hr {
      border-top: 1px dashed #9ca3af;
    }
    #modal .rc-logo {
      max-height: 48px;
    }
  }
  /* APEX KASIR brand system — logo resmi di halaman login dan navigasi aplikasi. */
  #sb .logo {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 17px 10px 19px;
    margin: 0 0 3px;
    min-width: 0;
    font-size: inherit;
    letter-spacing: 0;
    color: var(--tx);
  }
  #sb .logo>img {
    display: block;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 3px;
    object-fit: contain;
    border: 1px solid rgba(59,130,246,.12);
    border-radius: 14px;
    background: linear-gradient(145deg,#fff,#edf5ff);
    box-shadow: 0 7px 18px rgba(37,99,235,.14),inset 0 1px 0 #fff;
  }
  #sb .logo-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
  }
  #sb .logo-copy>span {
    font-size: 17px;
    font-weight: 750;
    letter-spacing: .015em;
    line-height: 1.25;
    color: var(--tx);
    white-space: nowrap;
  }
  #sb .logo-copy b {
    color: #2563eb;
  }
  #sb .logo-copy small {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: var(--mu);
    letter-spacing: .015em;
    white-space: nowrap;
  }
  body.col #sb .logo {
    justify-content: center;
    padding-inline: 0;
  }
  body.col #sb .logo-copy {
    display: none;
  }
  @media(min-width:901px) and (max-width:1180px) {
    #sb .logo {
      justify-content: center;
      padding-inline: 0;
    }
    #sb .logo-copy {
      display: none;
    }
  }
  .auth-mark {
    overflow: hidden;
    background: #fff!important;
    border: 1px solid rgba(255,255,255,.82);
    box-shadow: 0 9px 22px rgba(0,0,0,.17),inset 0 1px 0 rgba(255,255,255,.96);
  }
  .auth-mark img {
    width: 37px;
    height: 37px;
    display: block;
    object-fit: contain;
  }
  .auth-mobile-brand .auth-mark {
    width: 42px;
    height: 42px;
  }
  #auth-screen[data-auth-theme="dark"] .auth-mark {
    background: #fff!important;
  }
  .auth-field {
    margin-top: 15px;
  }
  .auth-field[hidden] {
    display: none!important;
  }
  .auth-field label {
    display: block;
    margin: 0 0 8px;
    color: #34445d;
    font-size: 12px;
    font-weight: 700;
  }
  .auth-field .auth-input-wrap {
    margin: 0;
  }
  .auth-label-row[hidden],.auth-text-btn[hidden] {
    display: none!important;
  }
  .auth-separator[hidden],.auth-google[hidden] {
    display: none!important;
  }
  .auth-account-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 16px 0 0;
    color: #718096;
    font-size: 11px;
    text-align: center;
  }
  .auth-account-switch button {
    padding: 3px 2px;
    border: 0;
    background: transparent;
    color: #2563eb;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
  }
  .auth-account-switch button:hover {
    text-decoration: underline;
  }
  #auth-screen[data-auth-theme="dark"] .auth-account-switch {
    color: #9aabc1;
  }
  #auth-screen[data-auth-theme="dark"] .auth-account-switch button {
    color: #8ab8ff;
  }
  .auth-config-note {
    overflow-wrap: anywhere;
  }
  /* Pengaturan printer — kartu pilihan, input berikon dan switch custom Liquid Glass. */
  #modal .printer-settings {
    display: grid;
    gap: 17px;
    padding: 8px 1px 3px;
  }
  .printer-settings-hero {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px;
    border: 1px solid rgba(59,130,246,.15);
    border-radius: 17px;
    background: linear-gradient(125deg,rgba(59,130,246,.10),rgba(14,165,233,.045) 58%,var(--in));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.42);
  }
  .printer-hero-icon {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(59,130,246,.16);
    border-radius: 14px;
    background: linear-gradient(145deg,#3b82f6,#1d4ed8);
    color: #fff;
    box-shadow: 0 7px 16px rgba(37,99,235,.2);
  }
  .printer-hero-icon svg {
    width: 21px;
    height: 21px;
  }
  .printer-hero-copy {
    display: grid;
    gap: 2px;
    flex: 1;
    min-width: 0;
  }
  .printer-hero-copy b {
    font-size: 13px;
    font-weight: 750;
    color: var(--tx);
  }
  .printer-hero-copy small {
    font-size: 11px;
    line-height: 1.4;
    color: var(--mu);
  }
  .printer-ready {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: none;
    padding: 5px 8px;
    border: 1px solid rgba(22,163,74,.16);
    border-radius: 99px;
    background: rgba(22,163,74,.08);
    color: #16a34a;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
  }
  .printer-ready i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,.12);
  }
  .printer-intro {
    margin: -5px 1px 0;
    color: var(--mu);
    font-size: 11px;
    line-height: 1.55;
  }
  .printer-field {
    display: grid;
    gap: 8px;
    min-width: 0;
  }
  .printer-field>label,.printer-field-heading>b {
    margin: 0;
    color: var(--tx);
    font-size: 12px;
    font-weight: 750;
  }
  .printer-field-heading {
    display: grid;
    gap: 2px;
  }
  .printer-field-heading small,.printer-field>small {
    color: var(--mu);
    font-size: 10px;
    line-height: 1.45;
  }
  .printer-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid var(--bd);
    border-radius: 13px;
    background: var(--in);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
    transition: border-color .18s,box-shadow .18s;
  }
  .printer-input-wrap:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59,130,246,.11);
  }
  .printer-input-wrap>svg {
    width: 17px;
    height: 17px;
    flex: none;
    color: var(--mu);
  }
  .printer-input-wrap input {
    width: 100%;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border: 0!important;
    outline: 0!important;
    background: transparent!important;
    box-shadow: none!important;
    color: var(--tx);
    font: inherit;
    font-size: 13px;
  }
  .printer-choice-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 8px;
  }
  .printer-choice {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 5px 3px;
    min-width: 0;
    min-height: 90px;
    padding: 10px;
    border: 1px solid var(--bd);
    border-radius: 14px;
    background: var(--in);
    color: var(--tx);
    text-align: left;
    cursor: pointer;
    transition: border-color .18s,background .18s,transform .18s,box-shadow .18s;
  }
  .printer-choice:hover {
    border-color: rgba(59,130,246,.45);
    transform: translateY(-1px);
  }
  .printer-choice.active {
    border-color: #3b82f6;
    background: linear-gradient(145deg,rgba(59,130,246,.12),rgba(37,99,235,.045));
    box-shadow: inset 0 0 0 1px rgba(59,130,246,.12),0 5px 14px rgba(37,99,235,.07);
  }
  .printer-choice-icon {
    grid-column: 1;
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border: 1px solid var(--bd);
    border-radius: 9px;
    background: var(--card);
    color: var(--mu);
  }
  .printer-choice-icon svg {
    width: 15px;
    height: 15px;
  }
  .printer-choice.active .printer-choice-icon {
    border-color: rgba(59,130,246,.2);
    background: rgba(59,130,246,.12);
    color: #2563eb;
  }
  .printer-choice-copy {
    grid-column: 1/-1;
    display: grid;
    gap: 2px;
    min-width: 0;
  }
  .printer-choice-copy b {
    font-size: 11px;
    font-weight: 750;
    line-height: 1.3;
    color: var(--tx);
  }
  .printer-choice-copy small {
    color: var(--mu);
    font-size: 9px;
    line-height: 1.4;
  }
  .printer-choice-check {
    grid-column: 2;
    grid-row: 1;
    width: 15px;
    height: 15px;
    color: #2563eb;
  }
  .printer-choice:not(.active) .printer-choice-check {
    color: var(--mu);
    opacity: .4;
  }
  .printer-paper-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .printer-paper-choice {
    display: grid;
    gap: 3px;
    min-height: 61px;
    padding: 10px 12px;
    border: 1px solid var(--bd);
    border-radius: 13px;
    background: var(--in);
    color: var(--tx);
    text-align: left;
    cursor: pointer;
    transition: border-color .18s,background .18s,box-shadow .18s;
  }
  .printer-paper-choice b {
    font-size: 15px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.02em;
  }
  .printer-paper-choice small {
    color: var(--mu);
    font-size: 10px;
  }
  .printer-paper-choice.active {
    border-color: #3b82f6;
    background: rgba(59,130,246,.09);
    box-shadow: inset 0 0 0 1px rgba(59,130,246,.1);
  }
  .printer-paper-choice.active b {
    color: #2563eb;
  }
  .printer-choice:focus-visible,.printer-paper-choice:focus-visible,.printer-switch input:focus-visible+i {
    outline: 3px solid rgba(59,130,246,.25);
    outline-offset: 2px;
  }
  .printer-auto-card {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 68px;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid var(--bd);
    border-radius: 15px;
    background: var(--in);
    cursor: pointer;
  }
  .printer-auto-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(59,130,246,.1);
    color: #2563eb;
  }
  .printer-auto-icon svg {
    width: 18px;
    height: 18px;
  }
  .printer-auto-copy {
    display: grid;
    gap: 2px;
    flex: 1;
    min-width: 0;
  }
  .printer-auto-copy b {
    font-size: 12px;
    font-weight: 750;
    color: var(--tx);
  }
  .printer-auto-copy small {
    color: var(--mu);
    font-size: 10px;
    line-height: 1.4;
  }
  .printer-switch {
    position: relative;
    display: block;
    flex: 0 0 43px;
    width: 43px;
    height: 25px;
  }
  .printer-switch input {
    position: absolute!important;
    inset: 0!important;
    width: 100%!important;
    height: 100%!important;
    min-height: 0!important;
    margin: 0!important;
    padding: 0!important;
    opacity: 0!important;
    cursor: pointer!important;
  }
  .printer-switch i {
    position: absolute;
    inset: 0;
    border-radius: 99px;
    background: var(--bd);
    transition: background .18s,box-shadow .18s;
    pointer-events: none;
  }
  .printer-switch i:before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15,23,42,.2);
    transition: transform .18s;
  }
  .printer-switch input:checked+i {
    background: #2563eb;
    box-shadow: 0 3px 9px rgba(37,99,235,.24);
  }
  .printer-switch input:checked+i:before {
    transform: translateX(18px);
  }
  .printer-help-box {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 12px;
    border: 1px solid rgba(59,130,246,.15);
    border-radius: 13px;
    background: rgba(59,130,246,.065);
    color: var(--mu);
  }
  .printer-help-box>svg {
    width: 16px;
    height: 16px;
    flex: none;
    margin-top: 1px;
    color: #3b82f6;
  }
  .printer-help-box p {
    margin: 0;
    font-size: 10px;
    line-height: 1.55;
  }
  #modal .printer-settings~* {
    min-width: 0;
  }
  #modal .mf .btn[data-act="printer-test"] {
    background: var(--in);
  }
  #modal .mf .btn[data-act="printer-save"] {
    background: linear-gradient(135deg,#3b82f6,#1d4ed8);
    border-color: #2563eb;
    box-shadow: 0 6px 14px rgba(37,99,235,.2);
  }
  #auth-screen[data-auth-theme="dark"] .auth-field label {
    color: #aab8ca;
  }
  #auth-screen[data-auth-theme="dark"] .auth-account-switch {
    color: #9aabc1;
  }
  #auth-screen[data-auth-theme="dark"] .auth-account-switch button {
    color: #8ab8ff;
  }
  :root[data-theme="dark"] .printer-settings-hero {
    border-color: rgba(96,165,250,.2);
    background: linear-gradient(125deg,rgba(37,99,235,.18),rgba(14,165,233,.08) 58%,var(--in));
  }
  :root[data-theme="dark"] .printer-ready {
    color: #86efac;
    background: rgba(22,163,74,.12);
    border-color: rgba(74,222,128,.16);
  }
  :root[data-theme="dark"] .printer-choice.active,:root[data-theme="dark"] .printer-paper-choice.active {
    background: rgba(59,130,246,.16);
  }
  :root[data-theme="dark"] .printer-choice.active .printer-choice-icon {
    color: #93c5fd;
    background: rgba(59,130,246,.18);
  }
  :root[data-theme="dark"] .printer-paper-choice.active b {
    color: #93c5fd;
  }
  :root[data-theme="dark"] .printer-help-box {
    border-color: rgba(96,165,250,.18);
    background: rgba(37,99,235,.12);
  }
  @media(max-width:600px) {
    #sb .logo {
      padding: 14px 10px 16px;
    }
    #sb .logo>img {
      width: 40px;
      height: 40px;
      flex-basis: 40px;
    }
    #sb .logo-copy>span {
      font-size: 16px;
    }
    .printer-choice {
      grid-template-columns: 30px minmax(0,1fr) 16px;
      align-items: center;
      min-height: 62px;
      padding: 9px;
      gap: 7px;
    }
    .printer-choice-icon {
      grid-column: 1;
      grid-row: 1;
    }
    .printer-choice-copy {
      grid-column: 2;
      grid-row: 1;
    }
    .printer-choice-check {
      grid-column: 3;
      grid-row: 1;
    }
    .printer-choice-copy small {
      font-size: 9px;
    }
    #modal .printer-settings {
      gap: 14px;
    }
    .printer-settings-hero {
      padding: 11px;
    }
    .printer-ready {
      font-size: 9px;
      padding: 4px 7px;
    }
  }
  @media(max-width:360px) {
    .printer-ready {
      display: none;
    }
    .printer-choice-grid {
      gap: 6px;
    }
    .printer-choice {
      padding: 8px 7px;
    }
  }
  @media(prefers-reduced-motion:reduce) {
    .printer-choice,.printer-paper-choice,.printer-input-wrap,.printer-switch i,.printer-switch i:before {
      transition: none;
    }
  }
  @media(max-width:380px) {
    .printer-choice-grid {
      grid-template-columns: 1fr;
    }
    .printer-choice {
      grid-template-columns: 30px minmax(0,1fr) 16px;
      min-height: 56px;
      align-items: center;
    }
    .printer-choice-icon {
      grid-row: 1;
      grid-column: 1;
    }
    .printer-choice-copy {
      grid-row: 1;
      grid-column: 2;
    }
    .printer-choice-check {
      grid-row: 1;
      grid-column: 3;
    }
  }
  /* APEX KASIR — Dark graphite, inspired by the neutral iOS dark appearance.
   Blue remains only as a restrained action/brand accent; surfaces stay black and charcoal. */
  @media(prefers-color-scheme:dark) {
    :root:not([data-theme="light"]) {
      --pr: #3B82F6;
      --bg: #0B0B0D;
      --card: rgba(28,28,30,.90);
      --tx: #F5F5F7;
      --mu: #98989D;
      --bd: rgba(84,84,88,.58);
      --sb: #1C1C1E;
      --gb: rgba(84,84,88,.48);
      --in: rgba(44,44,46,.92);
      --sheet: rgba(28,28,30,.98);
      --sg: #3A3A3C;
      --glow: 0;
      --hv: rgba(255,255,255,.065);
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --pr: #3B82F6;
    --bg: #0B0B0D;
    --card: rgba(28,28,30,.90);
    --tx: #F5F5F7;
    --mu: #98989D;
    --bd: rgba(84,84,88,.58);
    --sb: #1C1C1E;
    --gb: rgba(84,84,88,.48);
    --in: rgba(44,44,46,.92);
    --sheet: rgba(28,28,30,.98);
    --sg: #3A3A3C;
    --glow: 0;
    --hv: rgba(255,255,255,.065);
    color-scheme: dark;
  }
  @media(prefers-color-scheme:dark) {
    :root:not([data-theme="light"]) body,
  :root:not([data-theme="light"]) body {
      background: #0B0B0D!important;
    }
  }
  :root[data-theme="dark"] body {
    background: #0B0B0D!important;
  }
  :root[data-theme="dark"] #sb,
:root[data-theme="dark"] header,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .mc,
:root[data-theme="dark"] #bn,
:root[data-theme="dark"] .settings-store-card,
:root[data-theme="dark"] .settings-list,
:root[data-theme="dark"] .receipt-settings-card,
:root[data-theme="dark"] .pl-card {
    box-shadow: 0 10px 28px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.035);
  }
  :root[data-theme="dark"] #sb a.on,
:root[data-theme="dark"] #bn .on {
    background: rgba(255,255,255,.10);
    color: #F5F5F7;
    border: 1px solid rgba(255,255,255,.07);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  }
  :root[data-theme="dark"] #sb a:hover,
:root[data-theme="dark"] #bn a:hover {
    background: rgba(255,255,255,.07);
  }
  :root[data-theme="dark"] .chip.on,
:root[data-theme="dark"] .ckr.on {
    background: #3A3A3C;
    color: #F5F5F7;
    border-color: #545458;
  }
  :root[data-theme="dark"] .ckr.on {
    outline: 1px solid rgba(255,255,255,.13);
  }
  :root[data-theme="dark"] .th {
    background: linear-gradient(145deg,#3A3A3C,#242426);
  }
  :root[data-theme="dark"] .seg button.on {
    background: #48484A;
    color: #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,.28);
  }
  :root[data-theme="dark"] .settings-icon {
    background: #2C2C2E;
    color: #D1D1D6;
  }
  :root[data-theme="dark"] .settings-icon.store {
    background: rgba(59,130,246,.16);
    color: #8AB4F8;
  }
  :root[data-theme="dark"] .settings-note {
    background: rgba(255,255,255,.045);
  }
  :root[data-theme="dark"] .printer-settings-hero {
    border-color: var(--bd);
    background: linear-gradient(135deg,rgba(255,255,255,.055),rgba(255,255,255,.018) 65%,var(--in));
  }
  :root[data-theme="dark"] .printer-choice.active,
:root[data-theme="dark"] .printer-paper-choice.active {
    border-color: rgba(190,190,195,.42);
    background: rgba(255,255,255,.09);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
  }
  :root[data-theme="dark"] .printer-choice.active .printer-choice-icon {
    border-color: rgba(255,255,255,.10);
    background: #3A3A3C;
    color: #F5F5F7;
  }
  :root[data-theme="dark"] .printer-paper-choice.active b {
    color: #F5F5F7;
  }
  :root[data-theme="dark"] .printer-auto-icon {
    background: rgba(255,255,255,.08);
    color: #D1D1D6;
  }
  :root[data-theme="dark"] .printer-help-box {
    border-color: var(--bd);
    background: rgba(255,255,255,.045);
  }
  :root[data-theme="dark"] .printer-help-box>svg {
    color: #A1A1AA;
  }
  :root[data-theme="dark"] .printer-switch input:checked+i {
    background: #30D158;
    box-shadow: 0 3px 9px rgba(48,209,88,.16);
  }
  /* Login Dark follows the same graphite palette, including desktop and mobile. */
  #auth-screen[data-auth-theme="dark"] {
    background: #0B0B0D!important;
    color: #F5F5F7;
  }
  #auth-screen[data-auth-theme="dark"] .auth-shell {
    border-color: rgba(84,84,88,.48);
    background: rgba(28,28,30,.96);
    box-shadow: 0 28px 80px rgba(0,0,0,.48),inset 0 1px 0 rgba(255,255,255,.035);
  }
  #auth-screen[data-auth-theme="dark"] .auth-brand {
    background: linear-gradient(145deg,#242426 0%,#1C1C1E 58%,#151517 100%);
  }
  #auth-screen[data-auth-theme="dark"] .auth-brand:before {
    background: radial-gradient(circle at 75% 15%,rgba(255,255,255,.07),transparent 36%),linear-gradient(135deg,transparent 40%,rgba(255,255,255,.025));
  }
  #auth-screen[data-auth-theme="dark"] .auth-brand .auth-eyebrow {
    color: #C7C7CC;
  }
  #auth-screen[data-auth-theme="dark"] .auth-brand h1 em {
    color: #D1D1D6;
  }
  #auth-screen[data-auth-theme="dark"] .auth-brand-copy p,
#auth-screen[data-auth-theme="dark"] .auth-brand-foot {
    color: rgba(245,245,247,.68);
  }
  #auth-screen[data-auth-theme="dark"] .auth-orb-one {
    border-color: rgba(255,255,255,.08);
    box-shadow: 0 0 0 36px rgba(255,255,255,.018),0 0 0 78px rgba(255,255,255,.012);
  }
  #auth-screen[data-auth-theme="dark"] .auth-orb-two {
    background: rgba(255,255,255,.035);
  }
  #auth-screen[data-auth-theme="dark"] .auth-panel-wrap {
    background: rgba(28,28,30,.38);
  }
  #auth-screen[data-auth-theme="dark"] .auth-heading h2 {
    color: #F5F5F7;
  }
  #auth-screen[data-auth-theme="dark"] .auth-heading p,
#auth-screen[data-auth-theme="dark"] .auth-field label {
    color: #A1A1AA;
  }
  #auth-screen[data-auth-theme="dark"] .auth-heading .auth-eyebrow {
    color: #B8B8BE;
  }
  #auth-screen[data-auth-theme="dark"] .auth-input-wrap {
    border-color: #48484A;
    background: #2C2C2E;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  }
  #auth-screen[data-auth-theme="dark"] .auth-input-wrap:focus-within {
    border-color: #8E8E93;
    box-shadow: 0 0 0 3px rgba(255,255,255,.08);
  }
  #auth-screen[data-auth-theme="dark"] .auth-input-wrap input {
    -webkit-text-fill-color: #F5F5F7;
    caret-color: #F5F5F7;
  }
  #auth-screen[data-auth-theme="dark"] .auth-input-wrap input::placeholder {
    color: #8E8E93;
  }
  #auth-screen[data-auth-theme="dark"] .auth-google {
    border-color: #48484A;
    background: #2C2C2E;
    color: #F5F5F7;
  }
  #auth-screen[data-auth-theme="dark"] .auth-google:hover:not(:disabled) {
    background: #3A3A3C;
    border-color: #636366;
  }
  #auth-screen[data-auth-theme="dark"] .auth-theme-switch {
    border-color: #48484A;
    background: #242426;
  }
  #auth-screen[data-auth-theme="dark"] .auth-theme-switch button.active {
    background: #48484A;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  }
  #auth-screen[data-auth-theme="dark"] .auth-separator {
    color: #98989D;
  }
  #auth-screen[data-auth-theme="dark"] .auth-separator span {
    background: rgba(255,255,255,.12);
  }
  #auth-screen[data-auth-theme="dark"] .auth-privacy {
    color: #98989D;
  }
  #auth-screen[data-auth-theme="dark"] .auth-account-switch {
    color: #98989D;
  }
  #auth-screen[data-auth-theme="dark"] .auth-account-switch button,
#auth-screen[data-auth-theme="dark"] .auth-text-btn {
    color: #8AB4F8;
  }
  #auth-screen[data-auth-theme="dark"] .auth-panel {
    border-color: #38383A;
    background: linear-gradient(155deg,#1C1C1E,#171719);
    box-shadow: 0 18px 48px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.03);
  }
  #auth-screen[data-auth-theme="dark"] .auth-transition-blade {
    background: linear-gradient(105deg,transparent 0%,rgba(255,255,255,.025) 28%,rgba(190,190,195,.22) 42%,rgba(245,245,247,.92) 49.4%,#fff 50%,rgba(190,190,195,.72) 51%,rgba(255,255,255,.16) 59%,rgba(255,255,255,.02) 74%,transparent 100%);
    filter: drop-shadow(0 0 18px rgba(255,255,255,.17));
  }
  #auth-screen[data-auth-theme="dark"] .auth-transition-blade:before {
    background: linear-gradient(180deg,transparent,rgba(255,255,255,.85) 18%,#fff 50%,rgba(255,255,255,.82) 82%,transparent);
    box-shadow: 0 0 22px 4px rgba(255,255,255,.2);
  }
  /* Product images use one consistent 4:3 frame from crop editor to POS tiles. */
  .dz {
    width: min(100%,420px);
    height: auto;
    aspect-ratio: 4/3;
    max-height: none;
    margin-inline: auto;
    padding: 7px;
  }
  .dz #pv {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
  }
  .dz #pv img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
    border-radius: 12px;
    background: var(--hv);
  }
  .product-photo-note {
    font-size: 12px;
    margin: 4px 0 8px;
  }
  .th {
    height: auto;
    aspect-ratio: 4/3;
    min-height: 56px;
  }
  .th img {
    object-fit: contain;
    background: var(--hv);
  }
  .pg.ls .th {
    width: 96px;
    height: 72px;
    aspect-ratio: 4/3;
  }
  .product-crop-wrap {
    display: grid;
    gap: 14px;
  }
  .product-crop-heading {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .product-crop-ratio {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 36px;
    border: 1px solid var(--bd);
    border-radius: 10px;
    background: var(--hv);
    font-size: 12px;
    font-weight: 800;
    color: var(--pr);
  }
  .product-crop-heading b,.product-crop-heading small {
    display: block;
  }
  .product-crop-heading small {
    color: var(--mu);
    font-size: 12px;
    margin-top: 2px;
  }
  .product-crop-stage {
    position: relative;
    width: min(100%,480px);
    aspect-ratio: 4/3;
    margin-inline: auto;
    overflow: hidden;
    border-radius: 16px;
    background-color: #171719;
    background-image: linear-gradient(45deg,#222 25%,transparent 25%),linear-gradient(-45deg,#222 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#222 75%),linear-gradient(-45deg,transparent 75%,#222 75%);
    background-size: 20px 20px;
    background-position: 0 0,0 10px,10px -10px,-10px 0;
    cursor: grab;
    touch-action: none;
    user-select: none;
    border: 1px solid var(--bd);
  }
  .product-crop-stage.dragging {
    cursor: grabbing;
  }
  .product-crop-stage img {
    position: absolute;
    max-width: none;
    max-height: none;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }
  .product-crop-zoom>div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .product-crop-zoom label {
    margin: 0;
    color: var(--tx);
    font-size: 13px;
    font-weight: 600;
  }
  .product-crop-zoom b {
    font-size: 12px;
    color: var(--pr);
    font-variant-numeric: tabular-nums;
  }
  .product-crop-zoom input {
    padding: 0;
    margin: 9px 0 0;
    accent-color: var(--pr);
    background: transparent;
    border: 0;
    min-height: 0;
  }
  .product-crop-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .product-crop-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--bd);
    background: var(--hv);
    border-radius: 12px;
    color: var(--mu);
    font-size: 12px;
  }
  .product-crop-hint svg {
    width: 16px;
    height: 16px;
    flex: none;
    color: var(--pr);
    margin-top: 1px;
  }
  @media(max-width:600px) {
    .product-crop-stage {
      width: min(100%,420px);
    }
    .product-crop-heading small {
      line-height: 1.4;
    }
    .product-crop-actions .btn {
      min-height: 38px;
    }
  }
  /* Smart Sparepart Finder — pencarian kompatibilitas kendaraan pada POS. */
  .finder-launch {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    margin: 0 0 14px;
    border: 1px solid var(--bd);
    border-radius: 16px;
    background: linear-gradient(110deg,rgba(37,99,235,.09),rgba(6,182,212,.035)),var(--in);
  }
  .finder-launch-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 13px;
    background: linear-gradient(135deg,#2563EB,#0891B2);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37,99,235,.2);
  }
  .finder-launch-icon svg {
    width: 21px;
    height: 21px;
  }
  .finder-launch-copy {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
  }
  .finder-launch-copy b {
    font-size: 13px;
    line-height: 1.35;
  }
  .finder-launch-copy small {
    font-size: 11px;
    color: var(--mu);
    line-height: 1.35;
  }
  .finder-modal {
    display: grid;
    gap: 13px;
  }
  .finder-intro {
    font-size: 12px;
    margin: 0;
  }
  .finder-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
  }
  .finder-fields>div {
    min-width: 0;
  }
  .finder-fields label,.finder-custom label {
    font-size: 12px;
    font-weight: 650;
    color: var(--tx);
    margin: 0 0 5px;
  }
  .finder-custom[hidden] {
    display: none!important;
  }
  .finder-guidance {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--hv);
    border: 1px solid var(--bd);
    color: var(--mu);
    font-size: 11px;
    line-height: 1.45;
  }
  .finder-guidance svg {
    width: 16px;
    height: 16px;
    flex: none;
    color: var(--pr);
    margin-top: 1px;
  }
  .finder-guidance b {
    color: var(--tx);
  }
  .finder-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    border: 1px solid var(--bd);
    border-radius: 12px;
    background: var(--in);
  }
  .finder-search svg {
    width: 17px;
    height: 17px;
    color: var(--mu);
    flex: none;
  }
  .finder-search input {
    border: 0;
    background: transparent;
    outline: 0;
    box-shadow: none;
    padding: 10px 0;
    min-height: 40px;
  }
  .finder-search input:focus {
    outline: 0;
  }
  .finder-results {
    min-height: 120px;
  }
  .finder-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 2px 0 9px;
  }
  .finder-results-head>div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  .finder-results-head b {
    font-size: 13px;
  }
  .finder-results-head small,.finder-results-head>span {
    font-size: 11px;
    color: var(--mu);
  }
  .finder-results-head>span {
    padding: 4px 8px;
    border-radius: 99px;
    background: var(--hv);
    white-space: nowrap;
  }
  .finder-result-list {
    display: grid;
    gap: 8px;
    max-height: 330px;
    overflow: auto;
    padding: 1px 3px 2px 1px;
  }
  .finder-result {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--bd);
    border-radius: 14px;
    background: var(--card);
  }
  .finder-result-img {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: none;
    border-radius: 11px;
    background: var(--hv);
    color: var(--mu);
  }
  .finder-result-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .finder-result-img svg {
    width: 22px;
    height: 22px;
  }
  .finder-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .finder-result-info>b {
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .finder-result-info>small {
    font-size: 10px;
    color: var(--mu);
    overflow-wrap: anywhere;
  }
  .finder-result-info>div {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
  }
  .finder-result-info strong {
    font-size: 12px;
    color: var(--pr);
  }
  .finder-result-info>div span {
    font-size: 10px;
    color: var(--mu);
  }
  .finder-add {
    flex: none;
  }
  .finder-empty {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 7px;
    padding: 25px 16px;
    text-align: center;
    border: 1px dashed var(--bd);
    border-radius: 15px;
    background: var(--in);
  }
  .finder-empty>svg {
    width: 27px;
    height: 27px;
    color: var(--mu);
  }
  .finder-empty>b {
    font-size: 13px;
  }
  .finder-empty>span {
    max-width: 420px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--mu);
  }
  .finder-empty .btn {
    margin-top: 4px;
  }
  .fitment-edit {
    min-width: 0;
  }
  .fitment-edit textarea {
    resize: vertical;
    min-height: 72px;
    line-height: 1.45;
  }
  .fitment-edit small {
    display: block;
    margin-top: 5px;
    color: var(--mu);
    font-size: 11px;
    line-height: 1.45;
  }
  @media(max-width:640px) {
    .finder-fields {
      grid-template-columns: 1fr 1fr;
    }
    .finder-fields>div:last-child {
      grid-column: 1/-1;
    }
    .finder-launch {
      padding: 10px;
      gap: 8px;
    }
    .finder-launch-icon {
      width: 38px;
      height: 38px;
    }
    .finder-launch-copy small {
      font-size: 10px;
    }
    .finder-launch .btn {
      padding: 7px 9px;
      font-size: 11px;
    }
    .finder-result {
      gap: 8px;
      padding: 8px;
    }
    .finder-result-img {
      width: 48px;
      height: 48px;
    }
    .finder-add {
      padding: 6px 9px!important;
      font-size: 11px!important;
    }
  }
  @media(max-width:380px) {
    .finder-fields {
      grid-template-columns: 1fr;
    }
    .finder-fields>div:last-child {
      grid-column: auto;
    }
    .finder-launch-copy small {
      display: none;
    }
    .finder-launch .btn {
      font-size: 10px;
    }
  }


/* APEX KASIR — animasi perpindahan panel Login / Buat Akun.
   Desktop: form dan panel branding saling bertukar posisi dengan transisi halus.
   Mobile: tetap satu kolom agar formulir mudah digunakan dan tidak terpotong. */
@media (min-width: 801px) {
  .auth-shell {
    display: flex;
    align-items: stretch;
  }
  .auth-shell > .auth-brand {
    flex: 0 0 58%;
    width: 58%;
    min-width: 0;
    transform: translateX(0);
    transition: transform .88s cubic-bezier(.22, 1, .36, 1);
    will-change: transform;
  }
  .auth-shell > .auth-panel-wrap {
    flex: 0 0 42%;
    width: 42%;
    min-width: 0;
    transform: translateX(0);
    transition: transform .88s cubic-bezier(.22, 1, .36, 1);
    will-change: transform;
  }
  .auth-shell.is-signup > .auth-brand {
    transform: translateX(72.414%);
  }
  .auth-shell.is-signup > .auth-panel-wrap {
    transform: translateX(-138.095%);
  }
  .auth-shell.is-mode-changing.is-signup .auth-panel {
    animation: apexSignupPanelIn .72s cubic-bezier(.2, .8, .2, 1) both;
  }
  .auth-shell.is-mode-changing.is-signup .auth-brand-copy,
  .auth-shell.is-mode-changing.is-signup .auth-brand-top,
  .auth-shell.is-mode-changing.is-signup .auth-brand-foot {
    animation: apexSignupBrandIn .76s .08s cubic-bezier(.2, .8, .2, 1) both;
  }
  .auth-shell.is-mode-changing:not(.is-signup) .auth-panel {
    animation: apexLoginPanelIn .72s cubic-bezier(.2, .8, .2, 1) both;
  }
  .auth-shell.is-mode-changing:not(.is-signup) .auth-brand-copy,
  .auth-shell.is-mode-changing:not(.is-signup) .auth-brand-top,
  .auth-shell.is-mode-changing:not(.is-signup) .auth-brand-foot {
    animation: apexLoginBrandIn .76s .08s cubic-bezier(.2, .8, .2, 1) both;
  }
}

@media (min-width: 801px) and (max-width: 1000px) {
  .auth-shell > .auth-brand {
    flex-basis: 48%;
    width: 48%;
  }
  .auth-shell > .auth-panel-wrap {
    flex-basis: 52%;
    width: 52%;
  }
  .auth-shell.is-signup > .auth-brand {
    transform: translateX(108.334%);
  }
  .auth-shell.is-signup > .auth-panel-wrap {
    transform: translateX(-92.308%);
  }
  .auth-brand {
    padding: 34px;
  }
  .auth-panel-wrap {
    padding: 38px 32px;
  }
}

@keyframes apexSignupPanelIn {
  0% { opacity: .58; transform: translate3d(26px, 8px, 0) scale(.985); filter: blur(2px); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}
@keyframes apexLoginPanelIn {
  0% { opacity: .58; transform: translate3d(-26px, 8px, 0) scale(.985); filter: blur(2px); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}
@keyframes apexSignupBrandIn {
  0% { opacity: .72; translate: -16px 0; }
  100% { opacity: 1; translate: 0 0; }
}
@keyframes apexLoginBrandIn {
  0% { opacity: .72; translate: 16px 0; }
  100% { opacity: 1; translate: 0 0; }
}

@media (max-width: 800px) {
  .auth-shell,
  .auth-shell > .auth-brand,
  .auth-shell > .auth-panel-wrap {
    transform: none !important;
    transition: none;
    will-change: auto;
  }
  .auth-shell.is-mode-changing .auth-panel {
    animation: apexMobileAuthIn .46s cubic-bezier(.2, .8, .2, 1) both;
  }
}
@keyframes apexMobileAuthIn {
  0% { opacity: .55; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-shell > .auth-brand,
  .auth-shell > .auth-panel-wrap {
    transition: none !important;
    transform: none !important;
  }
  .auth-shell.is-mode-changing .auth-panel,
  .auth-shell.is-mode-changing .auth-brand-copy,
  .auth-shell.is-mode-changing .auth-brand-top,
  .auth-shell.is-mode-changing .auth-brand-foot {
    animation: none !important;
  }
}

/* APEX KASIR — verifikasi OTP saat pendaftaran akun */
.auth-otp-field[hidden],
.auth-submit[hidden] {
  display: none !important;
}
.auth-otp-label-row {
  margin-top: 0;
}
.auth-otp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}
.auth-otp-row .auth-input-wrap {
  min-width: 0;
}
.auth-otp-row input {
  letter-spacing: .16em;
  font-weight: 700;
}
.auth-send-otp {
  min-width: 112px;
  height: 49px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(37,99,235,.18);
  border-radius: 13px;
  background: rgba(37,99,235,.09);
  color: #1d4ed8;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s,border-color .18s,opacity .18s,transform .18s;
}
.auth-send-otp:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(37,99,235,.14);
  border-color: rgba(37,99,235,.3);
}
.auth-send-otp:disabled {
  opacity: .48;
  cursor: not-allowed;
}
.auth-send-otp svg {
  width: 14px;
  height: 14px;
  flex: none;
}
.auth-otp-help {
  margin: 8px 0 0;
  color: #7b8798;
  font-size: 10px;
  line-height: 1.55;
}
#auth-edit-signup {
  margin-left: 8px;
}
#auth-edit-signup[hidden] {
  display: none !important;
}
#auth-send-otp:disabled {
  transform: none;
}
#auth-screen[data-auth-theme="dark"] .auth-send-otp {
  border-color: rgba(138,180,248,.2);
  background: rgba(138,180,248,.1);
  color: #8ab4f8;
}
#auth-screen[data-auth-theme="dark"] .auth-send-otp:hover:not(:disabled) {
  background: rgba(138,180,248,.17);
  border-color: rgba(138,180,248,.34);
}
#auth-screen[data-auth-theme="dark"] .auth-otp-help {
  color: #98989d;
}
@media(max-width:420px) {
  .auth-send-otp {
    min-width: 106px;
    padding: 0 9px;
    font-size: 10px;
  }
  .auth-otp-row {
    gap: 7px;
  }
}



/* APEX KASIR — helper note login dark dibuat menyatu, bukan kotak peringatan. */
#auth-screen[data-auth-theme="dark"] .auth-config-note {
  margin: 11px auto 0;
  max-width: 340px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(161,161,170,.92);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}


/* APEX KASIR — hilangkan kartu pembungkus form pada Dark Mode mobile.
   Kontrol input tetap memakai permukaan masing-masing; hanya panel luar form
   yang dibuat transparan agar menyatu dengan latar halaman. */
@media (max-width: 800px) {
  #auth-screen[data-auth-theme="dark"] .auth-panel {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}


/* APEX KASIR — hapus seluruh panel/kartu pembungkus login pada Dark Mode mobile.
   Field input dan tombol tetap memakai permukaannya masing-masing. */
@media (max-width: 600px) {
  #auth-screen[data-auth-theme="dark"] .auth-shell {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  #auth-screen[data-auth-theme="dark"] .auth-panel-wrap {
    background: transparent;
  }
  #auth-screen[data-auth-theme="dark"] .auth-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}

/* APEX KASIR — samakan permukaan panel login Dark Mode mobile dengan latar belakang.
   Padding dan ukuran panel tetap dipertahankan agar posisi form tidak berubah. */
@media (max-width: 600px) {
  #auth-screen[data-auth-theme="dark"] .auth-panel {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }
}
