* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background-color: #f0f2f5; color: #1c1e21; height: 100vh; overflow: hidden; }
.app-viewport { display: table; width: 100%; height: calc(100vh - 60px); table-layout: fixed; }
.app-row { display: table-row; }
.sidebar { display: table-cell; width: 130px; background-color: #ffffff; border-right: 1px solid #e4e6eb; vertical-align: top; padding-top: 20px; }
.category-btn { display: block; width: 100%; padding: 18px 8px; text-align: center; cursor: pointer; color: #606770; font-size: 13px; font-weight: 600; border-left: 4px solid transparent; }
.category-btn i { display: block; font-size: 22px; margin-bottom: 6px; }
.category-btn.active { background-color: #e6f2ff; color: #0056b3; border-left-color: #0056b3; }
.main-content { display: table-cell; vertical-align: top; background-color: #f0f2f5; }
.top-bar { height: 60px; background-color: #ffffff; border-bottom: 1px solid #e4e6eb; padding: 0 20px; line-height: 60px; }
.search-bar { width: 200px; padding: 9px 15px; border: 1px solid #ccd0d5; border-radius: 20px; font-size: 13px; outline: none; background-color: #f5f6f7; display: inline-block; }
.lang-select-wrapper { display: inline-block; margin-left: 15px; vertical-align: middle; }
.lang-select { padding: 6px 10px; border-radius: 8px; border: 1px solid #cbd5e1; font-size: 13px; font-weight: 600; cursor: pointer; }
.operator-info { float: right; font-weight: 600; color: #606770; font-size: 14px; }
.product-area { height: calc(100vh - 120px); padding: 15px; overflow-y: auto; text-align: left; }
.product-card { display: inline-block; width: 140px; height: 140px; background-color: #ffffff; border-radius: 12px; padding: 12px; text-align: center; cursor: pointer; margin: 8px; vertical-align: top; border: 1px solid #e4e6eb; }
.product-card:active { transform: scale(0.96); background-color: #f8f9fa; }
.product-icon { font-size: 28px; margin-bottom: 6px; }
.product-name { font-size: 13px; font-weight: 600; color: #1c1e21; line-height: 1.2; margin-bottom: 6px; height: 34px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-price { font-size: 14px; font-weight: 700; color: #0056b3; }
.cart-panel { display: table-cell; width: 420px; background-color: #ffffff; border-left: 1px solid #e4e6eb; vertical-align: top; }
.cart-inner-container { display: table; width: 100%; height: calc(100vh - 60px); }
.cart-header-row { display: table-row; height: 60px; }
.cart-items-row { display: table-row; }
.cart-checkout-row { display: table-row; height: 260px; }
.cart-header { padding: 12px 15px; border-bottom: 1px solid #e4e6eb; }
.cart-header h2 { font-size: 15px; display: inline-block; line-height: 36px; }

/* 👤 顾客头像高质感按钮 */
.customer-avatar-btn { display: inline-block; vertical-align: middle; padding: 4px 10px; background: #e0e7ff; border: 1px solid #c7d2fe; color: #3730a3; font-size: 12px; font-weight: 700; border-radius: 15px; cursor: pointer; margin-left: 5px; }
.customer-avatar-btn:active { background: #c7d2fe; }

.clear-btn { float: right; color: #dc3545; cursor: pointer; font-size: 13px; font-weight: 600; line-height: 36px; }
.cart-items-cell { padding: 10px 20px; overflow-y: auto; max-height: calc(100vh - 380px); display: block; }
.cart-item { display: block; padding: 12px; border-bottom: 1px dashed #e4e6eb; background-color: #ffffff; border-radius: 8px; margin-bottom: 8px; border: 1px solid #e4e6eb; }
.item-main-row { width: 100%; display: block; height: 36px; }
.item-info { float: left; width: 180px; }
.item-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-price-unit { font-size: 13px; color: #2563eb; }
.item-controls { float: left; margin-left: 10px; }
.qty-btn { display: inline-block; width: 26px; height: 26px; border-radius: 50%; background-color: #f0f2f5; border: 1px solid #ccd0d5; text-align: center; line-height: 24px; cursor: pointer; font-weight: bold; }
.item-qty { display: inline-block; font-size: 14px; min-width: 22px; text-align: center; }
.item-total { float: right; font-size: 15px; font-weight: 700; line-height: 30px; }
.item-staff-row { margin-top: 6px; font-size: 12px; color: #4b5563; background-color: #f1f5f9; padding: 4px 8px; border-radius: 4px; display: inline-block; }
.checkout-area { background-color: #f8f9fa; padding: 20px; border-top: 1px solid #e4e6eb; height: 100%; }
.summary-line { display: block; margin-bottom: 6px; font-size: 14px; color: #606770; height: 20px; }
.summary-line span:last-child { float: right; }
.summary-line.total { font-size: 21px; font-weight: 800; margin-top: 10px; padding-top: 10px; border-top: 1px solid #ccd0d5; margin-bottom: 12px; height: 35px; }
.summary-line.total span:last-child { float: right; color: #00b159; }
.action-btn-table { display: table; width: 100%; table-layout: fixed; }
.action-btn-cell { display: table-cell; vertical-align: top; }
.pay-btn { width: 100%; background-color: #00b159; color: white; border: none; padding: 14px; font-size: 16px; font-weight: 700; border-radius: 12px; cursor: pointer; }
.hold-action-btn { width: 100%; background-color: #3b82f6; color: white; border: none; padding: 14px; font-size: 15px; font-weight: 700; border-radius: 12px; cursor: pointer; }
.util-btn-table { display: table; width: 100%; margin-top: 10px; table-layout: fixed; }
.util-btn-cell { display: table-cell; padding: 0 4px; }
.util-btn-cell:first-child { padding-left: 0; }
.util-btn-cell:last-child { padding-right: 0; }
.util-action-btn { width: 100%; background-color: #ffffff; color: #4b5563; border: 1px solid #cbd5e1; padding: 10px 0; font-size: 13px; font-weight: 600; border-radius: 8px; cursor: pointer; }
.util-action-btn.drawer-btn { color: #d97706; border-color: #fcd34d; background-color: #fffbdf; }
.bottom-order-bar { position: fixed; bottom: 0; left: 0; right: 0; height: 60px; background-color: #1e293b; padding: 10px 20px; }
.bottom-bar-table { display: table; width: 100%; height: 100%; table-layout: fixed; }
.bottom-bar-row { display: table-row; }
.quick-list-cell { display: table-cell; vertical-align: middle; text-align: left; overflow-x: auto; white-space: nowrap; }
.more-btn-cell { display: table-cell; width: 140px; vertical-align: middle; text-align: right; }
.quick-hold-btn { display: inline-block; background-color: #334155; color: #cbd5e1; border: 1px solid #475569; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 700; margin-right: 8px; cursor: pointer; }
.more-orders-btn { background-color: #f59e0b; color: #ffffff; border: none; padding: 8px 12px; border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer; }
.sys-toast { position: fixed; top: -50px; left: 50%; transform: translateX(-50%); background-color: #1e293b; color: #ffffff; padding: 10px 24px; border-radius: 20px; font-size: 14px; transition: top 0.3s; z-index: 4000; }
.sys-toast.show { top: 20px; }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); display: table; width: 100%; height: 100%; z-index: 3000; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-wrapper-cell { display: table-cell; vertical-align: middle; text-align: center; }
.modal-box { display: inline-block; background-color: #ffffff; width: 660px; border-radius: 16px; padding: 22px; text-align: left; vertical-align: middle; }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 12px; border-bottom: 1px solid #e2e8f0; padding-bottom: 8px; }
.price-display-wrapper { background-color: #f1f5f9; border: 2px solid #cbd5e1; border-radius: 10px; padding: 8px 14px; margin-bottom: 15px; text-align: right; }
.price-screen-label { font-size: 11px; color: #64748b; display: block; }
.price-screen-val { font-size: 28px; font-weight: 800; font-family: monospace; }
.modal-split-table { display: table; width: 100%; table-layout: fixed; }
.modal-split-row { display: table-row; }
.modal-split-cell { display: table-cell; vertical-align: top; }
.section-label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 10px; background: #f8fafc; padding: 4px 8px; border-left: 3px solid #2563eb; }
.staff-grid-box { padding-right: 12px; }
.staff-btn { display: block; width: 100%; padding: 11px 6px; margin-bottom: 6px; background-color: #f8fafc; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.staff-btn.active { background-color: #2563eb; color: #ffffff; border-color: #1d4ed8; }
.numpad-grid-box { padding-left: 12px; text-align: center; }
.numpad-btn { display: inline-block; width: 29%; height: 48px; margin: 1.5%; background-color: #ffffff; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 18px; font-weight: 800; cursor: pointer; line-height: 46px; }
.numpad-btn.action-clear { background-color: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.modal-footer-buttons { display: table; width: 100%; margin-top: 20px; table-layout: fixed; }
.modal-footer-cell { display: table-cell; padding: 0 4px; }
.modal-btn { width: 100%; padding: 12px 0; font-size: 14px; font-weight: 700; border-radius: 8px; cursor: pointer; border: none; }
.modal-btn.cancel { background-color: #e2e8f0; color: #475569; }
.modal-btn.confirm { background-color: #2563eb; color: #ffffff; }
.filter-tab-table { display: table; width: 100%; table-layout: fixed; margin-bottom: 12px; }
.filter-tab-cell { display: table-cell; padding: 0 4px; }
.tab-filter-btn { width: 100%; padding: 10px 0; font-size: 13px; font-weight: 700; border: 1px solid #cbd5e1; background-color: #f8fafc; border-radius: 6px; cursor: pointer; }
.tab-filter-btn.active { background-color: #1e293b; color: #ffffff; border-color: #1e293b; }
.orders-list-scrollway { max-height: 340px; overflow-y: auto; }
.receipt-log-card { background-color: #f8fafc; border: 1px solid #cbd5e1; border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.badge-status { display: inline-block; padding: 3px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; float: right; }
.badge-status.paid { background-color: #dcfce7; color: #166534; }
.badge-status.unpaid { background-color: #fef3c7; color: #92400e; }
.log-item-line { font-size: 12px; color: #475569; margin: 4px 0; }
.log-action-bar { border-top: 1px dashed #cbd5e1; margin-top: 8px; padding-top: 8px; text-align: right; }
.btn-recall { background-color: #3b82f6; color: #ffffff; border: none; padding: 5px 12px; font-size: 12px; font-weight: 700; border-radius: 4px; cursor: pointer; }

/* v5.3 新增：CRM 客户档案表单渲染排版样式 */
.crm-form-table { display: table; width: 100%; table-layout: fixed; text-align: left; }
.crm-form-row { display: table-row; }
.crm-form-cell { display: table-cell; vertical-align: top; }
.crm-form-table label { display: block; font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 5px; }
.crm-input { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; color: #0f172a; outline: none; }
.crm-input:focus { border-color: #2563eb; }
.crm-select { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; background-color: #f8fafc; outline: none; }
.crm-textarea { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; resize: none; outline: none; font-family: inherit; }

@media print {
    body { background: #ffffff !important; color: #000000 !important; height: auto !important; overflow: visible !important; }
    .sidebar, .main-content, .cart-header, .clear-btn, .item-controls, .pay-btn, .util-btn-table, .modal-overlay, .lang-select-wrapper, .bottom-order-bar { display: none !important; }
    .cart-panel { width: 100% !important; border: none !important; box-shadow: none !important; position: absolute; top: 0; left: 0; padding: 0 !important; }
    .cart-items-cell { overflow: visible !important; padding: 0 !important; max-height: none !important; }
    .cart-item { border-bottom: 1px dashed #000000 !important; padding: 8px 0 !important; background: transparent !important; margin-bottom: 0; border-radius: 0; border: none !important; }
    .checkout-area { border-top: 1px solid #000000 !important; background: transparent !important; padding: 10px 0 !important; }
    .cart-panel::before { content: "✨ GO GO SYS SALON & SPA ✨\\A纽约法拉盛中心\\A--------------------------------"; white-space: pre-wrap; text-align: center; display: block; font-weight: bold; margin-bottom: 15px; font-size: 14px; }
    .checkout-area::after { content: "--------------------------------\\A谢谢惠顾，欢迎下次光临！\\A Powered by Go Go Sys ..."; white-space: pre-wrap; text-align: center; display: block; margin-top: 20px; font-size: 12px; }
}