:root {
    --bg-color: #f7f9fc;
    --sidebar-bg: rgba(255, 255, 255, 0.7);
    --card-bg: rgba(255, 255, 255, 0.85);
    --primary-color: #ff6b81; /* A nice rose/pink tone suitable for women's wear */
    --primary-hover: #ff4757;
    --text-main: #2f3542;
    --text-muted: #747d8c;
    --border-color: rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.02);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 40px rgba(255, 107, 129, 0.15);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, hsla(347,100%,88%,1) 0, transparent 50%), 
        radial-gradient(at 100% 100%, hsla(339,100%,92%,1) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    z-index: 10;
    overflow-y: auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), #ff4757);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
}

.logo-mark {
    width: 44px;
    height: 44px;
    object-fit: cover;
    padding: 0;
    flex-shrink: 0;
    border: 1px solid rgba(183, 110, 121, 0.35);
}

.login-brand {
    text-align: center;
    margin-bottom: 1.25rem;
}

.login-brand img {
    width: 190px;
    max-width: 60%;
    height: auto;
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 107, 129, 0.05);
    color: var(--primary-color);
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.nav-item-shop:hover {
    background: rgba(212, 175, 55, 0.15) !important;
    border-color: #d4af37 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem 3rem;
    overflow-y: auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -1px;
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 129, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 129, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f1f2f6;
}

/* Views */
.view-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards & Tables */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.in-stock { background: #e0f7fa; color: #00838f; }
.badge.low-stock { background: #fff3e0; color: #e65100; }
.badge.out-of-stock { background: #ffebee; color: #c62828; }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: white;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal.side-panel {
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[dir="rtl"] .modal.side-panel {
    transform: translateX(-100%);
}

.modal-overlay.active .modal.side-panel {
    transform: translateX(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.1);
}

.form-row {
    display: flex;
    gap: 1rem;
}
.form-row .form-group {
    flex: 1;
}

.pos-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    height: calc(100vh - 120px);
}

.pos-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--pos-card-min, 180px), 1fr));
    gap: 1rem;
    align-content: start;
    overflow-y: auto;
    padding-right: 10px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.product-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}
.product-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.product-card .price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.cart-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.cart-summary {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: #fff;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1rem;
}
.summary-row.total {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Login Screen */
.login-wrapper {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, hsla(347,100%,88%,1) 0, transparent 50%), 
        radial-gradient(at 100% 100%, hsla(339,100%,92%,1) 0, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: var(--transition);
}

/* Taller than the screen (small screen, large system font): the page scrolls and the
   card starts at the top instead of being cut off at both ends */
.login-wrapper { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.login-wrapper > * { margin: auto; }

.login-wrapper.hidden {
    opacity: 0;
    pointer-events: none;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    padding: 3rem 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255,255,255,0.5);
}

/* Product Images */
.product-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
}

.pos-product-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.image-preview-container {
    width: 100px;
    height: 100px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 10px;
}

.image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pos-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
}

