/* POS Layout Styles - Ogawa SG Clone (Legacy iOS Theme) */

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  font: 16px Arial, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

/* ============================================================
   TOP BAR - iOSGridHeader style (gray gradient)
   ============================================================ */
.pos-topbar {
  background: #c8c8c8 url('../assets/images/button.jpg');
  background-size: 100% 100%;
  border-bottom: #ababab 1px solid;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  height: 44px;
  box-sizing: border-box;
}

/* MENU button - iOSButtonConfirmPressed (vivid green) */
.pos-topbar .btn-menu {
  background-color: #0DA421;
  background-image: url('../assets/images/buttonConfirmPressed.jpg');
  background-size: 100% 100%;
  color: #fff;
  border: 1px solid;
  border-color: #0C9321 #0C9321 #125A1E #0C9321;
  border-radius: 6px;
  padding: 6px;
  font: bold 14px Arial;
  text-transform: uppercase;
  cursor: pointer;
  text-shadow: #3C8C40 0px -2px 0px;
  white-space: nowrap;
  height: 30px;
  line-height: 16px;
  display: inline-block;
  box-sizing: border-box;
}

.pos-topbar .btn-menu:hover {
  opacity: 0.9;
}

/* Change Outlet button - iOSButtonAction (blue gradient) */
.pos-topbar .btn-outlet {
  background-color: #4a7abf;
  background-image: url('../assets/images/buttonAction.jpg');
  background-size: 100% 100%;
  border: #3a6aaf 1px solid;
  border-radius: 6px;
  padding: 6px;
  font: bold 14px Arial;
  cursor: pointer;
  color: #fff;
  text-shadow: 0px -2px #2a5a9f;
  white-space: nowrap;
  height: 30px;
  line-height: 16px;
  display: inline-block;
  box-sizing: border-box;
}

.pos-topbar .btn-outlet:hover {
  opacity: 0.9;
}

