/* POS Interface Styles - Touch Friendly */

/* ===== Fullscreen Override for Frappe ===== */
.pos-page .navbar,
.pos-page .web-footer,
.pos-page .footer,
.pos-page footer,
.pos-page .page-header,
.pos-page .page-head,
.pos-page header.navbar {
    display: none !important;
}

.pos-page .main-section,
.pos-page .container,
.pos-page .web-content,
.pos-page .page-content,
.pos-page main,
.pos-page .page-container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

.pos-page body {
    padding-top: 0 !important;
}

/* ===== Start Screen ===== */
.pos-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    overflow-y: auto;
}

.pos-start {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 60px 20px 40px;
}

.pos-logo {
    text-align: center;
    margin-bottom: 48px;
}

.pos-logo h1 {
    font-size: 2.5rem;
    color: #fff;
    margin: 0;
    font-weight: 700;
}

.pos-logo p {
    color: #cbd5e1;
    margin-top: 8px;
    font-size: 1.1rem;
}

/* Profile Selection Grid */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    max-width: 900px;
    width: 100%;
}

.profile-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.profile-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.profile-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.profile-card h3 {
    color: #fff;
    font-size: 1.25rem;
    margin: 0 0 8px 0;
}

.profile-card .price-list {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Session Card */
.session-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
}

.session-card h2 {
    color: #4ade80;
    margin: 0 0 24px 0;
}

.session-info {
    margin-bottom: 24px;
}

.session-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.session-info .label {
    color: #94a3b8;
}

.session-info .value {
    color: #fff;
    font-weight: 500;
}

/* POS Footer */
.pos-footer {
    margin-top: 48px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.pos-footer .operator {
    color: #64748b;
    font-size: 0.9rem;
}

.pos-footer .logout-link {
    color: #ef4444;
    text-decoration: none;
    font-size: 0.9rem;
}

.pos-footer .logout-link:hover {
    text-decoration: underline;
}

/* ===== Terminal Screen ===== */
.pos-terminal {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #0f172a;
}

/* Header */
.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.session-badge {
    background: #3b82f6;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.profile-name {
    color: #94a3b8;
    font-size: 0.9rem;
}

.header-center {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: monospace;
}

.header-right {
    display: flex;
    gap: 12px;
}

.btn-header {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-header:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-header.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.btn-header.btn-danger:hover {
    background: #ef4444;
    color: #fff;
}

/* Main Body */
.terminal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Panels */
.panel {
    display: flex;
    flex-direction: column;
}

.panel-items {
    flex: 1;
    background: #1e293b;
    border-right: 1px solid #334155;
}

.panel-transaction {
    width: 400px;
    background: #0f172a;
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid #334155;
}

.panel-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
}

/* Item Grid */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    grid-auto-rows: max-content;
    align-content: start;
    align-items: start;
    gap: 12px;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.item-btn {
    background: #334155;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100px;
    align-self: start;
}

.item-btn:hover {
    background: #475569;
    border-color: #3b82f6;
}

.item-btn:active {
    transform: scale(0.98);
}

.item-btn .item-name {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
}

.item-btn .item-rate {
    color: #4ade80;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Order Section */
.order-section {
    padding: 16px 20px;
    border-bottom: 1px solid #334155;
}

.order-section label {
    color: #94a3b8;
    font-size: 0.85rem;
    display: inline;
    margin-bottom: 8px;
}

.order-input-group {
    position: relative;
}

.order-section input {
    width: 100%;
    padding: 12px 16px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

.order-section input:focus {
    outline: none;
    border-color: #3b82f6;
}

.order-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

.order-result {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #334155;
}

.order-result:last-child {
    border-bottom: none;
}

.order-result:hover {
    background: #334155;
}

.order-result .order-id {
    color: #3b82f6;
    font-weight: 600;
    display: inline;
}

.order-result .order-details {
    color: #94a3b8;
    font-size: 0.85rem;
}

.no-results {
    padding: 12px 16px;
    color: #64748b;
    text-align: center;
}

.selected-order {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #334155;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 8px;
}

.selected-order .order-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.selected-order .order-id {
    color: #3b82f6;
    font-weight: 600;
    font-size: 1.1rem;
}

.selected-order .order-supplier {
    color: #fff;
}

.selected-order .order-plate {
    color: #94a3b8;
    font-size: 0.85rem;
}

.clear-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
}

.clear-btn:hover {
    color: #ef4444;
}

/* Cart Section */
.cart-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #334155;
}

.cart-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
}

.clear-cart-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
}

.cart-empty {
    color: #64748b;
    text-align: center;
    padding: 60px 20px 40px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #1e293b;
    border-radius: 8px;
    margin-bottom: 8px;
}

.cart-item.overridden {
    border-left: 3px solid #f59e0b;
}

.cart-item .item-info {
    flex: 1;
}

.cart-item .item-name {
    color: #fff;
    display: inline;
    font-weight: 500;
}

.cart-item .item-details {
    color: #64748b;
    font-size: 0.85rem;
}

.cart-item .override-badge {
    display: inline-block;
    background: #f59e0b;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
}

.cart-item .item-amount {
    color: #4ade80;
    font-weight: 600;
    font-size: 1rem;
}

.cart-item .remove-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 1.1rem;
    border-radius: 6px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cart-item .remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.cart-item .remove-btn:active {
    transform: scale(0.95);
}

/* Totals Section */
.totals-section {
    padding: 16px 20px;
    border-top: 1px solid #334155;
    background: #1e293b;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #94a3b8;
}

.total-row.total-amount {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    border-top: 1px solid #334155;
    padding-top: 12px;
    margin-top: 4px;
}

.total-row.total-amount span:last-child {
    color: #4ade80;
}

/* Action Section */
.action-section {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: #1e293b;
    border-top: 1px solid #334155;
}

.action-section .btn-pos {
    flex: 1;
}