/* Filter & Search Bars */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0 14px;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.search-box .material-symbols-rounded {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.search-box .form-control {
    border: none;
    padding: 10px 0;
    background: transparent;
    box-shadow: none;
}

.search-box .form-control:focus {
    box-shadow: none;
    border: none;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-filter label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.date-filter .form-control {
    width: 150px;
    padding: 8px 10px;
    font-size: 0.85rem;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-overlay img {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.product-thumbnail.clickable {
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.product-thumbnail.clickable:hover {
    transform: scale(1.15);
}

#btn-open-profile:hover {
    background: rgba(var(--primary-rgb, 139,90,143), 0.12);
}

/* ── View Layout Toggle ── */
.view-toggle {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.view-toggle-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
}
.view-toggle-btn:hover { background: rgba(0,0,0,0.06); color: var(--text-main); }
.view-toggle-btn.active {
    background: var(--primary-color);
    color: white;
}
.view-toggle-btn .material-symbols-rounded { font-size: 1.2rem; }

/* ── Category Filter Pills ── */
.cat-pill {
    border: 1px solid var(--border-color);
    background: transparent;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.78rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.cat-pill:hover { border-color: var(--primary-color); color: var(--primary-color); }
.cat-pill.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

/* ── Inventory Grid View ── */
.inventory-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
    padding: 0.5rem 0;
}
.inv-grid-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}
.inv-grid-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.inv-grid-card .card-thumb {
    width: 100%; height: 140px;
    object-fit: cover; display: block;
    cursor: zoom-in;
}
.inv-grid-card .card-thumb-placeholder {
    width: 100%; height: 140px;
    display: flex; align-items: center; justify-content: center;
    background: #f5f5f5;
    color: #ccc;
}
.inv-grid-card .card-body {
    padding: 8px 10px 10px;
}
.inv-grid-card .card-name {
    font-weight: 600; font-size: 0.85rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 2px;
}
.inv-grid-card .card-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.inv-grid-card .card-price { font-weight: 700; color: var(--primary-color); font-size: 0.9rem; }
.inv-grid-card .card-actions { display: flex; gap: 5px; margin-top: 6px; }
.inv-grid-card .card-actions button {
    flex: 1; font-size: 0.72rem; padding: 4px 0;
}

/* ── Inventory Compact List View ── */
.inventory-compact-container { display: flex; flex-direction: column; gap: 6px; padding: 0.5rem 0; }
.inv-compact-row {
    display: flex; align-items: center; gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 12px;
    transition: box-shadow 0.15s;
}
.inv-compact-row:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.08); }
.inv-compact-thumb {
    width: 44px; height: 44px; border-radius: 8px;
    object-fit: cover; flex-shrink: 0; cursor: zoom-in;
}
.inv-compact-thumb-ph {
    width: 44px; height: 44px; border-radius: 8px;
    background: #f5f5f5; display: flex; align-items: center;
    justify-content: center; color: #ccc; flex-shrink: 0;
}
.inv-compact-info { flex: 1; min-width: 0; }
.inv-compact-name { font-weight: 600; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-compact-meta { font-size: 0.75rem; color: var(--text-muted); }
.inv-compact-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.inv-compact-price { font-weight: 700; color: var(--primary-color); font-size: 0.9rem; }

@keyframes pulse {
    0% { opacity: 0.6; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.05); }
}

/* Sidebar thin custom scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.15);
}


/* ─── Online shop orders (POS) ─── */
.oo-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1rem; }
.oo-filter {
    padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border-color);
    background: white; color: var(--text-muted); font-weight: 600; cursor: pointer; font-family: inherit;
}
.oo-filter.active { background: var(--primary-color); border-color: var(--primary-color); color: white; }
.oo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 1.25rem; }
.oo-empty { text-align: center; color: var(--text-muted); padding: 3rem 1rem; grid-column: 1 / -1; }
.oo-card { display: flex; flex-direction: column; gap: 0.9rem; }
.oo-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.oo-id { font-family: monospace; font-weight: 700; font-size: 1rem; }
.oo-date { color: var(--text-muted); font-size: 0.85rem; }
.oo-status { padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.oo-status-pending { background: #fff3e0; color: #e65100; }
.oo-status-processing { background: #e3f2fd; color: #1565c0; }
.oo-status-fulfilled, .oo-status-delivered { background: #e8f5e9; color: #2e7d32; }
.oo-status-cancelled { background: #f5f5f5; color: #757575; }
.oo-customer { font-size: 0.9rem; display: grid; gap: 2px; }
.oo-items th, .oo-items td { padding: 0.5rem; text-align: start; font-size: 0.88rem; }
.oo-stock-ok { color: #2e7d32; font-weight: 600; }
.oo-stock-low { color: #c62828; font-weight: 700; }
.oo-warning { color: #c62828; font-size: 0.8rem; font-weight: 600; margin-top: 2px; }
/* Lowering or removing a line of an open order (a piece that cannot be supplied) */
.oo-line-tools { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.oo-line-btn { font: inherit; font-size: 0.75rem; padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(0,0,0,0.15); background: #fff; cursor: pointer; color: var(--text-main); }
.oo-line-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.oo-line-remove { color: #c62828; }
.oo-adjusted { color: #8e6d00; font-size: 0.8rem; font-weight: 600; margin-top: 4px; }
.oo-totals { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: baseline; font-size: 0.92rem; }
.oo-totals strong { font-size: 1.05rem; margin-inline-start: auto; }
.oo-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.oo-actions .btn { padding: 10px 18px; }
.oo-actions .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.oo-message { padding: 0.8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 600; }
.oo-message-ok { background: #e8f5e9; color: #2e7d32; }
.oo-message-error { background: #ffebee; color: #c62828; }
@media (max-width: 600px) { .oo-list { grid-template-columns: 1fr; } }

/* POS payment method (cash / on account) */
.pos-payment-method { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.85rem; }
.pos-payment-method label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; color: var(--text-main); }
.pos-payment-method input { accent-color: var(--primary-color); }

/* ─── Debts (POS) ─── */
.debts-summary { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.debts-summary strong { font-size: 1.6rem; color: #c0392b; }
.debts-list { display: grid; gap: 1.25rem; }
.debt-card { display: flex; flex-direction: column; gap: 0.75rem; }
.debt-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.debt-name { font-weight: 700; font-size: 1.05rem; }
.debt-sub { color: var(--text-muted); font-size: 0.82rem; }
.debt-owed { text-align: end; display: flex; flex-direction: column; }
.debt-owed span { color: var(--text-muted); font-size: 0.8rem; }
.debt-owed strong { font-size: 1.25rem; color: #c0392b; }
.debt-remaining { font-weight: 700; color: #c0392b; }
/* Debts table: a person's further invoices sit under their first row */
.debts-table tr.debt-more-row td { border-top-style: dashed; }
.debts-table .debt-pay-btn { white-space: nowrap; padding: 6px 12px; font-size: 0.82rem; }
.debt-pay-btn { padding: 8px 14px; font-size: 0.85rem; white-space: nowrap; }

/* ── List screens: view switcher + exports (Customers, Debts, Online Orders) ── */
.list-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.list-actions .btn { padding: 10px 16px; }
.cards-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
.list-table th, .list-table td { text-align: start; padding: 0.7rem 0.8rem; vertical-align: middle; }
.list-table td { font-size: 0.9rem; }
.list-table .num { text-align: end; white-space: nowrap; }
.list-table .muted { color: var(--text-muted); font-size: 0.82rem; }
.list-table .row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.list-table .row-actions .btn { padding: 6px 10px; font-size: 0.8rem; }
.list-table .row-actions .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.list-compact { display: flex; flex-direction: column; gap: 6px; }
.lc-row {
    display: flex; align-items: center; gap: 12px;
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 10px; padding: 8px 12px; transition: box-shadow 0.15s;
}
.lc-row:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.08); }
.lc-main { flex: 1; min-width: 0; }
.lc-title { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.lc-meta { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lc-amount { font-weight: 700; color: var(--primary-color); white-space: nowrap; }
.lc-amount.owed { color: #c0392b; }
.lc-side .btn { padding: 6px 10px; font-size: 0.8rem; }
.lc-side .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.oo-list.list-mode { display: block; }
/* Headers with a switcher and exports: keep the title on one line, wrap the buttons below it if needed */
header:has(.list-actions) { flex-wrap: wrap; gap: 1rem; }
header:has(.list-actions) h1 { white-space: nowrap; }
.list-actions .debts-summary { margin-inline-end: 6px; }
.list-table th { white-space: nowrap; }
.list-table span[dir="ltr"] { white-space: nowrap; }
.list-table .row-actions { flex-wrap: nowrap; }

/* ── Category chips (Settings) ── */
.category-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 20px; padding: 4px 6px 4px 12px; font-size: 0.88rem;
}
[dir="rtl"] .category-chip { padding: 4px 12px 4px 6px; }
.category-chip-name { font-weight: 600; }
.category-chip-en { font-weight: 400; color: var(--text-muted); }
.category-chip-count {
    min-width: 22px; text-align: center; font-size: 0.75rem; font-weight: 700;
    background: rgba(0,0,0,0.06); color: var(--text-muted); border-radius: 10px; padding: 1px 6px;
}
.category-chip-btn {
    border: none; background: transparent; cursor: pointer; color: var(--text-muted);
    width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
}
.category-chip-btn:hover { background: rgba(0,0,0,0.06); color: var(--primary-color); }
.category-chip-btn.danger:hover { color: #c0392b; }
.category-chip-btn .material-symbols-rounded { font-size: 1rem; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #a93226; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Customer purchase history ── */
.history-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 1rem; }
.history-stat { flex: 1 1 120px; background: var(--bg-secondary, rgba(0,0,0,0.03)); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.history-stat span { font-size: 0.75rem; color: var(--text-muted); }
.history-stat b { font-size: 1.1rem; }
.history-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.history-sale { border: 1px solid var(--border-color); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.history-sale-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.history-sale-side { display: flex; align-items: center; gap: 6px; color: var(--primary-color); }
.history-date { color: var(--text-muted); font-size: 0.82rem; margin-inline-start: 6px; }
.history-badge { color: #fff; font-size: 0.7rem; font-weight: 700; border-radius: 10px; padding: 1px 8px; margin-inline-start: 6px; }
.history-line { display: flex; justify-content: space-between; gap: 10px; font-size: 0.88rem; }
.history-line.muted { color: var(--text-muted); font-size: 0.82rem; }
.history-returned { color: #e67e22; font-weight: 700; font-size: 0.78rem; }
.history-empty { text-align: center; color: var(--text-muted); padding: 2rem; }

.barcodes-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }

/* ── Point of sale: product card size (1 = smallest … 5 = largest, 3 = the usual) ── */
.pos-products .product-card { padding: var(--pos-card-pad, 1.2rem); }
.pos-products .product-card h3 { font-size: calc(1rem * var(--pos-font, 1)); }
.pos-products .product-card p { font-size: calc(0.9rem * var(--pos-font, 1)); }
.pos-products .product-card .price { font-size: calc(1.1rem * var(--pos-font, 1)); }
.pos-products .pos-product-image { height: var(--pos-img-h, 120px); }
.pos-products[data-size="1"] { --pos-card-min: 115px; --pos-img-h: 70px;  --pos-card-pad: 0.55rem; --pos-font: 0.8;  gap: 0.6rem; }
.pos-products[data-size="2"] { --pos-card-min: 145px; --pos-img-h: 95px;  --pos-card-pad: 0.85rem; --pos-font: 0.9;  gap: 0.8rem; }
.pos-products[data-size="3"] { --pos-card-min: 180px; --pos-img-h: 120px; --pos-card-pad: 1.2rem;  --pos-font: 1; }
.pos-products[data-size="4"] { --pos-card-min: 225px; --pos-img-h: 165px; --pos-card-pad: 1.3rem;  --pos-font: 1.08; }
.pos-products[data-size="5"] { --pos-card-min: 280px; --pos-img-h: 215px; --pos-card-pad: 1.4rem;  --pos-font: 1.15; }
.pos-products[data-size="1"] .product-card .btn { padding: 2px 6px !important; font-size: 0.7rem !important; }

.pos-size-control {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 999px; padding: 4px 8px;
}
.pos-size-btn {
    width: 30px; height: 30px; border: none; background: transparent; border-radius: 50%;
    color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.pos-size-btn:hover:not(:disabled) { background: rgba(0,0,0,0.06); color: var(--primary-color); }
.pos-size-btn:disabled { opacity: 0.35; cursor: default; }
.pos-size-btn .material-symbols-rounded { font-size: 1.2rem; }
#pos-size-range { width: 110px; accent-color: var(--primary-color); cursor: pointer; }

/* ── Data tables: the table view of every screen ── */
.card.table-wrapper { padding: 0; overflow: auto; }
.list-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; }
.list-table thead th {
    background: color-mix(in srgb, var(--primary-color) 8%, #ffffff);
    color: var(--text-main); font-size: 0.8rem; font-weight: 700;
    text-transform: none; letter-spacing: 0; text-align: start; white-space: nowrap;
    padding: 0.8rem 0.75rem; border-bottom: 1px solid color-mix(in srgb, var(--primary-color) 22%, transparent);
}
.list-table thead th.num { text-align: end; }
.list-table tbody td {
    padding: 0.7rem 0.75rem; text-align: start; vertical-align: middle; line-height: 1.45;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06); transition: background 0.12s;
}
.list-table tbody tr:nth-child(even) td { background: rgba(0, 0, 0, 0.018); }
.list-table tbody tr:hover td { background: color-mix(in srgb, var(--primary-color) 6%, transparent); }
.list-table tbody tr:last-child td { border-bottom: none; }
.list-table td.num, .list-table th.num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.list-table .nowrap { white-space: nowrap; }
.list-table .muted { color: var(--text-muted); font-size: 0.82rem; }
.list-table b, .list-table strong { font-weight: 700; }
.list-table td:last-child:has(.row-actions) { width: 1%; }
.list-table .row-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: nowrap; }
.list-table .row-actions .btn { padding: 6px 10px; font-size: 0.8rem; white-space: nowrap; box-shadow: none; }
.list-table .row-actions .btn-icon { width: 32px; height: 32px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--border-color) !important; background: var(--card-bg) !important; }
.list-table .row-actions .btn-icon:hover { border-color: currentColor !important; background: rgba(0, 0, 0, 0.04) !important; }
.list-table .cell-thumb { width: 1%; text-align: center; }
.list-table .cell-thumb .product-thumbnail { width: 46px; height: 46px; display: block; border-radius: 10px; }
.list-table .cell-name { min-width: 170px; }
.list-table .cell-title { font-weight: 600; }
.list-table .cell-code { font-family: Consolas, 'Courier New', monospace; font-size: 0.82rem; font-weight: 600; white-space: nowrap; color: var(--text-muted); }

/* Small square icon buttons in table rows */
.tbl-icon-btn, .list-table .icon-btn, .lc-side .icon-btn, .card-actions .icon-btn {
    width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border-color);
    background: var(--card-bg); color: var(--text-muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.tbl-icon-btn .material-symbols-rounded, .list-table .icon-btn .material-symbols-rounded, .lc-side .icon-btn .material-symbols-rounded, .card-actions .icon-btn .material-symbols-rounded { font-size: 1.1rem; }
.tbl-icon-btn:hover, .list-table .icon-btn:hover, .lc-side .icon-btn:hover, .card-actions .icon-btn:hover { color: var(--primary-color); border-color: var(--primary-color); background: color-mix(in srgb, var(--primary-color) 8%, #ffffff); }
.tbl-icon-btn.danger:hover { color: #c0392b; border-color: #c0392b; background: #fdecea; }

/* Sizes and colours of a product */
.size-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.size-pill { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding: 3px 8px; font-size: 0.76rem; }
.color-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.color-chip {
    display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
    border: 1px solid var(--border-color); background: rgba(0, 0, 0, 0.03);
    border-radius: 999px; padding: 2px 8px; font-size: 0.78rem;
}
.color-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); font-style: normal; }
.color-dot.unknown { background: conic-gradient(#f48fb1, #fdd835, #43a047, #1e88e5, #8e24aa, #f48fb1); opacity: 0.55; }
.list-table .badge { white-space: nowrap; display: inline-block; }
.list-table td:first-child, .list-table th:first-child { padding-inline-start: 1.1rem; }
.list-table td:last-child, .list-table th:last-child { padding-inline-end: 1.1rem; }
.card-actions:has(> .icon-btn) { display: flex; gap: 6px; }

/* ══════════════════════════════════════════════════════════════════
   PHONES AND SMALL TABLETS (max-width 900px) — js/ui-mobile.js
   The program window on the shop's computer is always wider: nothing
   below changes it.
   ══════════════════════════════════════════════════════════════════ */
.mobile-topbar, .mobile-menu-backdrop, .pos-cart-jump { display: none; }

@media (max-width: 900px) {
    body { height: 100vh; height: 100dvh; }
    #app-container { flex-direction: column; height: 100vh !important; height: 100dvh !important; }

    /* Top bar: ☰, the screen's name, the logo */
    .mobile-topbar {
        display: flex; align-items: center; gap: 10px; flex-shrink: 0;
        height: 56px; padding: 0 10px; position: relative; z-index: 20;
        background: var(--sidebar-bg, rgba(255,255,255,.9)); border-bottom: 1px solid var(--border-color);
        backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    }
    .mobile-menu-btn {
        width: 44px; height: 44px; border: none; border-radius: 12px; background: transparent;
        color: var(--text-main); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    }
    .mobile-menu-btn:active { background: rgba(0,0,0,.06); }
    .mobile-menu-btn .material-symbols-rounded { font-size: 1.7rem; }
    .mobile-title { flex: 1; font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mobile-logo { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }

    /* The menu slides in from the side */
    .sidebar {
        position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 2001;
        width: min(290px, 85vw); padding: 1.25rem 1rem;
        transform: translateX(-105%); box-shadow: 0 0 30px rgba(0,0,0,.18);
        background: var(--card-bg, #fff);
    }
    [dir="rtl"] .sidebar { transform: translateX(105%); }
    body.menu-open .sidebar { transform: translateX(0); }
    /* Animated only once the menu is used (not when the language flips the page at start-up) */
    body.menu-anim .sidebar { transition: transform .25s ease; }
    .sidebar .logo-container { margin-bottom: 1.25rem; }
    .sidebar .nav-item { padding-block: 12px; }
    .mobile-menu-backdrop {
        display: block; position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.35);
        opacity: 0; pointer-events: none; transition: opacity .25s;
    }
    body.menu-open .mobile-menu-backdrop { opacity: 1; pointer-events: auto; }

    /* The screen */
    .main-content { padding: 1rem; flex: 1; min-height: 0; -webkit-overflow-scrolling: touch; }
    header { flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
    header h1 { font-size: 1.4rem; letter-spacing: 0; }
    header:has(.list-actions) h1 { white-space: normal; }
    .list-actions { width: 100%; justify-content: flex-start; gap: 8px; }
    .list-actions .btn, header .btn { padding: 10px 12px; font-size: 0.85rem; }
    .card { padding: 1rem; }
    .btn { min-height: 42px; }

    /* 16px fields: the phone does not zoom the page when one is tapped */
    input.form-control, select.form-control, textarea.form-control, .search-box input, input[type="text"], input[type="number"],
    input[type="password"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], select, textarea { font-size: 16px !important; }

    /* Grids become one column */
    .cards-view { grid-template-columns: 1fr; gap: 1rem; }
    .form-row { flex-direction: column; gap: 0; }
    #dashboard > div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
    #dashboard .pos-layout { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    #dashboard .pos-layout .card p { font-size: 1.5rem !important; }
    .inventory-grid-container { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

    /* Point of sale: products, then the order */
    #pos .pos-layout { grid-template-columns: 1fr; height: auto; gap: 1rem; }
    #pos .pos-products { overflow: visible; padding: 0; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(var(--pos-card-min, 180px), 40vw), 1fr)); }
    #pos .cart-section { scroll-margin-top: 8px; }
    #pos .cart-items { max-height: none; }
    #pos .summary-row { font-size: 1rem; }
    #pos .summary-row.total { font-size: 1.25rem; }
    .pos-cart-jump:not([hidden]) {
        display: flex; align-items: center; gap: 8px; position: fixed; z-index: 900;
        bottom: calc(14px + env(safe-area-inset-bottom)); inset-inline-end: 14px;
        padding: 12px 18px; border: none; border-radius: 999px; cursor: pointer;
        background: var(--primary-color); color: #fff; font: inherit; font-weight: 700;
        box-shadow: 0 8px 24px rgba(0,0,0,.25);
    }
    .pos-cart-jump b { background: #fff; color: var(--primary-color); border-radius: 999px; min-width: 22px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
    body.menu-open .pos-cart-jump { display: none; }

    /* Windows fill the screen from the bottom */
    .modal-overlay { align-items: flex-end; }
    .modal, .modal-overlay > .modal-content, .modal-overlay > div[class*="modal"]:not(.modal-overlay) {
        max-width: 100% !important; width: 100% !important; max-height: 92vh; max-height: 92dvh;
        border-radius: 18px 18px 0 0; padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    }
    .modal.side-panel { height: 100%; max-height: 100%; border-radius: 0; }

    /* Tables scroll sideways inside their card */
    .table-wrapper { -webkit-overflow-scrolling: touch; }
    .list-table thead th, .list-table tbody td { padding: 0.6rem 0.65rem; }
    .list-compact .lc-row { flex-wrap: wrap; }
    .lc-side { flex-wrap: wrap; }

    /* Rows of buttons and filters wrap instead of running off the screen */
    header > div[style*="display: flex"], header > div[style*="display:flex"] { flex-wrap: wrap !important; }
    .date-filter { flex-wrap: wrap; gap: 6px; }
    .date-filter input { min-width: 0; flex: 1 1 130px; width: auto !important; }
    .filter-bar > * { min-width: 0; max-width: 100%; }
    /* Cards in a grid may shrink to the screen (their tables scroll inside) */
    .debts-list, .suppliers-grid, .cards-view, .oo-list { grid-template-columns: minmax(0, 1fr) !important; }
    .debts-list > *, .suppliers-grid > *, .cards-view > *, .oo-list > * { min-width: 0; }
    .debt-card-head { flex-wrap: wrap; }

    /* Sign-in */
    .login-wrapper { padding: 12px; }
    .login-wrapper .login-box, .login-wrapper > div { max-width: calc(100vw - 24px); }
    .login-card { padding: 1.5rem 1.25rem; }
    .login-brand { margin-bottom: 0.75rem; }
    .login-brand img { width: 120px; }
    .login-card h2 { font-size: 1.4rem; margin-bottom: 1rem; }
    .login-card .form-group { margin-bottom: 0.9rem; }
}

/* ── Power button (js/ui-power.js): the window has no title bar ── */
.power-btn {
    width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; cursor: pointer;
    border: 1px solid rgba(192, 57, 43, 0.25); background: rgba(192, 57, 43, 0.07); color: #c0392b;
    display: inline-flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s;
}
.power-btn:hover { background: #c0392b; color: #fff; }
.power-btn .material-symbols-rounded { font-size: 1.25rem; }
/* Window buttons next to it: minimize and sign out (neutral, same size) */
.window-btns { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
/* Side menu: the buttons get their own row under the logo (too narrow for both) */
.sidebar .logo-container { flex-wrap: wrap; }
.logo-container .window-btns { flex-basis: 100%; justify-content: center; gap: 10px; margin-top: 10px; }
.logo-container .window-btns .power-btn,
.logo-container .window-btns .win-btn { width: 32px; height: 32px; }
.logo-container .window-btns .material-symbols-rounded { font-size: 1.1rem; }
.win-btn {
    width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; cursor: pointer;
    border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-muted);
    display: inline-flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s;
}
.win-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.win-btn .material-symbols-rounded { font-size: 1.25rem; }
.win-btn-logout:hover { background: #e74c3c; border-color: #e74c3c; }
.login-wrapper > .window-btns-corner { position: absolute; top: 16px; inset-inline-end: 16px; margin: 0; z-index: 2; }
/* Minimize and turn off only on the shop's computer window; sign out everywhere */
body.no-power-btn .power-btn, body.no-power-btn [data-minimize] { display: none; }
@media (max-width: 900px) { .power-btn, [data-minimize] { display: none; } }
/* Borderless maximized window larger than the screen (js/ui-power.js): content kept visible */
body.frame-fit { box-sizing: border-box; padding: var(--fit-t, 0) var(--fit-x, 0) var(--fit-b, 0); }
body.frame-fit .login-wrapper { top: var(--fit-t, 0); left: var(--fit-x, 0); right: var(--fit-x, 0); bottom: var(--fit-b, 0); }
body.frame-fit #app-container { height: 100% !important; }

/* Settings → colour names in English */
.colors-en-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.color-en-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 8px; margin: 0; }
.color-en-ar { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; min-width: 0; }
.color-en-row .form-control { padding: 6px 10px; }

/* Online orders: send the invoice on WhatsApp */
.oo-wa-btn { color: #128c7e; border-color: rgba(18, 140, 126, 0.35); }
.oo-wa-btn:hover { background: #25d366; color: #fff; border-color: #25d366; }

/* Settings → store logo (js/ui-store-logo.js) */
.store-logo-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
#store-logo-preview { width: 84px; height: 84px; object-fit: cover; border-radius: 16px; border: 1px solid var(--border-color); background: #fff; }
.store-logo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1; min-width: 200px; }
.store-logo-actions small { flex-basis: 100%; }

/* Offers (js/utils/offer.js): usual price crossed out in red, offer price, % off */
.offer-old { color: #d32f2f; text-decoration: line-through; text-decoration-color: #d32f2f; text-decoration-thickness: 2px; font-weight: 500; font-size: 0.85em; opacity: 0.9; }
.offer-new { font-weight: 700; }
.offer-pct { display: inline-block; background: #d32f2f; color: #fff; font-size: 0.72em; font-weight: 700; padding: 1px 6px; border-radius: 999px; vertical-align: middle; }
.offer-box { margin-top: 0.5rem; padding: 0.75rem 1rem; border: 1px dashed var(--border-color); border-radius: 10px; }
.offer-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; margin: 0; }
.offer-toggle input { width: 18px; height: 18px; }
.offer-toggle .material-symbols-rounded { color: #d32f2f; font-size: 1.2rem; }
#prod-offer-fields { margin-top: 0.75rem; }
.offer-preview { margin-top: 0.25rem; font-size: 1.05rem; }

/* Sign-in: saved accounts and the remember / save options (js/ui-login-memory.js) */
.saved-logins { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1rem; }
.saved-logins[hidden] { display: none; }
.saved-logins-title { flex-basis: 100%; font-size: 0.8rem; color: var(--text-muted); }
.saved-login { display: inline-flex; align-items: stretch; border: 1px solid var(--border-color); border-radius: 999px; overflow: hidden; background: var(--card-bg); }
.saved-login-pick { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; padding: 6px 10px 6px 12px; cursor: pointer; font: inherit; font-weight: 600; color: var(--text-color, inherit); }
.saved-login-pick:hover { background: rgba(0, 0, 0, 0.04); }
.saved-login-pick .material-symbols-rounded { font-size: 1.2rem; color: var(--primary-color); }
.saved-login-forget { border: none; border-inline-start: 1px solid var(--border-color); background: none; padding: 0 8px; cursor: pointer; color: var(--text-muted); display: inline-flex; align-items: center; }
.saved-login-forget:hover { color: #e74c3c; }
.saved-login-forget .material-symbols-rounded { font-size: 1rem; }
.login-options { display: flex; flex-direction: column; gap: 6px; margin: -0.25rem 0 1rem; }
.login-option { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; cursor: pointer; margin: 0; }
.login-option[hidden] { display: none; }
.login-option input { width: 16px; height: 16px; }

/* WhatsApp offer to the customers (js/ui-broadcast.js): pieces | message | customers, then the sending list */
.modal.broadcast-modal { max-width: 1200px; width: 96vw; }
.broadcast-modal .btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.bc-grid { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 1.25rem; margin-top: 1rem; }
.bc-col { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.bc-col h3 { font-size: 1rem; margin: 0; color: var(--primary-color); }
.bc-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bc-count { font-size: 0.8rem; color: var(--text-muted); margin-inline-start: auto; }
.bc-list { border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; height: 340px; overflow-y: auto; padding: 4px; }
.bc-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; cursor: pointer; margin: 0; }
.bc-item:hover { background: rgba(0,0,0,0.03); }
.bc-item.on { background: rgba(255, 107, 129, 0.08); }
.bc-item input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--primary-color); }
.bc-thumb { width: 38px; height: 38px; border-radius: 8px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.04); color: var(--text-muted); }
.bc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bc-item-text { display: flex; flex-direction: column; min-width: 0; }
.bc-item-name { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-item-sub { font-size: 0.78rem; color: var(--text-muted); }
.bc-item-sub s { color: #e74c3c; }
.bc-off { color: #e74c3c; font-weight: 600; }
.bc-empty { padding: 2rem 1rem; text-align: center; color: var(--text-muted); font-size: 0.88rem; }
.bc-inline { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.82rem; }
.bc-inline select { width: auto; padding: 0.3rem 0.5rem; }
#bc-text { height: 320px; resize: vertical; font-size: 0.9rem; line-height: 1.5; }
.bc-note { display: block; font-size: 0.78rem; color: var(--text-muted); white-space: pre-line; }
.bc-warn { color: #e67e22; }
.bc-check { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; margin: 0; cursor: pointer; }
.bc-check[hidden], .bc-note[hidden] { display: none; }
.bc-check input { width: 18px; height: 18px; accent-color: var(--primary-color); }
.bc-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 1rem; }
.bc-error { margin-inline-end: auto; font-size: 0.85rem; color: #e74c3c; }
.bc-progress { height: 10px; border-radius: 5px; background: rgba(0,0,0,0.06); overflow: hidden; margin-top: 1rem; }
.bc-progress-bar { height: 100%; width: 0; background: #25d366; transition: width 0.3s; }
.bc-progress-text { font-weight: 600; margin: 0.5rem 0; }
.bc-current { display: flex; flex-wrap: wrap; gap: 10px; margin: 0.75rem 0; }
.bc-current [hidden] { display: none; }
.bc-next { background: #25d366 !important; border-color: #25d366 !important; font-size: 1rem; }
.bc-status { font-size: 0.88rem; color: #27ae60; min-height: 1.2em; }
.bc-queue { list-style: none; margin: 0.75rem 0 0; padding: 0; max-height: 300px; overflow-y: auto; border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; }
.bc-queue li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; font-size: 0.85rem; border-bottom: 1px solid rgba(0,0,0,0.04); }
.bc-queue li small { color: var(--text-muted); }
.bc-queue li.current { background: rgba(37, 211, 102, 0.12); font-weight: 600; }
.bc-q-sent span:last-child { color: #27ae60; }
.bc-q-skipped span:last-child { color: var(--text-muted); }
@media (max-width: 1000px) { .bc-grid { grid-template-columns: 1fr; } .bc-list { height: 240px; } }

/* Taking a product photo with the camera (js/ui-camera.js) */
.modal.camera-modal { max-width: 760px; width: 94vw; }
.cam-stage { position: relative; margin-top: 1rem; background: #111; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.cam-stage video, .cam-stage img { width: 100%; height: 100%; object-fit: contain; }
.cam-stage [hidden] { display: none; }
.cam-status { position: absolute; inset: auto 12px 12px; padding: 8px 12px; border-radius: 8px; background: rgba(0,0,0,0.65); color: #fff; font-size: 0.9rem; text-align: center; }
.cam-status[hidden] { display: none; }
.cam-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 1rem; }
.cam-actions [hidden] { display: none; }

/* Saving to a folder on the computer (the program on the internet, js/ui-folder-save.js) */
.folder-save { margin: 0 0 1.5rem; padding: 1rem; border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; background: rgba(255, 107, 129, 0.04); }
.folder-save h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.fs-help { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 0.6rem; }
.fs-status { font-size: 0.88rem; font-weight: 600; margin: 0 0 0.75rem; white-space: pre-line; }
.fs-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fs-actions[hidden], .fs-actions [hidden] { display: none; }
.fs-banner { position: fixed; inset: auto 16px 16px 16px; z-index: 9000; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 10px 16px; border-radius: 12px; background: #fff7e6; border: 1px solid #f0c36d; box-shadow: 0 6px 20px rgba(0,0,0,0.12); font-size: 0.9rem; }
.fs-login-offer { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted); }

/* Shared data on the internet (js/cloud-sync.js) */
.cloud-card { margin: 0 0 1.5rem; padding: 1rem; border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; background: rgba(74, 140, 199, 0.06); }
.cloud-card h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.cloud-help { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 0.6rem; }
.cloud-status { font-size: 0.88rem; font-weight: 600; margin: 0 0 0.75rem; white-space: pre-line; }
.cloud-link { display: flex; gap: 8px; flex-wrap: wrap; }
.cloud-link input { flex: 1; min-width: 200px; }
.cloud-link[hidden], .cloud-actions[hidden] { display: none; }
.cloud-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cloud-toast { position: fixed; inset: auto 16px 80px 16px; z-index: 100001; margin: 0 auto; max-width: 520px; padding: 12px 16px; border-radius: 12px; background: #c0392b; color: #fff; font-size: 0.92rem; box-shadow: 0 8px 24px rgba(0,0,0,0.2); text-align: center; }
.cloud-pending { position: fixed; inset: auto 16px 16px 16px; z-index: 9001; margin: 0 auto; max-width: 620px; padding: 10px 14px; border-radius: 12px; background: #fff7e6; border: 1px solid #f0c36d; font-size: 0.85rem; text-align: center; }
.cloud-login-offer { margin-top: 14px; font-size: 0.85rem; text-align: start; }
.cloud-login-offer summary { cursor: pointer; color: var(--primary-color); }
.cloud-login-offer p { margin: 6px 0; color: var(--text-muted); font-size: 0.8rem; }

/* Dashboard → sales performance summary: the label at the start, the number at the far end
   with room between them; numbers keep their left-to-right order ($12.50, 12.5%) in Arabic */
.perf-summary { width: 100%; font-size: 0.95rem; border-collapse: collapse; }
.perf-summary td { padding: 12px 0; vertical-align: middle; }
.perf-summary td:first-child { color: var(--text-muted); padding-inline-end: 24px; }
.perf-summary td.perf-value {
    text-align: right; font-weight: 700; font-size: 1.05rem; white-space: nowrap;
    unicode-bidi: plaintext; font-variant-numeric: tabular-nums; min-width: 90px;
}
[dir="rtl"] .perf-summary td.perf-value { text-align: left; }