/* User info text */
.pos-topbar .user-info {
  flex: 1;
  font: bold 14px Arial;
  color: #6a6a6a;
  text-shadow: 0 2px #eee;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Language buttons - iOSButton (gray) */
.pos-topbar .btn-lang {
  background: #c8c8c8 url('../assets/images/button.jpg');
  background-size: 100% 100%;
  border: #ababab 1px solid;
  border-radius: 6px;
  padding: 6px;
  font: bold 14px Arial;
  cursor: pointer;
  color: #6a6a6a;
  text-shadow: 0 2px #eee;
  white-space: nowrap;
  height: 30px;
  line-height: 16px;
  display: inline-block;
}

.pos-topbar .btn-lang:hover {
  opacity: 0.9;
}

/* ============================================================
   LAYOUT STRUCTURE
   ============================================================ */

/* Main wrapper below topbar */
.pos-wrapper {
  display: flex;
  position: fixed;
  top: 44px;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Sidebar Menu (persistent panel, no overlay) */
.pos-sidebar {
  width: 320px;
  min-width: 320px;
  background: #fff;
  border-right: #9daeca 1px solid;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  flex-direction: column;
  box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}

.pos-sidebar.open {
  display: flex;
}

/* Outlet Selection Panel (shows in sidebar position) */
.pos-outlet-panel {
  width: 500px;
  min-width: 500px;
  background: #fff;
  border-right: #9daeca 1px solid;
  overflow-y: auto;
  overflow-x: hidden;
  flex-direction: column;
  box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}

/* Main Content Area */
.pos-content {
  flex: 1;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   HOME PAGE
   ============================================================ */
.pos-home {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  background: #fff;
  overflow-y: auto;
}

.pos-home .ogawa-logo {
  width: 376px;
  height: auto;
}

/* ============================================================
   SLIDE MENU - iOSListItem style
   ============================================================ */
.pos-menu-section {
  /* items handle their own borders */
}

.pos-menu-header {
  display: flex;
  align-items: center;
  padding: 12px;
  font: 16px Arial;
  font-weight: bold;
  color: #000;
  text-shadow: none;
  background: #e8e8e8;
  background: linear-gradient(to bottom, #f0f0f0, #d8d8d8);
  border: none;
  border-bottom: #ccc 1px solid;
  width: 100%;
  text-align: left;
  cursor: pointer;
  gap: 10px;
  outline: none;
}

.pos-menu-header:hover {
  background: linear-gradient(to bottom, #e8e8e8, #d0d0d0);
}

.pos-menu-header[aria-expanded="true"] {
  background: linear-gradient(to bottom, #e0e0e0, #c8c8c8);
}

.pos-menu-header[aria-expanded="true"] .menu-icon img {
  content: url('../assets/images/Collapse.png');
}

.pos-menu-header .menu-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.pos-menu-header .menu-icon img {
  width: 32px;
  height: 32px;
}

.pos-menu-item {
  display: block;
  padding: 12px;
  font: 16px Arial;
  color: #000;
  text-decoration: none;
  border-bottom: #ccc 1px solid;
  border-left: 4px solid #ccc;
  background: #fff;
  cursor: pointer;
  outline: none;
}

.pos-menu-item:hover {
  background: #c3d4e4;
  color: #000;
  text-decoration: none;
}

/* Home menu item */
.pos-menu-home {
  display: block;
  padding: 12px;
  font: 16px Arial;
  color: #000;
  background: #fff;
  border-bottom: #ccc 1px solid;
  text-decoration: none;
  cursor: pointer;
}

.pos-menu-home:hover {
  background: #c3d4e4;
  color: #000;
  text-decoration: none;
}

/* Quick-Access Shortcuts Panel */
.pos-quick-access {
  background: #fff;
  border-bottom: none;
}

.pos-quick-item {
  display: block;
  padding: 12px;
  font: 16px Arial;
  color: #000;
  background: #fff;
  border-bottom: #e0e0e0 1px solid;
  text-decoration: none;
  cursor: pointer;
}

.pos-quick-item:hover {
  background: #c3d4e4;
  color: #000;
  text-decoration: none;
}

.pos-quick-group {
  border-bottom: #e0e0e0 1px solid;
}

.pos-quick-group-label {
  display: block;
  padding: 12px;
  font: bold 16px Arial;
  color: #000;
  background: #f0f0f0;
  border-bottom: #e0e0e0 1px solid;
}

.pos-quick-item.pos-quick-sub {
  padding-left: 30px;
}

.pos-quick-item.pos-quick-logout {
  /* same as other quick items */
}

.pos-quick-divider {
  margin: 0;
  border: none;
  border-top: 3px solid #9daeca;
}

.pos-menu-logout {
  display: block;
  padding: 12px;
  font: 16px Arial;
  color: #000;
  background: #fff;
  border: none;
  border-top: #e0e0e0 1px solid;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.pos-menu-logout:hover {
  background: #c3d4e4;
}

/* ============================================================
   OUTLET TABLE - iOSGrid/List style
   ============================================================ */
.pos-outlet-view {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.outlet-table {
  font: 16px Arial;
  width: 100%;
  border-collapse: collapse;
  color: #000;
}

.outlet-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.outlet-table th {
  font: bold 14px Arial;
  color: #6a6a6a;
  text-shadow: 0 2px #eee;
  background: #c8c8c8 url('../assets/images/button.jpg');
  background-size: 100% 100%;
  border-bottom: #ababab 1px solid;
  border-right: #ababab 1px solid;
  padding: 12px;
  text-align: left;
  cursor: default;
}

.outlet-table th:last-child {
  border-right: none;
}

.outlet-table td {
  padding: 12px;
  border-bottom: #e0e0e0 1px solid;
  cursor: pointer;
  text-shadow: none;
  background: #fff;
}

.outlet-table tbody tr:hover td {
  background: #c3d4e4;
  text-shadow: none;
}

.outlet-table tbody tr.selected td {
  color: #fff;
  background: #025ee7;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ============================================================
   SUB-PAGE TEMPLATES - Search Bar, Grid, Report Form, Tabs
   ============================================================ */

/* --- General iOS Button (reusable) --- */
.pos-btn {
  background-color: #c8c8c8;
  background-image: url('../assets/images/button.jpg');
  background-size: 100% 100%;
  border: #ababab 1px solid;
  border-radius: 6px;
  padding: 6px 12px;
  font: bold 14px Arial, sans-serif;
  color: #6a6a6a;
  text-shadow: 0px 2px #eee;
  cursor: pointer;
  height: 30px;
  line-height: 16px;
  display: inline-block;
  box-sizing: border-box;
  white-space: nowrap;
}

/* --- Pagination Buttons --- */
.pos-pg-btn {
  background-color: #c8c8c8;
  background-image: url('../assets/images/button.jpg');
  background-size: 100% 100%;
  border: #ababab 1px solid;
  border-radius: 4px;
  padding: 0 6px;
  min-width: 28px;
  height: 26px;
  font: bold 12px Arial, sans-serif;
  color: #6a6a6a;
  text-shadow: 0px 1px #eee;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  white-space: nowrap;
}

.pos-pg-btn:hover:not(:disabled) {
  opacity: 0.85;
}

.pos-pg-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.pos-pg-active {
  background-image: none;
  background-color: #007aff;
  color: #fff;
  border-color: #006ae0;
  text-shadow: none;
}

.pos-btn:hover {
  opacity: 0.9;
}

/* iOS Green Confirm Button */
.pos-btn-confirm {
  background-color: #0DA421;
  background-image: url('../assets/images/buttonConfirmPressed.jpg');
  background-size: 100% 100%;
  color: #fff;
  border: 1px solid;
  border-color: #0C9321 #0C9321 #125A1E #0C9321;
  border-radius: 6px;
  padding: 6px 12px;
  font: bold 14px Arial, sans-serif;
  text-transform: uppercase;
  cursor: pointer;
  text-shadow: #3C8C40 0px -2px 0px;
  height: 30px;
  line-height: 16px;
  display: inline-block;
  box-sizing: border-box;
  white-space: nowrap;
}

.pos-btn-confirm:hover {
  opacity: 0.9;
}

/* --- Search Bar (Pattern 1 - List/Search pages) --- */
.pos-search-bar {
  padding: 8px 12px;
  background: #fff;
  border-bottom: #e0e0e0 1px solid;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pos-search-bar select {
  font: 16px Arial, sans-serif;
  border: #ccc 1px solid;
  border-radius: 4px;
  padding: 6px 8px;
  color: #000;
  background: #fff;
  height: 30px;
  box-sizing: border-box;
  outline: none;
}

.pos-search-bar input {
  font: 16px Arial, sans-serif;
  border: #ccc 1px solid;
  border-radius: 4px;
  padding: 6px 8px;
  color: #000;
  background: #fff;
  height: 30px;
  box-sizing: border-box;
  flex: 1;
  min-width: 150px;
  outline: none;
}

.pos-search-bar .btn-search {
  background-color: #c8c8c8;
  background-image: url('../assets/images/button.jpg');
  background-size: 100% 100%;
  border: #ababab 1px solid;
  border-radius: 6px;
  padding: 6px 12px;
  font: bold 14px Arial, sans-serif;
  color: #6a6a6a;
  text-shadow: 0px 2px #eee;
  cursor: pointer;
  height: 30px;
  line-height: 16px;
  box-sizing: border-box;
  white-space: nowrap;
}

.pos-search-bar .btn-search:hover {
  opacity: 0.9;
}

/* --- Data Grid (Pattern 1) --- */
.pos-grid {
  font: 16px Arial, sans-serif;
  width: 100%;
  border-collapse: collapse;
  color: #000;
}

.pos-grid thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.pos-grid th {
  font: bold 14px Arial, sans-serif;
  color: #6a6a6a;
  text-shadow: 0 2px #eee;
  background: #c8c8c8 url('../assets/images/button.jpg');
  background-size: 100% 100%;
  border-bottom: #ababab 1px solid;
  border-right: #ababab 1px solid;
  padding: 12px;
  text-align: left;
  cursor: default;
}

.pos-grid th:last-child {
  border-right: none;
}

.pos-grid td {
  padding: 12px;
  border-bottom: #e0e0e0 1px solid;
  cursor: pointer;
  text-shadow: none;
  background: #fff;
  font: 16px Arial, sans-serif;
  color: #000;
}

.pos-grid tr:hover td {
  background: #c3d4e4;
}

.pos-grid tr.selected td {
  color: #fff;
  background: #025ee7;
}

/* --- Report/Filter Form (Pattern 2) --- */
.pos-report-header {
  color: #00ff00;
  font: bold 16px Arial, sans-serif;
  text-shadow: 0 2px #fff;
  padding: 12px;
}

.pos-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  padding: 8px 12px;
}

.pos-filter-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
}

.pos-filter-cell .pos-form-label {
  min-width: 90px;
  font-size: 12px;
}

.pos-filter-cell .pos-form-input,
.pos-filter-cell .pos-form-select {
  font-size: 13px;
  height: 26px;
  padding: 3px 6px;
  flex: 1;
  min-width: 0;
}

.pos-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding: 4px 0 0;
}

.pos-form-row {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  gap: 8px;
}

.pos-form-label {
  font: bold 14px Arial, sans-serif;
  color: #000;
  min-width: 120px;
  text-align: right;
  white-space: nowrap;
}

.pos-form-input {
  font: 16px Arial, sans-serif;
  border: #ccc 1px solid;
  border-radius: 4px;
  padding: 6px 8px;
  color: #000;
  background: #fff;
  height: 30px;
  box-sizing: border-box;
  outline: none;
  flex: 1;
  min-width: 120px;
}

.pos-form-select {
  font: 16px Arial, sans-serif;
  border: #ccc 1px solid;
  border-radius: 4px;
  padding: 6px 8px;
  color: #000;
  background: #fff;
  height: 30px;
  box-sizing: border-box;
  outline: none;
}

/* --- Tab Bar (Pattern 3 - New Order) --- */
.pos-tab-bar {
  display: flex;
  background: #e8e8e8;
  border-bottom: #ababab 1px solid;
  padding: 4px 8px 0 8px;
  gap: 4px;
}

.pos-tab {
  background-color: #c8c8c8;
  background-image: url('../assets/images/button.jpg');
  background-size: 100% 100%;
  border: #ababab 1px solid;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 6px 14px;
  font: bold 14px Arial, sans-serif;
  color: #6a6a6a;
  text-shadow: 0px 2px #eee;
  cursor: pointer;
  height: 30px;
  line-height: 16px;
  box-sizing: border-box;
  white-space: nowrap;
}

.pos-tab:hover {
  opacity: 0.9;
}

.pos-tab.active {
  background-color: #fff;
  background-image: none;
  color: #000;
  text-shadow: none;
  border-bottom: 1px solid #fff;
  margin-bottom: -1px;
}

/* --- Footer Bar (Pattern 3 - Totals) --- */
.pos-footer-bar {
  background: #c8c8c8 url('../assets/images/button.jpg');
  background-size: 100% 100%;
  border-top: #ababab 1px solid;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.pos-footer-bar label {
  font: bold 14px Arial, sans-serif;
  color: #6a6a6a;
  text-shadow: 0 2px #eee;
  white-space: nowrap;
}

.pos-footer-bar input {
  font: 16px Arial, sans-serif;
  border: #ccc 1px solid;
  border-radius: 4px;
  padding: 4px 6px;
  color: #000;
  background: #fff;
  height: 26px;
  box-sizing: border-box;
  width: 90px;
  outline: none;
}

/* --- Dynamic page container --- */
#viewPage {
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* --- Sub-page content wrapper --- */
.pos-subpage {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.pos-subpage-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ============================================================
   MODAL OVERLAY (New Order Step 1)
   ============================================================ */
.pos-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pos-modal {
  background: #333;
  color: #fff;
  border-radius: 8px;
  padding: 20px;
  min-width: 400px;
}

.pos-modal h3 {
  text-align: center;
  margin-bottom: 16px;
  border-bottom: 1px solid #555;
  padding-bottom: 8px;
  font: bold 18px Arial, sans-serif;
}

.pos-modal .pos-form-row {
  padding: 8px 0;
}

.pos-modal .pos-form-label {
  color: #fff;
  min-width: 140px;
}

.pos-modal .pos-form-input,
.pos-modal .pos-form-select {
  background: #222;
  color: #fff;
  border-color: #555;
}

/* ============================================================
   NEW ORDER WIZARD STEPS
   ============================================================ */
.pos-step-header {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: #e8e8e8;
  border-bottom: #ababab 1px solid;
  gap: 8px;
}

.pos-step-header h4 {
  flex: 1;
  margin: 0;
  font: bold 16px Arial, sans-serif;
  color: #000;
}

.pos-step-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
}

.pos-split-layout {
  display: flex;
  gap: 16px;
  height: 100%;
}

.pos-split-left {
  flex: 1;
  overflow-y: auto;
  border-right: 1px solid #e0e0e0;
  padding-right: 16px;
}

.pos-split-right {
  flex: 1;
  overflow-y: auto;
}

fieldset.pos-fieldset {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 12px;
  margin: 0 0 12px 0;
}

fieldset.pos-fieldset legend {
  font: bold 14px Arial, sans-serif;
  color: #333;
  padding: 0 6px;
}

.pos-form-textarea {
  font: 16px Arial, sans-serif;
  border: #ccc 1px solid;
  border-radius: 4px;
  padding: 6px 8px;
  color: #000;
  background: #fff;
  box-sizing: border-box;
  outline: none;
  flex: 1;
  min-width: 120px;
  min-height: 60px;
  resize: vertical;
}

.pos-item-grid-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pos-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #c00;
  padding: 2px 6px;
}

.pos-icon-btn:hover {
  color: #f00;
}

.pos-icon-btn.edit-btn {
  color: #06c;
}

.pos-icon-btn.edit-btn:hover {
  color: #09f;
}

.pos-payment-summary {
  display: flex;
  gap: 20px;
  padding: 12px;
  font: bold 14px Arial, sans-serif;
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
  margin-top: 8px;
}

.pos-payment-summary span {
  color: #333;
}

.pos-checkout-summary {
  padding: 12px;
  font: 14px Arial, sans-serif;
}

.pos-checkout-summary table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.pos-checkout-summary th {
  text-align: left;
  font-weight: bold;
  padding: 4px 8px;
  color: #333;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
}

.pos-checkout-summary td {
  padding: 4px 8px;
  border-bottom: 1px solid #eee;
}

.pos-tab-save-draft {
  color: #c00;
  font: bold 14px Arial, sans-serif;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 14px;
  margin-left: auto;
}

.pos-tab-new-order {
  font: bold 14px Arial, sans-serif;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 14px;
  color: #333;
}

@media (max-width: 768px) {
  .pos-sidebar {
    width: 280px;
    min-width: 280px;
  }
  .pos-topbar .user-info {
    font-size: 11px;
  }
  .pos-topbar .btn-lang {
    font-size: 11px;
    padding: 3px 5px;
  }
}

/* ============================================================
   CHECKOUT STEP 6 - Three Column Layout
   ============================================================ */
.pos-checkout-3col {
  display: flex;
  gap: 12px;
  padding: 12px;
}
.pos-checkout-3col > div {
  flex: 1;
}
.pos-checkout-fieldset {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 8px;
}
.pos-checkout-fieldset legend {
  font: bold 14px Arial;
  color: #333;
  padding: 0 6px;
}
.pos-checkout-row {
  display: flex;
  align-items: center;
  padding: 3px 0;
}
.pos-checkout-label {
  font: bold 12px Arial;
  color: #333;
  min-width: 100px;
  text-align: right;
  padding-right: 8px;
}
.pos-checkout-value {
  font: 12px Arial;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 3px 6px;
  flex: 1;
  background: #fff;
}
.pos-checkout-value[readonly] {
  background: #f8f8f8;
}

/* ============================================================
   PRINT DOCUMENT STYLES
   ============================================================ */

.print-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #e8e8e8;
  border-bottom: #ababab 1px solid;
}

/* A4 Paper-like preview container */
.print-doc {
  max-width: 210mm;
  min-height: 297mm;
  margin: 10px auto;
  padding: 40px 45px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 9pt;
  color: #000;
  line-height: 1.4;
}

.print-doc hr {
  border: none;
  border-top: 1px solid #000;
  margin: 8px 0;
}

.print-doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8pt;
}

.print-doc table th {
  background: #eee;
  border: 0.5px solid #999;
  padding: 3px 5px;
  font-weight: bold;
  text-align: left;
  font-size: 7pt;
}

.print-doc table td {
  border-bottom: 0.5px solid #ddd;
  padding: 3px 5px;
  font-size: 8pt;
}

.print-header-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
}

.print-header-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}

