/* Staff app styles. Same world as the customer app: the carton —
   one primary band, white label panel, black type, numbers in columns. */

/* ---------- Base and components kept from the first version (overridden below where the theme differs) ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--font-ar); background-color: var(--bg-main); color: var(--text-main); direction: rtl; text-align: right; min-height: 100vh; padding-bottom: 90px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: var(--font-ar); }
input, textarea { -webkit-user-select: text; user-select: text; }
button { -webkit-appearance: none; appearance: none; }
.icon-svg { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.icon-svg.sm { width: 14px; height: 14px; }
.icon-svg.lg { width: 22px; height: 22px; }
.icon-svg.xl { width: 28px; height: 28px; }
.app-header { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25); height: 64px; box-sizing: border-box; }
.header-container { max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-section { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.brand-logo { width: 44px; height: 44px; border-radius: var(--radius-md); background: #ffffff; border: 1px solid rgba(255, 255, 255, 0.4); display: flex; align-items: center; justify-content: center; color: var(--primary); overflow: hidden; padding: 3px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); flex-shrink: 0; }
.brand-logo svg { width: 26px; height: 26px; stroke: var(--primary); }
.brand-titles { display: flex; flex-direction: column; justify-content: center; min-width: 0; overflow: hidden; flex: 1; }
.brand-titles h1 { font-size: 1.05rem; font-weight: 800; color: #ffffff; line-height: 1.2; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sync-status-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 600; cursor: pointer; margin-top: 3px; transition: all 0.2s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sync-status-inline.online { color: #bbf7d0; }
.sync-status-inline.offline { color: #fef08a; }
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.user-profile-pill-compact { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 6px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.32); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 999px; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.user-profile-pill-compact:hover { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.25); }
.profile-avatar-mini { width: 26px; height: 26px; border-radius: 50%; background: #ffffff; color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 0.82rem; font-weight: 800; line-height: 1; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.profile-details-mini { display: flex; align-items: center; gap: 6px; }
.profile-role-tag { font-size: 0.72rem; font-weight: 700; color: #ffffff; background: rgba(255, 255, 255, 0.22); border: 1px solid rgba(255, 255, 255, 0.28); padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.profile-chevron { color: rgba(255, 255, 255, 0.85); }
.role-tabs-bar { background: #ffffff; border-bottom: 1px solid var(--border-color); padding: 6px 16px; position: sticky; top: 60px; z-index: 90; }
.role-tabs-wrapper { max-width: 1200px; margin: 0 auto; background: #f1f5f9; padding: 3px; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.role-tabs-wrapper.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.role-tabs-wrapper.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.role-tabs-wrapper.admin-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
@media (max-width: 768px) {
    .role-tabs-wrapper.admin-tabs { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .role-tabs-wrapper.admin-tabs::-webkit-scrollbar { display: none; }
    .role-tabs-wrapper.admin-tabs .tab-btn { flex: 0 0 auto; width: auto; min-width: 100px; }
}
.tab-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border-radius: var(--radius-sm); background: transparent; border: none; color: var(--text-muted); font-family: var(--font-ar); font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: all 0.15s ease; white-space: nowrap; text-align: center; width: 100%; }
.tab-label-full { display: none; }
.tab-label-short { display: inline; }
@media (min-width: 768px) {
    .tab-label-full { display: inline; }
    .tab-label-short { display: none; }
}
.tab-btn .icon-svg { stroke: var(--text-muted); width: 16px; height: 16px; flex-shrink: 0; }
.tab-btn:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.5); }
.tab-btn.active { background: #ffffff; color: var(--primary); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.tab-btn.active .icon-svg { stroke: var(--primary); }
.tab-badge { background: var(--primary-light); color: var(--primary); font-size: 0.68rem; padding: 1px 6px; border-radius: 999px; font-weight: 800; }
.tab-btn.active .tab-badge { background: var(--primary); color: #ffffff; }
@media (max-width: 640px) {
    .role-tabs-bar { padding: 5px 8px; top: 54px; }
    .tab-btn { padding: 7px 4px; font-size: 0.76rem; gap: 4px; }
    .tab-btn .icon-svg { width: 14px; height: 14px; }
}
.app-container { max-width: 1200px; margin: 0 auto; padding: 16px; }
.catalog-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; align-items: center; justify-content: space-between; }
.search-input-wrapper { flex: 1; min-width: 240px; position: relative; }
.search-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-dim); display: flex; align-items: center; }
.search-input { width: 100%; padding: 12px 42px 12px 14px; background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-main); font-family: var(--font-ar); font-size: 0.9rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.search-input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1); }
.layout-toggle { display: none; flex-shrink: 0; gap: 2px; padding: 3px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.layout-toggle-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0; border: none; border-radius: var(--radius-sm); background: transparent; color: var(--text-dim); cursor: pointer; transition: background 0.15s, color 0.15s; }
.layout-toggle-btn.active { background: var(--primary-light); color: var(--primary); }
.category-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; width: 100%; scrollbar-width: none; }
.category-chip { font-family: var(--font-ar); padding: 8px 16px; background: #ffffff; border: 1px solid var(--border-color); border-radius: 999px; color: var(--text-muted); font-size: 0.82rem; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.category-chip:hover, .category-chip.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.product-card { background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; box-shadow: var(--shadow-sm); position: relative; }
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.product-image-container { height: 160px; background: #f1f5f9; position: relative; overflow: hidden; }
.product-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .product-image { transform: scale(1.04); }
.stock-tag { position: absolute; top: 10px; right: 10px; padding: 4px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; box-shadow: var(--shadow-sm); }
.stock-tag.in-stock { background: #ffffff; color: var(--success); border: 1px solid var(--success); }
.stock-tag.low-stock { background: #ffffff; color: var(--warning); border: 1px solid var(--warning); }
.stock-tag.out-stock { background: #ffffff; color: var(--danger); border: 1px solid var(--danger); }
.product-details { padding: 14px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.product-category { font-size: 0.7rem; color: var(--primary); font-weight: 700; margin-bottom: 4px; }
.product-title { font-size: 0.95rem; font-weight: 700; color: var(--text-main); line-height: 1.3; margin-bottom: 10px; }
.product-pricing { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.sell-price { font-size: 1.25rem; font-weight: 900; color: var(--primary); }
.sell-price small { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }
.product-card.in-cart { border-color: var(--primary); box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12); }
.product-actions { display: flex; align-items: center; width: 100%; }
.qty-stepper-full { display: flex; align-items: center; justify-content: space-between; width: 100%; background: #f8fafc; border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 3px; transition: all 0.2s ease; }
.qty-stepper-full.has-qty { background: var(--primary-light); border-color: var(--border-focus); }
.stepper-btn-full { width: 44px; height: 40px; border-radius: var(--radius-sm); background: #ffffff; border: 1px solid var(--border-color); color: var(--text-main); font-size: 1.3rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s ease; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.stepper-btn-full.plus { background: var(--primary); color: #ffffff; border-color: var(--primary); }
.stepper-btn-full.plus:hover { background: var(--primary-hover); }
.stepper-btn-full.minus:hover { background: #e2e8f0; }
.stepper-btn-full:active { transform: scale(0.94); }
.stepper-value-full { flex: 0 0 3.2em; width: 3.2em; min-width: 0; padding: 0; border: none; background: transparent; outline: none; text-align: center; font-size: 1.15rem; font-weight: 800; color: var(--text-main); -moz-appearance: textfield; }
.stepper-value-full::-webkit-outer-spin-button, .stepper-value-full::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-btn-full { touch-action: manipulation; }
.qty-stepper-full.has-qty .stepper-value-full { color: var(--primary); }
.cart-floating-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #ffffff; border-top: 1px solid var(--border-color); padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; z-index: 90; box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08); }
.cart-bar-info { display: flex; align-items: center; gap: 12px; }
.cart-icon-wrapper { position: relative; width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.cart-badge-bubble { position: absolute; top: -5px; right: -5px; background: var(--danger); color: #ffffff; font-size: 0.7rem; font-weight: 800; padding: 2px 6px; border-radius: 999px; border: 2px solid #ffffff; }
.cart-totals-text .cart-total-label { font-size: 0.75rem; color: var(--text-muted); }
.cart-totals-text .cart-total-value { font-size: 1.15rem; font-weight: 900; color: var(--text-main); }
.btn-checkout { background: var(--primary); color: #ffffff; border: none; padding: 8px 16px; border-radius: var(--radius-md); font-family: var(--font-ar); font-size: 0.95rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 8px; box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3); transition: transform 0.15s, background 0.2s; }
.btn-checkout:hover { background: var(--primary-hover); }
.btn-checkout:active { transform: scale(0.96); }
.checkout-items-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 8px; margin-bottom: 14px; background: #f8fafc; }
.checkout-item-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--border-color); font-size: 0.85rem; gap: 8px; }
.checkout-item-row:last-child { border-bottom: none; }
.checkout-price-input { width: 68px; padding: 3px 6px; border: 1px solid #cbd5e1; border-radius: var(--radius-sm); font-family: inherit; font-size: 0.82rem; font-weight: 700; text-align: center; direction: ltr; background: #ffffff; color: var(--text-main); outline: none; transition: all 0.2s; }
.checkout-price-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15); }
.order-item-chip { font-size: 0.78rem; color: var(--text-main); background: #ffffff; border: 1px solid var(--border-color); padding: 3px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; line-height: 1.2; }
.order-item-chip strong { color: var(--primary); font-weight: 800; }
.btn-action-preview { background: var(--fill); color: var(--ink); border: none; padding: 10px 14px; border-radius: var(--radius-md); font-family: var(--font-ar); font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; box-shadow: 0 2px 5px rgba(2, 132, 199, 0.25); transition: all 0.15s ease; }
.btn-action-preview:hover { background: #0369a1; color: #ffffff; transform: translateY(-1px); }
.btn-action-preview:active { transform: scale(0.98); }
.btn-delete-fit { background: var(--danger-light); color: var(--danger); border: none; padding: 8px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.15s ease; }
.btn-delete-fit:hover { background: var(--danger); color: #ffffff; transform: translateY(-1px); }
.btn-delete-fit:active { transform: scale(0.95); }
.receipt-preview-content { background: #ffffff; border: 1px dashed #cbd5e1; border-radius: var(--radius-md); padding: 16px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04); max-height: 60vh; overflow-y: auto; font-family: var(--font-ar); color: #1e293b; }
.styled-table { width: 100%; border-collapse: collapse; text-align: right; font-size: 0.85rem; }
.styled-table th { background: #f8fafc; padding: 12px 16px; font-weight: 700; color: var(--text-muted); border-bottom: 1px solid var(--border-color); }
.styled-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-color); color: var(--text-main); }
.styled-table tr:hover td { background: #f8fafc; }
body.modal-open { overflow: hidden !important; touch-action: none; }
.modal-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.modal-backdrop.active { opacity: 1; pointer-events: auto; }
.modal-box { background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-xl); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); transform: scale(0.96); transition: transform 0.2s ease; }
.modal-backdrop.active .modal-box { transform: scale(1); }
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { font-size: 1.15rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.modal-close-btn { background: transparent; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.modal-close-btn:hover { color: var(--text-main); }
.modal-body { padding: 20px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.form-control { width: 100%; padding: 12px 14px; background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-main); font-family: var(--font-ar); font-size: 0.9rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.form-control:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1); }
.client-suggestions { display: none; margin-top: 6px; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-card); overflow: hidden; }
.client-suggestions.open { display: block; }
.client-suggestion-item { display: block; width: 100%; padding: 10px 14px; background: none; border: none; border-bottom: 1px solid var(--border-color); text-align: right; font-family: var(--font-ar); font-size: 0.9rem; color: var(--text-main); cursor: pointer; }
.client-suggestion-item:last-child { border-bottom: none; }
.client-suggestion-item:hover, .client-suggestion-item:active { background: var(--bg-card-hover); }
.client-match-hint { margin-top: 6px; font-size: 0.8rem; font-weight: 700; }
.client-match-hint.existing { color: var(--success); }
.client-match-hint.new { color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-gps-grab { background: var(--primary-light); color: var(--primary); border: 1px dashed var(--primary); padding: 10px 14px; border-radius: var(--radius-md); font-family: var(--font-ar); font-weight: 700; font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 6px; transition: all 0.2s; }
.btn-gps-grab:hover { background: var(--primary); color: #ffffff; }
.gps-status-card { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-md); font-size: 0.82rem; display: flex; align-items: center; gap: 8px; transition: all 0.2s ease; }
.gps-status-card.idle { background: rgba(0, 0, 0, 0.03); color: var(--text-muted); border: 1px solid var(--border-color); }
.gps-status-card.loading { background: var(--primary-light); color: var(--primary); border: 1px solid rgba(37, 99, 235, 0.2); }
.gps-status-card.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.gps-status-card.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.gps-coords-badge { display: inline-flex; align-items: center; gap: 4px; background: #d1fae5; color: #047857; font-weight: 700; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; }
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.spin { animation: spin 1s linear infinite; }
.btn-store-camera { background: #ffffff; color: var(--primary); border: 1px dashed var(--border-focus); padding: 12px 14px; border-radius: var(--radius-md); font-family: var(--font-ar); font-weight: 700; font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; transition: all 0.2s; }
.btn-store-camera:hover { background: var(--primary-light); }
.btn-remove-photo { position: absolute; top: 8px; left: 8px; background: rgba(220, 38, 38, 0.9); color: #ffffff; border: none; padding: 4px 10px; border-radius: 6px; font-family: var(--font-ar); font-size: 0.75rem; font-weight: bold; cursor: pointer; }
.pin-pad-container { text-align: center; padding: 10px 0; }
.pin-dots-display { display: flex; justify-content: center; gap: 16px; margin: 16px 0 24px; }
.pin-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-color); background: #ffffff; transition: all 0.2s; }
.pin-dot.filled { background: var(--primary); border-color: var(--primary); transform: scale(1.15); }
.pin-keypad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 280px; margin: 0 auto; }
.pin-key-btn { height: 56px; border-radius: var(--radius-lg); background: #f8fafc; border: 1px solid var(--border-color); color: var(--text-main); font-family: var(--font-ar); font-size: 1.3rem; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; text-align: center; transition: background 0.15s, transform 0.1s; }
.pin-key-btn:hover { background: #f1f5f9; }
.pin-key-btn:active { background: var(--primary); color: #ffffff; transform: scale(0.95); }
.pin-key-btn.key-action { font-size: 0.9rem; font-weight: 700; background: #ffffff; color: var(--danger); border-color: var(--border-color); }
@media (max-width: 640px) {
    .app-header { height: 56px; }
    .app-container { padding: 10px; }
    .header-container { padding: 0 10px; }
    .brand-section { gap: 8px; }
    .brand-logo { width: 36px; height: 36px; }
    .brand-logo svg { width: 20px; height: 20px; }
    .brand-titles h1 { font-size: 0.90rem; }
    .sync-status-inline { font-size: 0.68rem; margin-top: 1px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .layout-toggle { display: flex; }
    .catalog-toolbar .search-input-wrapper { min-width: 0; }
    .products-grid.layout-single { grid-template-columns: 1fr; gap: 12px; }
    .products-grid.layout-single .product-image-container { height: 170px; }
    .products-grid.layout-single .product-details { padding: 12px; }
    .products-grid.layout-single .product-title { font-size: 0.95rem; margin-bottom: 8px; min-height: 0; line-height: 1.3; }
    .products-grid.layout-single .sell-price { font-size: 1.2rem; }
    .products-grid.layout-single .sell-price small { font-size: 0.72rem; }
    .product-card { border-radius: var(--radius-md); }
    .product-image-container { height: 120px; }
    .product-details { padding: 10px 8px; }
    .product-title { font-size: 0.82rem; margin-bottom: 6px; min-height: 2.2em; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .sell-price { font-size: 1.05rem; }
    .sell-price small { font-size: 0.65rem; }
    .stepper-btn-full { width: 36px; height: 36px; font-size: 1.2rem; }
    .stepper-value-full { font-size: 0.95rem; }
    .stock-tag { top: 6px; right: 6px; padding: 2px 6px; font-size: 0.6rem; }
}
.toast-notification { position: fixed; bottom: 85px; left: 50%; transform: translateX(-50%) translateY(80px); background: #0f172a; color: #ffffff; padding: 10px 20px; border-radius: 999px; font-size: 0.88rem; font-weight: 700; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2); display: flex; align-items: center; gap: 8px; z-index: 10000; opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); max-width: 90vw; text-align: center; border: 1px solid rgba(255, 255, 255, 0.1); }
.toast-notification.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.toast-notification.success { background: #065f46; border-color: #10b981; }
.toast-notification.warning { background: #92400e; border-color: #f59e0b; }
.toast-notification.error { background: #991b1b; border-color: #ef4444; }
.toast-icon { display: flex; align-items: center; justify-content: center; }
#receiptPrintSection { display: none; }
@media print {
    body > :not(#receiptPrintSection) { display: none !important; }
    #receiptPrintSection, #receiptPrintSection * { visibility: visible; }
    #receiptPrintSection { display: block !important; position: absolute; left: 0; top: 0; width: 78mm; margin: 0; padding: 0; background: #ffffff; color: #000000; font-family: 'Courier New', Courier, monospace, var(--font-ar); direction: rtl; font-size: 11pt; line-height: 1.2; }
}
.filter-pill { padding: 8px 16px; border-radius: 50px; background: #f1f5f9; color: var(--text-muted); border: 1px solid transparent; font-size: 0.85rem; font-family: var(--font-ar); font-weight: 700; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0; }
.filter-pill:hover { background: #e2e8f0; color: var(--text-main); }
.filter-pill.active { background: var(--primary); color: #ffffff; box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2); }
img.zoomable { cursor: zoom-in; }
.image-viewer { position: fixed; inset: 0; z-index: 5000; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.92); cursor: zoom-out; }
.image-viewer.open { display: flex; }
.image-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.image-viewer-close { position: absolute; top: 12px; left: 12px; width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.15); color: #ffffff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.category-add-row { display: flex; gap: 8px; margin-bottom: 16px; }
.category-add-row .btn-checkout { flex-shrink: 0; }
.categories-list { display: flex; flex-direction: column; gap: 8px; }
.category-row { display: flex; align-items: center; gap: 8px; }
.category-row .form-control { flex: 1; min-width: 0; padding: 8px 12px; }
.category-count { flex-shrink: 0; font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.category-row-btn { flex-shrink: 0; height: 38px; padding: 0 12px; }
.category-row .btn-delete-fit.category-row-btn { width: 38px; padding: 0; }

/* ---------- Theme ---------- */
:root {
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --primary-light: #e8eefc;
    --on-primary: #ffffff;
    --on-primary-2: #c9d6f8;

    --ink: #111111;
    --ink-2: #565656;
    --ink-3: #6f6f6f;
    --line: #e7e7e7;
    --fill: #f4f4f4;

    /* Old names mapped onto the palette: one primary, ink, and red only for errors and destructive actions */
    --bg-main: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: var(--fill);
    --bg-input: #ffffff;
    --border-color: var(--line);
    --border-focus: var(--primary);
    --success: var(--primary);
    --success-light: var(--primary-light);
    --warning: var(--ink);
    --warning-light: var(--fill);
    --danger: #b42318;
    --danger-light: #fbeceb;
    --whatsapp: var(--primary);
    --whatsapp-hover: var(--primary-hover);
    --text-main: var(--ink);
    --text-muted: var(--ink-2);
    --text-dim: var(--ink-3);

    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-sm: none;
    --shadow-md: 0 4px 16px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 12px 32px rgb(0 0 0 / 0.14);

    --font-ar: 'Almarai', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --header-h: 52px;
    --tab-h: 58px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body { font-size: 0.875rem; line-height: 1.45; padding-bottom: 32px; }
::selection { background: var(--primary-light); color: var(--ink); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.icon-svg { width: 20px; height: 20px; stroke-width: 1.75; }
.icon-svg.sm { width: 16px; height: 16px; }
.icon-svg.lg { width: 22px; height: 22px; }
.icon-svg.xl { width: 32px; height: 32px; stroke-width: 1.5; }
h1, h2, h3 { letter-spacing: 0; }

/* ---------- Header: the carton band ---------- */
.app-header { height: var(--header-h); background: var(--primary); box-shadow: none; }
.header-container { padding: 0 12px; gap: 8px; }
.brand-section { gap: 10px; }
.brand-logo { width: 32px; height: 32px; border: 0; border-radius: var(--radius-sm); padding: 2px; box-shadow: none; }
.brand-logo svg { width: 20px; height: 20px; stroke-width: 1.75; }
.brand-titles h1 { font-size: 1rem; font-weight: 800; }
.sync-status-inline { margin-top: 0; font-size: 0.75rem; font-weight: 400; color: var(--on-primary-2); }
.sync-status-inline.online { color: var(--on-primary-2); }
.sync-status-inline.offline { color: #ffffff; font-weight: 700; }
.sync-status-inline[hidden] { display: none; }
#pwaInstallHeaderBtn { display: none; width: 40px; height: 40px; border-radius: var(--radius-sm); margin: 0 !important; padding: 0 !important; }
#pwaInstallHeaderBtn:hover { background: rgb(255 255 255 / 0.12) !important; }
.user-profile-pill-compact { gap: 8px; padding: 4px 10px 4px 4px; background: rgb(255 255 255 / 0.12); border: 0; border-radius: 999px; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.user-profile-pill-compact:hover { background: rgb(255 255 255 / 0.2); border: 0; }
.profile-avatar-mini { width: 28px; height: 28px; font-size: 0.875rem; box-shadow: none; }
.profile-role-tag { padding: 0; background: none; border: 0; font-size: 0.875rem; }
.profile-chevron { color: var(--on-primary-2); }

/* ---------- Navigation ---------- */
.role-tabs-bar { top: var(--header-h); padding: 0 12px; background: var(--primary); border-bottom: 0; }
.role-tabs-wrapper { background: transparent; border: 0; border-radius: 0; padding: 0; gap: 0 !important; }
.tab-btn { position: relative; height: 44px; padding: 0 14px; border-radius: 0; font-size: 0.875rem; color: var(--on-primary-2); border-bottom: 2px solid transparent; }
.tab-btn .icon-svg { stroke: currentColor; width: 18px; height: 18px; }
.tab-btn:hover { background: transparent; color: #ffffff; }
.tab-btn.active { background: transparent; color: #ffffff; box-shadow: none; border-bottom-color: #ffffff; }
.tab-btn.active .icon-svg { stroke: currentColor; }
.tab-badge, .tab-btn.active .tab-badge { min-width: 18px; padding: 0 5px; border-radius: 9px; background: #ffffff; color: var(--primary); font-size: 0.75rem; line-height: 18px; text-align: center; }
.tab-badge.alert { background: #ffffff; color: var(--danger); }

/* Desktop: tabs sit at the start at their natural width */
@media (min-width: 768px) {
    .role-tabs-wrapper.grid-3, .role-tabs-wrapper.grid-2, .role-tabs-wrapper.admin-tabs { display: flex; }
    .role-tabs-wrapper .tab-btn { flex: 0 0 auto; width: auto; }
}

/* Vendeur and livreur on phones: native bottom tab bar */
@media (max-width: 767px) {
    body[data-role="vendeur"], body[data-role="livreur"], body[data-role="admin"] { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 16px); }
    body[data-role="vendeur"] .role-tabs-bar, body[data-role="livreur"] .role-tabs-bar, body[data-role="admin"] .role-tabs-bar {
        position: fixed; top: auto; bottom: 0; inset-inline: 0; z-index: 95; padding: 0 0 var(--safe-b);
        background: rgb(255 255 255 / 0.96); border-top: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(12px);
    }
    body[data-role="vendeur"] .tab-btn, body[data-role="livreur"] .tab-btn, body[data-role="admin"] .tab-btn {
        flex-direction: column; gap: 3px; height: var(--tab-h); padding: 0; border: 0; color: var(--ink-3); font-size: 0.75rem;
    }
    body[data-role="vendeur"] .tab-btn .icon-svg, body[data-role="livreur"] .tab-btn .icon-svg, body[data-role="admin"] .tab-btn .icon-svg { width: 22px; height: 22px; }
    body[data-role="vendeur"] .tab-btn.active, body[data-role="livreur"] .tab-btn.active, body[data-role="admin"] .tab-btn.active { color: var(--primary); border: 0; }
    body[data-role="vendeur"] .tab-badge, body[data-role="livreur"] .tab-badge, body[data-role="admin"] .tab-badge { position: absolute; top: 6px; inset-inline-start: calc(50% + 6px); background: var(--primary); color: #fff; border: 2px solid #fff; }
    .role-tabs-wrapper.admin-tabs .tab-btn { min-width: 0; }
}

/* ---------- Main ---------- */
.app-container { padding: 12px; }
@media (min-width: 768px) { .app-container { padding: 16px; } }

/* ---------- Catalog toolbar ---------- */
.catalog-toolbar { gap: 8px; margin-bottom: 12px; }
.search-input-wrapper { min-width: 200px; }
.search-icon { right: 12px; color: var(--ink-3); }
.search-icon .icon-svg { width: 18px; height: 18px; }
.search-input { height: 40px; padding: 0 40px 0 12px; border-radius: var(--radius-sm); background: var(--fill); border: 1px solid transparent; font-size: 1rem; }
.search-input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.search-input::placeholder { color: var(--ink-3); }
.layout-toggle { padding: 2px; border-radius: var(--radius-sm); border-color: var(--line); }
.layout-toggle-btn { width: 36px; height: 34px; border-radius: 6px; color: var(--ink-3); }
.layout-toggle-btn.active { background: var(--fill); color: var(--ink); }
.category-chips { gap: 6px; padding-bottom: 0; }
.category-chips::-webkit-scrollbar { display: none; }
.category-chip { height: 32px; padding: 0 12px; border-color: var(--line); color: var(--ink); font-size: 0.875rem; font-weight: 400; }
.category-chip:hover { background: var(--fill); color: var(--ink); border-color: var(--line); }
.category-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Product grid (dense, whole cells) ---------- */
.products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 600px) { .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1100px) { .products-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.product-card, .product-card:hover { border-radius: var(--radius-lg); box-shadow: none; transform: none; border-color: var(--line); }
.product-card.in-cart { border-color: var(--primary); box-shadow: none; }
.product-image-container, .products-grid.layout-single .product-image-container { height: auto; aspect-ratio: 1; background: #fff; border-bottom: 1px solid var(--line); }
.product-image, .product-card:hover .product-image { object-fit: contain; transform: none; }
.stock-tag { top: 8px; right: 8px; padding: 2px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; box-shadow: none; }
.stock-tag.in-stock { background: rgb(255 255 255 / 0.92); color: var(--ink-2); border: 1px solid var(--line); font-weight: 400; }
.stock-tag.low-stock { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
.stock-tag.out-stock { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.product-details { padding: 8px 10px 10px; gap: 2px; }
.product-category { display: block; margin: 0; color: var(--ink-3); font-size: 0.75rem; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-title { margin: 0 0 4px; font-size: 0.875rem; font-weight: 700; line-height: 1.35; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; direction: ltr; text-align: right; }
.product-pricing { margin: 6px 0 8px; }
.sell-price { font-size: 1rem; font-weight: 800; color: var(--ink); }
.sell-price small { font-size: 0.75rem; font-weight: 400; color: var(--ink-3); }

/* Stepper */
.qty-stepper-full { padding: 0; background: var(--fill); border: 0; border-radius: var(--radius-sm); }
.qty-stepper-full.has-qty { background: var(--primary); border: 0; }
.stepper-btn-full { width: 36px; height: 36px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink); box-shadow: none; }
.stepper-btn-full .icon-svg { width: 18px; height: 18px; stroke-width: 2; }
.stepper-btn-full.plus { background: transparent; color: var(--primary); border: 0; }
.stepper-btn-full.plus:hover, .stepper-btn-full.minus:hover { background: rgb(0 0 0 / 0.05); }
.stepper-btn-full:active { transform: none; background: rgb(0 0 0 / 0.08); }
.qty-stepper-full.has-qty .stepper-btn-full { color: #fff; }
.qty-stepper-full.has-qty .stepper-btn-full:hover, .qty-stepper-full.has-qty .stepper-btn-full:active { background: var(--primary-hover); }
.stepper-value-full { flex: 1 1 auto; width: auto; font-size: 1rem; font-variant-numeric: tabular-nums; }
.qty-stepper-full.has-qty .stepper-value-full { color: #fff; }
@media (max-width: 640px) {
    .stepper-btn-full { width: 34px; height: 34px; }
    .products-grid { gap: 8px; }
    .product-image-container { height: auto; }
    .product-details { padding: 8px; }
    .product-title { font-size: 0.875rem; min-height: 2.7em; }
    .sell-price { font-size: 1rem; }
    .stock-tag { top: 6px; right: 6px; font-size: 0.75rem; padding: 1px 6px; }
    .products-grid.layout-single { grid-template-columns: 1fr; }
    .products-grid.layout-single .product-card { flex-direction: row; }
    .products-grid.layout-single .product-image-container { width: 112px; flex-shrink: 0; border-bottom: 0; border-inline-end: 1px solid var(--line); }
}

/* ---------- Cart bar (bottom flap) ---------- */
.cart-floating-bar { inset-inline: 0; bottom: 0; padding: 6px 12px; border: 0; border-radius: 0; background: var(--primary); color: #fff; box-shadow: none; animation: themeRise 0.28s var(--ease); }
body[data-role="vendeur"] .cart-floating-bar { bottom: calc(var(--tab-h) + var(--safe-b)); }
body[data-role="vendeur"] { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 72px); }
@media (min-width: 768px) {
    body[data-role="vendeur"] { padding-bottom: 88px; }
    body[data-role="vendeur"] .cart-floating-bar { bottom: 0; justify-content: flex-start; gap: 24px; padding-inline: max(12px, calc((100% - 1200px) / 2 + 16px)); }
}
.cart-bar-info { gap: 10px; }
.cart-icon-wrapper { width: 36px; height: 36px; background: rgb(255 255 255 / 0.14); color: #fff; border-radius: var(--radius-sm); }
.cart-badge-bubble { top: -6px; right: -6px; min-width: 18px; padding: 0 5px; line-height: 16px; background: #fff; color: var(--primary); border: 2px solid var(--primary); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.cart-totals-text .cart-total-label { font-size: 0.75rem; color: var(--on-primary-2); }
.cart-totals-text .cart-total-value { font-size: 1rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.cart-floating-bar .btn-checkout { height: 40px; background: #fff; color: var(--primary); }
.cart-floating-bar .btn-checkout:hover { background: var(--primary-light); }
@keyframes themeRise { from { transform: translateY(12px); opacity: 0; } }

/* ---------- Buttons ---------- */
.btn-checkout { height: 44px; padding: 0 18px; border-radius: var(--radius-md); font-size: 1rem; font-weight: 800; justify-content: center; box-shadow: none; }
.btn-checkout:active { transform: none; background: var(--primary-hover); }
.btn-block { width: 100%; height: 48px; }

/* ---------- Checkout ---------- */
.checkout-items-list { max-height: 240px; padding: 0 12px; background: #fff; border-color: var(--line); border-radius: var(--radius-md); }
.checkout-item-row { padding: 10px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.checkout-item-main { flex: 1; min-width: 0; }
.checkout-item-name { display: block; font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; text-align: right; }
.checkout-item-sub { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--ink-3); font-size: 0.75rem; }
.checkout-item-total { flex-shrink: 0; font-size: 0.875rem; font-weight: 800; }
.checkout-price-input { width: 72px; height: 28px; padding: 0 6px; border-color: var(--line); border-radius: 6px; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.checkout-price-input:focus { box-shadow: 0 0 0 2px var(--primary-light); }
.checkout-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; margin-bottom: 8px; border-top: 1px solid var(--line); }
.checkout-total span { color: var(--ink-2); font-weight: 700; }
.checkout-total strong { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 12px; }
.form-label { margin-bottom: 6px; font-size: 0.75rem; font-weight: 400; color: var(--ink-2); }
.form-control { min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm); border-color: var(--line); font-size: 1rem; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control::placeholder { color: var(--ink-3); }
.client-suggestions { border-color: var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.client-match-hint { font-size: 0.75rem; }
.client-match-hint.new { color: var(--ink-2); }

/* ---------- Modals: bottom sheet on phones, dialog on desktop ---------- */
.modal-backdrop { padding: 16px; background: rgb(0 0 0 / 0.36); backdrop-filter: none; transition: opacity 0.24s var(--ease); }
.modal-box { border: 0; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); transform: scale(0.96); transition: transform 0.24s var(--ease); }
.modal-header { padding: 12px 8px 8px 16px; padding-inline: 16px 8px; border-bottom: 0; }
.modal-header h2 { font-size: 1rem; font-weight: 800; gap: 8px; }
.modal-header h2 .icon-svg { display: none; }
.modal-close-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--ink-2); }
.modal-close-btn:hover { background: var(--fill); color: var(--ink); }
.modal-body { padding: 4px 16px 16px; }
@media (max-width: 640px) {
    .modal-backdrop { align-items: flex-end; padding: 0; }
    .modal-box { max-width: none !important; max-height: 90vh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding-bottom: var(--safe-b); transform: translateY(100%); transition: transform 0.32s var(--ease); }
    .modal-box::before { content: ''; display: block; width: 36px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: var(--line); }
}
.modal-backdrop.active .modal-box { transform: none; }

/* ---------- PIN pad ---------- */
.pin-dots-display { gap: 14px; }
.pin-dot { width: 12px; height: 12px; border: 1.5px solid var(--ink-3); background: transparent; box-shadow: none; }
.pin-dot.filled { background: var(--primary); border-color: var(--primary); transform: none; box-shadow: none; }
.pin-keypad-grid { gap: 8px; }
.pin-key-btn { height: 56px; border: 0; border-radius: var(--radius-md); background: var(--fill); color: var(--ink); font-size: 1.375rem; font-weight: 700; box-shadow: none; font-variant-numeric: tabular-nums; }
.pin-key-btn:hover { background: var(--line); }
.pin-key-btn:active { background: #dcdcdc; transform: none; }
.pin-key-btn.key-action { background: transparent; color: var(--ink-2); font-size: 0.875rem; }
.pin-key-btn.key-action .icon-svg { width: 24px; height: 24px; }

/* ---------- Toast (snackbar) ---------- */
.toast-notification { bottom: 24px; padding: 12px 16px; border: 0; border-radius: var(--radius-md); background: var(--ink); font-size: 0.875rem; font-weight: 400; box-shadow: 0 8px 24px rgb(0 0 0 / 0.2); }
.toast-notification.success, .toast-notification.warning { background: var(--ink); border: 0; }
.toast-notification.error { background: var(--danger); border: 0; }
body[data-role="vendeur"] .toast-notification, body[data-role="livreur"] .toast-notification { bottom: calc(var(--tab-h) + var(--safe-b) + 72px); }
@media (min-width: 768px) { body[data-role="vendeur"] .toast-notification, body[data-role="livreur"] .toast-notification { bottom: 84px; } }

/* ---------- Empty state ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 16px; color: var(--ink-3); text-align: center; }
.empty-state.tall { min-height: 60vh; justify-content: center; }
.empty-state h3 { margin: 4px 0 0; font-size: 1rem; font-weight: 700; color: var(--ink); }
.empty-state p { margin: 0 0 8px; color: var(--ink-3); }

/* ---------- Page head + lists (rows separated by hairlines) ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.page-head h2 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 1.25rem; font-weight: 800; }
.page-count { color: var(--ink-3); font-size: 0.875rem; font-weight: 400; }
.page-meta { color: var(--ink-2); font-size: 0.875rem; }
.page-meta strong { color: var(--ink); font-size: 1rem; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 0.875rem; gap: 6px; }
.list-search { margin-bottom: 8px; }

.list { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row[hidden] { display: none; }
.row.wrap { flex-wrap: wrap; row-gap: 6px; }
.row-thumb { width: 44px; height: 44px; flex-shrink: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); object-fit: cover; background: #fff; }
.row-thumb.letter { display: grid; place-items: center; background: var(--fill); border-color: var(--fill); color: var(--ink-2); font-weight: 800; font-size: 1rem; }
.row-main { flex: 1; min-width: 0; }
.row-title { display: block; font-size: 1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { display: block; margin-top: 2px; color: var(--ink-3); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.amount { font-size: 1rem; font-weight: 800; white-space: nowrap; }
.amount small { color: var(--ink-3); font-size: 0.75rem; font-weight: 400; }
.row-items { flex: 1 0 100%; color: var(--ink-2); font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; }
.row-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.row-actions.full { flex: 1 0 100%; margin-inline-start: -8px; }
.push-end { margin-inline-start: auto; }

.icon-act { position: relative; width: 36px; height: 36px; display: inline-grid; place-items: center; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-2); text-decoration: none; }
.icon-act .icon-svg { width: 18px; height: 18px; }
.icon-act:hover { background: var(--fill); color: var(--ink); }
.icon-act:active { background: var(--line); }
.icon-act.danger { color: var(--danger); }
.icon-act.danger:hover { background: var(--danger-light); }
@media (hover: hover) {
    [data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 60; padding: 4px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 0.75rem; font-weight: 400; white-space: nowrap; pointer-events: none; }
}

/* Status: pending outline, active primary, delivered ink, cancelled struck */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.status.assigned, .status.delivering { color: var(--primary); }
.status.assigned::before, .status.delivering::before, .status.delivered::before { background: currentColor; }
.status.delivered { color: var(--ink); }
.status.cancelled, .status.canceled { color: var(--ink-3); text-decoration: line-through; }

/* Livreur task: a row plus a clear action bar */
.task-list { display: grid; gap: 8px; }
@media (min-width: 900px) { .task-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.task { padding: 0 12px 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.task .row { border-bottom: 0; padding-bottom: 6px; }
.task .row-items { display: block; margin-bottom: 10px; }
.task-actions { display: flex; align-items: center; gap: 6px; }
.task-actions .btn-checkout { height: 40px; padding: 0 16px; gap: 6px; }
.btn-quiet { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 0; border-radius: var(--radius-md); background: var(--fill); color: var(--ink); font-weight: 700; font-size: 0.875rem; text-decoration: none; cursor: pointer; }
.btn-quiet:hover { background: var(--line); }
.btn-outline-danger { height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; color: var(--danger); font-weight: 700; font-size: 0.875rem; cursor: pointer; }
.btn-outline-danger:hover { border-color: var(--danger); }

/* ---------- Segmented control (periods, order filters) ---------- */
.segmented { display: inline-flex; gap: 2px; max-width: 100%; overflow-x: auto; padding: 2px; margin-bottom: 12px; border-radius: var(--radius-sm); background: var(--fill); scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.seg-btn, .segmented .filter-pill { flex-shrink: 0; height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 0.875rem; font-weight: 700; white-space: nowrap; box-shadow: none; }
.seg-btn:hover, .segmented .filter-pill:hover { color: var(--ink); background: transparent; }
.seg-btn.active, .segmented .filter-pill.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }
.seg-count { margin-inline-start: 4px; color: var(--ink-3); font-weight: 400; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.toolbar .search-input-wrapper { flex: 1 1 240px; max-width: 360px; }
.toolbar .segmented { margin-bottom: 0; }
@media (max-width: 640px) { .toolbar .search-input-wrapper { max-width: none; } }

/* ---------- Ledger: the period's four figures in one strip ---------- */
.ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.ledger-cell { padding: 14px 16px; border-inline-start: 1px solid var(--line); }
.ledger-cell:first-child { border-inline-start: 0; }
.ledger-label { display: block; margin-bottom: 6px; color: var(--ink-2); font-size: 0.75rem; }
.ledger-value { font-size: 1.375rem; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.ledger-value small { color: var(--ink-3); font-size: 0.75rem; font-weight: 400; }
@media (max-width: 640px) {
    .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ledger-cell:nth-child(3) { border-inline-start: 0; }
    .ledger-cell:nth-child(n+3) { border-top: 1px solid var(--line); }
    .ledger-value { font-size: 1.125rem; }
}

/* ---------- Panels and plain tables ---------- */
.reports-two-col-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .reports-two-col-grid { grid-template-columns: 1fr; } }
.panel { padding: 12px 16px 4px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.panel-title { margin: 0 0 4px; font-size: 1rem; font-weight: 800; }
.panel-empty { margin: 8px 0 12px; color: var(--ink-3); }
.styled-table { font-size: 0.875rem; }
.styled-table th { padding: 8px 0; background: transparent; color: var(--ink-3); font-size: 0.75rem; font-weight: 400; border-bottom: 1px solid var(--line); }
.styled-table td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.styled-table tr:last-child td { border-bottom: 0; }
.styled-table tr:hover td { background: transparent; }
.styled-table th + th, .styled-table td + td { padding-inline-start: 12px; }
.t-num { text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-ltr { direction: ltr; text-align: right; }

/* ---------- Admin order rows: one markup, table columns on desktop, wrapped row on phones ---------- */
.olist { border-top: 1px solid var(--line); }
.orow { display: grid; grid-template-columns: 56px minmax(0, 2fr) minmax(0, 1fr) 120px minmax(140px, 1fr) 110px 80px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; }
.ohead { padding: 8px 0; color: var(--ink-3); font-size: 0.75rem; }
.o-no { color: var(--ink-2); font-weight: 700; }
.o-client { min-width: 0; }
.o-client strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-client small { color: var(--ink-3); font-size: 0.75rem; }
.o-client a { color: inherit; text-decoration: none; }
.o-vendeur { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-amount small { color: var(--ink-3); font-size: 0.75rem; }
.o-muted { color: var(--ink-3); }
.o-actions { display: flex; justify-content: flex-end; gap: 2px; }
.select-sm { width: 100%; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font: inherit; font-size: 0.875rem; }
.select-sm:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
@media (max-width: 900px) {
    .ohead { display: none; }
    .orow { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "no client amount" "vend vend status" "liv liv act"; row-gap: 6px; column-gap: 10px; }
    .o-no { grid-area: no; }
    .o-client { grid-area: client; }
    .o-amount { grid-area: amount; }
    .o-vendeur { grid-area: vend; font-size: 0.75rem; }
    .o-status { grid-area: status; justify-self: end; }
    .o-livreur { grid-area: liv; }
    .o-actions { grid-area: act; }
}

/* ---------- Admin: stock rows, client list, team, settings ---------- */
.page-actions { display: flex; gap: 8px; }
.page-actions .btn-quiet { height: 36px; font-size: 0.875rem; }
.stock-brand { width: auto; min-width: 150px; }
.srow { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) 90px 120px 80px 80px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; }
.srow.ohead { padding: 8px 0; }
.s-product { display: flex; align-items: center; gap: 10px; min-width: 0; }
.s-product .row-thumb { width: 40px; height: 40px; object-fit: contain; }
.s-name { min-width: 0; }
.s-name strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; text-align: right; }
.s-name small { color: var(--ink-3); font-size: 0.75rem; }
.s-brand { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-buy { color: var(--ink-2); }
.s-sell small { color: var(--ink-3); font-size: 0.75rem; }
.s-qty { font-weight: 800; }
.s-qty.low .num { padding: 1px 6px; border: 1px solid var(--ink); border-radius: 6px; }
.s-qty.out .num { padding: 1px 6px; border-radius: 6px; background: var(--ink); color: #fff; }
@media (max-width: 900px) {
    .srow { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "prod sell qty" "prod brand act"; row-gap: 2px; column-gap: 10px; }
    .s-product { grid-area: prod; }
    .s-sell { grid-area: sell; }
    .s-qty { grid-area: qty; }
    .s-brand { grid-area: brand; font-size: 0.75rem; text-align: left; }
    .srow .o-actions { grid-area: act; }
    .s-buy { display: none; }
}

.row.clickable { cursor: pointer; }
.row.clickable:hover { background: var(--fill); }
.list .row.clickable { padding-inline: 8px; margin-inline: -8px; border-radius: var(--radius-sm); }
.ledger.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) {
    .ledger.cols-3 .ledger-cell:nth-child(3) { border-inline-start: 1px solid var(--line); border-top: 0; }
    .ledger.cols-3 .ledger-value { font-size: 1rem; }
    .ledger.cols-3 .ledger-cell { padding: 10px; }
}

.settings { max-width: 640px; }
.settings-group { padding: 12px 16px 4px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.settings-group .panel-title { margin-bottom: 12px; }
.logo-row { display: flex; align-items: center; gap: 12px; }
.logo-box { width: 52px; height: 52px; display: grid; place-items: center; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--ink-3); overflow: hidden; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }
.form-row { gap: 12px; }

.category-row { gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.category-count { color: var(--ink-3); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.category-row-btn { height: 36px; }

/* ---------- Legacy buttons used in forms and modals ---------- */
.btn-action-preview, .btn-store-camera, .btn-gps-grab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: var(--radius-md); background: var(--fill); color: var(--ink); font-size: 0.875rem; font-weight: 700; box-shadow: none; }
.btn-action-preview:hover, .btn-store-camera:hover, .btn-gps-grab:hover { background: var(--line); color: var(--ink); }
.btn-store-camera, .btn-gps-grab { width: 100%; border-style: none; }
.btn-delete-fit { width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; color: var(--danger); box-shadow: none; }
.btn-delete-fit:hover { border-color: var(--danger); background: #fff; }
.btn-remove-photo { border: 0; border-radius: var(--radius-sm); background: rgb(0 0 0 / 0.6); color: #fff; font-size: 0.75rem; box-shadow: none; }
.gps-status-card { border-radius: var(--radius-sm); font-size: 0.75rem; }
.gps-status-card.success { background: var(--primary-light); color: var(--primary); border-color: transparent; }
.gps-status-card.error { background: var(--danger-light); color: var(--danger); border-color: transparent; }
.order-item-chip { border-radius: 999px; border-color: var(--line); background: #fff; color: var(--ink); font-size: 0.875rem; }
#productImagePreviewContainer { border: 1px solid var(--line) !important; background: #fff !important; }
@media (max-width: 900px) { .srow.ohead { display: none; } }

/* ---------- Bon (receipt): same markup on screen and on the 58/80mm printer ---------- */
.bon-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.bon-actions > * { flex: 1; height: 44px; justify-content: center; }
.receipt-preview-content { max-height: 62vh; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: none; color: #000; }
.bon { color: #000; font-family: var(--font-ar); font-size: 13px; line-height: 1.45; }
.bon-ltr { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.bon-head { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid #000; text-align: center; }
.bon-head h2 { margin: 0 0 2px; font-size: 17px; font-weight: 800; }
.bon-head p { margin: 0; font-size: 11px; }
.bon-meta { display: grid; gap: 2px; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid #000; }
.bon-meta div { display: flex; justify-content: space-between; gap: 8px; }
.bon-meta dt { color: #444; }
.bon-meta dd { margin: 0; font-weight: 700; text-align: left; }
.bon-table { width: 100%; border-collapse: collapse; }
.bon-table th { padding: 0 0 4px; border-bottom: 1px solid #000; font-size: 11px; font-weight: 400; color: #444; text-align: right; }
.bon-table td { padding: 4px 0; border-bottom: 1px dashed #bbb; vertical-align: top; }
.bon-table th + th, .bon-table td + td { padding-inline-start: 6px; }
.bon-item { direction: ltr; text-align: right; }
.bon-num { text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bon-totals { padding-top: 6px; margin-top: 4px; border-top: 1px solid #000; }
.bon-totals div { display: flex; justify-content: space-between; padding: 1px 0; }
.bon-table tbody tr:last-child td { border-bottom: 0; }
.bon-totals .bon-grand:first-child { border-top: 0; margin-top: 0; padding-top: 0 !important; }
.bon-grand { margin: 2px 0; padding: 4px 0 !important; border-top: 1px solid #000; border-bottom: 1px solid #000; font-size: 15px; font-weight: 800; }
.bon-credit { font-weight: 800; }
.bon-foot { margin: 10px 0 0; text-align: center; font-size: 11px; }
@media print {
    #receiptPrintSection { font-family: var(--font-ar) !important; font-size: 10pt; line-height: 1.35; }
    #receiptPrintSection .bon { padding: 3mm; font-size: 10pt; }
    #receiptPrintSection .bon-head h2 { font-size: 13pt; }
    #receiptPrintSection .bon-grand { font-size: 12pt; }
    #receiptPrintSection .bon-table td { border-bottom-color: #000; }
}


@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Review fixes ---------- */
@media (max-width: 767px) {
    body[data-role] .tab-btn.active .tab-badge { background: var(--primary); color: #fff; }
    body[data-role="admin"] .role-tabs-wrapper.admin-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; overflow: visible; }
    body[data-role="admin"] .tab-btn { min-width: 0; font-size: 0.75rem; }
    body[data-role="admin"] .tab-label-short { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .toolbar .segmented { width: 100%; }
    .toolbar .segmented .seg-btn { flex: 1 1 auto; padding: 0 6px; }
    .seg-count { margin-inline-start: 2px; }
}
select.form-control, .select-sm {
    -webkit-appearance: none; appearance: none; padding-inline-start: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23565656' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-size: 16px; background-position: left 10px center;
}
textarea.form-control { resize: none; }
html { scrollbar-width: thin; scrollbar-color: #cfcfcf transparent; }
.btn-remove-photo { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; }

/* ---------- Language switch + French (left to right) ---------- */
.lang-btn { min-width: 40px; height: 32px; padding: 0 8px; border: 1px solid rgb(255 255 255 / 0.4); border-radius: var(--radius-sm); background: transparent; color: #fff; font-size: 0.75rem; font-weight: 800; cursor: pointer; }
.lang-btn:hover { background: rgb(255 255 255 / 0.12); }
.header-right { display: flex; align-items: center; gap: 8px; }
html[dir="ltr"] body { direction: ltr; text-align: left; }
html[dir="ltr"] .search-icon { right: auto; left: 12px; }
html[dir="ltr"] .search-input { padding: 0 12px 0 40px; }
html[dir="ltr"] .stock-tag { right: auto; left: 8px; }
html[dir="ltr"] .product-title, html[dir="ltr"] .checkout-item-name, html[dir="ltr"] .s-name strong, html[dir="ltr"] .t-ltr, html[dir="ltr"] .bon-item { text-align: left; }
html[dir="ltr"] .t-num, html[dir="ltr"] .bon-num, html[dir="ltr"] .bon-meta dd { text-align: right; }
html[dir="ltr"] select.form-control, html[dir="ltr"] .select-sm { background-position: right 10px center; }
html[dir="ltr"] .qty-stepper-full { flex-direction: row-reverse; }
html[dir="ltr"] .cart-floating-bar .btn-checkout svg { transform: scaleX(-1); }
html[dir="ltr"] .bon-table th { text-align: left; }
html[dir="ltr"] .bon-table th.bon-num { text-align: right; }
.task-actions { flex-wrap: wrap; }
.task .row { min-width: 0; }

/* Password show / hide (js/pw-toggle.js) */
.pw-wrap { position: relative; display: block; }
.pw-wrap .form-control { padding-inline-end: 44px; }
.pw-eye { position: absolute; top: 50%; inset-inline-end: 4px; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-2); cursor: pointer; }
.pw-eye:hover { background: var(--fill); }
.pw-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Admin on phones: 3 sections + menu in the bar, all sections in a side drawer ---------- */
.tab-more { display: none !important; }
@media (max-width: 767px) {
    body[data-role="admin"] .tab-btn.mob-hide { display: none; }
    body[data-role="admin"] .tab-more { display: flex !important; }
}
.nav-drawer { align-items: stretch !important; justify-content: flex-start; padding: 0 !important; }
.drawer-panel { width: min(300px, 84vw); height: 100%; display: flex; flex-direction: column; gap: 2px; padding: 8px 8px calc(16px + var(--safe-b)); background: #fff; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform 0.28s var(--ease); overflow-y: auto; }
html[dir="ltr"] .drawer-panel { transform: translateX(-100%); }
.nav-drawer.active .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 12px 8px; padding-inline: 8px 4px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.drawer-head strong { font-size: 1rem; font-weight: 800; }
.drawer-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 48px; padding: 0 12px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink); font: inherit; font-size: 1rem; font-weight: 700; text-align: start; cursor: pointer; }
.drawer-item .icon-svg { width: 20px; height: 20px; color: var(--ink-2); }
.drawer-item:hover { background: var(--fill); }
.drawer-item.active { background: var(--primary-light); color: var(--primary); }
.drawer-item.active .icon-svg { color: var(--primary); }
.drawer-item .tab-badge { margin-inline-start: auto; background: var(--primary); color: #fff; }
.drawer-item .tab-badge.alert { background: var(--danger); color: #fff; }

/* ---------- Stock on phones: two products per row, like the catalog ---------- */
@media (max-width: 640px) {
    .stock-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border-top: 0; }
    .stock-list .srow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "prod prod" "brand brand" "sell qty" "act act"; row-gap: 4px; column-gap: 6px; padding: 0 0 8px; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; align-items: center; }
    .stock-list .srow[style*="none"] { display: none; }
    .stock-list .s-product { flex-direction: column; align-items: stretch; gap: 6px; }
    .stock-list .s-product .row-thumb { width: 100%; height: auto; aspect-ratio: 1; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
    .stock-list .s-name { padding: 0 8px; }
    .stock-list .s-name strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 0.875rem; line-height: 1.35; min-height: 2.7em; }
    .stock-list .s-brand { padding: 0 8px; text-align: start; }
    .stock-list .s-sell { padding-inline-start: 8px; text-align: start; }
    .stock-list .s-qty { padding-inline-end: 8px; }
    .stock-list .o-actions { justify-content: space-between; padding: 0 4px; border-top: 1px solid var(--line); padding-top: 4px; }
}

/* ---------- Vendeur stepper: wide + and - targets, narrow number box ---------- */
.qty-stepper-full .stepper-btn-full { flex: 1 1 0; width: auto; min-width: 44px; height: 40px; }
.qty-stepper-full .stepper-value-full { flex: 0 0 2.6em; width: 2.6em; }
.qty-stepper-full { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.drawer-item .tab-badge, body[data-role] .drawer-item .tab-badge { position: static; border: 0; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.link-danger { padding: 4px 0; border: 0; background: none; color: var(--danger); font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
/* Header install button: centred like the other header controls */
#pwaInstallHeaderBtn { align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0 !important; margin: 0 !important; color: #fff !important; border-radius: var(--radius-sm); vertical-align: middle; }
#pwaInstallHeaderBtn .icon-svg { width: 20px; height: 20px; }
.header-right { align-items: center; }
/* The app draws its own show/hide button: hide the browser one (Edge) */
input::-ms-reveal, input::-ms-clear { display: none; }

/* Customer's note on order rows and the bon */
.row-note { flex: 1 0 100%; margin-top: 2px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--fill); color: var(--ink); font-size: 0.75rem; line-height: 1.4; overflow-wrap: anywhere; white-space: normal; }
.task .row-note { margin-bottom: 10px; }
.bon-meta .bon-note { flex-direction: column; gap: 0; }
.bon-meta .bon-note dd { font-weight: 400; text-align: start; overflow-wrap: anywhere; }
