:root {
    --primary: #FF4B2B;
    --primary-gradient: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
    --bg-light: #f8f9fa;
    --text-dark: #333;
    --text-muted: #6c757d;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --mobile-width: 480px;
}

html {
    min-height: 100%;
    background: #151515;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    background-color: #151515;
    font-family: 'Inter', sans-serif;
    padding-bottom: 0;
    color: var(--text-dark);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button,
a,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
}

input,
textarea,
select,
.form-control,
.form-select {
    font-size: 16px;
}

img,
canvas,
svg,
video {
    max-width: 100%;
}

table {
    max-width: 100%;
}

body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl input,
body.rtl textarea,
body.rtl select {
    direction: rtl;
    text-align: right;
}

body.rtl .top-navbar,
body.rtl .contacts-topbar,
body.rtl .sales-topbar,
body.rtl .quick-sale-topbar,
body.rtl .reference-topbar {
    direction: rtl;
}

body.rtl .contacts-search,
body.rtl .sales-search,
body.rtl .inventory-search,
body.rtl .contact-input,
body.rtl .qs-select-customer,
body.rtl .qs-date-row {
    direction: rtl;
}

body.rtl .contacts-filter-row,
body.rtl .inventory-filter-row,
body.rtl .assignment-pills,
body.rtl .quick-add-row {
    direction: rtl;
}

body.rtl .receipt-box p span {
    text-align: left;
}

body.rtl .fa-chevron-right::before {
    content: "\f053";
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* App Wrapper */
.app-wrapper {
    width: 100%;
    max-width: var(--mobile-width);
    margin: 0 auto;
    background-color: var(--bg-light);
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow-x: hidden;
}

.app-wrapper > .container,
.app-wrapper > .container-fluid {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
}

/* Header Navbar */
.top-navbar {
    background: var(--primary-gradient);
    color: white;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 4px 10px rgba(255, 75, 43, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    max-width: var(--mobile-width);
    margin: 0 auto;
    min-height: 68px;
}

.top-navbar h5 {
    margin: 0;
    font-weight: 700;
}

.top-navbar .icon-btn {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease-in-out;
}

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

.dashboard-header-card {
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Quick Actions Grid */
.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.action-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.action-card .icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 10px;
    background: #fdf0f0;
    color: var(--primary);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    right: auto;
    width: 100%;
    max-width: var(--mobile-width);
    margin: 0 auto;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 1000;
    transform: translateX(-50%);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 12px;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--primary);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 85px;
    right: max(18px, calc((100vw - var(--mobile-width)) / 2 + 18px));
    background: var(--primary-gradient);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.4);
    border: none;
    cursor: pointer;
    z-index: 999;
    text-decoration: none;
}

.modal,
.offcanvas,
.action-sheet-overlay {
    max-width: var(--mobile-width);
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: 100%;
}

.modal-dialog {
    max-width: calc(100% - 32px);
    margin: 16px auto;
}

.modal-content {
    border-radius: 22px;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 50px;
    color: #e9ecef;
    margin-bottom: 15px;
    display: block;
}

/* Utilities */
.text-primary-custom {
    color: var(--primary) !important;
}

.bg-primary-custom {
    background: var(--primary) !important;
}

.btn-primary-custom {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
}

.btn-primary-custom:hover {
    color: white;
    opacity: 0.9;
}

/* App wrapper user-select */
.app-wrapper {
    -webkit-user-select: none;
    user-select: none;
}

input, textarea, select {
    -webkit-user-select: auto;
    user-select: auto;
}