/* ===== Buttons ===== */
.btn-pos {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-pos:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-pos.btn-primary {
    background: #3b82f6;
    color: #fff;
}

.btn-pos.btn-primary:hover:not(:disabled) {
    background: #2563eb;
}

.btn-pos.btn-secondary {
    background: #334155;
    color: #fff;
}

.btn-pos.btn-secondary:hover:not(:disabled) {
    background: #475569;
}

.btn-pos.btn-success {
    background: #22c55e;
    color: #fff;
}

.btn-pos.btn-success:hover:not(:disabled) {
    background: #16a34a;
}

.btn-pos.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-pos.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-pos.btn-large {
    padding: 18px 32px;
    font-size: 1.1rem;
}

/* ===== Modals ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1e293b;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow: hidden;
}

.modal-content.modal-large {
    max-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #334155;
}

.modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 4px;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #334155;
    justify-content: flex-end;
}

/* Weight Modal */
.weight-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.weight-display input {
    flex: 1;
    padding: 16px;
    font-size: 2rem;
    text-align: center;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 12px;
    color: #fff;
}

.weight-display input:focus {
    outline: none;
    border-color: #3b82f6;
}

.weight-uom {
    color: #94a3b8;
    font-size: 1.25rem;
    font-weight: 500;
}

.rate-display {
    margin-bottom: 20px;
}

.rate-display label {
    color: #94a3b8;
    font-size: 0.85rem;
    display: inline;
    margin-bottom: 8px;
}

.rate-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
}

.rate-input-group input {
    width: 120px;
    padding: 12px;
    font-size: 1.25rem;
    text-align: center;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #fff;
}

.rate-input-group input:focus {
    outline: none;
    border-color: #3b82f6;
}

.override-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    cursor: pointer;
    color: #f59e0b;
}

.override-label input {
    width: 18px;
    height: 18px;
}

.override-section {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.override-section label {
    color: #fbbf24;
    font-size: 0.85rem;
    display: inline;
    margin-bottom: 8px;
}

.override-section input {
    width: 100%;
    padding: 12px;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 8px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #fff;
}

.amount-preview {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    background: #0f172a;
    border-radius: 8px;
    font-size: 1.25rem;
}

.amount-preview span:first-child {
    color: #94a3b8;
}

.amount-preview span:last-child {
    color: #4ade80;
    font-weight: 600;
}

/* Summary Stats */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-card {
    background: #0f172a;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    display: inline;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.stat-label {
    color: #64748b;
    font-size: 0.9rem;
}

/* Close Summary */
.close-summary {
    background: #0f172a;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
}

.close-summary p {
    margin: 8px 0;
    color: #94a3b8;
}

.close-summary strong {
    color: #fff;
}

/* Error Screen */
.pos-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 40px;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 24px;
}

.pos-error h2 {
    color: #ef4444;
    margin: 0 0 16px 0;
}

.pos-error p {
    color: #94a3b8;
    margin-bottom: 24px;
}

/* No Profiles */
.no-profiles {
    text-align: center;
    color: #64748b;
    padding: 40px;
}

/* ===== Light Theme ===== */
.pos-terminal.light-theme {
    background: #f1f5f9;
}

.pos-terminal.light-theme .terminal-header {
    background: #fff;
    border-bottom-color: #e2e8f0;
}

.pos-terminal.light-theme .session-badge {
    background: #3b82f6;
}

.pos-terminal.light-theme .profile-name {
    color: #64748b;
}

.pos-terminal.light-theme .header-center {
    color: #1e293b;
}

.pos-terminal.light-theme .btn-header {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #1e293b;
}

.pos-terminal.light-theme .btn-header:hover {
    background: #e2e8f0;
}

.pos-terminal.light-theme .btn-header.btn-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.pos-terminal.light-theme .panel-items {
    background: #fff;
    border-right-color: #e2e8f0;
}

.pos-terminal.light-theme .panel-transaction {
    background: #f8fafc;
}

.pos-terminal.light-theme .panel-header {
    border-bottom-color: #e2e8f0;
}

.pos-terminal.light-theme .panel-header h2 {
    color: #1e293b;
}

.pos-terminal.light-theme .item-btn {
    background: #f1f5f9;
    border-color: transparent;
}

.pos-terminal.light-theme .item-btn:hover {
    background: #e2e8f0;
    border-color: #3b82f6;
}

.pos-terminal.light-theme .item-btn .item-name {
    color: #1e293b;
}

.pos-terminal.light-theme .order-section label {
    color: #64748b;
}

.pos-terminal.light-theme .order-section input {
    background: #fff;
    border-color: #e2e8f0;
    color: #1e293b;
}

.pos-terminal.light-theme .order-results {
    background: #fff;
    border-color: #e2e8f0;
}

.pos-terminal.light-theme .order-result {
    border-bottom-color: #e2e8f0;
}

.pos-terminal.light-theme .order-result:hover {
    background: #f1f5f9;
}

.pos-terminal.light-theme .order-result .order-details {
    color: #64748b;
}

.pos-terminal.light-theme .order-details-card {
    background: #fff;
    border-color: #e2e8f0;
}

.pos-terminal.light-theme .order-card-id {
    color: #3b82f6;
}

.pos-terminal.light-theme .detail-label {
    color: #64748b;
}

.pos-terminal.light-theme .detail-value {
    color: #1e293b;
}

.pos-terminal.light-theme .cart-header {
    border-bottom-color: #e2e8f0;
}

.pos-terminal.light-theme .cart-header h3 {
    color: #1e293b;
}

.pos-terminal.light-theme .cart-item {
    background: #fff;
}

.pos-terminal.light-theme .cart-item .item-name {
    color: #1e293b;
}

.pos-terminal.light-theme .cart-item .item-details {
    color: #64748b;
}

.pos-terminal.light-theme .totals-section {
    background: #fff;
    border-top-color: #e2e8f0;
}

.pos-terminal.light-theme .total-row {
    color: #64748b;
}

.pos-terminal.light-theme .action-section {
    background: #fff;
    border-top-color: #e2e8f0;
}

.pos-terminal.light-theme .modal-content {
    background: #fff;
}

.pos-terminal.light-theme .modal-header {
    border-bottom-color: #e2e8f0;
}

.pos-terminal.light-theme .modal-header h3 {
    color: #1e293b;
}

.pos-terminal.light-theme .modal-footer {
    border-top-color: #e2e8f0;
}

.pos-terminal.light-theme .weight-display input {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

.pos-terminal.light-theme .stat-card {
    background: #f8fafc;
}

.pos-terminal.light-theme .stat-value {
    color: #1e293b;
}

.pos-terminal.light-theme .close-summary {
    background: #f8fafc;
}

.pos-terminal.light-theme .close-summary p {
    color: #64748b;
}

.pos-terminal.light-theme .close-summary strong {
    color: #1e293b;
}

/* ===== Order Details Card ===== */
.order-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.scan-btn {
    background: #3b82f6;
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.scan-btn:hover {
    background: #2563eb;
}

.order-details-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    margin-top: 12px;
    overflow: hidden;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #334155;
    border-bottom: 1px solid #475569;
}

.order-card-id {
    font-size: 1.1rem;
    font-weight: 600;
    color: #3b82f6;
}

.order-card-body {
    padding: 12px 16px;
}

.order-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #334155;
}

