/* pos.css — POS pages: settings, customers, terminal, invoices */

.pos-page{
  max-width: 1200px;
  margin: 0 auto;
  padding: 78px 14px 100px;
}
.pos-hero{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.pos-hero h1{
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -.02em;
}
.pos-hero p{
  font-size: 12.5px;
  color: var(--au-text-3, #94a3b8);
  margin: 0;
}

/* CARDS */
.pos-card{
  background: var(--au-surface, rgba(20,22,40,.6));
  border: 1px solid var(--au-border, rgba(255,255,255,.10));
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}
.pos-card__title{
  font-size: 14px; font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: .04em;
  color: var(--au-text-2, #cbd5e1);
  text-transform: uppercase;
}
.pos-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width:720px){ .pos-grid{ grid-template-columns: 1fr; } }
.pos-field{ display:flex; flex-direction:column; gap:5px; }
.pos-field label{ font-size: 11px; color: var(--au-text-3,#94a3b8); font-weight:600; }
.pos-field input, .pos-field select, .pos-field textarea{
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--au-border, rgba(255,255,255,.12));
  background: var(--au-surface-2, rgba(255,255,255,.03));
  color: var(--au-text-1, #e2e8f0);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.pos-field textarea{ height: auto; min-height: 60px; padding: 8px 12px; resize: vertical; }
.pos-field input:focus, .pos-field select:focus, .pos-field textarea:focus{
  border-color: var(--au-accent, #06b6d4);
  box-shadow: 0 0 0 3px rgba(6,182,212,.18);
}

/* BUTTONS */
.pos-btn{
  height: 40px; padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--au-border, rgba(255,255,255,.12));
  background: var(--au-surface, rgba(20,22,40,.6));
  color: var(--au-text-1, #e2e8f0);
  font: inherit; font-weight: 700; font-size: 13px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.pos-btn:hover{ background: var(--au-surface-2, rgba(255,255,255,.05)); }
.pos-btn--primary{
  background: linear-gradient(135deg, var(--au-accent, #06b6d4), var(--au-accent-2, #3b82f6));
  border: none; color: #fff;
  box-shadow: 0 6px 20px rgba(6,182,212,.35);
}
.pos-btn--success{
  background: linear-gradient(135deg, #10b981, #059669);
  border: none; color: #fff;
}
.pos-btn--danger{
  background: rgba(239,68,68,.18);
  border-color: rgba(239,68,68,.4);
  color: #ef4444;
}

/* LOGO */
.pos-logo-box{
  display: flex; align-items: center; gap: 16px;
  padding: 14px;
  border-radius: 10px;
  border: 1px dashed var(--au-border);
  background: rgba(255,255,255,.02);
}
.pos-logo-box img{
  width: 80px; height: 80px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
}
.pos-logo-box__placeholder{
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  font-size: 28px;
}

/* TABLES */
.pos-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pos-table th{
  text-align: start;
  padding: 10px 12px;
  background: rgba(255,255,255,.04);
  color: var(--au-text-2, #cbd5e1);
  font-weight: 700; font-size: 11.5px;
  letter-spacing: .04em; text-transform: uppercase;
  border-bottom: 1px solid var(--au-border);
}
.pos-table td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.pos-table tr:hover td{ background: rgba(6,182,212,.04); }

/* ============================================
   POS TERMINAL — V3 (Classic Accounting Style)
   ============================================ */
.pos3-page{
  max-width: 1500px;
  margin: 0 auto;
  padding: 70px 14px 14px;
}

/* ---- Number inputs without arrows ---- */
.pos3-page input[type="number"]::-webkit-inner-spin-button,
.pos3-page input[type="number"]::-webkit-outer-spin-button{
  -webkit-appearance: none;
  margin: 0;
}
.pos3-page input[type="number"]{
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ---- Status bar ---- */
.pos3-status{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--au-surface);
  border: 1px solid var(--au-border);
  border-radius: 12px;
  flex-wrap: wrap;
}
.pos3-status__left, .pos3-status__right{ display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pos3-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  color: var(--au-text-1);
  font-size: 12.5px;
  font-weight: 600;
}
.pos3-chip span{ font-size: 10.5px; color: var(--au-text-3); letter-spacing: .04em; }
.pos3-chip b{ font-weight: 800; color: var(--au-accent); font-variant-numeric: tabular-nums; }
.pos3-chip--year{
  cursor: pointer;
  background: rgba(6,182,212,.10);
  border-color: rgba(6,182,212,.35);
}
.pos3-chip__sel{
  background: transparent;
  border: none;
  color: var(--au-text-1);
  font: inherit;
  font-weight: 800;
  outline: none;
  cursor: pointer;
  padding-inline-start: 4px;
}
.pos3-chip__sel option{ background: #15182a; color: #fff; }

.pos3-bigtotal{
  padding: 8px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(6,182,212,.15), rgba(59,130,246,.10));
  border: 1px solid rgba(6,182,212,.35);
  text-align: end;
}
.pos3-bigtotal__label{
  font-size: 10.5px;
  color: var(--au-text-3);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.pos3-bigtotal__val{
  font-size: 22px;
  font-weight: 900;
  color: var(--au-accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.pos3-bigtotal__val small{ font-size: 11px; opacity: .7; font-weight: 700; }

/* ---- Form header ---- */
.pos3-form{
  background: var(--au-surface);
  border: 1px solid var(--au-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.pos3-form__grid{
  display: grid;
  grid-template-columns: 140px 160px 150px 1fr 1fr 200px;
  gap: 10px;
  align-items: end;
}
@media (max-width: 1100px){
  .pos3-form__grid{ grid-template-columns: 1fr 1fr 1fr; }
  .pos3-field--wide{ grid-column: span 2; }
}
@media (max-width: 600px){
  .pos3-form__grid{ grid-template-columns: 1fr 1fr; }
  .pos3-field--wide{ grid-column: 1 / -1; }
}

.pos3-field{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pos3-field label{
  font-size: 10.5px;
  color: var(--au-text-3);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pos3-field label kbd{
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--au-border);
  border-radius: 4px;
  background: var(--au-surface-2);
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--au-text-2);
}
.pos3-field input, .pos3-field select{
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  color: var(--au-text-1);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.pos3-field input:focus, .pos3-field select:focus{
  border-color: var(--au-accent);
  box-shadow: 0 0 0 2px rgba(6,182,212,.15);
}
.pos3-field input[readonly]{
  background: rgba(255,255,255,.02);
  color: var(--au-text-3);
}
.pos3-field__btn{
  position: absolute;
  inset-block-end: 2px;
  inset-inline-end: 2px;
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid var(--au-accent);
  background: rgba(6,182,212,.12);
  color: var(--au-accent);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

/* ---- Options row ---- */
.pos3-opts{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--au-border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pos3-opts__group{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pos3-opts__label{
  font-size: 11.5px;
  font-weight: 700;
  color: var(--au-text-2);
  margin-inline-end: 4px;
}
.pos3-opts__sep{
  width: 1px;
  height: 24px;
  background: var(--au-border);
}
.pos3-radio, .pos3-check{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--au-text-2);
  user-select: none;
  transition: all .1s;
}
.pos3-radio:hover, .pos3-check:hover{
  border-color: var(--au-accent);
  color: var(--au-text-1);
}
.pos3-radio input, .pos3-check input{
  accent-color: var(--au-accent);
  margin: 0;
}
.pos3-radio:has(input:checked){
  background: rgba(6,182,212,.15);
  border-color: var(--au-accent);
  color: var(--au-accent);
}
.pos3-check:has(input:checked){
  background: rgba(16,185,129,.10);
  border-color: rgba(16,185,129,.4);
  color: #10b981;
}
.pos3-opts__rate{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  font-size: 12.5px;
  color: var(--au-text-2);
}
.pos3-opts__rate input{
  width: 48px; height: 24px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid var(--au-border);
  background: var(--au-surface);
  color: var(--au-text-1);
  font: inherit; font-weight: 700;
  text-align: center;
  outline: none;
}

/* ---- Items table ---- */
.pos3-table-wrap{
  background: var(--au-surface);
  border: 1px solid var(--au-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}
.pos3-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pos3-table thead th{
  background: rgba(255,255,255,.04);
  color: var(--au-text-2);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 9px 8px;
  border-bottom: 2px solid var(--au-border);
  text-align: center;
  white-space: nowrap;
}
.pos3-table tbody td{
  padding: 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  background: transparent;
}
.pos3-table tbody tr:hover td{ background: rgba(6,182,212,.03); }
.pos3-table tbody td input{
  width: 100%;
  height: 38px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--au-text-1);
  font: inherit;
  font-size: 13px;
  outline: none;
  font-variant-numeric: tabular-nums;
}
.pos3-table tbody td input:hover{ background: rgba(255,255,255,.03); }
.pos3-table tbody td input:focus{
  background: rgba(6,182,212,.08);
  border-color: var(--au-accent);
  box-shadow: inset 0 0 0 1px var(--au-accent);
}
.pos3-table tbody td input[readonly]{
  color: var(--au-text-3);
  cursor: default;
}

.col-num   { width: 38px;  text-align: center; color: var(--au-text-3); font-variant-numeric: tabular-nums; font-weight: 700; }
.col-code  { width: 150px; }
.col-name  { width: auto;  min-width: 220px; }
.col-qty   { width: 70px; }
.col-price { width: 100px; }
.col-tax   { width: 60px; }
.col-total { width: 110px; }
.col-act   { width: 40px;  text-align: center; }

.pos3-table .col-num, .pos3-table .cell-num{ text-align: center; }
.pos3-table input.cell-qty, .pos3-table input.cell-price,
.pos3-table input.cell-tax, .pos3-table input.cell-total{
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pos3-table input.cell-total{ background: rgba(6,182,212,.05); }
.pos3-row__del{
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(239,68,68,.3);
  background: rgba(239,68,68,.08);
  color: #ef4444;
  cursor: pointer;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pos3-row__del:hover{ background: #ef4444; color: #fff; }

/* ---- Bottom: notes + totals ---- */
.pos3-bottom{
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 12px;
}
@media (max-width: 980px){
  .pos3-bottom{ grid-template-columns: 1fr; }
}

.pos3-notes-box{
  background: var(--au-surface);
  border: 1px solid var(--au-border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pos3-notes-box label{
  font-size: 11px;
  color: var(--au-text-3);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pos3-notes-box textarea{
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  color: var(--au-text-1);
  font: inherit; font-size: 13px;
  resize: vertical;
  min-height: 70px;
  outline: none;
}
.pos3-notes-box textarea:focus{ border-color: var(--au-accent); }

.pos3-actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.pos3-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  color: var(--au-text-1);
  font: inherit; font-weight: 700; font-size: 14px;
  cursor: pointer;
  transition: all .12s;
}
.pos3-btn:hover{ background: var(--au-surface); }
.pos3-btn--ghost{
  background: transparent;
  color: var(--au-text-3);
  font-weight: 600;
  font-size: 12.5px;
}
.pos3-btn--ghost:hover{
  background: rgba(239,68,68,.10);
  color: #ef4444;
  border-color: rgba(239,68,68,.3);
}
.pos3-btn--primary{
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  font-size: 15px;
  box-shadow: 0 6px 18px rgba(16,185,129,.35);
}
.pos3-btn--primary:hover{
  box-shadow: 0 10px 26px rgba(16,185,129,.45);
  transform: translateY(-1px);
}
.pos3-btn--primary:disabled{
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
}
.pos3-btn kbd{
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255,255,255,.20);
  font-family: inherit; font-size: 10.5px; font-weight: 700;
}

/* ---- Totals box ---- */
.pos3-totals-box{
  background: var(--au-surface);
  border: 1px solid var(--au-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pos3-totals-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px;
  font-size: 13px;
  color: var(--au-text-2);
  border-bottom: 1px dashed rgba(255,255,255,.05);
}
.pos3-totals-row:last-child{ border-bottom: none; }
.pos3-totals-row b{
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--au-text-1);
}
.pos3-totals-row--input input{
  width: 110px;
  height: 32px;
  padding: 0 10px;
  text-align: end;
  border-radius: 7px;
  border: 1px solid rgba(239,68,68,.30);
  background: rgba(239,68,68,.05);
  color: var(--au-text-1);
  font: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.pos3-totals-row--input input:focus{
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239,68,68,.15);
}
.pos3-totals-row--grand{
  margin-top: 6px;
  padding: 12px 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(6,182,212,.14), rgba(59,130,246,.10));
  border: 1px solid rgba(6,182,212,.30);
  font-size: 15px;
  font-weight: 800;
  color: var(--au-text-1);
  border-bottom: 1px solid rgba(6,182,212,.30);
}
.pos3-totals-row--grand b{
  font-size: 22px;
  color: var(--au-accent);
}
.pos3-totals-row--grand small{ font-size: 11px; opacity: .7; }

/* ---- Modal (quick add customer) ---- */
.pos3-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2,6,23,.78);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pos3-modal[style*="flex"]{ display: flex !important; }
.pos3-modal__panel{
  width: min(420px, 100%);
  background: var(--au-surface-strong, rgba(20,22,40,.95));
  border: 1px solid var(--au-border-2, rgba(255,255,255,.18));
  border-radius: 12px;
  overflow: hidden;
}
.pos3-modal__head{
  padding: 14px 18px;
  border-bottom: 1px solid var(--au-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 14.5px;
}
.pos3-modal__close{
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--au-border);
  background: var(--au-surface);
  color: var(--au-text-2);
  cursor: pointer;
}
.pos3-modal__body{
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pos3-modal__foot{
  padding: 12px 18px;
  border-top: 1px solid var(--au-border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ---- Hints ---- */
.pos3-hints{
  position: fixed;
  bottom: 12px;
  inset-inline-start: 12px;
  z-index: 100;
  padding: 6px 12px;
  background: rgba(15,18,40,.92);
  border: 1px solid var(--au-border);
  border-radius: 999px;
  backdrop-filter: blur(20px);
  font-size: 10.5px;
  color: var(--au-text-3);
}
.pos3-hints kbd{
  display: inline-block;
  padding: 0 5px;
  margin-inline-end: 3px;
  border: 1px solid var(--au-border);
  border-radius: 4px;
  background: var(--au-surface-2);
  color: var(--au-text-1);
  font-family: inherit;
  font-weight: 700;
}
@media (max-width: 720px){ .pos3-hints{ display: none; } }


/* ============================================
   POS TERMINAL — V2 (LEGACY)
   ============================================ */
.pos2-page{
  max-width: 1500px;
  margin: 0 auto;
  padding: 70px 14px 14px;
}

/* ---- TOP STATUS BAR ---- */
.pos2-status{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--au-surface);
  border: 1px solid var(--au-border);
  border-radius: 14px;
  flex-wrap: wrap;
}
.pos2-status__group{ display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pos2-chip{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  color: var(--au-text-1);
  font-size: 12.5px;
  font-weight: 600;
}
.pos2-chip__icon{ font-size: 14px; line-height: 1; }
.pos2-chip__label{ font-size: 10.5px; color: var(--au-text-3); text-transform: uppercase; letter-spacing: .04em; }
.pos2-chip b{ font-variant-numeric: tabular-nums; font-weight: 800; color: var(--au-accent); }
.pos2-chip--year{
  cursor: pointer;
  background: rgba(6,182,212,.10);
  border-color: rgba(6,182,212,.35);
}
.pos2-chip--year:hover{ background: rgba(6,182,212,.18); }
.pos2-chip--user b{ color: var(--au-text-1); }
.pos2-chip__select{
  background: transparent;
  border: none;
  color: var(--au-text-1);
  font: inherit;
  font-weight: 800;
  outline: none;
  cursor: pointer;
}
.pos2-chip__select option{ background: #15182a; color: #fff; }

.pos2-counter{
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 10px;
  background: var(--au-surface-2);
  font-size: 11.5px;
  color: var(--au-text-3);
}
.pos2-counter b{
  font-size: 18px;
  color: var(--au-text-1);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.pos2-counter__cur{ font-size: 10.5px; }

/* ---- MAIN GRID ---- */
.pos2-grid{
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 14px;
  align-items: start;
  min-height: calc(100vh - 200px);
}
@media (max-width: 980px){
  .pos2-grid{ grid-template-columns: 1fr; }
}

/* ============ LEFT: SEARCH + PRODUCTS ============ */
.pos2-left{ display: flex; flex-direction: column; gap: 12px; min-height: 0; }

.pos2-search{
  position: relative;
  display: flex;
  align-items: center;
  background: var(--au-surface);
  border: 2px solid var(--au-border-2, rgba(255,255,255,.18));
  border-radius: 14px;
  padding: 6px;
  transition: border-color .12s, box-shadow .12s;
}
.pos2-search:focus-within{
  border-color: var(--au-accent);
  box-shadow: 0 0 0 4px rgba(6,182,212,.15);
}
.pos2-search__icon{
  margin: 0 14px 0 8px;
  color: var(--au-text-3);
  flex: none;
}
.pos2-search__input{
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 4px;
  background: transparent;
  border: none;
  color: var(--au-text-1);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  outline: none;
}
.pos2-search__input::placeholder{ color: var(--au-text-3); font-weight: 400; }
.pos2-search__hint{
  margin: 0 6px;
  font-size: 11px;
  color: var(--au-text-3);
}
.pos2-search__hint kbd{
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--au-border);
  border-radius: 5px;
  background: var(--au-surface-2);
  font-family: inherit;
  font-weight: 700;
}
.pos2-search__btn{
  width: 44px; height: 44px;
  border-radius: 10px;
  border: none;
  background: var(--au-surface-2);
  color: var(--au-text-1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: 4px;
  transition: transform .1s;
}
.pos2-search__btn:hover{ transform: scale(1.06); }
.pos2-search__btn--scan{
  background: linear-gradient(135deg, var(--au-accent), var(--au-accent-2));
  color: #fff;
}
.pos2-search__btn--fast{
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}
@media (max-width: 720px){
  .pos2-search__hint{ display: none; }
  .pos2-search__input{ font-size: 15px; }
}

/* PRODUCTS GRID */
.pos2-products{
  flex: 1;
  min-height: 400px;
  overflow-y: auto;
  background: var(--au-surface);
  border: 1px solid var(--au-border);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  align-content: start;
}
.pos2-product{
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: var(--au-surface-2);
  border: 1px solid var(--au-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all .12s;
  position: relative;
  overflow: hidden;
}
.pos2-product:hover{
  border-color: var(--au-accent);
  background: rgba(6,182,212,.05);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6,182,212,.18);
}
.pos2-product:active{ transform: scale(.98); }
.pos2-product__thumb{
  width: 100%;
  height: 80px;
  margin-bottom: 8px;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pos2-product__thumb img{
  width: 100%; height: 100%; object-fit: cover;
}
.pos2-product__thumb-fallback{
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}
.pos2-product__brand{
  font-size: 10.5px;
  color: var(--au-text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.pos2-product__name{
  font-size: 13px;
  font-weight: 700;
  color: var(--au-text-1);
  margin: 2px 0 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
}
.pos2-product__bottom{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--au-border);
}
.pos2-product__price{
  font-weight: 800;
  color: var(--au-accent);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.pos2-product__stock{
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(16,185,129,.15);
  color: #10b981;
}
.pos2-product__stock.low{ background: rgba(245,158,11,.18); color: #f59e0b; }
.pos2-product__stock.zero{ background: rgba(239,68,68,.18); color: #ef4444; }

/* Empty state */
.pos2-empty{
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  color: var(--au-text-3);
}
.pos2-empty__icon{ font-size: 50px; opacity: .4; margin-bottom: 14px; }
.pos2-empty__title{ font-size: 16px; color: var(--au-text-2); margin-bottom: 6px; font-weight: 600; }
.pos2-empty__sub{ font-size: 12.5px; }
.pos2-empty kbd{
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--au-border);
  border-radius: 5px;
  background: var(--au-surface-2);
  font-family: inherit; font-weight: 700;
  color: var(--au-text-1);
}

/* ============ RIGHT: CART + CHECKOUT ============ */
.pos2-right{
  background: var(--au-surface);
  border: 1px solid var(--au-border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 92px);
  overflow: hidden;
}

/* Customer */
.pos2-customer{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}
.pos2-customer__sel{
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  color: var(--au-text-1);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  outline: none;
}
.pos2-customer__sel:focus{ border-color: var(--au-accent); }
.pos2-customer__add{
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--au-accent);
  background: rgba(6,182,212,.10);
  color: var(--au-accent);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}
.pos2-customer-info{
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(6,182,212,.06);
  font-size: 11.5px;
  color: var(--au-text-2);
}
.pos2-customer-info.danger{ background: rgba(239,68,68,.10); color: #ef4444; }

/* Cart head */
.pos2-cart-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}
.pos2-cart-head__title{
  font-size: 13px;
  font-weight: 700;
  color: var(--au-text-2);
}
.pos2-cart-head__title b{
  display: inline-block;
  margin-inline-start: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--au-accent);
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.pos2-cart-head__clear{
  font-size: 11px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--au-text-3);
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: inherit;
}
.pos2-cart-head__clear:hover{ color: #ef4444; border-color: rgba(239,68,68,.3); }

/* Cart items */
.pos2-cart{
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pos2-cart-item{
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: var(--au-surface-2);
  border: 1px solid var(--au-border);
}
.pos2-cart-item.exempt{ border-color: rgba(245,158,11,.3); }
.pos2-cart-item__thumb{
  width: 36px; height: 36px;
  border-radius: 7px;
  background: rgba(255,255,255,.05);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pos2-cart-item__thumb img{ width: 100%; height: 100%; object-fit: cover; }
.pos2-cart-item__thumb-fb{ font-size: 13px; font-weight: 800; color: #fff; }
.pos2-cart-item__info{ min-width: 0; }
.pos2-cart-item__title{
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos2-cart-item__sub{
  font-size: 10.5px;
  color: var(--au-text-3);
  margin-top: 1px;
}
.pos2-cart-item__price{
  font-size: 13px;
  font-weight: 800;
  color: var(--au-accent);
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.pos2-cart-item__controls{
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--au-border);
}
.pos2-qty-btn{
  width: 24px; height: 24px;
  border-radius: 6px;
  border: 1px solid var(--au-border);
  background: var(--au-surface);
  color: var(--au-text-1);
  cursor: pointer;
  font: inherit; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.pos2-qty-btn:hover{ background: var(--au-accent); color: #fff; border-color: transparent; }
.pos2-qty-input{
  width: 48px; height: 24px;
  text-align: center;
  border-radius: 5px;
  border: 1px solid var(--au-border);
  background: var(--au-surface);
  color: var(--au-text-1);
  font: inherit; font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.pos2-price-input{
  flex: 1;
  height: 24px;
  padding: 0 6px;
  text-align: end;
  border-radius: 5px;
  border: 1px solid var(--au-border);
  background: var(--au-surface);
  color: var(--au-text-1);
  font: inherit; font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.pos2-del{
  width: 24px; height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(239,68,68,.3);
  background: rgba(239,68,68,.08);
  color: #ef4444;
  cursor: pointer;
  font-size: 12px;
}
.pos2-cart-empty{
  padding: 50px 20px;
  text-align: center;
  color: var(--au-text-3);
  font-size: 13px;
}

/* Toggles */
.pos2-toggles{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
}
.pos2-toggle{
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  color: var(--au-text-2);
  font: inherit; font-size: 11px; font-weight: 600;
  cursor: pointer;
  transition: all .1s;
}
.pos2-toggle:hover{ background: var(--au-accent); color: #fff; border-color: transparent; }
.pos2-toggle.is-on{
  background: rgba(6,182,212,.18);
  color: var(--au-accent);
  border-color: var(--au-accent);
}
.pos2-extras{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pos2-extra{
  display: none;
}
.pos2-extra.is-open{ display: block; }
.pos2-extra label{
  display: block;
  font-size: 10.5px;
  color: var(--au-text-3);
  font-weight: 600;
  margin-bottom: 3px;
}
.pos2-extra input, .pos2-extra textarea{
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  color: var(--au-text-1);
  font: inherit; font-size: 12px;
  outline: none;
  resize: vertical;
}
.pos2-extra input{ height: 32px; }
.pos2-extra input:focus, .pos2-extra textarea:focus{ border-color: var(--au-accent); }

/* Totals */
.pos2-totals{
  border-top: 1px solid var(--au-border);
  padding-top: 8px;
}
.pos2-totals__row{
  display: flex;
  justify-content: space-between;
  padding: 3px 2px;
  font-size: 12.5px;
  color: var(--au-text-2);
}
.pos2-totals__row b{ font-variant-numeric: tabular-nums; }
.pos2-totals__row--discount{ color: #f59e0b; }
.pos2-totals__row--grand{
  margin-top: 6px;
  padding: 10px 4px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(6,182,212,.12), rgba(59,130,246,.10));
  border: 1px solid rgba(6,182,212,.25);
  font-size: 16px;
  font-weight: 800;
  color: var(--au-text-1);
}
.pos2-totals__row--grand b{
  font-size: 24px;
  color: var(--au-accent);
}
.pos2-totals__row--grand small{ font-size: 11px; opacity: .7; font-weight: 600; }

/* Payment buttons */
.pos2-pays{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.pos2-pay{
  padding: 8px 4px;
  border-radius: 10px;
  border: 1.5px solid var(--au-border);
  background: var(--au-surface-2);
  color: var(--au-text-2);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: all .1s;
}
.pos2-pay:hover{ border-color: var(--au-accent); color: var(--au-text-1); }
.pos2-pay.is-active{
  border-color: var(--au-accent);
  background: rgba(6,182,212,.12);
  color: var(--au-accent);
  box-shadow: 0 0 0 1px rgba(6,182,212,.30) inset;
}
.pos2-pay__icon{ display: block; font-size: 22px; margin-bottom: 2px; }
.pos2-pay__label{ font-size: 11.5px; font-weight: 700; }

/* Checkout */
.pos2-checkout{
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font: inherit; font-size: 16px; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16,185,129,.40);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .1s, box-shadow .1s;
}
.pos2-checkout:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(16,185,129,.50);
}
.pos2-checkout:active{ transform: translateY(0); }
.pos2-checkout:disabled{
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
  background: var(--au-surface-2);
  color: var(--au-text-3);
}
.pos2-checkout kbd{
  margin-inline-start: auto;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255,255,255,.20);
  font-size: 10.5px;
  font-weight: 700;
}
.pos2-checkout__icon{ font-size: 18px; }

/* Modal (quick add customer) */
.pos2-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2,6,23,.78);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pos2-modal[style*="flex"]{ display: flex !important; }
.pos2-modal__panel{
  width: min(460px, 100%);
  background: var(--au-surface-strong, rgba(20,22,40,.95));
  border: 1px solid var(--au-border-2, rgba(255,255,255,.18));
  border-radius: 14px;
  overflow: hidden;
}
.pos2-modal__head{
  padding: 14px 18px;
  border-bottom: 1px solid var(--au-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 15px;
}
.pos2-modal__close{
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--au-border);
  background: var(--au-surface);
  color: var(--au-text-2);
  cursor: pointer;
}
.pos2-modal__body{ padding: 16px 18px; }
.pos2-modal__foot{
  padding: 12px 18px;
  border-top: 1px solid var(--au-border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Shortcuts hint */
.pos2-shortcuts{
  position: fixed;
  bottom: 14px;
  inset-inline-start: 14px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  background: rgba(15,18,40,.92);
  border: 1px solid var(--au-border);
  border-radius: 999px;
  backdrop-filter: blur(20px);
  font-size: 11px;
  color: var(--au-text-3);
}
.pos2-shortcuts kbd{
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--au-border);
  border-radius: 4px;
  background: var(--au-surface-2);
  color: var(--au-text-1);
  font-family: inherit;
  font-weight: 700;
  margin-inline-end: 4px;
}
.pos2-shortcuts__close{
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--au-border);
  background: var(--au-surface);
  color: var(--au-text-3);
  cursor: pointer;
  font-size: 10px;
}
@media (max-width: 720px){
  .pos2-shortcuts{ display: none; }
}


/* ============================================
   OLD POS TERMINAL — LEGACY (kept for backward compat)
   ============================================ */
.pos-terminal{
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 14px;
  height: calc(100vh - 140px);
  min-height: 600px;
}
@media (max-width: 980px){
  .pos-terminal{ grid-template-columns: 1fr; height: auto; }
}

.pos-left{
  display: flex; flex-direction: column; gap: 12px; min-height: 0;
}
.pos-search-bar{
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding: 10px 12px;
  background: var(--au-surface);
  border: 1px solid var(--au-border);
  border-radius: 12px;
}
.pos-search-bar input{
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  color: var(--au-text-1);
  font-size: 15px;
  outline: none;
}
.pos-search-bar input:focus{ border-color: var(--au-accent); }

.pos-results{
  flex: 1; min-height: 0; overflow-y: auto;
  background: var(--au-surface);
  border: 1px solid var(--au-border);
  border-radius: 12px;
  padding: 10px;
}
.pos-result{
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--au-surface-2);
  border: 1px solid transparent;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color .12s;
}
.pos-result:hover{ border-color: var(--au-accent); }
.pos-result__info{ min-width: 0; }
.pos-result__title{ font-weight: 700; font-size: 14px; }
.pos-result__meta{ font-size: 11.5px; color: var(--au-text-3); margin-top: 3px; }
.pos-result__price{
  font-weight: 800;
  color: var(--au-accent);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  min-width: 70px;
  text-align: end;
}
.pos-result__stock{
  font-size: 11px;
  color: var(--au-text-3);
  min-width: 60px;
  text-align: end;
}
.pos-result__stock.low{ color: #f59e0b; }
.pos-result__stock.zero{ color: #ef4444; }

/* RIGHT PANEL — CART + CHECKOUT */
.pos-right{
  display: flex; flex-direction: column; gap: 12px;
  background: var(--au-surface);
  border: 1px solid var(--au-border);
  border-radius: 14px;
  padding: 14px;
  overflow: hidden;
}
.pos-customer{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--au-border);
}
.pos-customer__select{
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  color: var(--au-text-1);
  font-size: 13px;
  outline: none;
}
.pos-customer__add{
  height: 40px; width: 40px;
  border-radius: 10px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  color: var(--au-text-1);
  cursor: pointer;
  font-size: 18px;
}

.pos-cart{
  flex: 1; min-height: 0; overflow-y: auto;
  margin: 0 -4px;
  padding: 0 4px;
}
.pos-cart-item{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  background: var(--au-surface-2);
  margin-bottom: 6px;
  font-size: 12.5px;
}
.pos-cart-item__title{
  font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pos-cart-item__meta{
  font-size: 10.5px;
  color: var(--au-text-3);
  margin-top: 2px;
}
.pos-cart-item__price{
  font-weight: 800;
  color: var(--au-accent);
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.pos-cart-item__row{
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px;
  grid-column: 1 / -1;
}
.pos-qty-btn{
  width: 26px; height: 26px;
  border-radius: 6px;
  border: 1px solid var(--au-border);
  background: var(--au-surface);
  color: var(--au-text-1);
  cursor: pointer;
  font-weight: 800;
}
.pos-qty-input{
  width: 50px; height: 26px;
  text-align: center;
  border-radius: 6px;
  border: 1px solid var(--au-border);
  background: var(--au-surface);
  color: var(--au-text-1);
  font: inherit;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.pos-price-input{
  width: 70px; height: 26px;
  padding: 0 6px;
  text-align: end;
  border-radius: 6px;
  border: 1px solid var(--au-border);
  background: var(--au-surface);
  color: var(--au-text-1);
  font: inherit; font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.pos-cart-item__del{
  width: 26px; height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(239,68,68,.3);
  background: rgba(239,68,68,.08);
  color: #ef4444;
  cursor: pointer;
}
.pos-cart-item.exempt{ border: 1px solid rgba(245,158,11,.3); }
.pos-cart-empty{
  padding: 60px 20px;
  text-align: center;
  color: var(--au-text-3);
}

/* TOTALS */
.pos-totals{
  border-top: 1px solid var(--au-border);
  padding-top: 12px;
  font-size: 12.5px;
}
.pos-totals__row{
  display: flex; justify-content: space-between;
  padding: 4px 0;
  color: var(--au-text-2);
}
.pos-totals__row.total{
  border-top: 1px solid var(--au-border);
  margin-top: 8px;
  padding-top: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--au-text-1);
}
.pos-totals__row.total b{ color: var(--au-accent); font-variant-numeric: tabular-nums; }

/* PAYMENT */
.pos-payments{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}
.pos-pay-btn{
  padding: 10px 6px;
  border-radius: 10px;
  border: 1px solid var(--au-border);
  background: var(--au-surface-2);
  color: var(--au-text-2);
  cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700;
  text-align: center;
}
.pos-pay-btn.is-active{
  border-color: var(--au-accent);
  background: rgba(6,182,212,.12);
  color: var(--au-accent);
}
.pos-checkout-btn{
  width: 100%;
  margin-top: 10px;
  height: 52px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font: inherit; font-size: 16px; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16,185,129,.4);
}
.pos-checkout-btn:disabled{ opacity: .4; cursor: not-allowed; }

/* ============================================
   INVOICE TEMPLATE — Classic Jordanian style
   ============================================ */
.inv-page{
  max-width: 850px;
  margin: 20px auto;
  background: #fff;
  color: #111;
  padding: 18mm 18mm 14mm;
  font-family: 'Cairo', 'Tahoma', Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 0 20px rgba(0,0,0,.5);
  position: relative;
  direction: rtl;
}
/* HEADER: 3 columns — English | Logo | Arabic */
.inv-h{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 2px solid #000;
  margin-bottom: 10px;
}
.inv-h__ar  { text-align: right; direction: rtl; }
.inv-h__en  { text-align: left;  direction: ltr; }
.inv-h__logo img{ width: 80px; height: 80px; object-fit: contain; }
.inv-h__name { font-size: 14px; font-weight: 800; line-height: 1.3; margin-bottom: 2px; }
.inv-h__addr { font-size: 11px; line-height: 1.4; color: #222; }
.inv-h__line { font-size: 11px; line-height: 1.4; color: #222; margin-top: 1px; }

/* TITLE — single big centered Arabic */
.inv-title{
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  margin: 4px 0 8px;
  letter-spacing: 0.5px;
}

/* META: 2x2 + spanning row */
.inv-meta-table{
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 6px;
  font-size: 11.5px;
}
.inv-meta-table td{
  padding: 5px 8px;
  border: 1px solid #999;
}
.inv-meta-table .lbl{
  background: #f0f0f0;
  font-weight: 700;
  width: 110px;
  text-align: right;
}
.inv-meta-table .val{
  background: #fff;
}

/* ITEMS TABLE — classic Excel-look */
.inv-items{
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 10px;
  font-size: 12px;
}
.inv-items th, .inv-items td{
  border: 1px solid #999;
  padding: 6px 8px;
  vertical-align: middle;
}
.inv-items thead th{
  background: #e8e8e8;
  font-weight: 800;
  text-align: center;
  font-size: 11.5px;
}
.inv-items .col-code  { width: 70px; text-align: center; }
.inv-items .col-name  { width: auto; }
.inv-items .col-desc  { width: 120px; }
.inv-items .col-qty   { width: 55px; text-align: center; }
.inv-items .col-price { width: 80px; text-align: center; }
.inv-items .col-tax   { width: 55px; text-align: center; }
.inv-items .cell-code  { text-align: center; }
.inv-items .cell-name__main{ font-weight: 700; }
.inv-items .cell-num   { text-align: center; font-variant-numeric: tabular-nums; }
.inv-items .cell-tax   { text-align: center; font-variant-numeric: tabular-nums; }
.inv-items tr.exempt td{ background: rgba(245,158,11,.06); }

/* FOOTER GRID: QR | Notes | Totals (3 columns RTL) */
.inv-footer-grid{
  display: grid;
  grid-template-columns: 110px 1fr 230px;
  gap: 12px;
  margin-top: 6px;
}
.inv-qr-box{
  width: 110px;
  height: 110px;
  border: 1px solid #ccc;
  padding: 4px;
  background: #fff;
}
.inv-qr-box svg{ width: 100% !important; height: 100% !important; display: block; }
.inv-notes{
  font-size: 11px;
  border: 1px solid #999;
  padding: 6px 10px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.inv-notes__title{
  font-weight: 800;
  font-size: 11.5px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 3px;
  margin-bottom: 3px;
}
.inv-notes__body{ flex: 1; color: #333; min-height: 16px; }
.inv-notes__tax-info{
  font-size: 10.5px;
  color: #555;
  font-style: italic;
  border-top: 1px dashed #ccc;
  padding-top: 4px;
}
.inv-notes__words{
  font-size: 11.5px;
  color: #111;
  text-align: center;
  padding: 4px 0;
  border-top: 1px solid #999;
  margin-top: 2px;
}
.inv-totals{
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  align-self: start;
}
.inv-totals td{
  padding: 6px 10px;
  border: 1px solid #999;
}
.inv-totals .lbl{
  background: #f0f0f0;
  font-weight: 700;
  width: 95px;
  text-align: right;
}
.inv-totals .val{
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: #fff;
}
.inv-totals .grand{
  font-weight: 800;
  font-size: 13px;
}
.inv-totals .grand .lbl{ background: #d0e0f0; }
.inv-totals .grand .val{ background: #f0f8ff; }

/* SIGNATURES — 2 columns at bottom */
.inv-sigs{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 30px;
  padding-top: 10px;
}
.inv-sig{
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
}
.inv-sig__line{
  height: 1px;
  background: #000;
  margin: 0 auto 6px;
  width: 70%;
}
.inv-footer-note{
  font-size: 10px;
  color: #666;
  text-align: center;
  margin-top: 12px;
  padding-top: 6px;
  border-top: 1px dashed #ccc;
}
/* Invoice page actions bar (above the page) */
.inv-actions{
  max-width: 850px;
  margin: 0 auto 14px;
  display: flex; gap: 10px;
  padding: 14px 18mm 0;
}

@media print {
  body{ background: #fff !important; }
  .wm-topbar, .wm-mobile-drawer, .aur-aurora, .aur-theme-toggle,
  .inv-actions, button { display: none !important; }
  .inv-page{ box-shadow: none; margin: 0; padding: 14mm 16mm; max-width: none; width: 100%; }
}