/* Responsive FAB */
@media (min-width: 481px) {
    body {
        display: flex;
        justify-content: center;
        background:
            radial-gradient(circle at top, rgba(255, 75, 43, .18), transparent 32rem),
            #151515;
    }

    .app-wrapper {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .toast-container-custom {
        width: min(90vw, 440px);
    }
}

/* Toast Notification */
.toast-container-custom {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 440px;
}

.toast-msg {
    padding: 12px 18px;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideDown 0.3s ease;
}

.toast-msg.success { background: #28a745; }
.toast-msg.error   { background: #dc3545; }
.toast-msg.info    { background: #17a2b8; }

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

/* Install page */
.install-wrapper {
    min-height: 100vh;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.install-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dee2e6;
}

.step-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 5px;
}

/* ── Cylinder Inventory ─────────────────────────────────────────────────── */
.overview-card { background: white; border-radius: 15px; padding: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 15px; }
.overview-stat { flex: 1; text-align: center; padding: 10px 5px; border-radius: 10px; cursor: pointer; text-decoration: none; display: block; }
.overview-stat .stat-icon { font-size: 22px; margin-bottom: 4px; }
.overview-stat .stat-num { font-size: 20px; font-weight: 700; line-height: 1; }
.overview-stat .stat-label { font-size: 11px; color: #6c757d; margin-top: 2px; }
.overview-stat.filled   { background: #f0faf0; color: #28a745; }
.overview-stat.empty    { background: #fff8f0; color: #fd7e14; }
.overview-stat.outside  { background: #f0f4ff; color: #4361ee; }
.overview-stat.customers{ background: #f8f0ff; color: #7b2d8b; }

.search-box { position: relative; }
.search-box input { border: 2px solid #FF4B2B; border-radius: 25px; padding: 10px 15px 10px 42px; font-size: 14px; }
.search-box input:focus { outline: none; box-shadow: 0 0 0 3px rgba(255,75,43,0.15); border-color: #FF4B2B; }
.search-box .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #FF4B2B; }

.filter-pill { border-radius: 20px; padding: 5px 16px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; background: #f0f0f0; color: #666; }
.filter-pill.active { background: #FF4B2B; color: white; }

.cyl-stat-box { flex: 1; text-align: center; padding: 8px 4px; }
.cyl-stat-box .num { font-size: 18px; font-weight: 700; }
.cyl-stat-box .lbl { font-size: 10px; color: #6c757d; }

/* Action Sheet */
.action-sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1050; display: none; }
.action-sheet-overlay.show { display: block; }
.action-sheet { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: white; border-radius: 20px 20px 0 0; padding: 20px; z-index: 1060; }
.action-sheet-item { display: flex; align-items: center; padding: 14px 10px; border-radius: 12px; cursor: pointer; text-decoration: none; color: #333; font-weight: 600; font-size: 15px; }
.action-sheet-item:hover { background: #f8f9fa; }
.action-sheet-item .as-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-right: 14px; }

/* Quick Stats Bar */
.quick-stat-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.quick-stat-item { flex: 1; background: #f8f9fa; border-radius: 10px; padding: 10px 6px; text-align: center; }
.quick-stat-item .qs-num { font-size: 18px; font-weight: 700; color: #FF4B2B; }
.quick-stat-item .qs-lbl { font-size: 10px; color: #6c757d; }

/* Quick Sale */
.qs-customer-box { border: 2px solid #e0e0e0; border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; cursor: pointer; }
.qs-customer-box.selected { border-color: #28a745; background: #f0faf0; }
.qs-customer-icon { width: 40px; height: 40px; border-radius: 10px; background: #28a745; color: white; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-right: 12px; }
.qs-date-box { border: 1.5px solid #e0e0e0; border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; }
.qs-date-icon { width: 36px; height: 36px; border-radius: 8px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; margin-right: 12px; }
.sale-type-tabs { display: flex; background: #f0f0f0; border-radius: 25px; padding: 3px; }
.sale-type-tab { flex: 1; text-align: center; padding: 7px; border-radius: 22px; font-size: 13px; font-weight: 600; cursor: pointer; color: #666; }
.sale-type-tab.active { background: #4361ee; color: white; }
.price-toggle { display: flex; align-items: center; gap: 8px; border: 1.5px solid #4361ee; border-radius: 20px; padding: 6px 14px; cursor: pointer; color: #4361ee; }
.price-toggle.active { background: #4361ee; color: white; }
.qty-control { display: flex; align-items: center; gap: 0; }
.qty-btn { width: 34px; height: 34px; border-radius: 8px; border: none; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.qty-btn.minus       { background: #f0f0f0; color: #666; }
.qty-btn.minus-green { background: #e8f5e9; color: #28a745; }
.qty-btn.plus        { background: #f0f0f0; color: #666; }
.qty-btn.plus-green  { background: #e8f5e9; color: #28a745; }
.qty-input { width: 50px; text-align: center; border: none; font-size: 16px; font-weight: 700; background: transparent; }
.add-to-cart-btn { width: 100%; padding: 12px; border-radius: 12px; border: none; font-size: 15px; font-weight: 700; background: #e0e0e0; color: #999; margin-top: 12px; }
.add-to-cart-btn.active { background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%); color: white; }
.save-sale-btn { width: 100%; padding: 14px; border-radius: 30px; border: none; font-size: 16px; font-weight: 700; background: #e0e0e0; color: #999; }
.save-sale-btn.active { background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%); color: white; }
.cart-item { background: white; border-radius: 12px; padding: 12px; margin-bottom: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

/* PDF reference: Cylinder Inventory */
.reference-topbar {
    min-height: 92px;
    padding: 18px 22px;
    align-items: center;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff6339 100%);
    box-shadow: 0 8px 20px rgba(255, 75, 43, 0.2);
}

.reference-topbar h5 {
    flex: 1;
    text-align: center;
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
}

.reference-back,
.reference-pdf {
    border: 0;
    color: #f04444;
    background: rgba(255,255,255,0.92);
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 19px;
    box-shadow: 0 8px 20px rgba(151, 46, 30, 0.12);
}

.reference-pdf {
    background: rgba(255,255,255,0.22);
    color: white;
}

.inventory-shell {
    padding: 22px 20px 92px;
    background: #f4f4f4;
    min-height: calc(100vh - 92px);
}

.reference-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 14px 30px rgba(0,0,0,0.06);
}

.quick-stats-card {
    padding: 22px 20px;
    margin-bottom: 20px;
}

.section-title-row,
.panel-heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-title-row h6 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
}

.title-icon,
.panel-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2f86cf;
    background: #e9f4ff;
    font-size: 20px;
}

.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 11px;
    margin-top: 18px;
}

.quick-stat-tile {
    min-height: 106px;
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

.quick-stat-tile i { font-size: 18px; margin-bottom: 14px; }
.quick-stat-tile strong { font-size: 26px; line-height: 1; }
.quick-stat-tile span { color: #808080; margin-top: 8px; font-size: 13px; }
.quick-stat-tile.blue { background: #eaf3fd; border-color: #cdddeb; color: #2f86cf; }
.quick-stat-tile.green { background: #eef7ef; border-color: #d0e4d2; color: #2f8c44; }
.quick-stat-tile.orange { background: #fff6f0; border-color: #f0ded2; color: #e97a28; }

.inventory-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0 20px;
    height: 66px;
    background: white;
    border-radius: 36px;
    align-items: center;
    box-shadow: 0 10px 22px rgba(0,0,0,0.05);
    border-bottom: 1px solid #bababa;
    margin-bottom: 22px;
}

.inventory-tab {
    height: 54px;
    border: 0;
    background: transparent;
    color: #858585;
    border-radius: 31px;
    font-size: 16px;
    font-weight: 700;
}

.inventory-tab.active {
    color: white;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff6339 100%);
}

.inventory-tab i { margin-right: 9px; }

.inventory-panel {
    padding: 28px 24px;
}

.panel-heading {
    margin-bottom: 28px;
}

.panel-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.panel-icon.pale {
    color: #2f86cf;
    background: #edf6ff;
}

.panel-heading h4 {
    margin: 0;
    font-size: 23px;
    font-weight: 800;
}

.panel-heading p {
    color: #878787;
    margin: 4px 0 0;
    font-size: 15px;
}

.reference-label {
    color: #7d7d7d;
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 11px;
}

.reference-select-wrap {
    position: relative;
    min-height: 70px;
    border: 1.5px solid #d2d2d2;
    border-radius: 15px;
    background: #fbfbfb;
    padding: 11px 45px 7px 42px;
}

.select-dot {
    position: absolute;
    left: 18px;
    top: 32px;
    width: 10px;
    height: 10px;
    background: #2f86cf;
    border-radius: 50%;
}

.reference-select {
    border: 0;
    background: transparent;
    width: 100%;
    font-weight: 800;
    font-size: 17px;
    outline: none;
    appearance: auto;
}

.select-subline {
    color: #898989;
    font-size: 13px;
    padding-top: 3px;
}

.current-pill {
    background: #fff0f2;
    color: #e5485b;
    border-radius: 6px;
    padding: 7px 12px;
    font-weight: 800;
    font-size: 14px;
}

.qty-entry {
    margin-top: 12px;
    min-height: 70px;
    border: 2px solid #d4d4d4;
    border-radius: 15px;
    display: grid;
    grid-template-columns: 48px 1fr 42px 42px;
    align-items: center;
    padding: 0 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.qty-entry > i {
    color: #f14555;
    font-size: 24px;
}

.qty-entry input {
    border: 0;
    outline: 0;
    color: #444;
    font-size: 16px;
}

.qty-entry input::placeholder { color: #8e8e8e; }
.qty-entry button {
    border: 0;
    background: transparent;
    color: #e5485b;
    font-size: 28px;
    line-height: 1;
}

.quick-add-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    align-items: center;
    margin: 0 -22px;
    padding: 20px 22px 22px;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    cursor: grab;
    user-select: none;
}

.quick-add-row span {
    color: #858585;
    white-space: nowrap;
}

.quick-add-row button {
    border: 1px solid #f3b8c1;
    color: #e5485b;
    background: #fff5f7;
    border-radius: 999px;
    min-width: 82px;
    padding: 11px 16px;
    font-weight: 800;
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.quick-add-row button:active {
    transform: scale(.97);
}

.notes-label {
    display: block;
    margin-top: 0;
}

.reference-textarea,
.reference-input {
    width: 100%;
    border: 1.5px solid #d2d2d2;
    border-radius: 14px;
    background: #fbfbfb;
    padding: 14px 16px;
    outline: 0;
}

.reference-textarea {
    min-height: 108px;
    resize: vertical;
}

.reference-textarea.small {
    min-height: 74px;
}

.inventory-submit {
    width: 100%;
    margin-top: 26px;
    border: 0;
    border-radius: 18px;
    padding: 16px;
    color: white;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff6339 100%);
    font-weight: 800;
    font-size: 16px;
}

.compact-empty {
    padding: 18px 10px 28px;
}

.history-list {
    display: grid;
    gap: 12px;
}

.history-item {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    gap: 12px;
    align-items: start;
}

.history-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f04444;
    margin-top: 8px;
}

.history-main strong { font-size: 14px; }
.history-meta {
    margin-top: 8px;
    padding: 12px;
    background: #fff5ed;
    border-radius: 8px;
    color: #b87749;
    font-size: 12px;
}
.history-meta b {
    display: block;
    color: #e5485b;
}
.history-qty {
    background: #fff0f2;
    color: #e5485b;
    border-radius: 14px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}

.opening-stock-modal .modal-content {
    border: 0;
    border-radius: 18px;
    background: #f3edf5;
    overflow: hidden;
}

.opening-stock-modal .modal-header {
    border: 0;
    padding: 17px 18px 8px;
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title-wrap span {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #ffede7;
    color: #ff4b2b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-title-wrap h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
}

.small-label {
    font-size: 12px;
    margin-bottom: 8px;
}

.entry-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.entry-mode-toggle button {
    min-height: 74px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: white;
    color: #777;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.entry-mode-toggle button strong {
    color: #6d6d6d;
    font-size: 11px;
}

.entry-mode-toggle button.active {
    border-color: #ffb5bd;
    color: #e5485b;
}

.opening-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.add-type-chip {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 9px;
    color: white;
    background: #ff3f4a;
    float: right;
    margin-top: -56px;
    position: relative;
    z-index: 2;
}

.no-types-box {
    clear: both;
    background: white;
    color: #c9bfc4;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    font-size: 12px;
    margin: 12px 0 18px;
}

.deduct-box {
    background: white;
    border-radius: 10px;
    padding: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.deduct-box strong,
.deduct-box span {
    display: block;
}

.deduct-box strong {
    font-size: 13px;
}

.deduct-box span {
    color: #8c8c8c;
    font-size: 10px;
}

.switch input {
    display: none;
}

.switch span {
    width: 46px;
    height: 25px;
    background: #cfcfd4;
    border-radius: 14px;
    display: block;
    position: relative;
}

.switch span::before {
    content: "";
    position: absolute;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: white;
    left: 3px;
    top: 3px;
    transition: transform .2s;
}

.switch input:checked + span {
    background: #ff4b2b;
}

.switch input:checked + span::before {
    transform: translateX(21px);
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.modal-actions button {
    border: 1px solid #cfc6ce;
    background: white;
    border-radius: 8px;
    padding: 12px;
    color: #8b7f89;
    font-weight: 700;
}

.modal-actions button[type="submit"] {
    border-color: transparent;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff6339 100%);
    color: white;
}

.inventory-home {
    padding: 16px 20px 100px;
    background: #f4f4f4;
    min-height: calc(100vh - 92px);
}

.inventory-overview {
    border-radius: 18px;
    padding: 20px 16px;
}

.inventory-filter-card,
.inventory-list-card {
    background: white;
    border-radius: 20px;
    padding: 20px 16px;
    margin-top: 16px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.06);
}

.inventory-search {
    display: flex;
    align-items: center;
    gap: 18px;
    border: 2px solid #d6d6d6;
    border-radius: 18px;
    height: 58px;
    padding: 0 22px;
}

.inventory-search i {
    color: #a02026;
    font-size: 21px;
}

.inventory-search input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    font-size: 17px;
}

.inventory-list-card h5 {
    font-weight: 800;
    margin-bottom: 18px;
}

.inventory-cylinder-row {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid #f0c4c4;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    background: #fff;
}

.cyl-row-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fde8e8;
    color: #b42129;
    display: flex;
    align-items: center;
    justify-content: center;
}

.capacity-badge {
    display: inline-block;
    font-size: 11px;
    margin-left: 8px;
    color: #a02026;
    background: #fff0f0;
    border: 1px solid #dda2a2;
    border-radius: 8px;
    padding: 2px 7px;
}

.row-stock {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    font-size: 12px;
    margin-top: 7px;
}

.cyl-row-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cyl-row-actions button {
    border: 0;
    border-radius: 10px;
    min-height: 38px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
}

.cyl-row-actions .view {
    color: #2f86d9;
    background: #e7f2ff;
}

.cyl-row-actions .edit {
    color: #f59e0b;
    background: #fff4dc;
}

.cyl-row-actions .delete {
    color: #ef3e45;
    background: #ffe6e8;
}

.cylinder-view-grid,
.edit-cylinder-stock-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cylinder-view-grid div {
    border: 1px solid #f0c4c4;
    border-radius: 14px;
    padding: 14px;
    background: #fff8f8;
}

.cylinder-view-grid small {
    display: block;
    color: #777;
    font-weight: 800;
    margin-bottom: 5px;
}

.cylinder-view-grid strong {
    font-size: 20px;
    font-weight: 900;
}

.inventory-fab {
    position: fixed;
    right: calc(50% - 210px);
    bottom: 86px;
    width: 74px;
    height: 74px;
    border: 0;
    border-radius: 20px;
    color: white;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff6339 100%);
    font-size: 32px;
    box-shadow: 0 12px 22px rgba(0,0,0,0.25);
    z-index: 1040;
}

.quick-action-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.48);
    display: none;
    z-index: 1050;
}

.quick-action-overlay.show {
    display: block;
}

.quick-action-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 28px 28px 0 0;
    padding: 18px 14px 26px;
}

.sheet-handle {
    width: 52px;
    height: 6px;
    border-radius: 8px;
    background: #ddd;
    margin: 0 auto 8px;
}

.quick-action-sheet h4 {
    text-align: center;
    font-weight: 800;
    margin-bottom: 20px;
}

.quick-action-item {
    width: 100%;
    min-height: 84px;
    border: 0;
    border-radius: 18px;
    background: white;
    color: #222;
    display: grid;
    grid-template-columns: 62px 1fr 22px;
    gap: 18px;
    align-items: center;
    padding: 14px 20px;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    margin-bottom: 12px;
    text-align: left;
}

.quick-action-item strong,
.quick-action-item small {
    display: block;
}

.quick-action-item strong {
    font-size: 17px;
    font-weight: 800;
}

.quick-action-item small {
    color: #8a8a8a;
    font-size: 14px;
    margin-top: 5px;
}

.quick-action-item > i {
    color: #888;
    font-size: 24px;
}

.qa-icon {
    width: 62px;
    height: 62px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.qa-icon.fire { color: #ff3f4a; background: #ffe8ea; }
.qa-icon.green { color: #2f8c44; background: #eaf5eb; }
.qa-icon.blue { color: #2f86cf; background: #eaf3fd; }
.qa-icon.yellow { color: #ff9800; background: #fff3df; }
.qa-icon.red { color: #dc3545; background: #ffe6e8; }

.add-cylinder-topbar {
    min-height: 122px;
    align-items: flex-start;
    padding-top: 34px;
}

.header-spacer {
    width: 46px;
    height: 46px;
}

.add-cylinder-shell {
    background: #f4f4f4;
    min-height: calc(100vh - 122px);
    padding: 36px 25px 88px;
}

.add-cylinder-card {
    background: white;
    border-radius: 18px;
    padding: 30px 26px;
    box-shadow: 0 18px 36px rgba(0,0,0,0.08);
}

.add-section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
}

.add-section-title i {
    color: #ff3f4a;
    font-size: 22px;
}

.add-section-title h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}

.add-basic-grid {
    display: grid;
    grid-template-columns: 1.4fr .95fr;
    gap: 14px;
}

.add-basic-grid label {
    display: block;
    font-weight: 800;
    margin-bottom: 12px;
}

.add-input-icon,
.add-select {
    height: 68px;
    border: 2px solid #d9d9d9;
    border-radius: 16px;
    background: #fbfbfb;
}

.add-input-icon {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 20px;
}

.add-input-icon i {
    color: #ff3f4a;
    font-size: 22px;
}

.add-input-icon input,
.add-select {
    border: 0;
    outline: 0;
    width: 100%;
    color: #333;
    font-size: 16px;
}

.add-input-icon input {
    background: transparent;
    min-width: 0;
}

.add-input-icon input::placeholder {
    color: #8f8f8f;
}

.add-select {
    padding: 0 16px;
}

.tracking-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 6px;
    background: #f0f0f0;
    border-radius: 14px;
    gap: 6px;
}

.tracking-toggle button {
    border: 0;
    border-radius: 10px;
    padding: 15px 10px;
    font-weight: 800;
    color: #b2b2b2;
    font-size: 15px;
}

.tracking-toggle button.active {
    color: white;
    background: #2e8b35;
    box-shadow: 0 8px 16px rgba(46,139,53,0.25);
}

.stock-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    background: #f8fff8;
    border: 1.5px solid #b9ddb9;
    border-radius: 17px;
    padding: 22px;
}

.stock-input-card {
    min-height: 156px;
    border: 1.5px solid #d7d7d7;
    border-radius: 16px;
    background: #fff;
    text-align: center;
    padding: 22px 14px;
}

.stock-input-card i {
    font-size: 24px;
    margin-bottom: 14px;
}

.stock-input-card strong,
.stock-input-card span {
    display: block;
}

.stock-input-card strong {
    font-size: 17px;
    font-weight: 800;
}

.stock-input-card span {
    color: #898989;
    font-size: 12px;
}

.stock-input-card input {
    width: 100%;
    height: 48px;
    margin-top: 14px;
    border: 1.5px solid #dcdcdc;
    border-radius: 13px;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
}

.stock-input-card.filled { border-color: #bfe4c1; }
.stock-input-card.filled i { color: #2e8b35; }
.stock-input-card.empty { border-color: #ffd9bf; }
.stock-input-card.empty i { color: #f47c2b; }
.stock-input-card.outside { border-color: #cfe4fb; }
.stock-input-card.outside i { color: #2f86cf; }
.stock-input-card.damaged { border-color: #f5c2c2; }
.stock-input-card.damaged i { color: #dc3545; }
.stock-input-card.total {
    background: #eef3ef;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.stock-input-card.total i { color: #222; }
.stock-input-card.total b {
    font-size: 28px;
    margin-top: 8px;
}

.save-cylinder-btn {
    width: 100%;
    margin-top: 32px;
    border: 0;
    border-radius: 18px;
    padding: 20px;
    color: white;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff6339 100%);
    box-shadow: 0 12px 22px rgba(255,63,74,0.26);
    font-size: 21px;
    font-weight: 800;
}

.modal-x {
    border: 0;
    background: transparent;
    color: #999;
    font-size: 28px;
}

.combined-type-box {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
}

.combined-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 64px;
    gap: 12px;
    margin-top: 14px;
}

.combined-grid button {
    border: 0;
    border-radius: 12px;
    background: #ef3333;
    color: white;
    font-size: 28px;
}

@media (max-width: 480px) {
    .inventory-fab {
        right: 20px;
    }
    .damage-fab {
        right: 96px;
        bottom: 92px;
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

.assignments-topbar {
    min-height: 132px;
    align-items: flex-start;
    padding-top: 34px;
}

.assignment-plus {
    width: 46px;
    height: 46px;
    border: 0;
    background: transparent;
    color: white;
    font-size: 28px;
}

.assignments-shell {
    background: #f7f7f7;
    min-height: calc(100vh - 132px);
    padding: 36px 20px 104px;
}

.assignment-summary {
    color: white;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff7538 100%);
    border-radius: 28px;
    padding: 26px;
    box-shadow: 0 16px 30px rgba(255,63,74,0.22);
}

.summary-head {
    display: flex;
    gap: 22px;
    align-items: center;
}

.summary-head > span {
    width: 74px;
    height: 74px;
    border-radius: 21px;
    background: rgba(255,255,255,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.summary-head p {
    margin: 0;
    opacity: .88;
    font-size: 18px;
}

.summary-head h3 {
    margin: 7px 0 0;
    font-size: 28px;
    font-weight: 800;
}

.assignment-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 28px;
    background: rgba(255,255,255,0.13);
    border-radius: 18px;
    padding: 18px 0;
}

.assignment-mini-stats div {
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.25);
}

.assignment-mini-stats div:last-child {
    border-right: 0;
}

.assignment-mini-stats i,
.assignment-mini-stats strong,
.assignment-mini-stats span {
    display: block;
}

.assignment-mini-stats i {
    font-size: 20px;
    margin-bottom: 8px;
}

.assignment-mini-stats strong {
    font-size: 20px;
}

.assignment-mini-stats span {
    opacity: .86;
    font-size: 13px;
}

.assignment-filter-card {
    margin-top: 26px;
    background: white;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.06);
}

.assignment-pills {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 28px -22px 0;
    overflow-x: auto;
    padding: 0 22px 3px;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    cursor: grab;
    user-select: none;
}

.assignment-pills button {
    flex: 0 0 auto;
    border: 1.5px solid #d5d5d5;
    background: white;
    color: #888;
    border-radius: 999px;
    padding: 12px 18px;
    white-space: nowrap;
    font-size: 15px;
    scroll-snap-align: start;
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease;
}

.assignment-pills button:active {
    transform: scale(.97);
}

.assignment-pills button.active {
    color: #ff3f4a;
    border-color: #ff3f4a;
}

.assignment-pills i {
    color: #888;
    margin-left: auto;
}

.assignment-empty {
    text-align: center;
    padding: 78px 10px 20px;
}

.assignment-empty div {
    width: 124px;
    height: 124px;
    border-radius: 50%;
    background: #ffe6e8;
    color: #ff3f4a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 54px;
    margin: 0 auto 32px;
}

.assignment-empty h3 {
    font-weight: 800;
    margin-bottom: 10px;
}

.assignment-empty p {
    color: #8d8d8d;
    font-size: 16px;
    margin-bottom: 30px;
}

.assignment-empty button {
    border: 0;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff6339 100%);
    padding: 17px 42px;
    font-weight: 800;
    font-size: 17px;
    box-shadow: 0 12px 22px rgba(255,63,74,0.24);
}

.assignment-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 18px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.05);
}

.assignment-row strong,
.assignment-row span {
    display: block;
}

.assignment-row span {
    color: #888;
    font-size: 13px;
    margin-top: 3px;
}

.assignment-row small {
    display: block;
    color: #7c828a;
    margin-top: 6px;
    font-weight: 700;
}

.assignment-row b {
    color: #ff3f4a;
    font-size: 22px;
}

.assignment-row-actions {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.assignment-return-btn {
    border: 0;
    border-radius: 999px;
    background: #e9f7ef;
    color: #2f9b55;
    padding: 8px 12px;
    font-weight: 800;
}

.return-cylinder-modal .modal-content,
.assign-cylinder-modal .modal-content {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    max-height: calc(100dvh - 24px);
}

.assign-cylinder-modal .return-modal-head {
    background: linear-gradient(135deg, #2f86d9, #237bd0);
}

.return-modal-head {
    display: grid;
    grid-template-columns: 58px 1fr 42px;
    gap: 14px;
    align-items: center;
    padding: 28px;
    color: #fff;
    background: linear-gradient(135deg, #35aa68, #2f9b45);
}

.return-modal-head > span {
    width: 54px;
    height: 54px;
    border-radius: 15px;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.return-modal-head h5 {
    margin: 0;
    font-weight: 900;
}

.return-modal-head p {
    margin: 4px 0 0;
    opacity: .9;
}

.return-modal-head .modal-x {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 24px;
}

.return-modal-body {
    padding: 22px;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.return-help {
    color: #3a8d55;
    background: #f0fbf4;
    border-radius: 13px;
    padding: 14px 16px;
    font-weight: 700;
}

.return-cylinder-card {
    background: #fbf7ff;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 16px;
}

.return-cylinder-title {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.return-cylinder-title > span {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #fff2de;
    color: #f48125;
    display: flex;
    align-items: center;
    justify-content: center;
}

.return-cylinder-title strong,
.return-cylinder-title small {
    display: block;
}

.return-cylinder-title small { color: #777; }
.return-cylinder-title b {
    color: #f48125;
    background: #fff1e3;
    border-radius: 10px;
    padding: 8px 10px;
}

.return-stepper {
    display: grid;
    grid-template-columns: 66px 1fr 66px;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

.return-stepper button,
.return-stepper input {
    height: 64px;
    border-radius: 16px;
    border: 1.5px solid #c6e7d1;
    text-align: center;
    font-size: 26px;
    font-weight: 900;
}

.return-stepper button {
    color: #35aa68;
    background: #effaf4;
}

.return-stepper input {
    color: #35aa68;
    background: #fff;
}

.return-none-btn {
    border: 0;
    background: transparent;
    color: #888;
    text-decoration: underline;
    margin-top: 12px;
    font-weight: 700;
}

.return-total-row,
.return-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.return-total-row {
    font-size: 20px;
    margin-bottom: 16px;
}

.return-total-row strong { color: #35aa68; }
.return-date-row { margin-bottom: 18px; }
.return-actions { grid-template-columns: 1fr 1.7fr; }
.return-actions button {
    min-height: 62px;
    border-radius: 14px;
    border: 1.5px solid #ddd;
    background: #fff;
    font-weight: 800;
}
.return-actions button:last-child {
    border: 0;
    color: #fff;
    background: #35aa68;
}

/* ── Assign Customer Info Card ── */
.assign-customer-info {
    padding: 0 24px 8px;
}
.assign-customer-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f0f6ff;
    border-radius: 14px;
    border: 1px solid #d6e4ff;
}
.assign-customer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2f86d9;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
}
.assign-customer-card div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.assign-customer-card strong {
    font-size: 16px;
    color: #1a1a2e;
}
.assign-customer-card small {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Professional inventory UX refinements */
.reference-topbar {
    position: sticky;
    top: 0;
    min-height: 84px;
    padding: 14px 20px;
}

.reference-topbar h5 {
    font-size: 19px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reference-back,
.reference-pdf,
.assignment-plus {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
}

.inventory-home,
.inventory-shell,
.add-cylinder-shell,
.assignments-shell {
    background: #f6f7f9;
}

.inventory-overview,
.inventory-filter-card,
.inventory-list-card,
.reference-card,
.add-cylinder-card,
.assignment-filter-card {
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.inventory-overview-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    align-items: baseline;
    margin-bottom: 16px;
}

.inventory-overview-head span {
    font-size: 17px;
    font-weight: 800;
}

.inventory-overview-head small {
    color: #7c828a;
    font-size: 12px;
}

.inventory-overview-head b {
    grid-column: 2;
    grid-row: 1 / span 2;
    color: #b5232d;
    font-size: 13px;
    white-space: nowrap;
}

.inventory-overview-head strong {
    font-size: 25px;
    line-height: 1;
}

.inventory-overview-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.inventory-overview .overview-stat {
    min-width: 0;
    padding: 12px 6px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.inventory-overview .overview-stat .stat-icon {
    font-size: 17px;
}

.inventory-overview .overview-stat .stat-num {
    font-size: 20px;
    overflow-wrap: anywhere;
}

.inventory-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    overflow-x: auto;
    padding: 2px 2px 7px;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    cursor: grab;
    user-select: none;
}

.inventory-filter-row::-webkit-scrollbar,
.quick-add-row::-webkit-scrollbar,
.assignment-pills::-webkit-scrollbar {
    display: none;
}

.inventory-filter-row.dragging,
.contacts-filter-row.dragging,
.assignment-pills.dragging,
.quick-add-row.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.inventory-filter-row .filter-pill {
    flex: 0 0 auto;
    min-height: 38px;
    white-space: nowrap;
    scroll-snap-align: start;
}

.inventory-search {
    height: 54px;
    border-width: 1.5px;
    background: #fff;
}

.inventory-search:focus-within,
.reference-input:focus,
.reference-textarea:focus,
.add-input-icon:focus-within,
.add-select:focus,
.qty-entry:focus-within {
    border-color: #ff4b2b;
    box-shadow: 0 0 0 4px rgba(255,75,43,0.12);
}

.inventory-cylinder-row {
    transition: transform .15s ease, box-shadow .15s ease;
}

.inventory-cylinder-row:active,
.quick-action-item:active,
.inventory-tab:active,
.save-cylinder-btn:active,
.inventory-submit:active {
    transform: scale(.985);
}

.inventory-fab {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    bottom: 84px;
}

.damage-fab {
    position: fixed;
    right: calc(50% - 130px);
    bottom: 94px;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%);
    font-size: 22px;
    box-shadow: 0 8px 18px rgba(220,53,69,0.3);
    z-index: 1040;
    transition: transform .15s ease, box-shadow .15s ease;
}

.damage-fab:active {
    transform: scale(.92);
}

.damage-fab.showing {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 8px 18px rgba(40,167,69,0.3);
}

.overview-stat.damaged {
    background: #fff0f0;
}
.overview-stat.damaged .stat-icon {
    background: #ffd7d7;
    color: #dc3545;
}

.quick-action-overlay {
    opacity: 0;
    pointer-events: none;
    display: block;
    transition: opacity .18s ease;
}

.quick-action-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.quick-action-sheet {
    transform: translate(-50%, 100%);
    transition: transform .22s ease;
    padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
}

.quick-action-overlay.show .quick-action-sheet {
    transform: translate(-50%, 0);
}

.quick-action-title {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 14px;
}

.quick-action-title h4 {
    margin: 0;
}

.quick-action-title button {
    position: absolute;
    right: 0;
    border: 0;
    background: #f3f4f6;
    color: #70757c;
    width: 36px;
    height: 36px;
    border-radius: 12px;
}

.quick-action-item {
    min-height: 76px;
    grid-template-columns: 54px 1fr 18px;
    gap: 14px;
    border: 1px solid rgba(15,23,42,0.06);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.qa-icon {
    width: 54px;
    height: 54px;
    font-size: 23px;
}

.quick-action-item strong {
    font-size: 16px;
}

.quick-action-item small {
    font-size: 13px;
}

.quick-stats-grid {
    gap: 10px;
}

.quick-stat-tile {
    min-height: 96px;
}

.inventory-tabs {
    padding: 5px;
    height: auto;
}

.inventory-tab {
    height: 50px;
}

.reference-select-wrap,
.qty-entry,
.reference-input,
.reference-textarea,
.add-input-icon,
.add-select {
    border-width: 1.5px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.inventory-submit:disabled,
.save-cylinder-btn:disabled,
.add-to-cart-btn:disabled,
.save-sale-btn:disabled {
    background: #d8d8d8 !important;
    color: #8a8a8a !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

.qty-entry input:disabled {
    background: transparent;
    color: #929292;
}

.add-cylinder-topbar,
.assignments-topbar {
    min-height: 96px;
    align-items: center;
    padding-top: 14px;
}

.add-cylinder-shell {
    min-height: calc(100vh - 96px);
    padding: 22px 18px 80px;
}

.add-cylinder-card {
    padding: 22px 18px;
}

.add-basic-grid {
    grid-template-columns: 1fr;
}

.add-section-title {
    margin-bottom: 16px;
}

.add-section-title h3 {
    font-size: 19px;
}

.add-input-icon,
.add-select {
    height: 58px;
}

.tracking-toggle button {
    min-height: 48px;
    font-size: 14px;
}

.stock-grid {
    gap: 12px;
    padding: 14px;
}

.stock-input-card {
    min-height: 132px;
    padding: 16px 10px;
}

.stock-input-card input {
    height: 42px;
    font-size: 17px;
}

.save-cylinder-btn {
    margin-top: 20px;
    padding: 16px;
    font-size: 18px;
}

.opening-stock-modal .modal-dialog {
    margin: 12px;
}

.opening-stock-modal .modal-content {
    border-radius: 22px;
}

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

.entry-mode-toggle button {
    min-height: 82px;
    border-radius: 14px;
}

.entry-mode-toggle button.active {
    background: #fff;
    box-shadow: 0 8px 18px rgba(15,23,42,.08);
}

.deduct-box {
    gap: 12px;
}

.deduct-box > i {
    color: #878787;
}

.deduct-box div {
    flex: 1;
}

.modal-actions button {
    border-radius: 14px;
    min-height: 48px;
}

.assignments-shell {
    min-height: calc(100vh - 96px);
    padding: 22px 18px 104px;
}

.assignment-summary {
    border-radius: 22px;
}

.assignment-filter-card {
    padding: 18px;
}

.assignment-empty {
    padding-top: 54px;
}

@media (max-width: 390px) {
    .inventory-home,
    .inventory-shell {
        padding-left: 14px;
        padding-right: 14px;
    }

    .inventory-overview-grid {
        gap: 6px;
    }

    .inventory-overview .overview-stat .stat-num {
        font-size: 18px;
    }

    .inventory-overview .overview-stat .stat-label {
        font-size: 10px;
    }

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

/* Accounts reference mobile UI */
.accounts-topbar {
    min-height: 104px;
    padding: 22px 20px;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff7538 100%);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.accounts-topbar h5 {
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}
.accounts-head-btn {
    border: 0;
    width: 58px;
    height: 58px;
    border-radius: 17px;
    color: #fff;
    background: rgba(255,255,255,.2);
    font-size: 24px;
}
.accounts-shell {
    min-height: calc(100vh - 104px);
    background: #f7f7f8;
    padding: 16px 20px 118px;
}
.accounts-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f3f3f3;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 30px;
}
.accounts-tabs button {
    min-height: 64px;
    border: 0;
    background: transparent;
    color: #777;
    font-size: 17px;
    font-weight: 700;
}
.accounts-tabs button.active {
    color: #fff;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff7538 100%);
    border-radius: 16px;
}
.account-summary-grid,
.expense-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(118px, .75fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}
.account-total-card,
.account-count-card,
.expense-total-card,
.expense-month-card {
    background: #fff;
    border-radius: 18px;
    padding: 26px;
    min-height: 170px;
    box-shadow: 0 12px 28px rgba(15,23,42,.07);
}
.account-count-card,
.expense-month-card {
    min-height: 150px;
    padding: 22px;
}
.account-total-card span,
.account-count-card span,
.expense-total-card span,
.expense-month-card span {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    font-size: 24px;
}
.account-total-card span,
.expense-total-card span { color:#ff3f4a; background:#ffe6e9; }
.account-count-card span { color:#2f86d9; background:#e7f2ff; }
.expense-month-card span { color:#f48125; background:#fff0df; }
.account-total-card strong,
.expense-total-card strong {
    color: #ff3f4a;
    font-size: 28px;
    font-weight: 900;
    display: block;
}
.account-count-card strong,
.expense-month-card strong {
    color: #2f86d9;
    font-size: 27px;
    font-weight: 900;
    display: block;
}
.expense-month-card strong { color:#f48125; }
.account-total-card small,
.account-count-card small,
.expense-total-card small,
.expense-month-card small {
    color: #888;
    font-size: 16px;
}
.account-filter-row {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin: 8px 0 18px;
    overflow-x: auto;
    padding: 0 6px 8px;
    margin-left: -6px;
    margin-right: -6px;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.account-filter-row::-webkit-scrollbar {
    display: none;
}
.account-filter-row button {
    min-width: 82px;
    flex: 0 0 auto;
    min-height: 50px;
    border-radius: 999px;
    border: 1.5px solid #ddd;
    color: #222;
    background: #fff;
    font-size: 17px;
    font-weight: 700;
    scroll-snap-align: start;
}
.account-filter-row button.active {
    border-color: transparent;
    color: #fff;
    background: #ff3f4a;
    box-shadow: 0 10px 20px rgba(255,63,74,.22);
}
.account-row {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 18px;
    align-items: center;
    box-shadow: 0 10px 24px rgba(15,23,42,.07);
}
.account-row-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.account-row-icon.bank { color:#2f86d9; background:#e7f2ff; }
.account-row-icon.cash { color:#35aa68; background:#e9f7ef; }
.account-row-main strong {
    display: block;
    font-size: 22px;
    font-weight: 900;
}
.account-row-main em {
    display: inline-block;
    color: #2f86d9;
    background: #e7f2ff;
    border-radius: 10px;
    padding: 5px 12px;
    font-style: normal;
    font-weight: 800;
    margin-top: 8px;
}
.account-row-side {
    text-align: right;
}
.account-row-side b {
    color: #35aa68;
    font-size: 22px;
    display: block;
    margin-bottom: 14px;
}
.account-row-side > div {
    display: flex;
    gap: 8px;
}
.account-row-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 330px;
}
.add-money-btn,
.row-pdf-btn,
.account-action {
    border: 0;
    border-radius: 11px;
    min-height: 44px;
    font-weight: 800;
}
.account-action {
    padding: 0 12px;
    color: #334155;
    background: #f1f5f9;
}
.account-action.view { color:#2f86d9; background:#e7f2ff; }
.account-action.pdf { color:#ff3f4a; background:#ffe8ea; }
.account-action.edit { color:#f59e0b; background:#fff4dc; }
.account-action.delete { color:#ef3e45; background:#ffe6e8; }
.add-money-btn {
    color: #35aa68;
    background: #e9f7ef;
    padding: 0 14px;
}
.row-pdf-btn {
    width: 48px;
    color: #ff3f4a;
    background: #ffe8ea;
}
.accounts-fab {
    position: fixed;
    right: calc(50% - 210px);
    bottom: 86px;
    border: 0;
    min-width: 190px;
    height: 76px;
    border-radius: 22px;
    background: #ff3f4a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 21px;
    font-weight: 900;
    box-shadow: 0 12px 22px rgba(0,0,0,.22);
    z-index: 1030;
}
.expense-section-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin: 22px 0 28px;
}
.expense-section-head h4 {
    margin:0;
    font-size:22px;
    font-weight:900;
}
.expense-section-head button {
    border:0;
    background:transparent;
    color:#ff3f4a;
    font-weight:900;
    font-size:16px;
}
.empty-category-pill {
    width:max-content;
    max-width:100%;
    margin: 0 auto 70px;
    color:#888;
    border:1.5px solid #ddd;
    background:#fff;
    border-radius:16px;
    padding:22px 34px;
    font-size:17px;
}
.expense-empty,
.accounts-empty {
    text-align:center;
    color:#222;
    padding:50px 12px;
}
.expense-empty span,
.accounts-empty span {
    width:128px;
    height:128px;
    border-radius:24px;
    margin:0 auto 28px;
    background:#eee;
    color:#999;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:64px;
}
.expense-empty h3,
.accounts-empty h3 { font-weight:900; }
.expense-empty p,
.accounts-empty p { color:#888; font-size:18px; }
.expense-list article {
    display:grid;
    grid-template-columns:54px 1fr auto;
    gap:14px;
    align-items:center;
    background:#fff;
    border-radius:16px;
    padding:18px;
    margin-bottom:12px;
}
.expense-list article span {
    width:48px;height:48px;border-radius:12px;background:#ffe8ea;color:#ff3f4a;display:flex;align-items:center;justify-content:center;
}
.expense-list small { display:block;color:#888; }
.expense-list b { color:#ff3f4a; }
.account-transfer-modal .modal-content {
    border:0;
    border-radius:28px;
    padding:34px 26px;
}
.account-transfer-modal h3 {
    font-weight:900;
    margin-bottom:28px;
}
.account-transfer-modal h3 i { color:#ff3f4a;margin-right:16px; }
.account-transfer-modal label {
    font-weight:900;
    margin:12px 0;
}
.account-transfer-modal select,
.account-transfer-modal input,
.transfer-note {
    width:100%;
    height:76px;
    border:1.5px solid #d6d6d6;
    border-radius:16px;
    padding:0 20px;
    font-size:20px;
    background:#fff;
}
.transfer-swap {
    width:58px;
    height:58px;
    border-radius:50%;
    color:#ff3f4a;
    background:#fff0f1;
    border:1.5px solid #ffbec4;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:24px auto;
    font-size:23px;
}
.transfer-note {
    display:flex;
    align-items:center;
    gap:18px;
    margin-top:18px;
}
.transfer-note input {
    border:0;
    height:auto;
    padding:0;
}
.bottom-sheet-overlay .account-report-sheet {
    position:absolute;
    left:50%;
    bottom:0;
    transform:translateX(-50%);
    width:min(480px,100%);
    background:#fff;
    border-radius:24px 24px 0 0;
    padding:20px 26px 34px;
}
.report-sheet-head {
    display:flex;
    align-items:center;
    gap:18px;
    margin-bottom:28px;
}
.report-sheet-head > span {
    width:54px;height:54px;border-radius:13px;background:#ffe8ea;color:#ff3f4a;display:flex;align-items:center;justify-content:center;font-size:25px;
}
.report-sheet-head h4 { margin:0;font-weight:900; }
.report-sheet-head p { margin:4px 0 0;color:#888; }
.account-report-sheet h5 { font-weight:900;margin-bottom:26px; }
.report-account-option,
.pdf-type-option {
    width:100%;
    border:0;
    background:#fff;
    display:grid;
    grid-template-columns:70px 1fr 32px;
    align-items:center;
    gap:16px;
    text-align:left;
    padding:18px 0;
}
.report-account-option > span,
.pdf-type-option > span {
    width:58px;height:58px;border-radius:12px;background:#e7f2ff;color:#2f86d9;display:flex;align-items:center;justify-content:center;font-size:26px;
}
.report-account-option strong,
.pdf-type-option strong { display:block;font-size:20px;font-weight:900; }
.report-account-option small,
.pdf-type-option small { color:#35aa68;font-size:16px; }
.report-account-option > i { color:#ff3f4a;font-size:24px; }
.pdf-type-option {
    border:1.5px solid #bfe5cf;
    border-radius:16px;
    padding:20px;
    margin-bottom:16px;
}
.pdf-type-option.green { background:#f8fffb;border-color:#bfe5cf; }
.pdf-type-option.blue { background:#f3f9ff;border-color:#b7d9ff; }
.pdf-type-option.orange { background:#fff9f4;border-color:#ffd7b5; }
.pdf-type-option.green > span { color:#35aa68;background:#e9f7ef; }
.pdf-type-option.blue > span { color:#2f86d9;background:#e7f2ff; }
.pdf-type-option.orange > span { color:#f48125;background:#fff0df; }
.pdf-type-option > i { font-size:24px; }
.pdf-type-option.green > i { color:#35aa68; }
.pdf-type-option.blue > i { color:#2f86d9; }
.pdf-type-option.orange > i { color:#f48125; }
.orange-icon { background:#fff0df !important;color:#f48125 !important; }
body.rtl .account-row-side { text-align:left; }
body.rtl .report-account-option,
body.rtl .pdf-type-option { text-align:right; }
@media (max-width:390px) {
    .account-row { grid-template-columns:58px 1fr; }
    .account-row-side { grid-column:1 / -1;text-align:left; }
    .accounts-fab { right:18px; min-width:168px; }
    .account-summary-grid,.expense-summary-grid { grid-template-columns:1fr; }
}

.pdf-export-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    z-index: 1080;
}

.pdf-export-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.pdf-export-dialog {
    width: 100%;
    max-width: 374px;
    background: #f3edf5;
    border-radius: 32px;
    padding: 36px 32px 28px;
    box-shadow: 0 24px 50px rgba(0,0,0,.22);
    transform: scale(.96);
    transition: transform .18s ease;
}

.pdf-export-overlay.show .pdf-export-dialog {
    transform: scale(1);
}

.pdf-export-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 26px;
}

.pdf-export-head span {
    color: #a92cc2;
    font-size: 28px;
    line-height: 1;
}

.pdf-export-head h4 {
    margin: 0;
    font-weight: 800;
    font-size: 22px;
    color: #1f2026;
}

.pdf-export-dialog > p {
    color: #666;
    text-align: center;
    font-size: 20px;
    margin: 0 0 26px;
}

.pdf-export-option {
    width: 100%;
    min-height: 104px;
    border: 1.5px solid #9dc5f0;
    border-radius: 18px;
    background: #dfe7f8;
    display: grid;
    grid-template-columns: 72px 1fr 22px;
    grid-template-rows: auto auto;
    column-gap: 18px;
    align-items: center;
    text-align: left;
    padding: 18px 22px;
    margin-bottom: 16px;
    color: #34363b;
}

.pdf-export-option > span {
    grid-row: 1 / span 2;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #2f86d9;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.pdf-export-option strong {
    font-size: 18px;
    font-weight: 800;
}

.pdf-export-option small {
    color: #727272;
    font-size: 16px;
    line-height: 1.35;
}

.pdf-export-option > i {
    grid-column: 3;
    grid-row: 1 / span 2;
    color: #237bd0;
    font-size: 24px;
}

.pdf-export-option.green {
    background: #e6eee9;
    border-color: #aacfb0;
}

.pdf-export-option.green > span {
    background: #39a348;
}

.pdf-export-option.green > i {
    color: #31983f;
}

.pdf-export-option:active {
    transform: scale(.985);
}

.pdf-export-cancel {
    display: block;
    margin: 24px 0 0 auto;
    border: 0;
    background: transparent;
    color: #6750a4;
    font-size: 18px;
    padding: 12px 10px;
}

/* Contacts page */
.contacts-topbar {
    min-height: 104px;
    padding: 22px 20px;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff7538 100%);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 8px 20px rgba(255, 75, 43, 0.22);
}

.contacts-topbar h5 {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
}

.contacts-head-btn {
    border: 0;
    background: transparent;
    color: #fff;
    width: 42px;
    height: 42px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contacts-shell {
    min-height: calc(100vh - 104px);
    background: #f7f7f8;
    padding: 20px 16px 104px;
}

.contacts-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.contacts-summary-card {
    background: #fff;
    border-radius: 14px;
    min-height: 96px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.contacts-summary-card.wide {
    grid-column: 1 / -1;
}

.summary-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex: 0 0 44px;
}

.summary-icon.red { color: #ef3e45; background: #ffe8ea; }
.summary-icon.orange { color: #f48125; background: #fff0df; }
.summary-icon.green { color: #35aa68; background: #e9f7ef; }

.contacts-summary-card strong,
.contacts-summary-card small {
    display: block;
}

.contacts-summary-card strong {
    font-size: 19px;
    font-weight: 800;
}

.contacts-summary-card small {
    color: #8d8d8d;
    margin-top: 3px;
    font-size: 13px;
}

.text-danger-custom { color: #ef3e45; }
.text-orange-custom { color: #f48125; }
.text-success-custom { color: #35aa68; }

.contacts-search-wrap {
    margin-top: 18px;
}

.contacts-search {
    height: 64px;
    border: 1.5px solid #d9d9d9;
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 22px;
    box-shadow: 0 3px 10px rgba(15,23,42,.03);
}

.contacts-search i {
    color: #888;
    font-size: 22px;
}

.contacts-search input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    font-size: 20px;
}

.contacts-filter-row {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow-x: auto;
    margin: 0 -22px;
    padding: 14px 22px 8px;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    cursor: grab;
    touch-action: pan-x;
    user-select: none;
}

.contacts-filter-row::-webkit-scrollbar {
    display: none;
}

.contact-chip {
    border: 1.5px solid #e0e0e0;
    background: #fff;
    color: #222;
    border-radius: 999px;
    min-height: 40px;
    padding: 0 17px;
    white-space: nowrap;
    font-size: 15px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    transition: transform .16s ease, background-color .16s ease, color .16s ease, border-color .16s ease;
}

.contact-chip:active {
    transform: scale(.96);
}

.contact-chip.active {
    border-color: transparent;
    color: #fff;
    background: #ff3f4a;
}

.contact-chip.danger {
    color: #ef3e45;
    border-color: #ffb6bb;
    background: #fff2f3;
}

.contact-chip.orange {
    color: #f48125;
    border-color: #ffc99c;
    background: #fff8f0;
}

.contact-chip.blue {
    color: #226fbd;
    border-color: #9dc5f0;
    background: #edf6ff;
}

.contacts-list {
    margin-top: 16px;
}

.contact-card {
    position: relative;
    min-height: 138px;
    border-radius: 16px;
    background: #fff;
    border-left: 4px solid #36aa68;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px 20px;
    margin-bottom: 14px;
    box-shadow: 0 10px 24px rgba(15,23,42,.05);
}

.contact-card-main {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    text-decoration: none;
    color: #181a2a;
    flex: 1;
    min-width: 0;
}

.contact-avatar {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #e4f5ec;
    color: #35aa68;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 21px;
    flex: 0 0 58px;
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.contact-avatar i {
    position: absolute;
    right: 2px;
    top: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ef3e45;
}

.contact-photo-field {
    min-height: 64px;
    border: 1.5px dashed #ffb5bd;
    border-radius: 17px;
    background: #fff7f8;
    color: #ff3f4a;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-weight: 800;
    cursor: pointer;
}

.contact-photo-field i {
    font-size: 22px;
}

.contact-photo-field span {
    flex: 1;
}

.contact-photo-field input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.contact-info {
    min-width: 0;
}

.contact-info strong {
    display: block;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-info small {
    display: block;
    color: #888;
    font-size: 13px;
    margin-top: 4px;
}

.contact-info b {
    display: inline-flex;
    margin-top: 26px;
    background: #ef3e3e;
    color: #fff;
    border-radius: 14px;
    padding: 13px 22px;
    font-size: 22px;
    line-height: 1;
}

.contact-pending {
    flex: 0 0 auto;
    align-self: center;
    text-align: center;
    min-width: 92px;
    margin: 0 8px 0 4px;
}

.contact-pending small {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
    color: #888;
}

.contact-pending strong {
    display: block;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.contact-pending.due small { color: #ef3e45; }
.contact-pending.due strong { color: #ef3e45; }

.contact-pending.advance small { color: #35aa68; }
.contact-pending.advance strong { color: #35aa68; }

.contact-pending.clear small,
.contact-pending.clear strong { color: #aaa; }

.contact-menu {
    border: 0;
    background: transparent;
    color: #888;
    width: 34px;
    height: 44px;
    font-size: 20px;
}
.contact-call-btn {
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #35aa68;
    background: #e9f7ef;
    margin-right: 6px;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.party-photo-form {
    flex: 0 0 68px;
}

.party-photo-picker {
    position: relative;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: block;
    cursor: pointer;
}

.party-photo-picker img,
.party-photo-picker > span {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    color: #fff;
    font-weight: 900;
    font-size: 22px;
}

.party-photo-picker b {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ff3f4a;
    color: #fff;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.party-photo-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.party-photo-btn {
    border: 0;
    color: #ff3f4a;
    background: #fff0f2;
    border-radius: 999px;
    padding: 5px 10px;
    margin: 5px 7px 5px 0;
    font-size: 12px;
    font-weight: 800;
}

.contacts-fab {
    bottom: 92px;
}

.add-contact-modal .modal-dialog {
    margin: 16px;
}

.add-contact-modal .modal-content {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 22px 48px rgba(0,0,0,.25);
}

.add-contact-head {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 38px 38px 34px;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff7538 100%);
    color: white;
}

.add-contact-head span {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
}

.add-contact-head h5 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
}

.add-contact-modal .modal-body {
    padding: 34px 32px 28px;
}

.contact-form-label {
    display: block;
    font-weight: 800;
    color: #252525;
    font-size: 17px;
    margin: 0 0 12px;
}

.contact-form-label span,
.contact-help {
    color: #888;
    font-weight: 400;
}

.contact-help {
    margin: -4px 0 14px;
    font-style: italic;
    font-size: 14px;
    line-height: 1.45;
}

.contact-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
}

.contact-type-toggle button {
    min-height: 70px;
    border: 1.5px solid #d8d8d8;
    background: #fff;
    color: #222;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 800;
}

.contact-type-toggle button.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff7538 100%);
    box-shadow: 0 10px 22px rgba(255,63,74,.2);
}

.contact-type-toggle i {
    margin-right: 8px;
}

.contact-input {
    height: 68px;
    border: 1.5px solid #d8d8d8;
    border-radius: 17px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 20px;
    margin-bottom: 24px;
    background: #fff;
}

.contact-input:focus-within {
    border-color: #ff4b2b;
    box-shadow: 0 0 0 4px rgba(255,75,43,.12);
}

.contact-input > i {
    color: #ff3f4a;
    font-size: 21px;
}

.contact-input input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    min-width: 0;
    font-size: 17px;
}

.contact-input button {
    border: 0;
    color: #ff3f4a;
    background: #fff0f2;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 20px;
    flex: 0 0 44px;
}

.contact-modal-actions {
    display: grid;
    grid-template-columns: .85fr 1.7fr;
    gap: 14px;
    margin-top: 10px;
}

.contact-modal-actions button {
    min-height: 64px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 17px;
}

.contact-modal-actions button:first-child {
    background: #fff;
    color: #8b8b8b;
    border: 1.5px solid #ddd;
}

.contact-modal-actions button:last-child {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff7538 100%);
    box-shadow: 0 10px 22px rgba(255,63,74,.18);
}

@media (max-width: 390px) {
    .contacts-shell {
        padding-left: 12px;
        padding-right: 12px;
    }

    .contacts-summary-card {
        padding: 13px;
    }

    .contacts-summary-card strong {
        font-size: 17px;
    }

    .contacts-search input {
        font-size: 17px;
    }

    .contact-info strong {
        font-size: 15px;
    }
    .contact-info small {
        font-size: 12px;
    }

    .contact-pending {
        min-width: 78px;
        margin: 0 4px;
    }

    .contact-pending strong {
        font-size: 15px;
    }

    .contact-info b {
        font-size: 18px;
    }

    .add-contact-modal .modal-body {
        padding: 28px 24px 24px;
    }
}

@media (max-width: 390px) {
    .pdf-export-dialog {
        padding: 30px 24px 24px;
        border-radius: 28px;
    }

    .pdf-export-option {
        grid-template-columns: 62px 1fr 18px;
        min-height: 94px;
        padding: 16px;
    }

    .pdf-export-option > span {
        width: 56px;
        height: 56px;
    }
}

/* Sales & Purchases */
.sales-topbar,
.quick-sale-topbar {
    min-height: 104px;
    padding: 22px 20px;
    background: linear-gradient(135deg, #ff3f4a 0%, #ff7538 100%);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.sales-topbar h5,
.quick-sale-topbar h5 {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 21px;
    font-weight: 800;
}

html {
    scroll-behavior: smooth;
}

/* ── Invoices Page (Redesigned) ── */
.sales-shell {
    min-height: calc(100vh - 104px);
    background: #f7f7f8;
    padding: 18px 16px 132px;
}

.inv-summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}
.inv-stat {
    background: #fff;
    border-radius: 14px;
    padding: 14px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(15,23,42,.05);
    opacity: .55;
}
.inv-stat.has { opacity: 1; }
.inv-stat > span {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}
.inv-stat > span.green { color: #35aa68; background: #e9f7ef; }
.inv-stat > span.red { color: #ef3e45; background: #ffe8ea; }
.inv-stat > span.orange { color: #f48125; background: #fff0df; }
.inv-stat div { min-width: 0; }
.inv-stat strong { display: block; font-size: 20px; font-weight: 800; line-height: 1.2; }
.inv-stat small { display: block; font-size: 11px; color: #888; }
.inv-stat b { display: block; font-size: 12px; color: #35aa68; margin-top: 2px; }

.inv-controls {
    margin-bottom: 18px;
}
.inv-search {
    height: 52px;
    border: 1.5px solid #d9d9d9;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    margin-bottom: 12px;
}
.inv-search > i { color: #888; font-size: 18px; }
.inv-search input {
    border: 0;
    outline: 0;
    flex: 1;
    font-size: 15px;
    background: transparent;
    min-width: 0;
}
.inv-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: #e8e8ec;
    border-radius: 10px;
    padding: 3px;
    gap: 0;
}
.inv-tabs button {
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 10px 6px;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    transition: all .2s;
}
.inv-tabs button.active {
    background: #fff;
    color: #e5485b;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* Invoice Cards */
.inv-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(15,23,42,.05);
    margin-bottom: 14px;
    border: 1px solid #eee;
}
.inv-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.inv-type-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}
.inv-type-icon.green { color: #35aa68; background: #e9f7ef; }
.inv-type-icon.red { color: #ef3e45; background: #ffe8ea; }
.inv-type-icon.orange { color: #f48125; background: #fff0df; }
.inv-card-info { flex: 1; min-width: 0; }
.inv-card-info strong { display: block; font-size: 16px; font-weight: 800; }
.inv-card-info span { font-size: 12px; color: #237bd0; background: #eaf3ff; padding: 2px 8px; border-radius: 6px; font-weight: 600; display: inline-block; margin-top: 3px; }
.inv-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 8px;
    text-transform: uppercase;
}
.inv-badge.green { color: #35aa68; background: #e9f7ef; }
.inv-badge.red { color: #ef3e45; background: #ffe8ea; }
.inv-badge.orange { color: #f48125; background: #fff0df; }

.inv-card-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.inv-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #666;
    align-items: center;
}
.inv-card-details span { display: inline-flex; align-items: center; gap: 4px; }
.inv-status { font-weight: 700; }
.inv-status.paid { color: #35aa68; }
.inv-status.partial { color: #f48125; }
.inv-status.unpaid { color: #ef3e45; }

.inv-amounts { text-align: right; flex-shrink: 0; }
.inv-amounts b { display: block; font-size: 17px; color: #1a1a2e; }
.inv-amounts small { font-size: 12px; color: #888; }
.inv-amounts small.green-text { color: #35aa68; }

.inv-note {
    font-size: 13px;
    color: #888;
    padding: 10px 0 6px;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.inv-note i { color: #f48125; margin-top: 2px; }

.inv-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.inv-card-actions a,
.inv-card-actions button {
    flex: 1;
    min-width: 60px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px 6px;
    background: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    transition: all .15s;
}
.inv-card-actions a:hover,
.inv-card-actions button:hover {
    background: #f5f5f5;
}
.inv-card-actions a i,
.inv-card-actions button i { font-size: 14px; }
.inv-card-actions a:first-child { color: #237bd0; border-color: #b7d9ff; background: #edf6ff; }
.inv-card-actions a:nth-child(2) { color: #f48125; border-color: #ffd4a8; background: #fff7ef; }
.inv-card-actions a:nth-child(3) { color: #35aa68; border-color: #bde7d2; background: #f1fbf6; }
.inv-card-actions button:last-child { color: #ef3e45; border-color: #ffc1c5; background: #fff0f1; }

.inv-empty {
    text-align: center;
    padding: 80px 10px 30px;
}
.inv-empty div { font-size: 48px; color: #ccc; }
.inv-empty h3 { font-weight: 800; margin-top: 12px; font-size: 20px; }
.inv-empty p { color: #888; font-size: 15px; }

/* FAB fixed within mobile app wrapper */
.inv-fab {
    position: fixed;
    right: calc(50% - min(240px, 50vw - 20px));
    bottom: 86px;
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
    color: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 26px;
    box-shadow: 0 8px 20px rgba(255,63,74,.45);
    z-index: 1040;
    border: 0;
    cursor: pointer;
}

/* ── Quick Sale Mode Tabs ── */
.qs-mode-tabs {
    display: flex;
    gap: 0;
    background: #e8e8ec;
    border-radius: 12px;
    padding: 3px;
    margin-bottom: 14px;
}
.qs-mode-tabs button {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 10px;
    padding: 10px 6px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.qs-mode-tabs button.active {
    background: #fff;
    color: #e5485b;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.qs-mode-tabs button i {
    font-size: 15px;
}

.quick-sale-shell {
    min-height: calc(100vh - 104px);
    background: #f7f7f8;
    padding: 18px 16px 132px;
}

.orange-text { color: #f48125 !important; }
.green-text { color: #35aa68 !important; }

.invoice-type-lock {
    min-height: 58px;
    border: 1.5px solid #ffd0b8;
    border-radius: 14px;
    background: #fff7f1;
    color: #ff4b2b;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    font-weight: 900;
}

.invoice-split-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.invoice-split-links a {
    min-height: 48px;
    border-radius: 12px;
    color: #ff4b2b;
    background: #fff0f2;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
}

/* Quick Sale */
.quick-refresh {
    border: 0;
    color: #ff3f4a;
    background: #fff;
    width: 56px;
    height: 56px;
    border-radius: 15px;
    font-size: 24px;
}

.quick-sale-card,
.quick-cart-card {
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 10px 24px rgba(15,23,42,.06);
}

.qs-select-customer,
.qs-date-row {
    width: 100%;
    min-height: 82px;
    border: 1.5px solid #d7d7d7;
    border-radius: 16px;
    background: #fff;
    display: grid;
    grid-template-columns: 54px 1fr 24px;
    gap: 18px;
    align-items: center;
    padding: 14px 20px;
    text-align: left;
    color: #222;
    margin-bottom: 16px;
}
.qs-select-customer.selected {
    border-color: #35aa68;
    background: #effaf4;
    color: #35aa68;
}
.qs-select-customer span,
.qs-date-row span:first-child {
    width: 48px;
    height: 48px;
    border-radius: 11px;
    background: #8c8c8c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qs-select-customer.selected span { background: #35aa68; }
.qs-select-customer strong { font-size: 20px; }
.qs-date-row {
    position: relative;
}
.qs-date-row input {
    position: absolute;
    inset: 0;
    opacity: 0;
}
.qs-date-row small,
.qs-date-row strong {
    display: block;
}
.qs-date-row small { color: #8a8a8a; }

.qs-controls-row {
    display: grid;
    grid-template-columns: 1.15fr .95fr;
    gap: 12px;
}
.qs-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f4f4f4;
    border: 1.5px solid #ddd;
    border-radius: 14px;
    padding: 4px;
}
.qs-tabs button {
    border: 0;
    background: transparent;
    border-radius: 10px;
    font-weight: 800;
    font-size: 15px;
    color: #888;
    padding: 10px 4px;
    white-space: nowrap;
}
.qs-tabs button.active {
    color: #fff;
    background: #2f86d9;
}
.qs-price-toggles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.qs-price-toggle {
    border: 1.5px solid #9bc6f0;
    border-radius: 14px;
    color: #2f86d9;
    background: #eff7ff;
    font-weight: 800;
    font-size: 13px;
    padding: 10px 12px;
    text-align: left;
}
.qs-price-toggle[data-price-target="empty"] {
    border-color: #ffc9a3;
    color: #f47c2b;
    background: #fff6ee;
}
.qs-price-toggle[data-price-target="empty"].active,
.qs-price-toggle[data-price-target="empty"] span {
    background: #f47c2b;
}
.qs-price-toggle.active {
    color: #fff;
    background: #2f86d9;
    border-color: #2f86d9;
}
.qs-price-toggle[data-price-target="empty"].active {
    background: #f47c2b;
    border-color: #f47c2b;
}
.qs-price-toggle span {
    display: inline-flex;
    background: #2f86d9;
    color: #fff;
    border-radius: 8px;
    padding: 7px;
    float: right;
}
.qs-section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 18px;
}
.qs-section-divider::before,
.qs-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}
.qs-section-divider span {
    font-size: 13px;
    font-weight: 800;
    color: #888;
    white-space: nowrap;
}

.qs-cyl-box {
    border: 1.5px solid #ddd;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 16px;
    background: #fcfcfc;
}
.qs-cyl-box.filled { border-color: #b8dfc8; background: #f6fcf9; }
.qs-cyl-box.empty { border-color: #ffd9bf; background: #fffbf7; }
.qs-cyl-box-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.qs-cyl-box-head i { font-size: 16px; }
.qs-cyl-box.filled .qs-cyl-box-head i { color: #35aa68; }
.qs-cyl-box.empty .qs-cyl-box-head i { color: #f47c2b; }
.qs-cyl-box-head strong {
    font-size: 17px;
    font-weight: 800;
}
.qs-cyl-box.filled .qs-cyl-box-head strong { color: #35aa68; }
.qs-cyl-box.empty .qs-cyl-box-head strong { color: #f47c2b; }

.qs-cyl-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.qs-cyl-price-row span {
    font-weight: 800;
    font-size: 15px;
    color: #888;
    min-width: 36px;
}
.qs-cyl-price-row input {
    flex: 1;
    height: 46px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 17px;
    font-weight: 800;
    text-align: center;
    outline: 0;
}
.qs-cyl-box.filled .qs-cyl-price-row input {
    border-color: #7fc89e;
    color: #35aa68;
}
.qs-cyl-box.empty .qs-cyl-price-row input {
    border-color: #ffc9a3;
    color: #f47c2b;
}

.qs-cyl-qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.qs-cyl-qty-row label {
    font-weight: 800;
    font-size: 14px;
    color: #888;
    min-width: 32px;
}
.qs-cyl-qty-row .qs-stepper {
    flex: 1;
}

.qs-warning {
    border: 1.5px solid #ffbf8a;
    background: #fff6ee;
    color: #f48125;
    border-radius: 14px;
    padding: 24px 28px;
    font-size: 19px;
    margin-bottom: 260px;
}

.qs-add-head {
    display: grid;
    grid-template-columns: 30px auto 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}
.qs-add-head > span { color: #ff3f4a; font-size: 22px; }
.qs-add-head strong { font-size: 20px; }
.qs-add-head select {
    height: 52px;
    border: 1.5px solid #d4d4d4;
    border-radius: 11px;
    padding: 0 14px;
    min-width: 0;
}
.selected-cylinder-info {
    border: 1.5px solid #7fc89e;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    position: relative;
}
.selected-cylinder-info strong,
.selected-cylinder-info small { display: block; }
.selected-cylinder-info strong { color: #35aa68; }
.selected-cylinder-info small { color: #237bd0; }
.selected-cylinder-info b {
    position: absolute;
    right: -3px;
    top: 28px;
    color: #fff;
    background: #35aa68;
    border-radius: 12px;
    padding: 8px 12px;
}
.selected-cylinder-info > i {
    position: absolute;
    right: 14px;
    top: 15px;
    color: #35aa68;
}
.qs-stepper {
    display: grid;
    grid-template-columns: 64px 1fr 64px;
    height: 58px;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #ddd;
}
.qs-stepper button,
.qs-stepper input {
    border: 0;
    text-align: center;
    font-size: 22px;
    background: #eee;
    color: #888;
}
.qs-stepper input { background: #fff; }
.qs-stepper.filled button { background: #e3f6ec; color: #35aa68; }
.qs-stepper.empty button { background: #fff0e6; color: #f47c2b; }
.qs-add-cart {
    width: 100%;
    height: 64px;
    margin-top: 22px;
    border: 0;
    border-radius: 13px;
    background: #d9d9d9;
    color: #fff;
    font-size: 19px;
    font-weight: 800;
}
.qs-add-cart:not(:disabled) { background: #ff3f4a; }

.cart-head {
    display: flex;
    justify-content: space-between;
    color: #35aa68;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 16px;
}
.quick-cart-row {
    display: grid;
    grid-template-columns: 54px 1fr auto 42px;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid #eee;
}
.quick-cart-row > span {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    color: #ff3f4a;
    background: #fff0f1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.quick-cart-row small { color: #237bd0; display:block; }
.quick-cart-row b { color: #35aa68; }
.quick-cart-row button {
    border: 0;
    color: #ef3e45;
    background: #fff0f1;
    border-radius: 8px;
    width: 40px;
    height: 40px;
}

.payment-card h3 {
    font-weight: 800;
    margin-bottom: 20px;
}
.payment-card h3 i { color: #f48125; margin-right: 10px; }
.payment-row {
    display: grid;
    grid-template-columns: 1fr 82px;
    gap: 14px;
}
.payment-row input {
    height: 68px;
    border: 1.5px solid #d8d8d8;
    border-radius: 13px;
    padding: 0 22px;
    font-weight: 800;
    font-size: 18px;
}
.payment-row button {
    border: 0;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg,#ff3f4a,#ff7538);
    font-size: 18px;
    font-weight: 800;
}
.split-box,
.cash-alert,
.paid-pill {
    margin-top: 16px;
    border-radius: 11px;
    padding: 16px;
    background: #fff;
    border: 1.5px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.split-box small { display:block; color:#888; margin-top:4px; }
.receive-tabs {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    margin-bottom:16px;
}
.receive-tabs button {
    height:58px;
    border:1.5px solid #ddd;
    border-radius:12px;
    font-weight:800;
    background:#fff;
}
.receive-tabs button.active {
    color:#fff;
    border:0;
    background:linear-gradient(135deg,#ff3f4a,#ff7538);
}
.sale-account-list {
    display:grid;
    gap:10px;
    margin-bottom:12px;
}
.sale-account-card {
    width:100%;
    min-height:68px;
    border:1.5px solid #ddd;
    border-radius:14px;
    background:#fff;
    display:grid;
    grid-template-columns:46px 1fr auto auto;
    gap:12px;
    align-items:center;
    padding:10px 12px;
    text-align:left;
}
.sale-account-card > span {
    width:46px;
    height:46px;
    border-radius:12px;
    background:#e9f7ef;
    color:#35aa68;
    display:flex;
    align-items:center;
    justify-content:center;
}
.sale-account-card strong {
    font-size:17px;
    font-weight:900;
}
.sale-account-card small {
    color:#35aa68;
    font-weight:800;
}
.sale-account-card > i {
    color:#35aa68;
    opacity:0;
}
.sale-account-card.active {
    border-color:#35aa68;
    background:#f3fff8;
}
.sale-account-card.active > i {
    opacity:1;
}
.sale-add-account-btn {
    width:100%;
    min-height:54px;
    border:1.5px dashed #ff9d72;
    border-radius:13px;
    background:#fff8f0;
    color:#f48125;
    font-weight:900;
    margin-bottom:12px;
}
.cash-alert {
    color:#f48125;
    border-color:#ffc68f;
    background:#fff8f0;
    font-weight:800;
    cursor:pointer;
}
.receive-payment-head .modal-title { color: #35aa68; }
.receive-balance-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0fbf4;
    border: 1.5px solid #bfe4c1;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 800;
}
.receive-balance-pill strong { color: #35aa68; }
.receive-payment-modal .payment-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}
.receive-payment-modal .payment-row button {
    border: 1.5px solid #9bc6f0;
    background: #eff7ff;
    color: #2f86d9;
    border-radius: 12px;
    padding: 0 18px;
    height: 48px;
    font-weight: 800;
}
.receive-payment-modal #receivePaymentBtn {
    background: #35aa68;
    color: #fff;
    border: 0;
}

.sale-account-modal .modal-content {
    border:0;
    border-radius:22px;
}
.sale-account-modal .modal-footer {
    display:grid;
    grid-template-columns:1fr 1.4fr;
    gap:12px;
}
.sale-account-modal .modal-footer .btn {
    min-height:52px;
    border-radius:13px;
    font-weight:800;
}
.paid-pill {
    justify-content:center;
    gap:8px;
    color:#35aa68;
    border:0;
    background:#e9f7ef;
    font-weight:800;
}
.payment-card textarea {
    width:100%;
    min-height:126px;
    border:1.5px solid #ddd;
    border-radius:13px;
    padding:20px;
    font-size:22px;
}
.quick-complete-btn {
    position:fixed;
    left:50%;
    bottom:46px;
    transform:translateX(-50%);
    width:min(450px, calc(100% - 32px));
    height:72px;
    border:0;
    border-radius:999px;
    background:#ff3f4a;
    color:#fff;
    font-size:19px;
    font-weight:800;
    box-shadow:0 12px 22px rgba(0,0,0,.22);
    z-index:1040;
}
.quick-complete-btn:disabled { background:#d9d9d9; box-shadow:none; }

.qs-customer-option {
    width:100%;
    border:0;
    background:#fff;
    display:grid;
    grid-template-columns:46px 1fr;
    text-align:left;
    gap:12px;
    padding:10px;
    border-radius:12px;
}
.qs-customer-option span {
    grid-row:1 / span 2;
    width:42px;
    height:42px;
    border-radius:50%;
    background:#35aa68;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
}
.qs-customer-option small { color:#888; }

.quick-confirm-modal .modal-content,
.sale-success-modal .modal-content {
    border:0;
    border-radius:28px;
    background:#f3edf5;
}
.quick-confirm-modal .modal-body {
    padding:32px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.sale-success-modal .modal-body {
    padding:0 18px 28px;
}
.confirm-check {
    width:42px;
    height:42px;
    border-radius:50%;
    background:#35aa68;
    color:#fff;
    margin:0 auto 20px;
    display:flex;
    align-items:center;
    justify-content:center;
}
.quick-confirm-modal h3 { text-align:center; font-weight:800; }
.confirm-summary {
    display:grid;
    grid-template-columns:54px 1fr auto;
    gap:12px;
    align-items:center;
    background:#dfe7f8;
    border-radius:12px;
    padding:16px;
}
.confirm-summary > span {
    width:46px;height:46px;border-radius:10px;background:#cbe4ff;color:#237bd0;display:flex;align-items:center;justify-content:center;
}
.confirm-summary small,
.confirm-summary strong { display:block; }
.confirm-summary b { color:#8d35aa; background:#ead2f2; border:1px solid #c77ddd; border-radius:12px; padding:10px; }
.confirm-details {
    border:1.5px solid #c9dccf;
    border-radius:12px;
    padding:18px;
    margin-top:16px;
}
.confirm-cylinder,
.success-item {
    background:#fff;
    border-radius:12px;
    padding:14px;
    border:1px solid #d6f0df;
}
.confirm-cylinder span,
.success-item span {
    background:#eee;
    border:1px solid #ccc;
    border-radius:6px;
    padding:4px 7px;
}
.confirm-cylinder p,
.success-item p {
    display:flex;
    gap:10px;
    justify-content:space-between;
}
.confirm-cylinder b,
.confirm-cylinder em,
.success-item b,
.success-item em {
    background:#f5f5f5;
    border-radius:8px;
    padding:8px 10px;
    font-style:normal;
}
.confirm-total,
.confirm-paid {
    display:flex;
    justify-content:space-between;
    border-radius:12px;
    padding:20px;
    margin-top:14px;
    font-size:20px;
    font-weight:800;
}
.confirm-total { background:#e6f0ee; border:1.5px solid #9ed2bd; }
.confirm-total strong { color:#2e8b35; }
.confirm-paid { background:#e0e9fb; border:1.5px solid #9bc6f0; }
.confirm-paid strong { color:#237bd0; }
.confirm-actions {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}
.confirm-actions button {
    border:0;
    border-radius:12px;
    height:62px;
    font-weight:800;
}
.confirm-actions button:last-child {
    color:#fff;
    background:#35aa68;
}

.sale-success-modal .modal-content {
    padding:0;
    overflow:hidden;
    background:#fff;
    height: min(760px, calc(100dvh - 18px));
    max-height: calc(100dvh - 18px);
    display: flex;
    flex-direction: column;
}
.success-head {
    color:#fff;
    background:#56b75c;
    text-align:center;
    padding:34px 20px;
}
.success-head > span {
    width:48px;height:48px;border-radius:50%;background:rgba(255,255,255,.22);display:flex;align-items:center;justify-content:center;margin:0 auto 14px;
}
.success-head h4 { font-weight:800; }
.success-head button {
    border:1px solid rgba(255,255,255,.5);
    border-radius:999px;
    background:rgba(255,255,255,.15);
    color:#fff;
    padding:7px 14px;
}
.success-head b {
    display:inline-block;
    background:rgba(255,255,255,.18);
    border-radius:10px;
    padding:10px 18px;
    font-size:20px;
}
.success-head.modal-header {
    flex-direction: column;
    gap: 6px;
    padding: 28px 18px 16px;
}
.success-body.modal-body {
    padding: 18px 18px 28px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.receipt-box {
    border:1.5px solid #ccebd6;
    background:#f8fffa;
    border-radius:16px;
    padding:16px;
}
.receipt-box p {
    display:flex;
    justify-content:space-between;
    gap:12px;
}
.receipt-box p span {
    background:#eaf6ff;
    border:1px solid #9bc6f0;
    border-radius:8px;
    padding:6px 10px;
    font-weight:800;
}
.receipt-box h3 {
    text-align:center;
    font-weight:800;
}
.receipt-box h3 b {
    display:inline-block;
    color:#2e8b35;
    background:#e9f7ef;
    border:1.5px solid #9ed2bd;
    border-radius:12px;
    padding:12px 22px;
    margin-top:10px;
}
.success-body h5 {
    text-align:center;
    font-size:14px;
    font-weight:800;
    margin:14px 0;
}
.success-actions {
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:8px;
    scroll-margin: 22px;
}
.success-actions button {
    border:0;
    color:#fff;
    border-radius:14px;
    min-height:74px;
    font-weight:800;
}
.success-actions button i { display:block; font-size:20px; margin-bottom:8px; }
.success-actions .download { background:#2da4f3; }
.success-actions .preview { background:#3f8ed6; }
.success-actions .edit { background:#ff9f1a; }
.success-actions .whatsapp { background:#56b75c; }
.success-body .done {
    width:100%;
    height:60px;
    border:1.5px solid #ddd;
    border-radius:14px;
    background:#fff;
    font-weight:800;
    margin-top:16px;
}
.success-scroll-btn {
    position: sticky;
    left: 100%;
    bottom: 12px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: #ff3f4a;
    box-shadow: 0 8px 18px rgba(15,23,42,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 0 auto;
}

@media (max-width: 390px) {
    .qs-controls-row,
    .qs-price-toggles { grid-template-columns:1fr; }
    .qs-tabs button { font-size: 13px; padding: 8px 2px; }
}

.report-pdf-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ==========================================================================
   Quick Sale UI Redesign Overrides
   ========================================================================== */

/* Topbar circle button styling */
.quick-sale-topbar {
    background: linear-gradient(90deg, #f53649 0%, #f66236 100%) !important;
    box-shadow: 0 4px 12px rgba(245, 54, 73, 0.2) !important;
    min-height: 80px;
    display: flex;
    align-items: center;
    padding: 0 16px;
}
.quick-sale-topbar h5 {
    color: #ffffff;
    font-size: 21px;
    font-weight: 700;
    text-align: center;
    margin: 0;
    flex: 1;
}
.quick-sale-topbar .reference-back,
.quick-sale-topbar .quick-refresh {
    border: 0;
    color: #f53649 !important;
    background: #ffffff !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
    font-size: 18px !important;
    padding: 0 !important;
}

/* Customer selector overrides */
.qs-select-customer {
    width: 100%;
    min-height: 72px !important;
    border: 1.5px solid #dcdce0 !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    display: grid !important;
    grid-template-columns: 48px 1fr 24px !important;
    gap: 16px !important;
    align-items: center !important;
    padding: 12px 16px !important;
    text-align: left !important;
    color: #222226 !important;
    margin-bottom: 12px !important;
    transition: all 0.2s ease;
}
.qs-select-customer.selected {
    border-color: #2bbb76 !important;
    background: #f3faf6 !important;
    color: #2bbb76 !important;
}
.qs-select-customer span {
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    background: #f1f1f5 !important;
    color: #727278 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
}
.qs-select-customer.selected span {
    background: #2bbb76 !important;
    color: #ffffff !important;
}
.qs-select-customer strong {
    font-size: 17px !important;
    font-weight: 600 !important;
}
.qs-select-customer .qs-chevron {
    display: block;
    color: #8a8a8f;
    font-size: 16px;
    text-align: center;
}
.qs-select-customer.selected .qs-chevron {
    display: none;
}
.qs-select-customer .qs-check {
    display: none;
    font-size: 20px;
    color: #2bbb76;
    text-align: center;
}
.qs-select-customer.selected .qs-check {
    display: block;
}

/* Date Row overrides */
.qs-date-row {
    width: 100%;
    min-height: 72px !important;
    border: 1.5px solid #dcdce0 !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    display: grid !important;
    grid-template-columns: 48px 1fr 24px !important;
    gap: 16px !important;
    align-items: center !important;
    padding: 12px 16px !important;
    text-align: left !important;
    color: #222226 !important;
    margin-bottom: 16px !important;
    position: relative;
    cursor: pointer;
}
.qs-date-row span:first-child {
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    background: #f1f1f5 !important;
    color: #727278 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
}
.qs-date-row small {
    color: #8a8a8f !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    display: block;
    margin-bottom: 2px;
}
.qs-date-row strong {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #222226 !important;
    display: block;
}
.qs-date-row i.far.fa-calendar-plus {
    font-size: 18px;
    color: #8a8a8f;
    text-align: center;
}
.qs-date-row input[type="date"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Tabs & stacked controls row */
.qs-controls-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}
.qs-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    background: #f1f1f5 !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 4px !important;
    width: 100% !important;
}
.qs-tabs button {
    border: 0 !important;
    background: transparent !important;
    border-radius: 9px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #727278 !important;
    padding: 8px 0 !important;
    transition: all 0.2s ease !important;
}
.qs-tabs button.active {
    color: #ffffff !important;
    background: #1e75d6 !important;
    box-shadow: 0 2px 6px rgba(30, 117, 214, 0.2) !important;
}

/* Vertically stacked price banners */
.qs-price-toggles {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    grid-template-columns: none !important;
}
.qs-price-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 15px;
    background: #ffffff;
    border: 1.5px solid #dcdce0;
}
.qs-price-banner span i {
    margin-right: 8px;
    color: #8a8a8f;
}
.qs-price-banner.active.filled {
    border-color: #1e75d6;
    background: #f1f7fe;
    color: #1e75d6;
}
.qs-price-banner.active.filled span i {
    color: #1e75d6;
}
.qs-price-banner.active.empty {
    border-color: #f47c2b;
    background: #fff8f0;
    color: #f47c2b;
}
.qs-price-banner.active.empty span i {
    color: #f47c2b;
}
.qs-price-banner .qs-checkbox-icon {
    font-size: 20px;
    display: flex;
    align-items: center;
}
.qs-price-banner.active.filled .qs-checkbox-icon {
    color: #1e75d6;
}
.qs-price-banner.active.empty .qs-checkbox-icon {
    color: #f47c2b;
}

/* Redesigned Add Cylinder head & inputs */
.qs-add-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.qs-title-side {
    display: flex;
    align-items: center;
    gap: 8px;
}
.qs-title-side strong {
    font-size: 18px;
    font-weight: 700;
    color: #222226;
}
.qs-dropdown-side select {
    min-width: 140px;
    height: 44px;
    border: 1.5px solid #dcdce0;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #222226;
    background-color: #ffffff;
    appearance: auto;
    outline: none;
}
.qs-single-price-container {
    margin-bottom: 20px;
}
.qs-blue-label {
    font-size: 14px;
    font-weight: 700;
    color: #1e75d6;
    display: block;
    margin-bottom: 8px;
}
.qs-price-input-wrapper input {
    width: 100%;
    height: 52px;
    border: 2px solid #cde1f8;
    background: #ffffff;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #222226;
    text-align: center;
    outline: none;
    transition: border-color 0.2s ease;
}
.qs-price-input-wrapper input:focus {
    border-color: #1e75d6;
}

/* Steppers Grid */
.qs-steppers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.qs-stepper-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.qs-stepper-col.empty label {
    font-size: 14px;
    font-weight: 700;
    color: #727278;
}
.qs-stepper-col.filled label {
    font-size: 14px;
    font-weight: 700;
    color: #2bbb76;
}
.qs-stepper-col.empty .qs-stepper-row {
    background: #f1f1f5;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    height: 52px;
    align-items: center;
    border: 1px solid #dcdce0;
}
.qs-stepper-col.filled .qs-stepper-row {
    background: #eef7ef;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    height: 52px;
    align-items: center;
    border: 1px solid #ccebd6;
}
.qs-stepper-row button {
    border: 0;
    background: transparent;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}
.qs-stepper-col.empty .qs-stepper-row button {
    color: #727278;
}
.qs-stepper-col.filled .qs-stepper-row button {
    color: #2bbb76;
}
.qs-stepper-row input {
    border: 0;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    width: 100%;
    outline: none;
}
.qs-stepper-col.empty .qs-stepper-row input {
    color: #222226;
}
.qs-stepper-col.filled .qs-stepper-row input {
    color: #2bbb76;
}

/* Add to Cart button styles */
.qs-add-cart-btn {
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.qs-add-cart-btn:disabled {
    background: #e5e5ea !important;
    color: #aeaeb2 !important;
    cursor: not-allowed;
}
.qs-add-cart-btn:not(:disabled) {
    background: linear-gradient(90deg, #ff3647 0%, #ff6e34 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(255, 54, 71, 0.25) !important;
}

/* Sticky complete button at the bottom */
.quick-complete-btn {
    height: 60px !important;
    border-radius: 30px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    bottom: 30px !important;
}
.quick-complete-btn:disabled {
    background: #dbdbdb !important;
    color: #ffffff !important;
    box-shadow: none !important;
}
.quick-complete-btn:not(:disabled) {
    background: linear-gradient(90deg, #ff3647 0%, #ff6e34 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(255, 54, 71, 0.25) !important;
}

/* 3-Column Stepper layout & Returned theme overrides */
.qs-steppers-grid {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 8px !important;
}
.qs-stepper-row {
    grid-template-columns: 32px 1fr 32px !important;
}
.qs-stepper-col.returned label {
    font-size: 14px;
    font-weight: 700;
    color: #ff6e34;
}
.qs-stepper-col.returned .qs-stepper-row {
    background: #fff8f5;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 32px 1fr 32px;
    height: 52px;
    align-items: center;
    border: 1px solid #ffe2d6;
}
.qs-stepper-col.returned .qs-stepper-row button {
    color: #ff6e34;
}
.qs-stepper-col.returned .qs-stepper-row input {
    color: #ff6e34;
}

/* Header capsule mode toggle button */
.qs-mode-toggle-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-style: solid;
}
.qs-mode-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* Modal header capsule toggle button */
.qs-modal-toggle-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #555 !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-style: solid;
}
.qs-modal-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.08) !important;
}

/* Dynamic green gradient top header */
.quick-sale-topbar.return-theme {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}
.quick-sale-topbar.return-theme .qs-mode-toggle-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Green complete return button */
#returnCylinderBtn:not(:disabled) {
    background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(17, 153, 142, 0.25) !important;
}



/* ── Cylinder Allotment & Return Modal ─────────────────────────────────────── */
.assignments-topbar {
    min-height: 92px;
    padding: 18px 22px;
}

.assignment-plus {
    border: 0;
    width: 46px; height: 46px;
    border-radius: 15px;
    background: rgba(255,255,255,0.92);
    color: #f04444;
    font-size: 22px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(151,46,30,0.12);
}

.assignment-summary {
    background: #fff;
    border-radius: 22px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}

.summary-head {
    display: flex; gap: 14px; align-items: center; margin-bottom: 14px;
}

.summary-head span {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: #ffe5e8; color: #e5485b;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}

.summary-head p { color: #888; margin: 0; font-size: 13px; }
.summary-head h3 { margin: 0; font-size: 22px; font-weight: 900; }

.assignment-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 6px;
}

.assignment-mini-stats > div {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
}

.assignment-mini-stats > div i { color: #e5485b; font-size: 16px; }
.assignment-mini-stats > div strong { font-size: 18px; font-weight: 800; line-height: 1; }
.assignment-mini-stats > div span { font-size: 11px; color: #888; }

.assignment-filter-card {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.assignment-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    margin-top: 12px;
    padding-bottom: 4px;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    cursor: grab;
    touch-action: pan-x;
    user-select: none;
}

.assignment-pills::-webkit-scrollbar { display: none; }

.assignment-pills button {
    border: 1.5px solid #e0e0e0;
    background: #fff; color: #444;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px; font-weight: 700;
    white-space: nowrap;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.assignment-pills button.active {
    background: #e5485b; color: #fff; border-color: transparent;
}

.assignment-pills > i { color: #ccc; margin-left: 4px; font-size: 18px; }

/* Assignment row card */
.assignment-row {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    border-left: 4px solid #e5485b;
}

.assignment-row-main { flex: 1; min-width: 0; }
.assignment-row-main strong { display: block; font-size: 15px; font-weight: 800; }
.assignment-row-main span { display: block; font-size: 13px; color: #666; margin-top: 2px; }
.assignment-row-main small { display: block; font-size: 12px; color: #999; margin-top: 4px; }

.assignment-row-actions {
    display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}

.assignment-row-actions b {
    font-size: 22px; font-weight: 900; color: #e5485b;
}

.assignment-return-btn {
    border: 0;
    background: #ffe5e8; color: #e5485b;
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 13px; font-weight: 800;
    display: flex; align-items: center; gap: 6px;
}

.assignment-empty {
    text-align: center;
    padding: 50px 20px;
    color: #aaa;
}

.assignment-empty > div {
    width: 72px; height: 72px;
    border-radius: 18px;
    background: #f3f3f3; color: #ccc;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    margin: 0 auto 16px;
}

.assignment-empty h3 { color: #555; margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.assignment-empty p { font-size: 14px; margin: 0 0 20px; }
.assignment-empty button {
    border: 0;
    background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
    color: #fff;
    border-radius: 30px;
    padding: 12px 28px;
    font-size: 15px; font-weight: 800;
}

/* Return / Assign modal shared */
.return-cylinder-modal .modal-content {
    border: 0;
    border-radius: 26px;
    overflow: hidden;
}

.return-modal-head {
    background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: white;
}

.return-modal-head > span {
    width: 46px; height: 46px;
    border-radius: 14px;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}

.return-modal-head > div { flex: 1; min-width: 0; }
.return-modal-head h5 { margin: 0; font-size: 18px; font-weight: 800; }
.return-modal-head p { margin: 3px 0 0; font-size: 13px; opacity: 0.85; }
.return-modal-head p b { font-weight: 800; }

.modal-x {
    border: 0;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.return-modal-body {
    padding: 22px 20px 24px;
}

.return-help {
    background: #fff8f0;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    color: #b07030;
    margin-bottom: 18px;
    line-height: 1.55;
}

.return-help i { margin-right: 6px; }

/* Cylinder card in return modal (matching Urdu screenshot) */
.return-cylinder-card {
    background: #f8f8f8;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.return-cylinder-title {
    display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}

.return-cylinder-title > span {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: #ffe5e8; color: #e5485b;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}

.return-cylinder-title > div { flex: 1; min-width: 0; }
.return-cylinder-title strong { display: block; font-size: 15px; font-weight: 800; }
.return-cylinder-title small { display: block; color: #888; font-size: 12px; margin-top: 2px; }
.return-cylinder-title > b { font-size: 13px; color: #e5485b; font-weight: 800; white-space: nowrap; }

.return-cylinder-card > label {
    display: block; font-size: 12px; font-weight: 700; color: #888; margin-bottom: 10px;
}

.return-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border: 2px solid #f0c4c4;
    border-radius: 14px;
    overflow: hidden;
    height: 56px;
}

.return-stepper button {
    border: 0;
    background: transparent;
    color: #e5485b;
    font-size: 26px;
    font-weight: 700;
    width: 52px;
    height: 100%;
    flex-shrink: 0;
}

.return-stepper input {
    flex: 1;
    border: 0;
    outline: 0;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    background: transparent;
    color: #222;
}

.return-none-btn {
    display: block;
    margin-top: 10px;
    border: 0;
    background: transparent;
    color: #888;
    font-size: 13px;
    text-decoration: underline;
    padding: 4px 0;
}

/* "Return all" / quick set button */
.return-all-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    border: 1.5px solid #ffc5cc;
    background: #fff5f6;
    color: #e5485b;
    border-radius: 12px;
    padding: 10px;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.return-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0faf0;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #444;
}

.return-total-row strong { font-size: 16px; font-weight: 800; color: #2e8b35; }
.return-total-row strong b { font-size: 20px; }

/* Date row inside return modal */
.return-date-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f4f4f4;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    cursor: pointer;
    position: relative;
}

.return-date-row > span:first-child {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: #fff; color: #888;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}

.return-date-row > span:nth-child(2) { flex: 1; }
.return-date-row > span:nth-child(2) small { display: block; color: #888; font-size: 11px; }
.return-date-row > span:nth-child(2) strong { display: block; font-size: 15px; font-weight: 800; color: #2e8b35; }

.return-date-row > i.far { color: #888; font-size: 18px; }

.return-date-row input[type="datetime-local"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}

.return-actions {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 10px;
}

.return-actions button {
    min-height: 52px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    border: 0;
}

.return-actions button:first-child {
    background: #f0f0f0;
    color: #777;
}

.return-actions button:last-child {
    background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
    color: #fff;
}

/* Assign customer info card */
.assign-customer-info { margin-bottom: 14px; }
.assign-customer-card {
    display: flex; align-items: center; gap: 14px;
    background: #f0faf0;
    border-radius: 14px;
    padding: 14px;
}

.assign-customer-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800; flex-shrink: 0;
}

.assign-customer-card > div { flex: 1; min-width: 0; }
.assign-customer-card strong { display: block; font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assign-customer-card small { display: block; color: #666; font-size: 12px; margin-top: 2px; }

/* ── QS Steppers in assign modal ── */
.qs-stepper-row {
    display: flex; align-items: center;
}

.qs-stepper-row button {
    width: 46px; height: 46px;
    border-radius: 12px;
    border: 0;
    background: #f0f0f0;
    color: #e5485b;
    font-size: 22px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

.qs-stepper-row input {
    flex: 1;
    text-align: center;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    margin: 0 8px;
    height: 46px;
    font-size: 18px; font-weight: 800;
    color: #222;
    outline: 0;
    background: transparent;
}

/* ── Receive payment modal (contacts page) ── */
.receive-payment-head {
    background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
    color: white;
    padding: 22px 20px 18px;
    border-radius: 18px 18px 0 0;
}

.receive-payment-head h5 { color: white; }
.receive-payment-head p { color: rgba(255,255,255,0.8); }
.receive-payment-head .btn-close { filter: invert(1); }

.receive-balance-pill {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff5f0;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 14px;
    color: #444;
}

.receive-balance-pill strong { color: #e5485b; font-weight: 800; }

.receive-tabs {
    display: flex; gap: 8px; margin-bottom: 12px;
}

.receive-tabs button {
    flex: 1; min-height: 46px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    background: #fff; color: #555;
    font-size: 14px; font-weight: 700;
}

.receive-tabs button.active {
    background: #e5485b; color: #fff; border-color: transparent;
}

.payment-row {
    display: flex; gap: 8px; align-items: center;
}

.payment-row input { flex: 1; }
.payment-row button {
    border: 0;
    background: #e5485b; color: #fff;
    border-radius: 10px; padding: 10px 16px;
    font-size: 14px; font-weight: 800;
}

.sale-account-list { margin-bottom: 8px; }
.sale-account-card {
    display: flex; align-items: center; gap: 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    background: #fff;
}

.sale-account-card.active {
    border-color: #e5485b;
    background: #fff5f6;
}

.sale-account-card > span {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: #f0f0f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}

.sale-account-card strong { flex: 1; font-size: 14px; font-weight: 700; }
.sale-account-card small { font-size: 12px; color: #888; }
.sale-account-card .fa-check-circle { color: transparent; margin-left: auto; }
.sale-account-card.active .fa-check-circle { color: #e5485b; }

.sale-add-account-btn {
    display: flex; align-items: center; gap: 10px;
    border: 1.5px dashed #e0e0e0;
    background: transparent; color: #888;
    border-radius: 12px; padding: 12px 14px;
    font-size: 14px; font-weight: 700; cursor: pointer;
}

.cash-alert {
    display: flex; align-items: center; gap: 10px;
    border: 1.5px solid #ffc5cc;
    background: #fff5f6; color: #e5485b;
    border-radius: 12px; padding: 12px 14px;
    font-size: 14px; font-weight: 700; cursor: pointer;
}

/* ── Settings page ── */
.settings-page-topbar {
    background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
}

/* ── Company Profile Save ── */
.invoice-type-lock {
    display: flex; align-items: center; gap: 12px;
    background: #f0f0f0; border-radius: 12px;
    padding: 14px 16px;
    font-size: 16px; font-weight: 700; color: #555;
}

.invoice-type-lock i { color: #e5485b; font-size: 20px; }

/* ── Quick sale topbar extras ── */
.qs-mode-toggle-btn {
    border: 0;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
}

.quick-refresh {
    border: 0;
    background: rgba(255,255,255,0.15);
    color: #fff;
    width: 38px; height: 38px;
    border-radius: 10px;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
}