.order-detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.detail-value {
    color: #fff;
    font-weight: 500;
}

/* Status Colors */
.detail-value.status-pending {
    color: #fbbf24;
}

.detail-value.status-processed {
    color: #22c55e;
}

/* Re-weight Warning */
.reweight-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 10px 16px;
    margin-top: 0;
    font-size: 0.85rem;
    border-radius: 0 0 12px 12px;
}

.pos-terminal.light-theme .reweight-warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

/* ===== Scanner Modal ===== */
.scanner-container {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    min-height: 300px;
}

/* html5-qrcode library styles */
#qr-reader {
    width: 100% !important;
    border: none !important;
}

#qr-reader video {
    width: 100% !important;
    border-radius: 12px;
}

#qr-reader__scan_region {
    background: #000;
}

#qr-reader__dashboard {
    padding: 10px !important;
}

#qr-reader__dashboard_section_swaplink {
    color: #3b82f6 !important;
    text-decoration: underline;
}

/* Hide the file scan option - we only want camera */
#qr-reader__dashboard_section_fsr {
    display: none !important;
}

.scanner-instructions {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 20px;
}

.manual-entry {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #0f172a;
    border-radius: 8px;
}

.manual-entry label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.manual-entry input {
    padding: 12px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

.manual-entry input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* ===== Remarks Modal ===== */
#remarksInput {
    width: 100%;
    padding: 16px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
}

#remarksInput:focus {
    outline: none;
    border-color: #3b82f6;
}

.pos-terminal.light-theme #remarksInput {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

/* ===== Photo Capture Modal ===== */
.camera-container {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.camera-container video,
.camera-container img {
    width: 100%;
    height: auto;
    display: inline;
    max-height: 400px;
    object-fit: contain;
}

.photo-controls {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .terminal-body {
        flex-direction: column;
    }

    .panel-items {
        border-right: none;
        border-bottom: 1px solid #334155;
        max-height: 50vh;
    }

    .panel-transaction {
        width: 100%;
    }

    .item-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .summary-stats {
        grid-template-columns: 1fr;
    }

    .action-section {
        flex-wrap: wrap;
    }

    .action-section .btn-pos {
        min-width: calc(50% - 6px);
    }
}

/* ===== Truck Weight Section ===== */
.truck-weight-section {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    margin-top: 12px;
    overflow: hidden;
}

.truck-weight-header {
    padding: 10px 16px;
    background: #334155;
    border-bottom: 1px solid #475569;
}

.truck-weight-header h4 {
    margin: 0;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
}

.truck-weight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
}

.truck-weight-card {
    background: #0f172a;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.truck-weight-card label {
    display: inline;
    color: #94a3b8;
    font-size: 0.75rem;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.truck-weight-card .weight-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.truck-weight-card.truck-weight-result .weight-value {
    color: #4ade80;
}

.btn-truck-weight {
    background: #3b82f6;
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    width: 100%;
    transition: background 0.2s ease;
}

.btn-truck-weight:hover {
    background: #2563eb;
}

/* Variance Section */
.variance-section {
    padding: 12px 16px;
    border-top: 1px solid #334155;
    background: #0f172a;
}

.variance-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.variance-value {
    font-weight: 600;
}

.variance-value.variance-ok {
    color: #22c55e;
}

.variance-value.variance-warning {
    color: #f59e0b;
}

.variance-value.variance-error {
    color: #ef4444;
}

/* Truck Weight Hint in Modal */
.truck-weight-hint {
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 12px;
}

/* Light Theme for Truck Weight */
.pos-terminal.light-theme .truck-weight-section {
    background: #fff;
    border-color: #e2e8f0;
}

.pos-terminal.light-theme .truck-weight-header {
    background: #f1f5f9;
    border-bottom-color: #e2e8f0;
}

.pos-terminal.light-theme .truck-weight-header h4 {
    color: #1e293b;
}

.pos-terminal.light-theme .truck-weight-card {
    background: #f8fafc;
}

.pos-terminal.light-theme .truck-weight-card label {
    color: #64748b;
}

.pos-terminal.light-theme .truck-weight-card .weight-value {
    color: #1e293b;
}

.pos-terminal.light-theme .variance-section {
    background: #f8fafc;
    border-top-color: #e2e8f0;
}

.pos-terminal.light-theme .variance-row {
    color: #64748b;
}

/* ===== Truck Weight Screen (Fullscreen) ===== */

/* Header styles for operator name and truck button */
.operator-name {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid #334155;
}

.btn-truck-scale {
    background: #059669 !important;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 16px;
}

.btn-truck-scale:hover {
    background: #047857 !important;
}

.truck-icon {
    font-size: 1.2rem;
}

/* Truck Weight Fullscreen */
.truck-weight-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.truck-weight-screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #0f172a;
    border-bottom: 1px solid #334155;
}

.truck-weight-screen-header h2 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
}

.btn-back {
    background: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #1e293b;
    color: #fff;
}

.operator-badge {
    background: #334155;
    color: #94a3b8;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Order Search in Truck Weight Screen */
.truck-order-search {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex: 1;
    padding: 40px;
}

.truck-order-search .search-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
}

.truck-order-search h3 {
    color: #fff;
    margin: 0 0 24px 0;
    text-align: center;
}

.truck-order-search .search-row {
    display: flex;
    gap: 12px;
}

.truck-order-search input {
    flex: 1;
    padding: 16px 20px;
    font-size: 1.1rem;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 10px;
    color: #fff;
}

.truck-order-search input:focus {
    outline: none;
    border-color: #3b82f6;
}

.truck-order-search .order-results {
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
}

/* Truck Weight Content */
.truck-weight-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.truck-order-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.truck-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.truck-order-id {
    color: #4ade80;
    font-size: 1.25rem;
    font-weight: 600;
}