.print-header-left img {
  width: 55px;
  height: auto;
}

.print-company-info {
  font-size: 7pt;
  line-height: 1.5;
}

.print-company-name {
  font-size: 12pt;
  font-weight: bold;
  margin-bottom: 2px;
}

.print-header-right {
  text-align: right;
  min-width: 200px;
}

.print-so-title {
  font-size: 14pt;
  font-weight: bold;
  color: #4CAF50;
  margin-bottom: 4px;
}

.print-inv-title {
  font-size: 18pt;
  font-weight: bold;
  text-align: center;
  margin: 5px 0;
}

.print-order-info {
  font-size: 8pt;
  line-height: 1.6;
}

.print-order-info td {
  border: none;
  padding: 1px 0;
  font-size: 8pt;
}

.print-boxes {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.print-box {
  flex: 1;
  border: 1px solid #000;
  padding: 6px 8px;
  font-size: 7.5pt;
  line-height: 1.6;
}

.print-box-title {
  font-weight: bold;
  font-size: 8pt;
  margin-bottom: 3px;
}

.print-totals {
  text-align: right;
  margin: 8px 0;
  font-size: 8pt;
  font-weight: bold;
}

.print-totals table {
  margin-left: auto;
  width: auto;
}

.print-totals td {
  border: none;
  padding: 2px 5px;
  font-size: 8pt;
}

.print-totals .net-total {
  font-size: 9pt;
  border-top: 1px solid #000;
}

.print-signature-row {
  display: flex;
  margin-top: 15px;
}

.print-signature-left {
  flex: 1;
}

.print-signature-right {
  width: 220px;
  border: 1px solid #000;
  padding: 6px 8px;
  font-size: 8pt;
}

.print-nb {
  font-size: 7pt;
  margin-top: 15px;
  line-height: 1.5;
}

.print-copy-label {
  font-size: 8pt;
  text-align: right;
}

/* ============================================================
   PRINT MEDIA QUERY
   ============================================================ */

@media print {
  /* Hide everything except the print area */
  body * {
    visibility: hidden;
  }

  #printArea, #printArea * {
    visibility: visible;
  }

  #printArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: Helvetica, Arial, sans-serif !important;
    font-size: 9pt !important;
  }

  .print-toolbar {
    display: none !important;
  }

  .pos-topbar,
  .pos-sidebar,
  .pos-tab-bar,
  .pos-step-header,
  .pos-footer-bar {
    display: none !important;
  }

  .print-doc {
    max-width: 100%;
    margin: 0;
    padding: 15mm;
    box-shadow: none;
    min-height: auto;
  }

  .print-doc table {
    page-break-inside: auto;
  }

  .print-doc table tr {
    page-break-inside: avoid;
  }

  @page {
    size: A4;
    margin: 10mm;
  }
}