.btn-clear-order {
    background: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-clear-order:hover {
    background: #1e293b;
    color: #fff;
}

.truck-order-info {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.truck-order-info .info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.truck-order-info .info-label {
    color: #64748b;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.truck-order-info .info-value {
    color: #fff;
    font-size: 1rem;
}

/* Weight Cards */
.truck-weight-recording {
    max-width: 1000px;
    margin: 0 auto;
}

.weight-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.weight-card {
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.weight-card.gross-card {
    border-color: #3b82f6;
}

.weight-card.tare-card {
    border-color: #8b5cf6;
}

.weight-card.net-card {
    border-color: #22c55e;
    background: #0f172a;
}

.weight-card-header {
    color: #cbd5e1;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.weight-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.weight-card-value.large {
    font-size: 2.5rem;
    color: #4ade80;
}

.weight-card-time {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 16px;
    min-height: 1.2em;
}

.weight-card-label {
    color: #64748b;
    font-size: 0.85rem;
}

.btn-record {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
}

/* Variance Box */
.variance-box {
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.variance-box .variance-header {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.variance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.variance-item {
    text-align: center;
    padding: 16px;
    background: #1e293b;
    border-radius: 8px;
}

.variance-item.variance-result {
    background: #0f172a;
    border: 2px solid #334155;
}

.variance-label {
    display: inline;
    color: #64748b;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.variance-val {
    display: inline;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
}

.variance-val.variance-ok {
    color: #22c55e;
}

.variance-val.variance-warning {
    color: #f59e0b;
}

.variance-val.variance-error {
    color: #ef4444;
}

.variance-status {
    text-align: center;
    margin-top: 16px;
    font-size: 1rem;
}

.variance-status .status-ok {
    color: #22c55e;
}

.variance-status .status-warning {
    color: #f59e0b;
}

.variance-status .status-error {
    color: #ef4444;
}

/* Scrap Summary Box */
.scrap-summary-box {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
}

.scrap-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #334155;
}

.scrap-count {
    background: #3b82f6;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.scrap-summary-list {
    max-height: 150px;
    overflow-y: auto;
}

.scrap-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #1e293b;
}

.scrap-name {
    color: #94a3b8;
    font-size: 0.9rem;
}

.scrap-weight {
    color: #fff;
    font-weight: 500;
}

.scrap-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid #334155;
    color: #fff;
    font-weight: 600;
}

/* Light Theme Support for Truck Weight Screen */
.pos-terminal.light-theme .operator-name {
    color: #64748b;
    border-left-color: #e2e8f0;
}

.pos-terminal.light-theme .truck-weight-screen {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.pos-terminal.light-theme .truck-weight-screen-header {
    background: #fff;
    border-bottom-color: #e2e8f0;
}

.pos-terminal.light-theme .truck-weight-screen-header h2 {
    color: #1e293b;
}

.pos-terminal.light-theme .btn-back {
    border-color: #cbd5e1;
    color: #64748b;
}

.pos-terminal.light-theme .btn-back:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.pos-terminal.light-theme .operator-badge {
    background: #e2e8f0;
    color: #64748b;
}

.pos-terminal.light-theme .truck-order-search .search-container {
    background: #fff;
    border-color: #e2e8f0;
}

.pos-terminal.light-theme .truck-order-search h3 {
    color: #1e293b;
}

.pos-terminal.light-theme .truck-order-search input {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

.pos-terminal.light-theme .truck-order-card {
    background: #fff;
    border-color: #e2e8f0;
}

.pos-terminal.light-theme .truck-order-id {
    color: #059669;
}

.pos-terminal.light-theme .truck-order-info .info-value {
    color: #1e293b;
}

.pos-terminal.light-theme .weight-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.pos-terminal.light-theme .weight-card.net-card {
    background: #fff;
}

.pos-terminal.light-theme .weight-card-value {
    color: #1e293b;
}

.pos-terminal.light-theme .variance-box {
    background: #fff;
    border-color: #e2e8f0;
}

.pos-terminal.light-theme .variance-box .variance-header {
    color: #1e293b;
}

.pos-terminal.light-theme .variance-item {
    background: #f8fafc;
}

.pos-terminal.light-theme .variance-val {
    color: #1e293b;
}

.pos-terminal.light-theme .scrap-summary-box {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.pos-terminal.light-theme .scrap-summary-header {
    color: #1e293b;
    border-bottom-color: #e2e8f0;
}

.pos-terminal.light-theme .scrap-weight {
    color: #1e293b;
}

.pos-terminal.light-theme .scrap-summary-total {
    border-top-color: #e2e8f0;
    color: #1e293b;
}

/* Mobile responsive for truck weight screen */
@media (max-width: 768px) {
    .weight-cards {
        grid-template-columns: 1fr;
    }

    .variance-grid {
        grid-template-columns: 1fr;
    }

    .truck-order-info {
        flex-direction: column;
        gap: 12px;
    }

    .truck-weight-screen-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .truck-weight-screen-header h2 {
        order: -1;
        width: 100%;
        text-align: center;
    }
}

/* ===== Language Button ===== */
.btn-lang {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f59e0b;
    border: none;
    color: #000;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-lang:hover {
    background: #d97706;
}

.pos-terminal.light-theme .btn-lang {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f59e0b;
    color: #000;
}

/* ===== Terminal Selection Grid ===== */
.session-active-label {
    color: #4ade80;
    font-size: 0.95rem;
    margin-top: 8px;
}

.terminal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: min-content;
    align-content: start;
    align-items: start;
    gap: 24px;
    max-width: 700px;
    width: 100%;
    margin-bottom: 32px;
    flex: 0 0 auto;
}

.terminal-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    transition: all 0.3s ease;
    height: fit-content;
    min-height: 200px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.terminal-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.terminal-card.scrap-terminal {
    border-color: rgba(59, 130, 246, 0.5);
}

.terminal-card.scrap-terminal:hover {
    border-color: #3b82f6;
}

.terminal-card.truck-terminal {
    border-color: rgba(34, 197, 94, 0.5);
}

.terminal-card.truck-terminal:hover {
    border-color: #22c55e;
}

.terminal-icon {
    font-size: 3rem;
    margin-bottom: 6px;
}

.terminal-card h3 {
    color: #ffffff;
    font-size: 1.4rem;
    margin: 0 0 4px 0;
    font-weight: 600;
}

.terminal-card p {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.terminal-card .btn-pos {
    width: 100%;
}

.session-info-bar {
    display: flex;
    gap: 24px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.session-info-bar .info-item {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #cbd5e1;
}

/* ===== Settings Bar ===== */
.pos-settings-bar {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-setting {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-setting:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-setting span {
    font-size: 1rem;
}

/* ===== Light Theme for Landing Page ===== */
.pos-container.light-theme {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.pos-container.light-theme .pos-start {
    background: transparent;
}

.pos-container.light-theme .pos-logo h1 {
    color: #1e293b;
}

.pos-container.light-theme .pos-logo p {
    color: #64748b;
}

.pos-container.light-theme .session-active-label {
    color: #16a34a;
}

.pos-container.light-theme .terminal-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.pos-container.light-theme .terminal-card:hover {
    background: #ffffff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.pos-container.light-theme .terminal-card h3 {
    color: #1e293b;
}

.pos-container.light-theme .terminal-card p {
    color: #64748b;
}

.pos-container.light-theme .terminal-card.scrap-terminal {
    border-color: #3b82f6;
}

.pos-container.light-theme .terminal-card.truck-terminal {
    border-color: #22c55e;
}

.pos-container.light-theme .session-info-bar .info-item {
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.pos-container.light-theme .btn-setting {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #475569;
}

.pos-container.light-theme .btn-setting:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.pos-container.light-theme .pos-footer {
    color: #64748b;
}

.pos-container.light-theme .logout-link {
    color: #dc2626;
}


.pos-container.light-theme .profile-dropdown {
    background: #ffffff;
    color: #1e293b;
    border-color: #e2e8f0;
}

.pos-container.light-theme .profile-selector {
    background: rgba(0, 0, 0, 0.03);
}

.pos-container.light-theme .profile-selector label {
    color: #475569;
}

.pos-container.light-theme .terminal-icon {
    filter: none;
}

.pos-container.light-theme .operator {
    color: #475569;
}

/* Back button small for terminal header */
.btn-back-small {
    background: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.btn-back-small:hover {
    background: #1e293b;
    color: #fff;
}

.pos-terminal.light-theme .btn-back-small {
    border-color: #cbd5e1;
    color: #64748b;
}

.pos-terminal.light-theme .btn-back-small:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* ===== Truck Terminal Page ===== */
.pos-container > .truck-terminal {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #0f172a;
}

.pos-container > .truck-terminal.light-theme {
    background: #f1f5f9;
}

.truck-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.truck-terminal.light-theme .truck-header {
    background: #fff;
    border-bottom-color: #e2e8f0;
}

.truck-header .header-center h1 {
    color: #fff;
    font-size: 1.3rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.truck-terminal.light-theme .truck-header .header-center h1 {
    color: #1e293b;
}

.truck-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.truck-search-section {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex: 1;
    padding: 40px;
}

.truck-search-section .search-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
}

.truck-terminal.light-theme .truck-search-section .search-container {
    background: #fff;
    border-color: #e2e8f0;
}

.truck-search-section h2 {
    color: #fff;
    margin: 0 0 24px 0;
    text-align: center;
}

.truck-terminal.light-theme .truck-search-section h2 {
    color: #1e293b;
}

.truck-search-section .search-row {
    display: flex;
    gap: 12px;
}

.truck-search-section input {
    flex: 1;
    padding: 16px 20px;
    font-size: 1.1rem;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 10px;
    color: #fff;
}

.truck-terminal.light-theme .truck-search-section input {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

.truck-search-section input:focus {
    outline: none;
    border-color: #3b82f6;
}

.truck-search-section .order-results {
    position: relative;
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.truck-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.order-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.truck-terminal.light-theme .order-card {
    background: #fff;
    border-color: #e2e8f0;
}

.order-card .order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #334155;
}

.truck-terminal.light-theme .order-card .order-card-header {
    border-bottom-color: #e2e8f0;
}

.order-card .order-id {
    color: #4ade80;
    font-size: 1.25rem;
    font-weight: 600;
}

.order-card .order-info {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.order-card .info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-card .info-label {
    color: #64748b;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.order-card .info-value {
    color: #fff;
    font-size: 1rem;
}

.truck-terminal.light-theme .order-card .info-value {
    color: #1e293b;
}

.weight-recording {
    max-width: 1000px;
    margin: 0 auto;
}

/* Responsive for terminal grid */
@media (max-width: 768px) {
    .terminal-grid {
        grid-template-columns: 1fr;
    }

    .terminal-card {
        padding: 40px 32px;
    }

    .terminal-icon {
        font-size: 3rem;
    }

    .session-info-bar {
        flex-direction: column;
        gap: 8px;
    }
}

/* ===== Profile Selector ===== */
.profile-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.profile-selector label {
    color: #94a3b8;
    font-size: 0.95rem;
}

.profile-dropdown {
    padding: 10px 16px;
    font-size: 1rem;
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 8px;
    color: #fff;
    min-width: 200px;
    cursor: pointer;
}

.profile-dropdown:focus {
    outline: none;
    border-color: #3b82f6;
}

.profile-dropdown option {
    background: #1e293b;
    color: #fff;
}

/* ===== Truck Scale Terminal Styles ===== */

/* Weight Panel Content */
.weight-panel-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.weight-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #64748b;
    text-align: center;
    padding: 40px;
}

.weight-empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.weight-empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

/* Weight Cards Panel */
.weight-cards-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.weight-card {
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.weight-card.gross-card {
    border-color: #3b82f6;
}

.weight-card.tare-card {
    border-color: #8b5cf6;
}

.weight-card.net-card {
    border-color: #22c55e;
    background: #0f172a;
}

.weight-card-header {
    color: #cbd5e1;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.weight-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.weight-card-value.large {
    font-size: 2.5rem;
    color: #4ade80;
}

.weight-card-time {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 16px;
    min-height: 1.2em;
}

.weight-card-label {
    color: #64748b;
    font-size: 0.85rem;
}

.btn-record {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
}

/* Variance Panel */
.variance-panel {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    margin-top: 16px;
    overflow: hidden;
}

.variance-panel .panel-header {
    padding: 12px 16px;
    background: #334155;
    border-bottom: 1px solid #475569;
}

.variance-panel .panel-header h3 {
    margin: 0;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
}

.variance-content {
    padding: 16px;
}

.variance-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #334155;
}

.variance-row:last-of-type {
    border-bottom: none;
}

.variance-row.variance-total {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #334155;
    font-weight: 600;
}

.variance-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.variance-value {
    color: #fff;
    font-weight: 500;
}

.variance-value.variance-ok {
    color: #22c55e;
}

.variance-value.variance-warning {
    color: #f59e0b;
}

.variance-value.variance-error {
    color: #ef4444;
}

.variance-status {
    text-align: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #334155;
}

.variance-status .status-ok {
    color: #22c55e;
}

.variance-status .status-warning {
    color: #f59e0b;
}

.variance-status .status-error {
    color: #ef4444;
}

/* Scrap Panel */
.scrap-panel {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    margin-top: 16px;
    overflow: hidden;
}

.scrap-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #334155;
    border-bottom: 1px solid #475569;
}

.scrap-panel .panel-header h3 {
    margin: 0;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
}

.scrap-count {
    background: #3b82f6;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.scrap-list {
    padding: 12px 16px;
    max-height: 150px;
    overflow-y: auto;
}

.scrap-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #334155;
}

.scrap-item:last-child {
    border-bottom: none;
}

.scrap-name {
    color: #94a3b8;
    font-size: 0.9rem;
}

.scrap-weight {
    color: #fff;
    font-weight: 500;
}

.scrap-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: #0f172a;
    border-top: 1px solid #334155;
    font-weight: 600;
    color: #fff;
}

/* Light Theme - Truck Scale */
.pos-terminal.light-theme .weight-empty-state {
    color: #94a3b8;
}

.pos-terminal.light-theme .weight-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.pos-terminal.light-theme .weight-card.net-card {
    background: #fff;
}

.pos-terminal.light-theme .weight-card-header {
    color: #64748b;
}

.pos-terminal.light-theme .weight-card-value {
    color: #1e293b;
}

.pos-terminal.light-theme .weight-card-time {
    color: #94a3b8;
}

.pos-terminal.light-theme .variance-panel {
    background: #fff;
    border-color: #e2e8f0;
}

.pos-terminal.light-theme .variance-panel .panel-header {
    background: #f1f5f9;
    border-bottom-color: #e2e8f0;
}

.pos-terminal.light-theme .variance-panel .panel-header h3 {
    color: #1e293b;
}

.pos-terminal.light-theme .variance-content {
    background: #fff;
}

.pos-terminal.light-theme .variance-row {
    border-bottom-color: #e2e8f0;
}

.pos-terminal.light-theme .variance-row.variance-total {
    border-top-color: #e2e8f0;
}

.pos-terminal.light-theme .variance-label {
    color: #64748b;
}

.pos-terminal.light-theme .variance-value {
    color: #1e293b;
}

.pos-terminal.light-theme .variance-status {
    border-top-color: #e2e8f0;
}

.pos-terminal.light-theme .scrap-panel {
    background: #fff;
    border-color: #e2e8f0;
}

.pos-terminal.light-theme .scrap-panel .panel-header {
    background: #f1f5f9;
    border-bottom-color: #e2e8f0;
}

.pos-terminal.light-theme .scrap-panel .panel-header h3 {
    color: #1e293b;
}

.pos-terminal.light-theme .scrap-list {
    background: #fff;
}

.pos-terminal.light-theme .scrap-item {
    border-bottom-color: #e2e8f0;
}

.pos-terminal.light-theme .scrap-name {
    color: #64748b;
}

.pos-terminal.light-theme .scrap-weight {
    color: #1e293b;
}

.pos-terminal.light-theme .scrap-total {
    background: #f8fafc;
    border-top-color: #e2e8f0;
    color: #1e293b;
}

/* Truck Weight Hint */
.truck-weight-hint {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 12px;
}

/* Action Section for Remarks and Photo */
.action-section + .action-section {
    border-top: none;
    padding-top: 0;
}

.action-section .btn-pos {
    flex: 1;
    max-width: 200px;
}

.action-section .btn-pos.has-content {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
}

.action-section .btn-pos.has-content:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Light theme action section */
.pos-terminal.light-theme .action-section {
    border-top-color: #e2e8f0;
}

/* Camera Container for Photo Modal */
.camera-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0f172a;
    border-radius: 8px;
    min-height: 300px;
    overflow: hidden;
}

.camera-container video,
.camera-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
}

.photo-controls {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 0;
}

.btn-large {
    padding: 14px 32px;
    font-size: 1.1rem;
}

/* Remarks Modal Textarea */
#remarksInput {
    width: 100%;
    padding: 12px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
}

#remarksInput:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.pos-terminal.light-theme #remarksInput {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

.pos-terminal.light-theme #remarksInput:focus {
    border-color: #3b82f6;
}

/* ===== Scale Selection Modal ===== */
.scale-instruction {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 24px;
}

.scale-scan-section {
    text-align: center;
    margin-bottom: 20px;
}

.scale-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.scale-divider::before,
.scale-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #334155;
}

.scale-divider span {
    padding: 0 16px;
    color: #64748b;
    font-size: 0.85rem;
}

.scale-select-section {
    margin-bottom: 20px;
}

.scale-select-section label {
    display: inline;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.scale-dropdown {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
}

.scale-dropdown:focus {
    outline: none;
    border-color: #3b82f6;
}

.scale-dropdown option {
    background: #1e293b;
    color: #fff;
    padding: 12px;
}

.scale-dropdown option:disabled {
    color: #64748b;
    background: #0f172a;
}

.selected-scale-info {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.scale-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #334155;
}

.scale-info-row:last-child {
    border-bottom: none;
}

.scale-info-row .info-label {
    color: #64748b;
    font-size: 0.9rem;
}

.scale-info-row .info-value {
    color: #fff;
    font-weight: 500;
}

/* Scale Badge in Header */
.scale-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #059669;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 12px;
}

.scale-icon {
    font-size: 1rem;
}

/* Light Theme Scale Modal */
.pos-terminal.light-theme .scale-instruction {
    color: #64748b;
}

.pos-terminal.light-theme .scale-divider::before,
.pos-terminal.light-theme .scale-divider::after {
    background: #e2e8f0;
}

.pos-terminal.light-theme .scale-divider span {
    color: #94a3b8;
}

.pos-terminal.light-theme .scale-select-section label {
    color: #64748b;
}

.pos-terminal.light-theme .scale-dropdown {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

.pos-terminal.light-theme .scale-dropdown option {
    background: #fff;
    color: #1e293b;
}

.pos-terminal.light-theme .scale-dropdown option:disabled {
    color: #94a3b8;
    background: #f1f5f9;
}

.pos-terminal.light-theme .selected-scale-info {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.pos-terminal.light-theme .scale-info-row {
    border-bottom-color: #e2e8f0;
}

.pos-terminal.light-theme .scale-info-row .info-label {
    color: #64748b;
}

.pos-terminal.light-theme .scale-info-row .info-value {
    color: #1e293b;
}

/* Scale QR Scanner */
#scale-qr-reader {
    width: 100% !important;
    border: none !important;
}

#scale-qr-reader video {
    width: 100% !important;
    border-radius: 12px;
}
/* ============================================
   POS RESPONSIVE IMPROVEMENTS - Dec 2025
   ============================================ */

/* ===== Tablet Breakpoint (769px - 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Landing Page - Tablet */
    .pos-start {
        padding: 40px 24px 32px;
    }

    .pos-logo h1 {
        font-size: 2rem;
    }

    .terminal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 600px;
    }

    .terminal-card {
        padding: 32px 24px;
    }

    /* Terminal Header - Tablet */
    .terminal-header {
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-left {
        gap: 10px;
    }

    .header-right {
        gap: 8px;
    }

    .btn-header {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .session-badge {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .profile-name,
    .operator-name {
        font-size: 0.8rem;
    }

    /* Terminal Body - Tablet */
    .panel-transaction {
        width: 350px;
    }

    .item-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
        padding: 16px;
    }

    .item-btn {
        padding: 16px 12px;
        height: 90px;
    }

    .item-btn .item-name {
        font-size: 0.9rem;
    }

    /* Truck Terminal - Tablet */
    .weight-card {
        padding: 20px;
    }

    .weight-card-value {
        font-size: 1.75rem;
    }

    .weight-card-value.large {
        font-size: 2rem;
    }
}

/* ===== Mobile Breakpoint Enhanced (max-width: 768px) ===== */
@media (max-width: 768px) {
    /* Landing Page - Mobile */
    .pos-start {
        padding: 24px 16px 20px;
        justify-content: flex-start;
        min-height: 100vh;
    }

    .pos-logo {
        margin-bottom: 32px;
    }

    .pos-logo h1 {
        font-size: 1.5rem;
    }

    .pos-logo p {
        font-size: 0.95rem;
    }

    .terminal-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        width: 100%;
        max-width: 400px;
    }

    .terminal-card {
        padding: 28px 24px;
    }

    .terminal-icon {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }

    .terminal-card h3 {
        font-size: 1.15rem;
    }

    .terminal-card p {
        font-size: 0.85rem;
    }

    .pos-settings-bar {
        margin-top: 24px;
    }

    .pos-footer {
        margin-top: 32px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .profile-selector {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
        margin-bottom: 24px;
    }

    .profile-dropdown {
        width: 100%;
        min-width: unset;
    }

    /* Terminal Header - Mobile: Reorganized */
    .terminal-header {
        flex-direction: column;
        padding: 8px 12px;
        gap: 8px;
    }

    .header-left {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-center {
        order: -1;
        width: 100%;
        text-align: center;
        font-size: 1rem;
        padding: 4px 0;
        border-bottom: 1px solid #334155;
        margin-bottom: 4px;
    }

    .header-right {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 6px;
    }

    .btn-header {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .session-badge {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .profile-name {
        display: none;
    }

    .operator-name {
        font-size: 0.75rem;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .scale-badge {
        padding: 3px 8px;
        font-size: 0.7rem;
        margin-left: 0;
    }

    .btn-back-small {
        padding: 6px 10px;
        font-size: 1rem;
    }

    /* Terminal Body - Mobile */
    .terminal-body {
        flex-direction: column;
    }

    .panel-items {
        border-right: none;
        border-bottom: 1px solid #334155;
        max-height: 45vh;
        min-height: 200px;
    }

    .panel-transaction {
        width: 100%;
        flex: 1;
        min-height: 55vh;
    }

    .panel-header {
        padding: 12px 16px;
    }

    .panel-header h2 {
        font-size: 1rem;
    }

    /* Item Grid - Mobile */
    .item-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 12px;
    }

    .item-btn {
        padding: 12px 8px;
        height: 75px;
        border-radius: 10px;
    }

    .item-btn .item-name {
        font-size: 0.8rem;
    }

    .item-btn .item-rate {
        font-size: 0.75rem;
    }

    /* Order Section - Mobile */
    .order-section {
        padding: 12px 16px;
    }

    .order-section label {
        font-size: 0.8rem;
    }

    .order-section input {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .order-label-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .scan-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* Order Details Card - Mobile */
    .order-details-card {
        margin-top: 10px;
    }

    .order-card-header {
        padding: 10px 12px;
    }

    .order-card-id {
        font-size: 1rem;
    }

    .order-card-body {
        padding: 10px 12px;
    }

    .order-detail-row {
        padding: 6px 0;
    }

    .detail-label {
        font-size: 0.75rem;
    }

    .detail-value {
        font-size: 0.85rem;
    }

    /* Cart Section - Mobile */
    .cart-header {
        padding: 10px 16px;
    }

    .cart-header h3 {
        font-size: 0.95rem;
    }

    .cart-items {
        padding: 10px 16px;
        max-height: 150px;
    }

    .cart-item {
        padding: 10px;
    }

    .cart-item .item-name {
        font-size: 0.9rem;
    }

    .cart-item .item-details {
        font-size: 0.8rem;
    }

    .cart-item .remove-btn {
        padding: 6px 10px;
        min-width: 36px;
        min-height: 36px;
    }

    /* Totals - Mobile */
    .totals-section {
        padding: 12px 16px;
    }

    .total-row {
        font-size: 0.9rem;
    }

    .total-row.total-amount {
        font-size: 1.1rem;
    }

    /* Action Section - Mobile */
    .action-section {
        padding: 10px 16px;
        gap: 8px;
    }

    .btn-pos {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .btn-pos.btn-large {
        padding: 14px 20px;
        font-size: 1rem;
    }

    /* Modals - Mobile */
    .modal-content {
        width: 95%;
        max-width: none;
        max-height: 95vh;
        margin: 10px;
        border-radius: 12px;
    }

    .modal-content.modal-large {
        max-width: none;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 16px 20px;
    }

    .modal-footer {
        padding: 12px 20px;
        gap: 10px;
    }

    .modal-footer .btn-pos {
        flex: 1;
        min-width: 0;
    }

    /* Weight Modal - Mobile */
    .weight-display input {
        font-size: 1.75rem;
        padding: 14px;
    }

    .weight-uom {
        font-size: 1.1rem;
    }

    /* Summary Stats - Mobile */
    .summary-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    /* Truck Terminal - Mobile */
    .weight-panel-content {
        padding: 12px;
    }

    .weight-cards-panel {
        gap: 12px;
    }

    .weight-card {
        padding: 16px;
    }

    .weight-card-header {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .weight-card-value {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }

    .weight-card-value.large {
        font-size: 1.75rem;
    }

    .weight-card-time {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }

    .btn-record {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    /* Variance Panel - Mobile */
    .variance-panel {
        margin-top: 12px;
    }

    .variance-panel .panel-header {
        padding: 10px 12px;
    }

    .variance-panel .panel-header h3 {
        font-size: 0.9rem;
    }

    .variance-content {
        padding: 12px;
    }

    .variance-row {
        padding: 6px 0;
    }

    .variance-label {
        font-size: 0.85rem;
    }

    .variance-value {
        font-size: 0.9rem;
    }

    /* Scrap Panel - Mobile */
    .scrap-panel {
        margin-top: 12px;
    }

    .scrap-panel .panel-header {
        padding: 10px 12px;
    }

    .scrap-panel .panel-header h3 {
        font-size: 0.9rem;
    }

    .scrap-list {
        max-height: 120px;
    }

    .scrap-item {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .scrap-total {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    /* Scale Modal - Mobile */
    .scale-instruction {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .scale-scan-section .btn-pos {
        width: 100%;
    }

    .scale-divider {
        margin: 20px 0;
    }

    .scale-dropdown {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .selected-scale-info {
        padding: 12px;
    }

    .scale-info-row {
        padding: 6px 0;
    }

    .scale-info-row .info-label {
        font-size: 0.85rem;
    }

    .scale-info-row .info-value {
        font-size: 0.9rem;
    }

    /* Scanner Container - Mobile */
    .scanner-container {
        min-height: 250px;
    }

    .scanner-instructions {
        font-size: 0.9rem;
        padding: 12px;
    }

    .manual-entry {
        padding: 12px;
    }

    .manual-entry label {
        font-size: 0.85rem;
    }

    .manual-entry input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    /* Camera Container - Mobile */
    .camera-container {
        max-height: 300px;
    }

    .photo-controls {
        padding: 12px;
        gap: 10px;
    }

    .photo-controls .btn-pos {
        padding: 12px 20px;
    }

    /* Reweight Warning - Mobile */
    .reweight-warning {
        font-size: 0.8rem;
        padding: 10px 12px;
    }
}

/* ===== Small Mobile (max-width: 400px) ===== */
@media (max-width: 400px) {
    .pos-logo h1 {
        font-size: 1.25rem;
    }

    .terminal-card {
        padding: 24px 20px;
    }

    .terminal-icon {
        font-size: 2rem;
    }

    .terminal-card h3 {
        font-size: 1rem;
    }

    .item-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .item-btn {
        height: 70px;
        padding: 10px 6px;
    }

    .item-btn .item-name {
        font-size: 0.75rem;
    }

    .btn-header {
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    .header-right .btn-header:not(.btn-danger) span {
        display: none;
    }

    .weight-card-value {
        font-size: 1.25rem;
    }

    .weight-card-value.large {
        font-size: 1.5rem;
    }
}

/* ===== Landscape Mobile ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .pos-start {
        padding: 16px;
    }

    .pos-logo {
        margin-bottom: 16px;
    }

    .pos-logo h1 {
        font-size: 1.25rem;
    }

    .terminal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 500px;
    }

    .terminal-card {
        padding: 20px 16px;
    }

    .terminal-icon {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .terminal-card h3 {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .terminal-card p {
        font-size: 0.75rem;
    }

    .panel-items {
        max-height: 40vh;
    }

    .panel-transaction {
        min-height: 60vh;
    }

    .modal-content {
        max-height: 90vh;
    }
}

/* ===== Touch-friendly improvements ===== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .item-btn {
        min-height: 70px;
    }

    .btn-pos {
        min-height: 44px;
    }

    .btn-header {
        min-height: 40px;
    }

    .cart-item .remove-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .scan-btn {
        min-height: 40px;
        padding: 10px 14px;
    }

    .clear-btn {
        min-width: 40px;
        min-height: 40px;
        font-size: 1.25rem;
    }

    .modal-close {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.75rem;
    }

    /* Prevent text selection on touch */
    .item-btn,
    .btn-pos,
    .btn-header,
    .terminal-card,
    .scan-btn {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* Active states for touch feedback */
    .item-btn:active {
        transform: scale(0.96);
        opacity: 0.9;
    }

    .btn-pos:active:not(:disabled) {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .terminal-card:active {
        transform: scale(0.98);
    }
}

/* ===== Light Theme - Mobile Fixes ===== */
@media (max-width: 768px) {
    .pos-terminal.light-theme .header-center {
        border-bottom-color: #e2e8f0;
    }

    .pos-terminal.light-theme .panel-items {
        border-bottom-color: #e2e8f0;
    }

    .pos-container.light-theme .pos-footer {
        color: #64748b;
    }

    .pos-container.light-theme .pos-footer .operator {
        color: #475569;
    }
}

/* ===== Print Styles (hide POS on print) ===== */
@media print {
    .pos-container,
    .pos-terminal {
        display: none !important;
    }
}

/* ===== X-DESK Branding ===== */
h1 .pos-brand,
.pos-logo .pos-brand {
    display: inline;
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 400;
    margin-top: 4px;
    letter-spacing: 0.05em;
}

.pos-container.light-theme h1 .pos-brand,
.pos-logo .pos-brand {
    display: inline;
    color: #64748b;
}

.brand-badge {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pos-terminal.light-theme .brand-badge {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

@media (max-width: 768px) {
    h1 .pos-brand,
.pos-logo .pos-brand {
    display: inline;
        font-size: 0.85rem;
    }

    .brand-badge {
        padding: 3px 8px;
        font-size: 0.65rem;
    }
}

/* ===== Category Tabs ===== */
.category-tabs {
    display: flex !important;
    gap: 10px;
    padding: 8px 16px 16px 16px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
}

button.category-tab {
    padding: 14px 24px !important;
    border: 2px solid rgba(255, 255, 255, 0.25) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #c0c8d4 !important;
    border-radius: 25px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    flex-shrink: 0;
    min-width: 80px;
    min-height: 50px;
    text-align: center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
}

button.category-tab:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

button.category-tab.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Light theme category tabs */
.pos-terminal.light-theme button.category-tab {
    border-color: rgba(0, 0, 0, 0.15) !important;
    background: rgba(0, 0, 0, 0.05) !important;
    color: #475569 !important;
}

.pos-terminal.light-theme button.category-tab:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(0, 0, 0, 0.3) !important;
    color: #1e293b !important;
}

.pos-terminal.light-theme button.category-tab.active {
    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Tablet responsive */
@media (max-width: 1024px) {
    .category-tabs {
        padding: 6px 12px 14px 12px;
        gap: 8px;
    }

    button.category-tab {
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
        min-height: 48px;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .category-tabs {
        padding: 4px 10px 12px 10px;
        gap: 6px;
    }

    button.category-tab {
        padding: 10px 16px !important;
        font-size: 0.9rem !important;
        border-radius: 20px !important;
        min-height: 44px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    button.category-tab {
        padding: 8px 14px !important;
        font-size: 0.85rem !important;
        min-height: 40px;
    }
}
