@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Tajawal:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {

    /* --- Bright Pink --- */
    --primary:        #FF007F;
    --primary-light:  #FF66B2;
    --primary-glow:   rgba(255, 0, 127, 0.25);
    --primary-dark:   #C20060;

    /* --- Sky Blue --- */
    --secondary:      #00E5FF; /* Much brighter neon cyan */
    --secondary-light:#80F2FF;
    --secondary-glow: rgba(0, 229, 255, 0.35);

    /* --- Pastel Purple --- */
    --accent:         #B92B27; /* Candy red/purple */
    --accent-light:   #1565C0; /* Deep candy blue */
    --accent-glow:    rgba(185, 43, 39, 0.15);

    --success:        #00E676;
    --success-light:  #E8F5E9;
    --warning:        #FFEA00;
    --warning-light:  #FFFDE7;
    --danger:         #FF1744;
    --danger-light:   #FFEBEE;
    --whatsapp:       #25D366;

    /* --- Backgrounds --- */
    --bg-gradient:    linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%); /* Vivid Candy Gradient */
    --bg:             #F4F6F9;
    --white:          #FFFFFF;
    --card:           rgba(255, 255, 255, 0.85); /* Glassmorphism Base */
    --border:         #E2E8F0;
    --border-light:   rgba(241, 245, 249, 0.6);

    /* --- Typography --- */
    --text-main:      #1F1135; /* Dark purple/navy for better contrast */
    --text-muted:     #6E5A8E; 
    --text-light:     #A695C0; 

    /* --- Shadows (3D Glossy Candy) --- */
    --shadow-sm:      0 4px 10px rgba(255, 0, 127, 0.05);
    --shadow:         0 10px 25px rgba(0, 229, 255, 0.1);
    --shadow-lg:      0 20px 40px rgba(255, 0, 127, 0.15);
    --shadow-pink:    0 8px 25px rgba(255, 0, 127, 0.35);
    --shadow-blue:    0 8px 25px rgba(0, 229, 255, 0.35);
    --shadow-floating:0 24px 48px rgba(185, 43, 39, 0.15);

    /* --- Radii (Bubble / Pill shaped) --- */
    --radius-sm:      20px;
    --radius:         30px;
    --radius-lg:      40px;
    --radius-xl:      50px;

    /* --- Glassmorphism Utils --- */
    --glass-blur:     16px;
    --glass-border:   3px solid rgba(255, 255, 255, 0.8);

    --nav-height:     85px;
    --header-height:  75px;
    --sidebar-width:  280px;

    --transition:     all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow:all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html { 
    scroll-behavior: smooth; 
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0;
    padding-bottom: calc(var(--nav-height) + 16px);
    padding-top: var(--header-height);
    direction: rtl;
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
    margin: 0 0 12px;
}

.app-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    height: var(--header-height);
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: var(--glass-border);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
    min-width: 0;
}

.logo-text {
    font-family: 'Cairo', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.logo-sub {
    font-size: 0.85rem;
    color: var(--primary);
    display: block;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-suspended {
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 5px 12px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.82rem !important;
    height: 34px !important;
    max-height: 34px !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    user-select: none !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

#openSuspendedBtn.is-hidden-tab {
    display: none !important;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--success);
    background: var(--success-light);
    padding: 6px 12px;
    border-radius: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%   { zoom: 1; transform: none; opacity: 1; box-shadow: 0 0 0 0 rgba(0,200,83,0.5); }
    70%  { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(0,200,83,0); }
    100% { zoom: 1; transform: none; opacity: 1; }
}

.interactive-btn {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s, filter 0.2s;
    cursor: pointer;
}

.interactive-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.interactive-btn:active {
    transform: translateY(1px) !important;
}

/* Specific Candy 3D Buttons */
.candy-btn {
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
    border-radius: var(--radius-xl);
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 0 var(--primary-dark), 0 8px 15px rgba(255, 0, 127, 0.3), inset 0 2px 5px rgba(255,255,255,0.5);
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.candy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--primary-dark), 0 12px 20px rgba(255, 0, 127, 0.4), inset 0 2px 5px rgba(255,255,255,0.7);
    filter: brightness(1.1);
}

.candy-btn:active {
    transform: translateY(2px) !important;
    box-shadow: 0 2px 0 var(--primary-dark), 0 4px 8px rgba(255, 0, 127, 0.2), inset 0 2px 5px rgba(255,255,255,0.3) !important;
}

.login-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, #F5F3FF 50%, #FFF0F5 100%);
    overflow: hidden;
}

.login-logo {
    display: block;
    width: 150px;
    height: auto;
    margin: 0 auto 20px auto;
    filter: drop-shadow(0 10px 15px rgba(255, 0, 127, 0.4));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.login-logo:hover {
    transform: scale(1.1) rotate(-5deg);
}

.login-card {
    background: var(--card);
    padding: 45px 35px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-floating);
    border: var(--glass-border);
    width: 90%;
    max-width: 420px;
    text-align: center;
    position: relative;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    animation: loginFadeIn 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.login-card.login-card-error {
    animation: loginShake 0.45s ease both;
}

.login-form {
    text-align: right;
}

.login-input {
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease, background-color 0.25s ease;
}

.login-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(233, 30, 140, 0.14), 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
    background: #ffffff;
}

.login-btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn[disabled] {
    opacity: 0.85;
    transform: none;
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.25);
}

.login-eye {
    transition: color 0.2s ease, transform 0.2s ease;
}

.login-eye:hover {
    transform: translateY(-50%) scale(1.08);
}

.login-eye-active {
    color: var(--primary-dark) !important;
}

.login-error {
    transition: all 0.25s ease;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes loginShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

@keyframes loginFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(20px, -25px, 0) scale(1.05); }
}

.interactive-btn:active {
    transform: translateY(1px);
    box-shadow: var(--shadow-sm);
}

.pulse-btn {
    animation: pulse-btn-anim 2.5s infinite;
}

@keyframes pulse-btn-anim {
    0%   { box-shadow: 0 0 0 0 rgba(0,200,83,0.4); }
    70%  { box-shadow: 0 0 0 14px rgba(0,200,83,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,200,83,0); }
}

.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mb-15 { margin-bottom: 15px; }
.text-center { text-align: center; }

.app-content {
    padding: 24px 28px;
    max-width: 1400px; 
    margin: 0 auto;
}

.tab-pane {
    display: none;
    animation: fadeInUp 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tab-pane.active { display: block; }

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

.section-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 4px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-xl);
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(255, 0, 127, 0.1), inset 0 4px 10px rgba(255, 255, 255, 1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0, 229, 255, 0.15), inset 0 4px 15px rgba(255, 255, 255, 1);
}

.section-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-family: 'Cairo', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    flex-shrink: 0;
}

.divider {
    margin: 28px 0 18px;
    text-align: center;
    font-weight: 700;
    color: var(--primary);
    position: relative;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: linear-gradient(to center, var(--border), transparent);
    background: var(--border);
}

.divider::before { right: 0; }
.divider::after  { left: 0; }

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    letter-spacing: 0.2px;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 22px;
    border: 2px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-sm);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-dark);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01), 0 2px 5px rgba(0,0,0,0.02);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--secondary);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--secondary-glow);
    transform: translateY(-2px);
}

input::placeholder,
textarea::placeholder { color: var(--text-muted); font-weight: 500; opacity: 0.7; }

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237B839A' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 20px center;
    padding-left: 45px;
    font-weight: 700;
    cursor: pointer;
}

optgroup {
    font-weight: bold;
    color: var(--primary);
    background: #fdfdfd;
}
option {
    color: var(--text-dark);
    font-weight: normal;
    background: #fff;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.locked-field {
    background-color: var(--success-light) !important;
    border-color: #a5d6a7 !important;
    color: #2e7d32 !important;
    font-weight: 600;
    pointer-events: none;
}

.hidden-field { display: none !important; }
input[readonly] {
    background-color: #f1f2f6;
    color: #7B839A;
    border-color: #E8ECF4;
    cursor: not-allowed;
    font-weight: 600;
}
body.dark-mode input[readonly] {
    background-color: #13151F;
    color: #5A6380;
    border-color: #2D3150;
}

.duration-badge {
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: -8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-with-action {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.input-with-action input {
    margin-bottom: 0;
    padding-right: 48px;
    padding-left: 16px;
}

.check-status-icon {
    position: absolute;
    right: 14px;
    left: auto;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.check-status-icon:hover { transform: scale(1.15); }

.product-header-labels {
    display: flex;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 0 6px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.product-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr auto auto;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
    background: #FAFBFF;
    padding: 8px 10px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    transition: var(--transition);
}

.product-row:hover { border-color: var(--primary-light); }

.product-row input {
    margin-bottom: 0;
    padding: 9px 10px;
    background: transparent;
    border: none;
    box-shadow: none;
    width: 100%;
}

.product-row input:focus {
    background: var(--white);
    border-radius: 8px;
    box-shadow: none;
}

.product-price-input { text-align: center; color: var(--primary); font-weight: 700; }
.product-offer-input { text-align: center; color: var(--secondary); font-weight: 700; }
.product-qty-input   { text-align: center; font-weight: 700; }

.product-row.confirmed {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.product-row.confirmed .product-price-input[readonly] {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.product-row.confirmed .product-offer-input,
.product-row.confirmed .product-qty-input {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    cursor: text;
    pointer-events: auto;
}

.product-name-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
    padding: 7px 10px;
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    user-select: none;
}

.product-row .product-price-input[readonly] {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    cursor: not-allowed;
    font-weight: 800;
}

.product-row .product-offer-input {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    color: #e11d48;
    font-weight: 800;
}

.product-row .product-offer-input:focus {
    border-color: #e11d48;
    box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.15);
}

.product-row .product-qty-input {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-weight: 800;
}

.product-row .product-qty-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.order-products-empty-state {
    text-align: center;
    padding: 24px 15px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    margin-bottom: 12px;
}

.order-products-empty-state i {
    font-size: 2rem;
    color: #94a3b8;
    margin-bottom: 8px;
    display: block;
}

.order-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s ease;
}

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

.order-search-item:hover,
.order-search-item.highlighted {
    background: #f0fdf4;
}

.order-search-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
    flex: 1;
}

.order-search-item-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

.order-search-item-meta {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    gap: 8px;
    align-items: center;
}

.order-search-item-price-box {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    margin-right: 12px;
}

.order-search-item-price {
    font-weight: 800;
    font-size: 1rem;
    color: #10b981;
}

.order-search-item-offer {
    font-size: 0.8rem;
    color: #e11d48;
    font-weight: 700;
}

.btn-confirm-pro,
.remove-product-btn {
    border: none;
    flex: 0 0 36px;
    height: 36px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-confirm-pro {
    background: #EDF7EE;
    color: var(--success);
}

.btn-confirm-pro:hover { background: #c8e6c9; }

.remove-product-btn {
    background: var(--danger-light);
    color: var(--danger);
}

.remove-product-btn:hover { background: #fca5a5; }

.btn-add-pro {
    background: transparent;
    color: var(--primary);
    border: 2px dashed var(--primary-light);
    width: 100%;
    padding: 11px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 16px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-add-pro:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
}

.invoice-offer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff0f8;
    padding: 6px 10px;
    border-radius: 8px;
    margin-top: 5px;
    font-size: 0.8rem;
    border: 1px dashed var(--primary-light);
    width: 100%;
}
body.dark-mode .invoice-offer-bar {
    background: #2D1520;
    border-color: var(--primary);
}
.invoice-offer-bar .offer-prices { color: var(--text-muted); font-weight: 600; }
.invoice-offer-bar .offer-prices span { color: var(--primary); font-weight: bold; margin: 0 5px; }
.offer-mini-switch { display: flex; align-items: center; gap: 5px; font-weight: bold; color: var(--primary); }

.totals-box {
    background: linear-gradient(135deg, #FAFBFF, #F5F0FF);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-top: 16px;
}

.total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.total-item input {
    width: 100px;
    margin-bottom: 0;
    padding: 7px 10px;
    text-align: center;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-weight: 700;
    color: var(--text-main);
}

.final-amount {
    font-size: 1.35rem;
    text-align: center;
    color: var(--primary);
    margin-top: 14px;
    border-top: 2px dashed #E0E5F5;
    padding-top: 14px;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
}

.gift-switch-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #fff0f8, #ffe4f2);
    padding: 13px 16px;
    border-radius: var(--radius);
    margin-top: 14px;
    border: 1.5px dashed var(--primary-light);
}

.gift-label {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #CBD5E1;
    transition: 0.35s cubic-bezier(0.4,0,0.2,1);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.35s cubic-bezier(0.4,0,0.2,1);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(24px); }

.delivery-prediction {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    margin-top: 10px;
    padding: 9px 14px;
    background: rgba(0,180,216,0.08);
    border-radius: 9px;
    border: 1px solid rgba(0,180,216,0.2);
}

.payment-section {
    background: #FAFBFF;
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    margin-top: 16px;
}

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

.payment-row select { margin-bottom: 0; flex: 1; }

.btn-confirm-action {
    background: #E8ECF4;
    border: none;
    padding: 11px 16px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    color: var(--text-muted);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-confirm-action.confirmed {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 14px rgba(0,200,83,0.25);
}

.main-actions-stack { margin-top: 22px; }

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border: none;
    width: 100%;
    padding: 15px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(37,211,102,0.3);
    margin-bottom: 10px;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37,211,102,0.4);
}

.action-grid {
    display: flex;
    gap: 10px;
}

.btn-save {
    background: linear-gradient(135deg, var(--success), #009624);
    color: white;
    border: none;
    flex: 2;
    padding: 15px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(0,200,83,0.3);
    transition: var(--transition);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0,200,83,0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-muted);
    flex: 1;
    border-radius: var(--radius-lg);
    font-weight: 700;
    cursor: pointer;
    padding: 12px;
    font-family: 'Cairo', sans-serif;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-glow);
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    margin-bottom: 0;
    flex: 1;
}

.btn-search {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 0 22px;
    border-radius: var(--radius);
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: var(--shadow-pink);
}

.btn-search:hover { transform: translateY(-1px); }

.scroll-list {
    max-height: 360px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px;
}

::-webkit-scrollbar { width: 10px; height: 10px; } 
::-webkit-scrollbar-track { background: #f1f2f6; border-radius: 8px; }
::-webkit-scrollbar-thumb { background: #E91E8C; border-radius: 8px; border: 2px solid #f1f2f6; }
::-webkit-scrollbar-thumb:hover { background: #d81b60; }

.empty-state-msg {
    grid-column: 1 / -1; text-align: center; padding: 40px; color: #999;
}

.driver-card {
    display: flex; flex-direction: column; gap: 10px; background: rgba(255,255,255,0.7); 
    padding: 16px; border: 1px solid rgba(0,0,0,0.03); border-radius: var(--radius-sm); 
    box-shadow: 0 4px 6px rgba(0,0,0,0.02); text-align: center;
}

input,
select,
textarea {
    padding: 12px 18px;
    border: 3px solid rgba(255,255,255,0.5);
    border-radius: var(--radius-xl);
    font-family: 'Tajawal', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    box-shadow: inset 0 4px 6px rgba(0,0,0,0.05), 0 4px 15px rgba(255,255,255,0.5);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: #FFFFFF;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02), 0 0 0 6px var(--secondary-glow);
    transform: translateY(-2px);
}


.driver-card-actions {
    display: flex; justify-content: space-between; gap: 8px; width: 100%; margin-top: 10px;
}

.mod-row-item {
    align-items: center; padding: 10px 12px;
}
.mod-row-name {
    flex: 1; font-weight: 600; color: var(--text-main);
}

.empty-msg {
    text-align: center;
    color: var(--text-light);
    padding: 28px 20px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1.5px dashed var(--border);
    font-size: 0.9rem;
}

.stats-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.stat-item {
    flex: 1;
    padding: 18px 14px;
    border-radius: var(--radius-lg);
    text-align: center;
    color: white;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.stat-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.stat-item.pink  { background: linear-gradient(135deg, #E91E8C, #FF6BB5); }
.stat-item.orange{ background: linear-gradient(135deg, #FF8C00, #FFB347); }
.stat-item.blue  { background: linear-gradient(135deg, #00B4D8, #48CAE4); }

.stat-item .label {
    font-size: 0.72rem;
    display: block;
    margin-bottom: 7px;
    opacity: 0.88;
    letter-spacing: 0.3px;
}

.stat-item .value {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
}

.shipping-actions-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.data-list-container {
    max-height: 220px;
    overflow-y: auto;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 8px;
    border: 1.5px solid var(--border);
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 10px;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}

.data-row:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(-4px); /* Slight shift in RTL */
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    border-color: rgba(var(--primary-rgb), 0.1);
}

.price-badge {
    background: rgba(0,180,216,0.1);
    color: var(--secondary);
    padding: 3px 9px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
}

.phone-badge {
    color: var(--primary);
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    direction: ltr;
    display: inline-block;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 18, 40, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 440px;
    padding: 28px;
    border-radius: var(--radius-xl);
    animation: modalPop 0.3s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    border: 1px solid var(--border);
}

@keyframes modalPop {
    from { transform: scale(0.85); opacity: 0; }
    to   { zoom: 1; transform: none; opacity: 1; }
}

.modal-content h3 {
    margin-top: 0;
    color: var(--primary);
    font-family: 'Cairo', sans-serif;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 18px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.btn-cancel,
.btn-confirm {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: var(--transition);
}

.btn-cancel {
    background: var(--bg);
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}

.btn-cancel:hover { background: var(--border); }

.btn-confirm {
    background: linear-gradient(135deg, var(--secondary), #0096C7);
    color: white;
    box-shadow: 0 4px 14px rgba(0,180,216,0.3);
}

.btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0,180,216,0.4);
}

.toast-container {
    position: fixed;
    top: 78px;
    left: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

.toast {
    background: var(--white);
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    animation: toastIn 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
    border: 1.5px solid var(--border);
    pointer-events: all;
    min-width: 240px;
    max-width: 380px;
}

@keyframes toastIn {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

.toast.fade-out {
    animation: toastOut 0.35s ease forwards;
}

@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to   { transform: translateX(110%); opacity: 0; }
}

.toast.success { border-right: 4px solid var(--success); }
.toast.error   { border-right: 4px solid var(--danger); }
.toast.warning { border-right: 4px solid var(--warning); }

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    display: flex;
    justify-content: flex-start;
    align-items: center;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.05);
    border-top: var(--glass-border);
    z-index: 999;
    padding: 0 8px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
}
.bottom-nav::-webkit-scrollbar {
    display: none;
}
.bottom-nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.nav-item {
    border: none;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-light);
    transition: var(--transition);
    cursor: pointer;
    padding: 8px 14px;
    flex: 0 0 auto;
    border-radius: var(--radius);
    position: relative;
    min-width: 60px;
}

.nav-item .icon {
    font-size: 1.3rem;
    margin-bottom: 3px;
    transition: var(--transition);
}

.nav-item .label {
    font-size: 0.68rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    transition: var(--transition);
    white-space: nowrap;
}

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

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 0 0 4px 4px;
}

.nav-item.active .icon {
    filter: drop-shadow(0 2px 6px var(--primary-glow));
    transform: translateY(-1px);
}

.print-only { display: none; }

@media print {
    @page {
        margin: 0; 
    }

    body {
        background: #fff;
        color: #000;
        margin: 0;
        padding: 0;
        direction: rtl;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .app-header,
    .app-content,
    .bottom-nav,
    .toast-container,
    .modal-overlay,
    #booking-alert-banner,
    #quickRefreshBtn { display: none !important; }

    .print-only {
        display: block !important;
        width: 80mm;
        margin: 0 auto;
        padding: 5mm;
        color: #000;
        font-family: 'Cairo', sans-serif;
        font-size: 13px;

        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
    }

    .receipt-header { text-align: center; margin-bottom: 10px; }
    .receipt-header img, #print-logo, .print-logo { 
        display: block !important; 
        margin: 0 auto 10px auto !important; 
        width: 80px !important;
        height: auto !important;
        filter: grayscale(100%) !important;
    }
    .receipt-header h2 { margin: 5px 0; font-size: 19px; font-weight: bold; }
    .receipt-header p  { margin: 0; font-size: 15px; font-weight: bold; }

    .receipt-info p    { margin: 4px 0; font-weight: bold; font-size: 16px; }

    .print-only, .print-only * {
        color: #000000 !important;
        font-size: 14px !important;
        font-weight: 500 !important;
    }

    .receipt-table {
        width: 100%;
        border-collapse: collapse;
        margin: 10px 0;
        font-size: 15px;
        font-weight: 600 !important;
    }

    .receipt-table th {
        background-color: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        padding: 8px !important;
        border: 1px solid #000 !important;
    }

    .receipt-table th,
    .receipt-table td {
        border: 1px solid #000 !important;
        padding: 8px !important;
        text-align: center;
        color: #000000 !important;
        font-weight: 600 !important;
    }

    .receipt-totals { margin-top: 10px; font-weight: 600; font-size: 15px; }
    .receipt-totals p { margin: 4px 0; display: flex; justify-content: flex-start; gap: 5px; align-items: baseline; }
    .receipt-totals h3 {
        margin: 5px 0;
        display: flex;
        justify-content: flex-start;
        gap: 5px;
        font-size: 18px;
        border-top: 2px solid #000 !important;
        padding: 8px !important;
        font-weight: 800 !important;
        background-color: #000000 !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .receipt-totals h3 * {
        color: #ffffff !important;
    }

    .print-deposit-row {
        font-weight: 600 !important;
        color: #000000 !important;
    }

    .receipt-footer {
        text-align: center;
        margin-top: 15px;
        font-size: 13px;
        padding-top: 10px;
        font-weight: 600;
    }

    .print-only hr {
        border: none !important;
        border-top: 2px solid #000 !important;
        margin: 8px 0 !important;
    }

    .print-only [style*="dashed"],
    .print-only [style*="dotted"] {
        border-style: solid !important;
        border-color: #000000 !important;
    }

    .print-shipping-row {
        border: 2px solid #000 !important;
    }

    .print-only .receipt-footer, 
    .print-only .receipt-footer *,
    .print-only .receipt-footer [style*="dashed"],
    .print-only .receipt-footer [style*="dotted"],
    .print-only #print-footer,
    .print-only #print-footer *,
    .print-only #print-qr-code,
    .print-only .print-qr-container,
    .print-only .print-qr-container * {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
}

body.dark-mode {
    --bg:         #0B0E14;
    --card:       rgba(20, 24, 39, 0.85); /* Glassmorphism Base for Dark Mode */
    --white:      #141827;
    --border:     rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.05);
    
    --text-main:  #F8FAFC;
    --text-muted: #94A3B8;
    --text-light: #64748B;
    
    --shadow-sm:  0 4px 10px rgba(0, 0, 0, 0.2);
    --shadow:     0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-lg:  0 20px 40px rgba(0, 0, 0, 0.5);
    
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #242740;
    color: var(--text-main);
    border-color: var(--border);
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder { color: var(--text-light); }

body.dark-mode .section-card,
body.dark-mode .app-header,
body.dark-mode .bottom-nav,
body.dark-mode .modal-content,
body.dark-mode .toast {
    background: var(--card);
    border-color: var(--border);
}

body.dark-mode .toast { color: var(--text-main); }

body.dark-mode label { color: var(--text-muted); }

body.dark-mode .total-item { color: var(--text-muted); }

body.dark-mode .total-item input {
    background: #242740;
    color: var(--text-main);
    border-color: var(--border);
}

body.dark-mode .data-list-container,
body.dark-mode .payment-section,
body.dark-mode .totals-box {
    background: #13151F;
    border-color: var(--border);
}

body.dark-mode .empty-msg {
    background: #13151F;
    color: var(--text-light);
    border-color: var(--border);
}

body.dark-mode .btn-suspended,
body.dark-mode .btn-add-pro {
    background: #242740;
    color: var(--text-muted);
    border-color: var(--border);
}

body.dark-mode .btn-outline {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

body.dark-mode .btn-cancel {
    background: #242740;
    color: var(--text-muted);
    border-color: var(--border);
}

body.dark-mode .product-row {
    background: #242740;
    border-color: var(--border);
}

body.dark-mode .product-row.confirmed {
    background: #1e2235;
    border-color: #2e334d;
}

body.dark-mode .product-name-title {
    background: #252b45;
    border-color: #2e334d;
    color: #f1f5f9;
}

body.dark-mode .product-row .product-price-input[readonly] {
    background: #252b45;
    border-color: #2e334d;
    color: #94a3b8;
}

body.dark-mode .product-row .product-offer-input,
body.dark-mode .product-row .product-qty-input {
    background: #151726;
    border-color: #2e334d;
    color: #f1f5f9;
}

body.dark-mode #orderProductSearchResults {
    background: #1e2235;
    border-color: #2e334d;
}

body.dark-mode .order-search-item {
    border-bottom-color: #2e334d;
}

body.dark-mode .order-search-item:hover,
body.dark-mode .order-search-item.highlighted {
    background: #252b45;
}

body.dark-mode .order-search-item-name {
    color: #f1f5f9;
}

body.dark-mode .order-products-empty-state {
    background: #151726;
    border-color: #2e334d;
    color: #94a3b8;
}

body.dark-mode .bottom-nav {
    box-shadow: 0 -2px 20px rgba(0,0,0,0.4);
}

body.dark-mode .divider::before,
body.dark-mode .divider::after { background: var(--border); }

body.dark-mode .data-row { border-bottom-color: var(--border); }
body.dark-mode .data-row:hover { background: #242740; }

body.dark-mode .gift-switch-container {
    background: #2D1520;
    border-color: var(--primary);
}

body.dark-mode .section-title { color: var(--text-main); border-bottom-color: var(--border); }
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3 { color: var(--text-main); }

body.dark-mode .status-indicator {
    background: rgba(0,200,83,0.1);
}

body.dark-mode .delivery-prediction {
    background: rgba(0,180,216,0.08);
    border-color: rgba(0,180,216,0.15);
}

.shipping-actions-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.shipping-actions-row .btn-outline {
    flex: 1;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius);
    text-align: center;
}

.data-list-container {
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 6px;
    border: 1.5px solid var(--border);
}

.zones-lists-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    flex: 1;
}

.zone-details {
    background: #FAFBFF;
    border-radius: 12px;
    overflow: hidden;
}

.zone-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    background: #FAFBFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    user-select: none;
    list-style: none; 
}

.zone-summary::-webkit-details-marker {
    display: none;
}

.zone-summary .arrow {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.zone-details[open] .zone-summary {
    border-radius: 12px 12px 0 0;
    border-bottom: 1px dashed var(--border);
}

.zone-details[open] .zone-summary .arrow {
    transform: rotate(180deg);
}

.zone-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.zone-premium-card {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background: var(--white);
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.zone-premium-card::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--primary);
    border-radius: 0 12px 12px 0;
}

.zone-premium-card.zone-next-day::before {
    background: var(--warning);
}

.zone-premium-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.zone-info-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 12px;
}

.zone-title {
    color: var(--text-main);
    font-size: 1.15rem;
    margin-bottom: 8px;
    font-family: 'Cairo', sans-serif;
}

.zone-details-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.premium-badge {
    background: rgba(41, 128, 185, 0.1);
    color: #2980b9;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(41, 128, 185, 0.2);
}

.duration-badge {
    background: rgba(149, 165, 166, 0.1);
    color: #7f8c8d;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(149, 165, 166, 0.2);
}

.zone-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    padding-right: 15px;
    border-right: 1px dashed var(--border);
}

.zone-actions button {
    padding: 8px 12px;
    font-size: 0.9rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.zone-actions .edit-btn {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
}
.zone-actions .edit-btn:hover {
    background: var(--primary);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
}
.btn-danger:hover {
    background: #c0392b;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

body.dark-mode .zone-premium-card {
    background: var(--card-bg);
}

body.dark-mode .premium-badge {
    background: rgba(41, 128, 185, 0.2);
    color: #6bb9f0;
}

body.dark-mode .duration-badge {
    color: #bdc3c7;
}

body.dark-mode .zone-actions .edit-btn {
    background: transparent;
    color: var(--primary-light);
    border-color: var(--primary-light);
}

body.dark-mode .zone-details,
body.dark-mode .zone-summary {
    background: var(--card);
}

.shipping-order-card {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 0 12px;
    align-items: start;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 12px 10px;
    margin-bottom: 8px;
    transition: box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
    position: relative;
}

.shipping-order-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px var(--primary-glow);
}

body.dark-mode .shipping-order-card {
    background: #1A1D2E;
    border-color: #2a2d40;
}

body.dark-mode .shipping-order-card:hover {
    border-color: var(--primary);
}

.shipping-order-card .soc-checkbox {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    margin-top: 3px !important;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.shipping-order-card .soc-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.soc-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.soc-id {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-main);
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
}

.soc-type-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.soc-type-badge.normal  { background: rgba(0,180,216,0.12); color: var(--secondary); }
.soc-type-badge.gov     { background: rgba(255,140,0,0.12);  color: var(--warning); }
.soc-type-badge.booking { background: rgba(233,30,140,0.12); color: var(--primary); }
.soc-type-badge.branch  { background: rgba(0,200,83,0.12);   color: var(--success); }

.soc-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soc-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 7px 10px;
    background: var(--bg);
    border-radius: 8px;
}

body.dark-mode .soc-info-row {
    background: #242740;
}

.soc-info-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.soc-info-item.highlight {
    color: var(--text-main);
    font-weight: 700;
}

.soc-info-item.money {
    color: var(--success);
    font-weight: 800;
    font-size: 0.9rem;
}

.soc-info-item.remaining {
    color: var(--danger);
    font-weight: 800;
    font-size: 0.9rem;
}

.soc-address {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 4px;
    line-height: 1.4;
    border-top: 1px dashed var(--border);
    padding-top: 6px;
    margin-top: 2px;
}

.soc-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.shipping-action-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: box-shadow 0.2s;
}

body.dark-mode .shipping-action-card {
    background: #1A1D2E;
    border-color: #2a2d40;
}

.shipping-action-card .sac-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.sac-name {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-main);
    font-family: 'Cairo', sans-serif;
}

.sac-id {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.sac-finance-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 0.85rem;
}

body.dark-mode .sac-finance-row {
    background: #242740;
}

.sac-total   { color: var(--text-main); font-weight: 700; }
.sac-remain  { color: var(--danger); font-weight: 800; font-size: 0.9rem; }
.sac-phone   { color: var(--secondary); font-weight: 700; }
.sac-date    { color: var(--primary); font-weight: 700; }

.sac-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sac-actions button {
    flex: 1;
    min-width: 120px;
    padding: 9px 10px;
    font-size: 0.85rem;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: var(--transition);
}

.sac-btn-deliver {
    background: linear-gradient(135deg, var(--success), #00a040);
    color: white;
    box-shadow: 0 3px 10px rgba(0,200,83,0.25);
}

.sac-btn-deliver:hover { filter: brightness(1.1); }

.sac-btn-convert {
    background: linear-gradient(135deg, var(--secondary), #0090b0);
    color: white;
    box-shadow: 0 3px 10px rgba(0,180,216,0.25);
}

.sac-btn-convert:hover { filter: brightness(1.1); }

.shipped-order-card {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 0 12px;
    align-items: start;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 12px 10px;
    margin-bottom: 8px;
    transition: box-shadow 0.2s;
}

body.dark-mode .shipped-order-card {
    background: #1A1D2E;
    border-color: #2a2d40;
}

.shipped-order-card:hover {
    border-color: var(--success);
    box-shadow: 0 4px 14px rgba(0,200,83,0.15);
}

.offer-badge {
    background: linear-gradient(135deg, var(--primary), #FF6BB5);
    color: white;
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 700;
    animation: pop 1.5s infinite alternate;
    display: inline-block;
}

@keyframes pop {
    0%   { zoom: 1; transform: none; }
    100% { transform: scale(1.07); }
}

.zone-next-day {
    border-right: 4px solid var(--warning) !important;
    background-color: #FFF8EE;
}

body.dark-mode .zone-next-day {
    background-color: #2A1F00;
    border-right-color: #FFB300 !important;
}

.zone-next-day .price-badge {
    background: rgba(255,140,0,0.15);
    color: var(--warning);
}

.catalog-row { align-items: center; padding: 12px 10px; }

.catalog-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.catalog-price { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
body.dark-mode .catalog-price { color: var(--text-muted); }

.catalog-offer-price { font-size: 0.85rem; font-weight: 700; color: var(--primary); }

@media (min-width: 900px) {

    .app-content {
        padding: 30px 40px;
        max-width: 100%; 
        margin: 0;
    }

    .app-header {
        padding: 0 40px;
    }

    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        height: var(--nav-height);
        flex-direction: row;
        justify-content: space-around;
        padding: 0 20px;
        border-top: 1px solid var(--border);
        border-left: none;
        box-shadow: 0 -2px 20px rgba(30,40,90,0.08);
    }

    .nav-item {
        width: auto;
        padding: 8px 24px;
        border-radius: var(--radius);
        flex-direction: column;
        justify-content: center;
    }

    .nav-item.active::before {
        top: 0;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 3px;
        border-radius: 0 0 4px 4px;
    }

    .toast-container {
        top: 78px;
        right: 40px;
        left: auto;
        max-width: 360px;
    }

    #create-tab.active {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        align-items: start;
    }

    #create-tab .section-card {
        grid-column: 1 / -1; 
        max-width: 100%;
    }

    #reports-tab .stats-row {
        gap: 20px;
    }

    #shipping-tab.active {
        display: block;
        width: 100%;
    }

    #catalog-tab.active {
        display: block;
        width: 100%;
    }
}

@media (min-width: 1200px) {

    .app-content {
        padding: 40px 60px;
    }

    #create-tab.active {
        grid-template-columns: 2fr 1.5fr; 
    }

    #create-tab .section-card:first-child {
        grid-column: 1 / -1; 
    }
}

@media (max-width: 899px) {
    body { padding-top: 130px; } 
    .app-content { 
        padding: 10px 10px 100px 10px; 
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    } 
    .app-header { 
        padding: 10px 16px; 
        height: var(--header-height); 
        flex-wrap: nowrap; 
        gap: 10px; 
    }
    .header-actions {
        flex-wrap: nowrap;
        width: auto;
        justify-content: flex-end;
    }
    .logo-container { width: auto; justify-content: center; flex-direction: column; gap: 2px; }
    .header-right { min-width: unset !important; }
    .logo-text { font-size: 1.1rem; white-space: nowrap; }
    .logo-sub { font-size: 0.75rem; white-space: nowrap; }
    .section-card { padding: 16px 12px; margin-bottom: 15px; border-radius: 12px; }
    .stats-row { flex-wrap: wrap; }

    .shipping-actions-row {
        flex-direction: column;
    }

    .zone-list-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .zone-premium-card {
        padding: 8px 10px;
        flex-direction: column;
    }
    .zone-title {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }
    .zone-details-row {
        flex-wrap: wrap;
        gap: 5px;
    }
    .premium-badge, .duration-badge {
        font-size: 0.7rem;
        padding: 3px 5px;
    }
    .zone-actions {
        flex-direction: row;
        justify-content: flex-end;
        padding-right: 0;
        padding-top: 6px;
        margin-top: 6px;
        border-right: none;
        border-top: 1px dashed var(--border);
        gap: 6px;
    }
    .zone-actions button {
        flex: 1;
        padding: 8px !important;
        font-size: 0.9rem !important;
        border-radius: 8px !important;
        width: 100% !important;
    }
    .btn-text-mobile-hide {
        display: inline !important; 
    }
    .product-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "name name"
            "price offer"
            "qty actions";
        align-items: stretch;
    }

    .product-name-input, .product-col-name, .product-name-title { grid-area: name; font-size: 1rem !important; }
    .product-price-input { grid-area: price; }
    .product-offer-input { grid-area: offer; }
    .product-qty-input { grid-area: qty; }

    .btn-confirm-pro, .remove-product-btn { display: inline-block; }

    .product-row-actions {
        grid-area: actions;
        display: flex;
        gap: 5px;
        width: 100%;
    }

    .product-row-actions button {
        flex: 1;
        padding: 8px !important;
        border-radius: var(--radius) !important;
    }

    .zones-lists-container {
        grid-template-columns: 1fr; 
        gap: 15px;
    }

    .stats-row .stat-item { min-width: calc(50% - 6px); }
    .bottom-nav { 
        height: auto; 
        padding-bottom: env(safe-area-inset-bottom, 10px); 
        padding-top: 10px;
    }
    .nav-item { padding: 6px; min-width: 45px; }
    .nav-item .icon { font-size: 1.3rem; margin-bottom: 2px; }
    .nav-item .label { font-size: 0.7rem; }

    .modal-content { 
        padding: 15px 12px; 
        max-height: 95vh; 
        border-radius: 12px; 
        width: 95%;
    }

    td[style*="display: flex"] {
        flex-direction: column !important;
        gap: 8px !important;
    }
    td[style*="display: flex"] button {
        width: 100% !important;
        padding: 8px !important;
    }

    .table-responsive, .data-table, .receipt-table { 
        display: block; 
        width: 100%; 
        overflow-x: auto; 
        white-space: nowrap; 
        -webkit-overflow-scrolling: touch;
    }

    .expiry-form-grid, .invoice-details-grid {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    .expiry-form-grid > div {
        grid-column: span 1 !important;
    }

    input, select, textarea {
        font-size: 16px !important; 
        padding: 12px 10px !important;
    }

    .interactive-btn:not(.order-action-icon-btn):not(.icon-only):not(.btn-suspended):not(.restore-btn):not(.delete-btn):not(.btn-search):not(#menuToggleBtn):not(#quickRefreshBtn):not(.order-status-pill) {
        padding: 12px 16px !important;
        font-size: 1.02rem !important;
    }

    .toast-container { top: 72px; }
}

.invoice-offer-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff0f5; 
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 2px solid #FF1493; 
    color: #FF1493;
    font-weight: bold;
    animation: flash-border 1.5s infinite; 
}
body.dark-mode .invoice-offer-bar {
    background: #301020;
}
@keyframes flash-border {
    0% { border-color: #FF1493; }
    50% { border-color: #ff85c0; }
    100% { border-color: #FF1493; }
}

.history-item {
    background: var(--card); 
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 10px; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    border-right: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
    gap: 7px;
    box-sizing: border-box;
}

/* Dynamic Status Backgrounds */
.history-item.status-delivered, .history-item.status-settled { background-color: #e8f5e9; }
.history-item.status-pending { background-color: #fff8e1; }
.history-item.status-shipped { background-color: #e3f2fd; }
.history-item.status-returned { background-color: #ffebee; }

/* Dynamic Status Backgrounds - Dark Mode */
body.dark-mode .history-item.status-delivered, body.dark-mode .history-item.status-settled { background-color: rgba(76, 175, 80, 0.1); }
body.dark-mode .history-item.status-pending { background-color: rgba(255, 193, 7, 0.1); }
body.dark-mode .history-item.status-shipped { background-color: rgba(33, 150, 243, 0.1); }
body.dark-mode .history-item.status-returned { background-color: rgba(244, 67, 54, 0.1); }

/* ========================================================= */
/* ⭐ Order Card History Actions (WhatsApp & Print Buttons)   */
/* ========================================================= */
.order-action-icon-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    border: 1.5px solid transparent !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    vertical-align: middle !important;
}

.order-action-icon-btn.whatsapp-action-btn {
    background: #ecfdf5 !important;
    color: #16a34a !important;
    border-color: #a7f3d0 !important;
}

.order-action-icon-btn.whatsapp-action-btn i {
    font-size: 19px !important;
    line-height: 1 !important;
    color: #16a34a !important;
    pointer-events: none !important;
}

.order-action-icon-btn.whatsapp-action-btn:hover,
.order-action-icon-btn.whatsapp-action-btn:active {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
    transform: scale(1.08);
    box-shadow: 0 3px 8px rgba(22, 163, 74, 0.35) !important;
}

.order-action-icon-btn.whatsapp-action-btn:hover i,
.order-action-icon-btn.whatsapp-action-btn:active i {
    color: #ffffff !important;
}

.order-action-icon-btn.print-action-btn {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}

.order-action-icon-btn.print-action-btn i,
.order-action-icon-btn.print-action-btn svg {
    font-size: 16px !important;
    width: 17px !important;
    height: 17px !important;
    line-height: 1 !important;
    color: #334155 !important;
    pointer-events: none !important;
}

.order-action-icon-btn.print-action-btn:hover,
.order-action-icon-btn.print-action-btn:active {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    transform: scale(1.08);
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.35) !important;
}

.order-action-icon-btn.print-action-btn:hover i,
.order-action-icon-btn.print-action-btn:active i {
    color: #ffffff !important;
}

/* Dark mode styling */
body.dark-mode .order-action-icon-btn.whatsapp-action-btn {
    background: rgba(22, 163, 74, 0.18) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
    color: #4ade80 !important;
}
body.dark-mode .order-action-icon-btn.whatsapp-action-btn i {
    color: #4ade80 !important;
}

body.dark-mode .order-action-icon-btn.print-action-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #e2e8f0 !important;
}
body.dark-mode .order-action-icon-btn.print-action-btn i,
body.dark-mode .order-action-icon-btn.print-action-btn svg {
    color: #e2e8f0 !important;
}

/* ========================================================= */
/* ⭐ Order History Card - Compact & Balanced Modern Design  */
/* ========================================================= */
.history-item-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px 12px !important;
    width: 100% !important;
    margin: 0 !important;
    flex-wrap: wrap !important;
}

.history-item-identity {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
}

.history-item-identity strong {
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    color: var(--text-dark, #0f172a);
    word-break: break-word;
    line-height: 1.3;
}

.history-item-actions-cluster {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    margin-inline-start: auto !important;
    padding: 0 !important;
    border: none !important;
}

.order-status-pill {
    padding: 3px 9px !important;
    border-radius: 7px !important;
    font-weight: 800 !important;
    font-size: 0.78rem !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

.history-item-subbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px 12px !important;
    width: 100% !important;
    font-size: 0.84rem !important;
    color: var(--text-muted, #64748b) !important;
    background: var(--bg-body, rgba(0,0,0,0.025)) !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
}

body.dark-mode .history-item-subbar {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-muted, #94a3b8) !important;
}

/* Suspended orders card compact design */
.suspended-order-card {
    background: var(--card, #ffffff) !important;
    border: 1px solid var(--border, #e2e8f0) !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    box-sizing: border-box !important;
}

.suspended-order-card .restore-btn,
.suspended-order-card .delete-btn {
    padding: 5px 12px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    height: 30px !important;
    min-height: 30px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    box-sizing: border-box !important;
}

@keyframes subtlePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 5px rgba(76, 175, 80, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}
.clickable-badge-pulse {
    animation: subtlePulse 2.5s infinite;
    cursor: pointer;
    transition: 0.2s;
}
.clickable-badge-pulse:hover {
    transform: scale(1.05);
    background: #c8e6c9 !important;
}

.financial-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: #FAFBFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
}
body.dark-mode .financial-row { 
    background: #242740; 
    border-color: var(--border); 
}
.financial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.05rem;
    color: var(--primary);
    border-bottom: 1px dashed var(--border);
    padding-bottom: 8px;
}
.financial-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.financial-status {
    font-size: 0.95rem;
    font-weight: bold;
    text-align: center;
    padding: 5px;
    border-radius: 6px;
    margin-top: 5px;
}

.driver-card.settled {
    border-color: #e0e0e0 !important;
    box-shadow: none !important;
    opacity: 0.8;
}
.driver-card.settled .financial-header span:first-child {
    color: #888 !important;
}
.driver-card.settled .financial-status {
    background: #f5f5f5 !important;
    color: #9e9e9e !important;
    border-color: #bdbdbd !important;
}

.btn-offer-toggle {
    background: #f1f2f6;
    color: #7B839A;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 10px;
    transition: 0.3s;
    font-size: 0.85rem;
    height: 38px; 
}
.btn-offer-toggle.active {
    background: #fff0f5;
    color: #FF1493;
    border-color: #FF1493;
    box-shadow: 0 0 5px rgba(255,20,147,0.3);
}
body.dark-mode .btn-offer-toggle {
    background: #242740;
    border-color: var(--border);
}
body.dark-mode .btn-offer-toggle.active {
    background: #301020;
    color: #FF1493;
    border-color: #FF1493;
}

.financial-order-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--white);
    padding: 10px 12px;
    margin-top: 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}
body.dark-mode .financial-order-item {
    background: #1A1D2E;
    border-color: #2e344e;
}
.btn-settle {
    background: linear-gradient(135deg, var(--success), #00a040);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.82rem;
    transition: 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-settle:hover {
    filter: brightness(1.1);
    box-shadow: 0 3px 10px rgba(0,200,83,0.25);
}
body.dark-mode .btn-settle {
    background: linear-gradient(135deg, #1b6b3a, #1b4d2e);
    color: #81c784;
}

.print-only {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }

    .print-only, .print-only * {
        visibility: visible;
    }

    .print-only { position: relative !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 4mm !important; box-sizing: border-box !important; }

    @page {
        margin: 0;
        size: 80mm auto;
    }

    body {
        margin: 0;
        padding: 0;
        font-size: 12px;
    }

    .receipt-header h2 { margin: 2px 0; font-size: 16px; }
    .receipt-info p, .receipt-totals p, .receipt-footer p { margin: 1px 0; font-size: 11px; }

    .receipt-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 11px; }
    .receipt-table th { border: 1px solid #000; padding: 6px; text-align: center; background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .receipt-table td { border: 1px solid #000; padding: 6px; text-align: center; }

    #print-logo { object-fit: contain; max-height: 80px; }

    hr { margin: 5px 0; border: 0; border-top: 1px dashed #000; }
}

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

@keyframes countUp {
    from { transform: scale(0.8); opacity: 0; }
    to   { zoom: 1; transform: none;   opacity: 1; }
}

.stat-item .value {
    animation: countUp 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

@media print {
    .receipt-totals p {
        display: flex !important;
        justify-content: flex-start !important;
        gap: 5px !important;
        margin: 4px 0 !important;
        align-items: baseline !important;
    }
    .receipt-totals h3 {
        display: flex !important;
        justify-content: flex-start !important;
        gap: 5px !important;
        border-top: 2px dashed #000 !important;
        padding-top: 5px !important;
        font-size: 18px !important;
        font-weight: bold !important;
        margin: 5px 0 !important;
    }
    .print-shipping-row {
        background: #f0f0f0 !important;
        border: 2px dashed #333 !important;
        border-radius: 5px !important;
        padding: 4px 7px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

.excel-password-modal {
    max-width: 400px;
    padding: 30px;
    text-align: center;
    background: var(--card);
}

.password-modal-header {
    margin-bottom: 25px;
}

.lock-icon-container {
    width: 60px;
    height: 60px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    border: 2px dashed #a5d6a7;
}

.lock-icon {
    font-size: 1.8rem;
}

.password-input-container {
    margin-bottom: 25px;
}

.password-field {
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 5px;
    font-weight: bold;
    padding-right: 45px;
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.password-field:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
}

.toggle-password-btn {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.toggle-password-btn:hover {
    opacity: 1;
}

.shake-animation {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

@media print {
    body {
        filter: grayscale(100%) contrast(150%);
    }
    body.print-mode-tags {
        filter: none !important;
    }

    .print-gov-shipping th:nth-child(2),
    .print-gov-shipping th:nth-child(4),
    .print-gov-shipping td:nth-child(2),
    .print-gov-shipping td:nth-child(4),
    .print-gov-shipping .receipt-totals,
    .print-gov-shipping .receipt-table {
        display: none !important;
    }

    .print-gov-shipping h2#receipt-type {
        font-size: 24pt !important;
        font-weight: 900 !important;
        margin-bottom: 10px !important;
    }

    .print-gov-shipping .receipt-info {
        font-size: 20pt !important;
        line-height: 1.8 !important;
        border: 4px solid #000 !important;
        padding: 20px !important;
        margin: 20px 0 !important;
        background: #fff !important;
    }

    .print-gov-shipping .receipt-info p {
        font-size: 20pt !important;
        font-weight: 900 !important;
        margin-bottom: 15px !important;
        color: #000 !important;
    }
}

@media print {

    body, .print-only, .print-only *, * {
        font-family: Tahoma, Arial, sans-serif !important;
        -webkit-font-smoothing: auto !important;
        text-rendering: optimizeLegibility !important;
        font-weight: bold !important;
        color: #000000 !important;
    }

    body, .receipt-container {
        direction: rtl !important;
        text-align: right !important;
        margin: 0 auto !important;
        padding: 0 !important;
        width: 100% !important;
    }

    body.shipping-mode .receipt-table,
    body.shipping-mode .receipt-table-container {
        display: none !important;
    }

    .receipt-table {
        width: 100% !important;
        border-collapse: collapse !important;
        display: table !important;
        white-space: normal !important;
    }

    .receipt-table th,
    .receipt-table td {
        display: table-cell !important;
        border: 2px solid #000 !important;
        font-size: 11px !important;
        padding: 2px !important;
        font-weight: bold !important;
        color: #000000 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: normal !important;
    }

    .receipt-totals h3 {
        background: transparent !important;
        background-color: transparent !important;
        color: #000000 !important;
        border: 3px solid #000000 !important;
        border-top: 3px solid #000000 !important;
        font-size: 18px !important;
        font-weight: 900 !important;
        padding: 5px !important;
        margin: 3px 0 !important;
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 5px !important;
    }

    .receipt-totals h3 * {
        color: #000000 !important;
    }

    .receipt-totals p, 
    .receipt-footer, 
    .receipt-footer p,
    .print-deposit-row,
    .print-shipping-row,
    .receipt-info p {
        font-size: 14px !important;
        font-weight: bold !important;
        line-height: 1.3 !important;
        margin: 2px 0 !important;
        color: #000000 !important;
    }
}

@keyframes flashSuccessAnim {
    0%   { background-color: rgba(46, 125, 50, 0.4); }
    100% { background-color: var(--card); }
}

.flash-success {
    animation: flashSuccessAnim 0.6s ease-out;
}

#reader {
    background: #000;
}
#reader video {
    object-fit: cover;
    border-radius: 10px;
}

/* شارة التكبير العائمة للكاميرا (Pinch-to-Zoom Indicator) */
.camera-zoom-badge {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(15, 23, 42, 0.85);
    color: #38bdf8;
    padding: 5px 14px;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    z-index: 99999;
    pointer-events: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.15s ease;
    direction: ltr;
    user-select: none;
}
.camera-zoom-badge svg {
    color: #38bdf8;
    stroke: currentColor;
    flex-shrink: 0;
}
.camera-zoom-badge .zoom-text {
    font-family: monospace, sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 250px;
    padding: 15px 20px;
    border-radius: 12px;
    background: #333;
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slideInToast 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast.success {
    background: linear-gradient(135deg, #2e7d32, #43a047);
}

.toast.error {
    background: linear-gradient(135deg, #c62828, #e53935);
}

.toast.warning {
    background: linear-gradient(135deg, #f57c00, #ff9800);
}

.toast.fade-out {
    opacity: 0;
    transform: translateX(100%);
}

@keyframes slideInToast {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-wrap: nowrap !important;
        height: var(--header-height) !important;
        padding: 0 10px !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 5px !important;
    }
    .header-right {
        order: 1;
        width: auto !important;
    }
    .logo-container {
        order: 2;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        text-align: center;
        justify-content: center !important;
        overflow: hidden;
        min-width: 0;
        gap: 2px;
    }
    .logo-text {
        font-size: 0.95rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .logo-sub {
        display: block !important;
        font-size: 0.8rem !important;
        color: var(--primary) !important;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .header-actions {
        order: 3;
        width: auto !important;
        margin-top: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        padding-top: 0 !important;
        border-top: none !important;
    }
    .status-indicator {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        width: auto !important;
        padding: 4px 6px !important;
        background: transparent !important;
        border-radius: 10px !important;
    }
    .btn-suspended {
        font-size: 11px !important;
        padding: 4px 8px !important;
        white-space: nowrap !important;
        border-radius: 10px !important;
    }
    #sync-status {
        display: none !important;
    }
    .toast-container {
        top: calc(var(--header-height) + 10px) !important;
    }
}

.expiry-dashboard-overlay {
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.expiry-dashboard-content {
    background: var(--bg);
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    animation: fadeInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.expiry-header {
    background: var(--white);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
}

.expiry-header h2 {
    margin: 0;
    color: var(--primary);
    font-size: 1.5rem;
}

.expiry-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.expiry-form-card {
    background: var(--white);
    border-left: 5px solid var(--secondary);
}

.expiry-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.expiry-form-grid label {
    margin-bottom: 5px;
    color: var(--text-main);
    font-weight: 700;
}

.expiry-form-grid input {
    margin-bottom: 0;
    background: #FAFBFF;
}

.expiry-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.expiry-stat-item {
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    color: white;
    font-family: 'Cairo', sans-serif;
    transition: transform 0.2s;
}

.expiry-stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.expiry-stat-item .label {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 5px;
}

.expiry-stat-item .value {
    font-size: 2.5rem;
    font-weight: 800;
}

.stat-total { background: linear-gradient(135deg, #34495e, #2c3e50); }
.stat-critical { background: linear-gradient(135deg, #e74c3c, #c0392b); box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3); }
.stat-far { background: linear-gradient(135deg, #3498db, #2980b9); box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3); }
.stat-safe { background: linear-gradient(135deg, #2ecc71, #27ae60); box-shadow: 0 8px 20px rgba(46, 204, 113, 0.3); }

.traffic-light-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.traffic-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.traffic-header {
    padding: 15px;
    text-align: center;
    color: white;
}

.traffic-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: white;
}

.traffic-header .subtitle {
    font-size: 0.9rem;
    opacity: 0.95;
    font-weight: bold;
}

.traffic-red .traffic-header { background: linear-gradient(135deg, #ff4d4d, #c0392b); }
.traffic-orange .traffic-header { background: linear-gradient(135deg, #ff9f43, #d35400); }
.traffic-yellow .traffic-header { background: linear-gradient(135deg, #f1c40f, #f39c12); }
.traffic-green .traffic-header { background: linear-gradient(135deg, #2ed573, #27ae60); }
.traffic-blue .traffic-header { background: linear-gradient(135deg, #3498db, #2980b9); }

.traffic-red { border: 2px solid #ff4d4d; }
.traffic-orange { border: 2px solid #ff9f43; }
.traffic-yellow { border: 2px solid #f1c40f; }
.traffic-green { border: 2px solid #2ed573; }
.traffic-blue { border: 2px solid #3498db; }

.traffic-list {
    padding: 12px;
    flex: 1;
    min-height: 250px;
    max-height: 400px;
    overflow-y: auto;
    background: #FAFBFF;
}

.expiry-item-row {
    background: white;
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: var(--transition);
}

.expiry-item-row:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.expiry-item-row h4 {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    color: var(--text-main);
}

.expiry-item-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    background: #f1f2f6;
    padding: 6px 10px;
    border-radius: 6px;
}

.expiry-item-actions {
    display: flex;
    gap: 10px;
}

.btn-activate-offer {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}
.btn-activate-offer:hover { background: #ffe0b2; }

.btn-close-item {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}
.btn-close-item:hover { background: #c8e6c9; }

body.dark-mode .expiry-dashboard-content {
    background: #1A1D2E;
}
body.dark-mode .expiry-header {
    background: #25283B;
    border-color: #383D57;
}
body.dark-mode .expiry-form-card,
body.dark-mode .traffic-card {
    background: #25283B;
    border-color: #383D57;
}
body.dark-mode .traffic-list {
    background: #1E2132;
}
body.dark-mode .expiry-item-row {
    background: #25283B;
    border-color: #383D57;
}
body.dark-mode .expiry-item-details {
    background: #13151F;
}
body.dark-mode .expiry-form-grid input {
    background: #13151F;
    color: white;
    border-color: #383D57;
}

.traffic-light-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.traffic-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 5px solid transparent;
}

.traffic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.traffic-card .traffic-header {
    text-align: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.traffic-card .traffic-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.traffic-card .subtitle {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
}

.traffic-red { border-top-color: #c0392b; background: rgba(192, 57, 43, 0.05); }
.traffic-orange { border-top-color: #d35400; background: rgba(211, 84, 0, 0.05); }
.traffic-yellow { border-top-color: #f39c12; background: rgba(243, 156, 18, 0.05); }
.traffic-green { border-top-color: #27ae60; background: rgba(39, 174, 96, 0.05); }
.traffic-blue { border-top-color: #2980b9; background: rgba(41, 128, 185, 0.05); }
.traffic-total { border-top-color: #2c3e50; }

.expiry-item-row {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.expiry-item-row h4 {
    margin: 0 0 8px 0;
    color: var(--primary);
}

.expiry-item-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.expiry-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-activate-offer, .btn-close-item {
    flex: 1;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn-activate-offer:hover, .btn-close-item:hover {
    filter: brightness(0.9);
}

.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { zoom: 1; transform: none; box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { zoom: 1; transform: none; box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

#openLedgerBtn.pulse-btn {
    animation: pulse-purple 2s infinite;
}

@keyframes pulse-purple {
    0% { zoom: 1; transform: none; box-shadow: 0 0 0 0 rgba(142, 68, 173, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(142, 68, 173, 0); }
    100% { zoom: 1; transform: none; box-shadow: 0 0 0 0 rgba(142, 68, 173, 0); }
}

.loading-overlay-hidden { display: none !important; }
#loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: white; font-weight: bold; font-size: 1.2rem;
}
.spinner {
    border: 6px solid #f3f3f3; border-top: 6px solid var(--primary, #007bff);
    border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; margin-bottom: 15px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.input-error-flash { border: 2px solid #ff1744 !important; animation: flash 0.5s ease-in-out 2; }
@keyframes flash { 0%, 100% {opacity:1;} 50% {opacity:0.5;} }

.expiry-item-row {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.expiry-item-row:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.expiry-item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.expiry-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.expiry-item-actions button {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
}

@media (max-width: 768px) {
    .product-row {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 12px;
    }

    .product-header-labels {
        display: none;
    }

    .product-row input {
        border: 1px solid var(--border) !important;
        background: var(--white) !important;
        text-align: right !important;
    }

    .product-row .product-price-input { text-align: left !important; }
}

.menu-toggle-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
}

.app-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--white);
    z-index: 10000;
    box-shadow: -2px 0 20px rgba(0,0,0,0.1);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

body.dark-mode .app-sidebar {
    background: var(--card-bg);
}

.app-sidebar.open {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: var(--primary);
    color: white;
}

.sidebar-header h3 {
    margin: 0;
}

.close-sidebar-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-menu .nav-item,
.sidebar-menu .sidebar-action-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 14px 18px;
    gap: 15px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.sidebar-menu .nav-item:hover,
.sidebar-menu .sidebar-action-btn:hover {
    background: var(--bg);
}

.sidebar-menu .nav-item.active {
    background: var(--primary-glow);
    color: var(--primary);
}

.sidebar-menu .nav-item .icon,
.sidebar-menu .sidebar-action-btn .icon {
    font-size: 1.4rem;
}

.wa-customer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
}

.wa-send-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.wa-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.menu-group { margin-bottom: 5px; }
.menu-group-title { font-size: 0.8rem; color: #7f8c8d; font-weight: bold; margin-bottom: 5px; padding-right: 15px; text-transform: uppercase; letter-spacing: 1px; transition: color 0.3s ease; }
.menu-group-title.active-group { color: var(--primary) !important; }
.menu-group-title.active-group .chevron-icon { color: var(--primary); }

#closeSidebarBtn {
    color: white !important;
    background-color: var(--danger) !important;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.4);
    font-size: 0.85rem;
}
#closeSidebarBtn:hover {
    background-color: #ff4757 !important;
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.8);
}
#closeSidebarBtn:active {
    transform: scale(0.95);
}

@media (min-width: 900px) {

    body {
        padding-left: 0;
    }

    .app-header {
        left: 0;
        width: 100%;
    }

    .toast-container {
        left: 20px;
    }
}

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

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeInUp 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.nav-item {
    transition: all 0.3s ease;
}

.nav-item:hover {
    transform: translateX(-5px);
    background: var(--bg);
}

.nav-item i {
    transition: transform 0.3s ease;
}

.nav-item:hover i {
    transform: scale(1.15) rotate(-5deg);
}

.dash-card {
    background: var(--card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: var(--glass-border);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s;
}
.dash-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-floating);
    border-color: rgba(255, 255, 255, 0.8);
}

.price-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    padding: 30px 20px 20px 20px; 
    background: transparent;
}

.price-tag-card {
    position: relative;
    background: #fff;
    border-radius: 0; 
    overflow: visible; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 6px; 
    margin-top: 0; 
    background-image: repeating-linear-gradient(
        -45deg,
        #f06292,
        #f06292 10px,
        #fff 10px,
        #fff 20px
    );
}

.price-tag-inner {
    background: #fff;
    border-radius: 0; 
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 3px solid #e91e63; 
    position: relative;
    padding: 5px 10px; 
}

.candy-deco {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.9;
    z-index: 10;
}
.candy-deco.top-left { top: 10px; left: 10px; transform: rotate(-15deg); }
.candy-deco.top-right { top: 10px; right: 10px; transform: rotate(15deg); }
.candy-deco.bottom-left { bottom: 10px; left: 10px; transform: rotate(15deg); }
.candy-deco.bottom-right { bottom: 10px; right: 10px; transform: rotate(-15deg); }

.price-tag-header {
    text-align: center;
    margin-bottom: 2px;
    margin-top: -12px; 
    z-index: 15;
}

.price-tag-logo {
    height: 60px;
    object-fit: contain;

}

.price-tag-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    z-index: 5;
    margin-top: 0; 
}

.tag-box {
    border: 2px dashed #f48fb1;
    border-radius: 8px;
    padding: 2px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tag-box.top-box {
    flex: 1.5;
    margin-bottom: 5px;
    position: relative;
}

.tag-box.bottom-box {
    flex: 1;
    margin-top: 5px;
}

.middle-divider-bar {
    background-color: #aa00ff;
    height: 15px;
    margin: 0 -10px; 
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.middle-divider-bar::before,
.middle-divider-bar::after {
    content: '';
    flex: 1;
    border-top: 3px dotted #fff;
    margin: 0 10px;
}

.middle-divider-bar .candy-icon {
    font-size: 1.2rem;
    background: #fff;
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.tag-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 900;
    direction: rtl;
}

.name-row .tag-label,
.name-row .tag-value,
.price-row .tag-label,
.price-row .tag-value {
    color: #4a148c; 
    font-family: 'Cairo', sans-serif;
}

.tag-value {
    flex: 1;
    text-align: right;
    word-break: break-word;
    overflow-wrap: break-word;
}

.tag-barcode-container {
    text-align: center;
    margin-top: 5px;
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.barcode-svg {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
}

.price-tag-card.is-offer {
    background-color: #ff0000;
    background-image: none; 
}

.price-tag-card.is-offer .price-tag-inner {
    border: 4px solid #ff0000;
}

.price-tag-card.is-offer .tag-box {
    border: 2px dashed #ff9800;
}

.price-tag-card.is-offer .middle-divider-bar {
    background-color: #ff0000;
}

.price-tag-card.is-offer .price-row .tag-label,
.price-tag-card.is-offer .price-row .tag-value,
.price-tag-card.is-offer .name-row .tag-label,
.price-tag-card.is-offer .name-row .tag-value {
    color: #b71c1c; 
}

.offer-badge {
    position: absolute;
    top: -12px;
    right: -12px;
    background-color: #E91E8C;
    color: #fff;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 12px;
    z-index: 20;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    font-size: 1.8rem;
    border: 2px solid #ffeb3b;
    animation: none !important;
    transform: none !important;
}
.price-tag-card .offer-badge { font-size: 1.8rem; padding: 10px 20px; top: -12px; right: -12px; }

.old-price {
    text-decoration: line-through;
    text-decoration-color: #ff0000;
    text-decoration-thickness: 2px;
    color: #7f8c8d;
    font-size: 0.8em;
    margin-left: 8px;
}

.price-tag-wrapper {
    display: inline-block;
    vertical-align: top;
    margin-bottom: 20px;
    overflow: hidden;
    page-break-inside: avoid;
}

.price-tag-wrapper.size-large { width: 13.5cm; height: 9cm; }
.price-tag-wrapper.size-medium { width: 9.5cm; height: 6.3cm; }
.price-tag-wrapper.size-small { width: 4.5cm; height: 3.0cm; }

.price-tag-card { 
    width: 13.5cm; 
    height: 9cm; 
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    margin: 0;
    transform-origin: top right; 
    -webkit-print-color-adjust: exact !important; 
    print-color-adjust: exact !important;
}
.price-tag-card .tag-row { font-size: 1.7rem; }
.price-tag-card .price-tag-logo { height: 75px; }
.price-tag-card .candy-deco { font-size: 1.4rem; }

.price-tag-wrapper.size-large .price-tag-card {
    zoom: 1; transform: none;
}
.price-tag-wrapper.size-medium .price-tag-card {
    zoom: 0.703; transform: none; 
}
.price-tag-wrapper.size-small .price-tag-card {
    zoom: 0.333; transform: none; 
}

.print-tags-only {
    display: none;
}

@media print {
    @page {
        margin: 5mm; 
    }

    body.print-mode-tags * {
        visibility: hidden;
    }
    body.print-mode-tags .print-tags-only,
    body.print-mode-tags .print-tags-only * {
        visibility: visible;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    body.print-mode-tags .print-tags-only {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    body.print-mode-tags .price-tags-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 15px !important; 
        justify-content: flex-start;
        padding: 0; 
        background: transparent;
        margin: 0 auto;
    }

    body.print-mode-tags .price-tag-wrapper {
        page-break-inside: avoid;
        margin-bottom: 15px !important; 

    }

    body.print-mode-tags .price-tag-card {
        box-shadow: none;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        margin: 0 !important;

    }

}

body.hide-print-barcode .tag-barcode-container {
    display: none !important;
}

/* --- Locked Nav Item (Marketing Trick) --- */
.locked-nav-item {
    opacity: 0.55;
    position: relative;
    cursor: not-allowed !important;
    background: #f8f9fa !important;
}
.locked-nav-item::after {
    content: '\f023'; /* fa-lock */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #e74c3c;
    pointer-events: none;
}
.locked-nav-item * {
    pointer-events: none;
}

/* --- Permission Checkbox Cards (Admin UI) --- */
.perms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.perm-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.perm-card:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}
.perm-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}
.perm-card.active-perm {
    border-color: var(--primary);
    background: #fff0f5;
}
.perm-icon {
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}
.perm-card.active-perm {
    border-color: var(--primary);
    background: #fff0f5;
}

.perm-text {
    font-weight: bold;
    font-size: 0.9rem;
    color: #334155;
}


/* ============================================================
   HR Module: ┘╪╕╪د┘à ╪د┘╪ص╪╢┘ê╪▒ ┘ê╪د┘╪د┘╪╡╪▒╪د┘
   ============================================================ */

/* GPS Status Card */
.hr-gps-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #f8f9fa;
    margin-bottom: 18px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.gps-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}
.gps-dot::after {
    content: '';
    position: absolute;
    top: -4px; left: -4px;
    width: 24px; height: 24px;
    border-radius: 50%;
    animation: gpsPulse 2s infinite;
}
.gps-dot.gps-in { background: #2e7d32; }
.gps-dot.gps-in::after { background: rgba(46, 125, 50, 0.3); }
.gps-dot.gps-out { background: #c62828; }
.gps-dot.gps-out::after { background: rgba(198, 40, 40, 0.3); }
.gps-dot.gps-unknown { background: #9e9e9e; }
.gps-dot.gps-unknown::after { background: rgba(158, 158, 158, 0.3); }

@keyframes gpsPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* Check-in/out Buttons */
.hr-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border-radius: 14px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex: 1;
    min-width: 160px;
    justify-content: center;
}
.hr-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}
.hr-checkin-btn {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.35);
}
.hr-checkin-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.5);
}
.hr-checkout-btn {
    background: linear-gradient(135deg, #c62828, #e53935);
    color: white;
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.35);
}
.hr-checkout-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 40, 40, 0.5);
}

/* Dashboard Cards */
.hr-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}
.hr-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 14px;
    background: white;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s;
}
.hr-stat-card:hover { transform: translateY(-2px); }
.hr-stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.hr-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1;
}
.hr-stat-label {
    display: block;
    font-size: 0.78rem;
    color: #888;
    margin-top: 4px;
}

/* Attendance Table */
.hr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    border-radius: 10px;
    overflow: hidden;
}
.hr-table thead th {
    background: #00897b;
    color: white;
    padding: 10px 12px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}
.hr-table tbody td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}
.hr-table tbody tr:hover {
    background: #f5f5f5;
}
.hr-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Pending Leave Items */
.hr-pending-item {
    padding: 14px;
    border: 1px solid #ffe0b2;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #fff8e1;
}
.hr-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    background: #e3f2fd;
    color: #1565c0;
    margin-inline-start: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .hr-dashboard-cards { grid-template-columns: 1fr 1fr; }
    .hr-action-btn { padding: 14px 20px; font-size: 1rem; }
    .hr-table { font-size: 0.78rem; }
    .hr-table thead th, .hr-table tbody td { padding: 8px 6px; }
}

/* Chic Employee Attendance Cards */
.hr-chic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}
.hr-chic-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}
.hr-chic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.06);
}
.hr-chic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.hr-chic-date {
    font-weight: 700;
    color: #333;
    font-size: 1.05rem;
}
.hr-chic-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}
.hr-chic-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}
.hr-chic-time {
    text-align: center;
    font-size: 0.95rem;
    color: #444;
}
.hr-chic-time div {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 3px;
}
.hr-chic-total {
    text-align: center;
    font-size: 0.9rem;
    color: #1a237e;
    font-weight: bold;
}
.hr-chic-total div {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 3px;
}
.hr-chic-notes {
    font-size: 0.85rem;
    color: #666;
    background: #fff8e1;
    padding: 8px 12px;
    border-radius: 6px;
    border-right: 3px solid #ffb300;
}

/* Special HR Chic Cards styling */
.hr-paid-leave {
    border-right: 4px solid #fbc02d !important;
}
.hr-unpaid-leave {
    border-right: 4px solid #d32f2f !important;
}
.hr-absent {
    border-right: 4px solid #9e9e9e !important;
    opacity: 0.8;
}

.btn-edit {
    background: rgba(41, 128, 185, 0.1);
    color: #2980b9;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
}
.btn-edit:hover {
    background: #2980b9;
    color: #fff;
}
.btn-delete {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
}
.btn-delete:hover {
    background: #e74c3c;
    color: #fff;
}

.table-row-hover:hover { background: #e3f2fd !important; }

/* --- UI/UX Premium Redesign --- */

/* 1. Frosted Glass (Glassmorphism) & Holographic Hover for Traffic Cards */

.traffic-card {
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07) !important;
}

body.dark-mode .traffic-card {
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
}

/* 2. Neon Glows based on card type */
.traffic-darkred { box-shadow: 0 8px 32px 0 rgba(139, 0, 0, 0.2), inset 0 2px 0 0 rgba(255,255,255,0.2) !important; }
.traffic-red { box-shadow: 0 8px 32px 0 rgba(231, 76, 60, 0.2), inset 0 2px 0 0 rgba(255,255,255,0.2) !important; }
.traffic-orange { box-shadow: 0 8px 32px 0 rgba(211, 84, 0, 0.2), inset 0 2px 0 0 rgba(255,255,255,0.2) !important; }
.traffic-yellow { box-shadow: 0 8px 32px 0 rgba(243, 156, 18, 0.2), inset 0 2px 0 0 rgba(255,255,255,0.2) !important; }
.traffic-green { box-shadow: 0 8px 32px 0 rgba(39, 174, 96, 0.2), inset 0 2px 0 0 rgba(255,255,255,0.2) !important; }
.traffic-blue { box-shadow: 0 8px 32px 0 rgba(41, 128, 185, 0.2), inset 0 2px 0 0 rgba(255,255,255,0.2) !important; }
.traffic-total { box-shadow: 0 8px 32px 0 rgba(30, 60, 114, 0.2), inset 0 2px 0 0 rgba(255,255,255,0.2) !important; }
.traffic-offers { box-shadow: 0 8px 32px 0 rgba(243, 156, 18, 0.2), inset 0 2px 0 0 rgba(255,255,255,0.2) !important; }

/* 3. Dynamic Borders & Light Reflection on Hover */
.traffic-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
}
.traffic-darkred:hover { box-shadow: 0 15px 40px 0 rgba(139, 0, 0, 0.4), inset 0 2px 0 0 rgba(255,255,255,0.5) !important; }
.traffic-red:hover { box-shadow: 0 15px 40px 0 rgba(231, 76, 60, 0.4), inset 0 2px 0 0 rgba(255,255,255,0.5) !important; }
.traffic-green:hover { box-shadow: 0 15px 40px 0 rgba(39, 174, 96, 0.4), inset 0 2px 0 0 rgba(255,255,255,0.5) !important; }

/* Holographic Sheen */
.traffic-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: left 0.7s ease;
    pointer-events: none;
}
.traffic-card:hover::before { left: 200%; }

/* 4. Monospaced Digits */
.traffic-card h2 {
    font-family: 'Share Tech Mono', monospace, sans-serif !important;
    font-size: 3.5rem !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -2px;
}
.traffic-header h3 {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.traffic-card h3 i {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transform: translateZ(10px);
}

/* 5. Heartbeat Pulse for Critical */
@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.1); text-shadow: 0 0 15px rgba(255,0,0,0.8); }
    30% { transform: scale(1); }
    45% { transform: scale(1.1); text-shadow: 0 0 15px rgba(255,0,0,0.8); }
    60% { transform: scale(1); }
}
.traffic-darkred h2 {
    animation: heartbeat 2s infinite ease-in-out;
}

/* 6. Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(200, 200, 200, 0.5);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(150, 150, 150, 0.8);
}
body.dark-mode ::-webkit-scrollbar-thumb {
    background: rgba(80, 80, 80, 0.5);
}

/* 7. Liquid Active State for Sidebar */
.nav-item .nav-link {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 0 20px 20px 0;
    margin-right: 10px;
}
.nav-item .nav-link.active {
    background: linear-gradient(90deg, rgba(233, 30, 99, 0.1) 0%, transparent 100%) !important;
    border-left: 4px solid var(--primary);
    box-shadow: inset 10px 0 15px -10px rgba(233, 30, 99, 0.3);
}

/* Pulsing Badge for Sidebar */
.pulsing-badge {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #ff3b30;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
    animation: pulse-red 1.5s infinite;
}
@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

/* Smart Accordion Parent Row */
.batch-parent-row {
    background: linear-gradient(to left, rgba(240, 248, 255, 0.8), transparent) !important;
    border-right: 4px solid var(--primary);
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.batch-parent-row:hover {
    background: rgba(240, 248, 255, 1) !important;
}
body.dark-mode .batch-parent-row {
    background: linear-gradient(to left, rgba(30, 60, 114, 0.3), transparent) !important;
}
.batch-child-row {
    background: rgba(0,0,0,0.015);
    border-right: 2px dashed rgba(0,0,0,0.1);
}
body.dark-mode .batch-child-row {
    background: rgba(255,255,255,0.015);
    border-right: 2px dashed rgba(255,255,255,0.1);
}


/* Custom Platform Select Dropdown */
/* Custom Platform Select Dropdown */
.custom-platform-select { position: relative; width: 100%; margin-bottom: 15px; font-family: inherit; }
.platform-selected { display: flex; align-items: center; padding: 12px 16px; border: 2px solid #cbd5e1; border-radius: 12px; background: #fff; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.platform-selected:hover { border-color: #94a3b8; }
.platform-selected i.platform-icon { font-size: 1.5rem; margin-left: 12px; color: #94a3b8; transition: all 0.3s ease; }
.platform-selected span.platform-text { flex-grow: 1; font-weight: 600; color: #333; font-size: 1.1rem; }
.platform-selected.is-placeholder span.platform-text { color: #94a3b8; font-weight: 500; }
.platform-selected.is-placeholder i.platform-icon { color: #94a3b8 !important; }
.platform-selected i.dropdown-arrow { margin-left: 0; font-size: 1rem; color: #888; transition: transform 0.3s ease; }
.custom-platform-select.open .dropdown-arrow { transform: rotate(180deg); }
.platform-options { position: absolute; top: 100%; right: 0; left: 0; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); margin-top: 8px; z-index: 999; overflow: hidden; display: none; transform-origin: top; animation: dropFadeIn 0.2s ease; border: 1px solid #eee; }
.custom-platform-select.open .platform-options { display: block; }
.platform-option { padding: 12px 16px; display: flex; align-items: center; cursor: pointer; transition: background 0.2s; font-weight: 500; color: #444; border-bottom: 1px solid #f5f5f5; }
.platform-option:last-child { border-bottom: none; }
.platform-option:hover { background: #f8f9fa; }
.platform-option i { font-size: 1.3rem; margin-left: 12px; }
@keyframes dropFadeIn { from { opacity: 0; transform: scaleY(0.9); } to { opacity: 1; transform: scaleY(1); } }

/* Platform Validation Shake & Red Flash */
.custom-platform-select.platform-error .platform-selected {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
    animation: platformShake 0.4s ease-in-out;
}

@keyframes platformShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

@media (max-width: 500px) { .welcome-text { display: none !important; } }

/* Custom Date Picker Wheel Styles */
.wheel-column {
    flex: 1;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    text-align: center;
    position: relative;
}
.wheel-column::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}
.wheel-item {
    height: 40px;
    line-height: 40px;
    scroll-snap-align: center;
    font-size: 1.1rem;
    color: #94a3b8;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
}
.wheel-item.selected {
    color: #1e293b;
    font-size: 1.4rem;
    font-weight: 800;
}
body.dark-mode .wheel-item {
    color: #64748b;
}
body.dark-mode .wheel-item.selected {
    color: #f8fafc;
}
body.dark-mode .wheel-picker-container {
    background: #0f172a;
}
.wheel-spacer {
    height: 80px; /* Half of container height (100px) minus half of item height (20px) */
}

/* Payment Method Colors */
.payment-cash { background-color: rgba(37, 211, 102, 0.1) !important; border: 2px solid #25D366 !important; color: #128C7E !important; font-weight: bold; box-shadow: 0 0 10px rgba(37, 211, 102, 0.2); }
.payment-instapay { background-color: rgba(156, 39, 176, 0.1) !important; border: 2px solid #9C27B0 !important; color: #7B1FA2 !important; font-weight: bold; box-shadow: 0 0 10px rgba(156, 39, 176, 0.2); }


/* Flatpickr Custom Styling for Expiries */
.flatpickr-day.has-entry {
    background-color: #e8f5e9 !important;
    border-color: #4caf50 !important;
    color: #2e7d32 !important;
    font-weight: bold;
}
.flatpickr-day.has-entry::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #2e7d32;
}

@media (max-width: 600px) {
    #moderators-tab {
        width: 100%;
        min-width: 0;
        height: auto !important;
    }

    #moderators-tab > .moderators-page-card {
        width: 100%;
        height: auto !important;
        min-height: calc(100vh - var(--header-height) - var(--nav-height) - 24px);
        padding: 16px 12px;
        overflow: hidden;
        transform: none;
    }

    #moderators-tab > .moderators-page-card:hover {
        transform: none;
    }

    #moderators-tab .moderators-header {
        margin-bottom: 16px !important;
    }

    #moderators-tab .moderators-header h2 {
        font-size: 1.15rem;
        line-height: 1.5;
        padding-inline-start: 28px;
    }

    #moderators-tab .moderators-header p {
        font-size: 0.85rem !important;
        line-height: 1.6;
    }

    #moderators-tab .moderators-add-form {
        flex-direction: column;
        align-items: stretch;
        gap: 8px !important;
    }

    #moderators-tab #newModeratorName {
        width: 100%;
        min-width: 0;
        min-height: 48px;
    }

    #moderators-tab #addModeratorBtn {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        padding: 10px 14px !important;
    }

    #moderators-tab #moderatorsList {
        width: 100%;
        max-height: 180px !important;
        margin-bottom: 14px !important;
        border-radius: 14px;
    }

    #moderators-tab #moderatorsList .data-row {
        gap: 10px;
        min-width: 0;
        padding: 10px;
    }

    #moderators-tab #moderatorsList .mod-row-name {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    #moderators-tab #moderatorsList .mod-row-item > button {
        flex: 0 0 42px;
        min-width: 42px;
        min-height: 42px;
    }

    #moderators-tab .moderators-toolbar {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
        padding: 12px !important;
    }

    #moderators-tab .moderators-toolbar h3 {
        font-size: 1rem;
    }

    #moderators-tab .moderators-filter {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px !important;
        width: 100%;
    }

    #moderators-tab .moderators-filter label {
        grid-column: 1 / -1;
        font-size: 0.85rem !important;
    }

    #moderators-tab #moderatorsMonthFilter {
        width: 100%;
        min-width: 0;
    }

    #moderators-tab .moderators-filter button {
        min-width: 88px;
        min-height: 44px;
    }

    #moderators-tab #moderatorsDashboardContainer {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
        min-width: 0;
        overflow: visible !important;
    }

    #moderators-tab #moderatorsDashboardContainer > .report-card {
        min-width: 0;
        padding: 14px !important;
        border-radius: 14px !important;
    }

    #moderators-tab #moderatorsDashboardContainer .report-card h3 {
        min-width: 0;
        font-size: 1.1rem !important;
        overflow-wrap: anywhere;
    }

    #moderators-tab #moderatorsDashboardContainer .report-card > div:last-child {
        gap: 8px !important;
    }

    #moderators-tab #moderatorsDashboardContainer .report-card > div:last-child > div {
        min-width: 0;
        padding: 9px 6px !important;
    }

    #moderators-tab #moderatorsDashboardContainer .report-card > div:last-child > div > div:last-child {
        font-size: 1rem !important;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 600px) {
    #financials-tab {
        width: 100%;
        min-width: 0;
    }

    #financials-tab > .financials-page-card {
        width: 100%;
        min-width: 0;
        padding: 14px 10px;
        overflow: hidden;
        transform: none;
    }

    #financials-tab > .financials-page-card:hover {
        transform: none;
    }

    #financials-tab .financials-header-row {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 14px !important;
    }

    #financials-tab .financials-header-row > div:first-child {
        display: grid;
        gap: 6px;
        min-width: 0;
    }

    #financials-tab .financials-header-row h2 {
        margin: 0 !important;
        font-size: 1.25rem;
        line-height: 1.45;
    }

    #financials-tab #financialsTotalAmount {
        font-size: 1.05rem;
        line-height: 1.5;
    }

    #financials-tab .financials-controls {
        display: flex !important;
        flex-direction: column;
        align-items: stretch !important;
        gap: 9px !important;
        width: 100%;
        min-width: 0;
    }

    #financials-tab .financials-add-driver-form,
    #financials-tab .financials-month-filter,
    #financials-tab .financials-order-search {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px !important;
        width: 100%;
        min-width: 0;
        padding: 9px !important;
    }

    #financials-tab .financials-add-driver-form input,
    #financials-tab .financials-month-filter input,
    #financials-tab .financials-order-search input {
        width: 100% !important;
        min-width: 0;
        margin: 0 !important;
    }

    #financials-tab .financials-add-driver-form #addDriverBtn {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 44px;
    }

    #financials-tab .financials-filter-search {
        display: flex !important;
        flex-direction: column;
        gap: 8px !important;
        width: 100%;
        min-width: 0;
    }

    #financials-tab .financials-month-filter label {
        grid-column: 1 / -1;
        font-size: 0.84rem !important;
    }

    #financials-tab .financials-month-filter #driversMonthFilter {
        grid-column: 1 / -1;
    }

    #financials-tab .financials-month-filter button {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 44px;
        padding: 9px 10px !important;
    }

    #financials-tab .financials-order-search #driverOrderSearchInput {
        grid-column: 1 / -1;
    }

    #financials-tab .financials-order-search button {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 44px;
        padding: 9px 10px !important;
    }

    #financials-tab .financials-select-all,
    #financials-tab #closeSelectedFinancialsBtn {
        min-height: 44px;
        justify-content: center;
        width: 100%;
        margin: 0;
    }

    #financials-tab .financials-display-list {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
        min-width: 0;
        overflow: visible !important;
    }

    #financials-tab .financials-display-list > .driver-card {
        width: 100%;
        min-width: 0;
        padding: 12px !important;
        margin: 0 !important;
        border-radius: 14px !important;
    }

    #financials-tab .financial-header {
        align-items: flex-start !important;
        gap: 8px !important;
    }

    #financials-tab .financial-header > div {
        flex-wrap: wrap !important;
        min-width: 0;
    }

    #financials-tab .financial-header > div > span:first-child {
        white-space: normal !important;
        overflow-wrap: anywhere;
        font-size: 1rem !important;
    }

    #financials-tab .financial-metrics-grid {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 5px !important;
    }

    #financials-tab .financial-metrics-grid > div {
        min-width: 0;
        padding: 7px 3px !important;
    }

    #financials-tab .financial-metrics-grid > div > div:first-child {
        min-height: 2.2em;
        font-size: 0.62rem !important;
        line-height: 1.25;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    #financials-tab .financial-metrics-grid > div > div:nth-child(2) {
        font-size: 0.92rem !important;
        overflow-wrap: anywhere;
    }

    #financials-tab .financial-status {
        font-size: 0.84rem !important;
        line-height: 1.55;
        overflow-wrap: anywhere;
    }

    #financials-tab .financial-order-item > div:first-child {
        flex-wrap: wrap;
    }

    #financials-tab .financial-order-item > div:first-child > div:first-child {
        flex-wrap: wrap !important;
        min-width: 0;
    }

    #financials-tab .financial-order-item > div:first-child > div:first-child > span {
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    #financials-tab .financial-order-item .btn-settle {
        min-height: 38px;
    }

    #financials-tab .financial-order-item > div:nth-child(2) {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 3px !important;
        padding: 6px 4px !important;
    }

    #financials-tab .financial-order-item > div:last-child {
        flex-wrap: wrap !important;
        gap: 6px !important;
        line-height: 1.5;
    }

    #financials-tab .financial-order-item > div:last-child > span {
        overflow-wrap: anywhere;
    }
}

#financials-tab .financial-css-icon {
    position: relative;
    display: inline-block;
    width: 1em;
    height: 0.9em;
    flex: 0 0 1em;
    margin-inline-end: 0.2em;
    vertical-align: -0.08em;
    color: currentColor;
}

#financials-tab .financial-css-icon::before,
#financials-tab .financial-css-icon::after {
    position: absolute;
    box-sizing: border-box;
    content: "";
}

#financials-tab .financial-css-icon--cash::before {
    top: 0.12em;
    left: 0.04em;
    width: 0.9em;
    height: 0.62em;
    border: 1.5px solid currentColor;
    border-radius: 0.14em;
}

#financials-tab .financial-css-icon--cash::after {
    top: 0.3em;
    left: 0.39em;
    width: 0.2em;
    height: 0.2em;
    border: 1px solid currentColor;
    border-radius: 50%;
}

#financials-tab .financial-css-icon--phone::before {
    top: 0.02em;
    left: 0.22em;
    width: 0.56em;
    height: 0.84em;
    border: 1.5px solid currentColor;
    border-radius: 0.16em;
}

#financials-tab .financial-css-icon--phone::after {
    bottom: 0.11em;
    left: 0.47em;
    width: 0.07em;
    height: 0.07em;
    border-radius: 50%;
    background: currentColor;
}

#financials-tab .financial-css-icon--truck {
    background: linear-gradient(currentColor, currentColor) right 0.04em top 0.18em / 0.24em 0.34em no-repeat;
}

#financials-tab .financial-css-icon--truck::before {
    top: 0.12em;
    left: 0.02em;
    width: 0.74em;
    height: 0.49em;
    border: 1.5px solid currentColor;
    border-radius: 0.08em;
}

#financials-tab .financial-css-icon--truck::after {
    bottom: 0.02em;
    left: 0.17em;
    width: 0.17em;
    height: 0.17em;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0.48em 0 0 -0.01em currentColor;
}

#financials-tab .financial-css-icon--check::before,
#financials-tab .financial-css-icon--balance::before {
    top: 0.02em;
    left: 0.06em;
    width: 0.82em;
    height: 0.82em;
    border: 1.5px solid currentColor;
    border-radius: 50%;
}

#financials-tab .financial-css-icon--check::after {
    top: 0.2em;
    left: 0.29em;
    width: 0.25em;
    height: 0.42em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
}

#financials-tab .financial-css-icon--balance::after {
    top: 0.31em;
    left: 0.27em;
    width: 0.4em;
    height: 1px;
    background: currentColor;
    box-shadow: 0 0.16em 0 currentColor;
}

#financials-tab .financial-payment-badge,
#financials-tab .financial-metric-label,
#financials-tab .financial-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2em;
}

#financials-tab .financial-status {
    display: flex;
}

.ledger-marketplace-statuses {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
}

.ledger-platform-field {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 9px 11px;
    border: 1px solid;
    border-radius: 9px;
    background: #fff;
}

.ledger-platform-field--talabat {
    border-color: #ea580c;
    background: #f97316;
    color: #fff;
}

.ledger-platform-field--instashop {
    border-color: #ec4899;
    background: #ec4899;
    color: #fff;
}

.ledger-platform-field label {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 800;
}

.ledger-platform-select,
.marketplace-status-select {
    min-width: 0;
    width: 100%;
    min-height: 40px;
    padding: 7px 9px;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-weight: 700;
}

.ledger-platform-select--native {
    display: none;
}

.ledger-custom-select {
    position: relative;
}

.ledger-custom-select__button {
    width: 100%;
    min-height: 40px;
    padding: 7px 35px 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font: inherit;
    font-weight: 800;
    text-align: right;
    cursor: pointer;
}

.ledger-custom-select__button::after {
    position: absolute;
    left: 12px;
    top: 50%;
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.ledger-custom-select__button[data-status="unknown"] {
    border-color: #94a3b8;
    background: #f1f5f9;
    color: #475569;
}

.ledger-custom-select__button[data-status="present"] {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.ledger-custom-select__button[data-status="absent"] {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}

.ledger-platform-field--talabat .ledger-custom-select__button,
.ledger-platform-field--instashop .ledger-custom-select__button {
    border-width: 2px;
}

.ledger-platform-field--talabat .ledger-custom-select__button[data-status="unknown"],
.ledger-platform-field--instashop .ledger-custom-select__button[data-status="unknown"] {
    border-color: #94a3b8;
    background: #f1f5f9;
    color: #475569;
}

.ledger-custom-select__menu {
    position: absolute;
    z-index: 20;
    right: 0;
    left: 0;
    display: none;
    gap: 4px;
    margin-top: 4px;
    padding: 5px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.ledger-custom-select.is-open .ledger-custom-select__menu {
    display: grid;
}

.ledger-custom-select__menu button {
    min-height: 36px;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-weight: 700;
    text-align: right;
    cursor: pointer;
}

.ledger-custom-select__menu button:hover,
.ledger-custom-select__menu button[aria-selected="true"] {
    background: #f1f5f9;
}

.ledger-custom-select__menu button[data-value="present"][aria-selected="true"] {
    background: #dcfce7;
    color: #166534;
}

.ledger-custom-select__menu button[data-value="absent"][aria-selected="true"] {
    background: #fee2e2;
    color: #991b1b;
}

.ledger-custom-select__menu button[data-value="unknown"][aria-selected="true"] {
    background: #f1f5f9;
    color: #475569;
}

.ledger-platform-hint {
    grid-column: 1 / -1;
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
}

.ledger-status-chip {
    display: inline-block;
    margin: 2px;
    padding: 3px 7px;
    border: 1px solid;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.ledger-status-chip--talabat {
    color: #c2410c;
    border-color: #fed7aa;
    background: #fff7ed;
}

.ledger-status-chip--instashop {
    color: #6d28d9;
    border-color: #ddd6fe;
    background: #f5f3ff;
}

.marketplace-archive-panel {
    min-width: 0;
    margin: 18px 0 24px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.marketplace-archive-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    color: #172554;
    cursor: pointer;
    list-style: none;
}

.marketplace-archive-summary::-webkit-details-marker {
    display: none;
}

.marketplace-archive-summary-title {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    font-size: 1.15rem;
    font-weight: 900;
}

.marketplace-word-connector {
    color: #64748b;
    font-weight: 700;
}

.marketplace-word--talabat,
.marketplace-table-heading--talabat {
    color: #ea580c;
}

.marketplace-word--instashop,
.marketplace-table-heading--instashop {
    color: #ff2b66;
}

.marketplace-archive-summary-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.marketplace-archive-chevron {
    color: #64748b;
    transition: transform 0.2s ease;
}

.marketplace-archive-panel[open] .marketplace-archive-chevron {
    transform: rotate(180deg);
}

.marketplace-archive-content {
    padding: 0 16px 16px;
}

.marketplace-archive-heading {
    margin-bottom: 14px;
}

.marketplace-archive-heading p {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
}

/* ===================================================
   📊 Marketplace KPI Summary Bar
   =================================================== */
.marketplace-kpi-summary-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.marketplace-kpi-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.marketplace-kpi-group:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.marketplace-kpi-group--talabat {
    border-right: 4px solid #ea580c;
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.05), #ffffff);
}

.marketplace-kpi-group--instashop {
    border-right: 4px solid #ff2b66;
    background: linear-gradient(135deg, rgba(255, 43, 102, 0.06), #ffffff);
}

.marketplace-kpi-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 800;
}

.marketplace-kpi-group--talabat .marketplace-kpi-brand {
    color: #ea580c;
}

.marketplace-kpi-group--instashop .marketplace-kpi-brand {
    color: #ff2b66;
}

.marketplace-kpi-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.marketplace-kpi-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.kpi-pill--present {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.kpi-pill--absent {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.kpi-pill--unknown {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.marketplace-archive-count {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    font-weight: 800;
}

.marketplace-archive-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 14px;
}

/* صندوق تحديد الفترة الزمنية والكبسولات السريعة */
.marketplace-date-range-box {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.marketplace-date-inputs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.marketplace-date-inputs-row > label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #1e293b;
    font-size: 0.84rem;
    font-weight: 800;
}

.marketplace-date-inputs-row input[type="date"] {
    min-height: 42px;
    padding: 7px 10px;
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    font: inherit;
    font-weight: 700;
    color: #0f172a;
    transition: all 0.2s ease;
}

.marketplace-date-inputs-row input[type="date"]:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
    outline: none;
}

.marketplace-date-preset-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.date-range-preset-chip {
    padding: 7px 14px;
    border-radius: 20px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.date-range-preset-chip:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.date-range-preset-chip.active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35);
}

body.dark-mode .marketplace-date-range-box {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .marketplace-date-inputs-row > label {
    color: #cbd5e1;
}

body.dark-mode .marketplace-date-inputs-row input[type="date"] {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

body.dark-mode .date-range-preset-chip {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}

body.dark-mode .date-range-preset-chip.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.marketplace-archive-controls > label {
    display: grid;
    gap: 4px;
    min-width: 0;
    margin: 0;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
}

.marketplace-archive-controls input,
.marketplace-archive-controls select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin: 0;
    padding: 7px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

.marketplace-filter--talabat {
    color: #c2410c !important;
}

.marketplace-filter--instashop {
    color: #ff2b66 !important;
}

.marketplace-archive-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.marketplace-archive-actions button {
    min-height: 42px;
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: #0f766e;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

/* ===================================================
   ✨ Floating Capsule Pagination Bar
   =================================================== */
.marketplace-archive-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 22px auto 8px;
    width: fit-content;
    max-width: 95%;
    padding: 8px 16px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 999px;
    box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 3px 8px -2px rgba(15, 23, 42, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.marketplace-archive-pagination:hover {
    box-shadow: 0 14px 30px -4px rgba(99, 102, 241, 0.15), 0 4px 10px -2px rgba(15, 23, 42, 0.06);
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.marketplace-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 20px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff !important;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    outline: none;
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.32);
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.marketplace-page-btn i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.marketplace-page-btn--prev:hover:not(:disabled) i {
    transform: translateX(3px);
}

.marketplace-page-btn--next:hover:not(:disabled) i {
    transform: translateX(-3px);
}

.marketplace-page-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

.marketplace-page-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
}

.marketplace-page-btn:disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none !important;
}

.marketplace-page-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 999px;
    color: #4338ca;
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.marketplace-page-info .page-current {
    color: #4f46e5;
    font-size: 1.1rem;
    font-weight: 900;
    margin: 0 4px;
}

.marketplace-page-info .page-total {
    color: #64748b;
    font-weight: 800;
    margin: 0 4px;
}

@media (max-width: 600px) {
    .marketplace-archive-pagination {
        width: 100%;
        border-radius: 16px;
        gap: 8px;
        padding: 8px;
    }
    .marketplace-page-btn {
        padding: 8px 12px;
        font-size: 0.84rem;
        flex: 1;
        min-height: 38px;
    }
    .marketplace-page-info {
        padding: 6px 10px;
        font-size: 0.82rem;
    }
}

#exportMarketplaceArchiveExcelBtn {
    background: #15803d;
}

#exportMarketplaceArchivePdfBtn {
    background: #be185d;
}

.marketplace-archive-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.marketplace-archive-table {
    min-width: 780px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.marketplace-archive-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: #fff;
    background: #334155;
    white-space: nowrap;
    padding: 10px 14px;
}

.marketplace-table-heading--talabat {
    color: #fff !important;
    background: linear-gradient(135deg, #ea580c, #c2410c) !important;
    text-align: center;
}

.marketplace-table-heading--instashop {
    color: #fff !important;
    background: linear-gradient(135deg, #ff2b66, #e6005c) !important;
    text-align: center;
}

.marketplace-archive-table td {
    vertical-align: middle;
    padding: 9px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.marketplace-col-talabat {
    background: rgba(234, 88, 12, 0.03);
    text-align: center;
    min-width: 155px;
}

.marketplace-col-instashop {
    background: rgba(255, 43, 102, 0.03);
    text-align: center;
    min-width: 155px;
}

.marketplace-product-name {
    min-width: 180px;
    font-weight: 800;
}

.marketplace-prod-name-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.marketplace-name-text {
    font-size: 0.94rem;
    color: #0f172a;
}

.marketplace-modified-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    animation: pulse-soft 2s infinite ease-in-out;
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.72; }
}

tr.marketplace-row--recently-modified {
    background: rgba(254, 243, 199, 0.3) !important;
    border-right: 4px solid #f59e0b;
}

.marketplace-barcode {
    min-width: 140px;
}

/* ===================================================
   🏷️ Interactive Barcode Pill (Click-to-Copy)
   =================================================== */
.marketplace-barcode-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    color: #1e293b;
    font-family: monospace;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    outline: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.marketplace-barcode-pill:hover {
    background: #f1f5f9;
    border-color: #64748b;
    color: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.07);
}

.marketplace-barcode-pill:active {
    transform: scale(0.97);
}

.marketplace-barcode-pill.copied {
    background: #ecfdf5 !important;
    border-color: #10b981 !important;
    color: #047857 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
    transform: scale(1.03);
}

.barcode-pill-icon {
    font-size: 0.85rem;
    opacity: 0.7;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.marketplace-barcode-pill:hover .barcode-pill-icon {
    opacity: 1;
    transform: scale(1.15);
}

.marketplace-no-barcode {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 700;
}

/* ===================================================
   🎨 Modern Custom Dropdowns (CSS-Only, No Native Select)
   =================================================== */
.marketplace-custom-select {
    position: relative;
    display: inline-block;
    width: 100%;
    min-width: 140px;
}

.marketplace-custom-select__btn {
    width: 100%;
    min-height: 40px;
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
    border: 1.5px solid transparent;
}

.marketplace-custom-select__btn:hover {
    transform: translateY(-1px);
}

.marketplace-status-text {
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.marketplace-custom-select__arrow {
    font-size: 0.72rem;
    transition: transform 0.2s ease;
    opacity: 0.75;
}

.marketplace-custom-select.is-open .marketplace-custom-select__arrow {
    transform: rotate(180deg);
}

/* Status Colors for Button */
.marketplace-custom-select[data-status="present"] .marketplace-custom-select__btn {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border-color: #10b981 !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.12);
}

.marketplace-custom-select[data-status="absent"] .marketplace-custom-select__btn {
    background-color: #fef2f2 !important;
    color: #be123c !important;
    border-color: #f43f5e !important;
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.12);
}

.marketplace-custom-select[data-status="unknown"] .marketplace-custom-select__btn {
    background-color: #fffbeb !important;
    color: #92400e !important;
    border-color: #f59e0b !important;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.12);
}

/* Status Dots (CSS Circles) */
.marketplace-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot--present {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.dot--absent {
    background: #f43f5e;
    box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.2);
}

.dot--unknown {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* Floating Menu */
.marketplace-custom-select__menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    min-width: 140px;
    z-index: 150;
    background: #ffffff;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    padding: 6px;
    display: none;
    animation: dropMenuIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropMenuIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.marketplace-custom-select.is-open .marketplace-custom-select__menu {
    display: block;
}

.marketplace-custom-select__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #334155;
    margin-bottom: 3px;
}

.marketplace-custom-select__option:last-child {
    margin-bottom: 0;
}

.marketplace-custom-select__option.option--present:hover,
.marketplace-custom-select__option.option--present.is-selected {
    background: #ecfdf5;
    color: #065f46;
    font-weight: 800;
}

.marketplace-custom-select__option.option--absent:hover,
.marketplace-custom-select__option.option--absent.is-selected {
    background: #fef2f2;
    color: #be123c;
    font-weight: 800;
}

.marketplace-custom-select__option.option--unknown:hover,
.marketplace-custom-select__option.option--unknown.is-selected {
    background: #fffbeb;
    color: #92400e;
    font-weight: 800;
}

.marketplace-archive-empty {
    padding: 22px !important;
    color: #64748b;
    text-align: center;
}

/* ===================================================
   📱 Mobile Responsive Card Transformation (<= 768px)
   =================================================== */
@media (max-width: 768px) {
    .marketplace-kpi-summary-bar {
        grid-template-columns: 1fr;
    }

    .marketplace-archive-controls {
        grid-template-columns: 1fr;
    }

    .marketplace-date-inputs-row {
        grid-template-columns: 1fr 1fr;
    }

    @media (max-width: 480px) {
        .marketplace-date-inputs-row {
            grid-template-columns: 1fr;
        }
    }

    .marketplace-archive-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .marketplace-archive-table-wrap {
        border: none;
        background: transparent;
        overflow: visible;
    }

    .marketplace-archive-table {
        min-width: 100%;
        display: block;
    }

    .marketplace-archive-table thead {
        display: none;
    }

    .marketplace-archive-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .marketplace-archive-table tr {
        display: flex;
        flex-direction: column;
        background: #fff;
        border: 1.5px solid #e2e8f0;
        border-radius: 14px;
        padding: 14px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.04);
        position: relative;
    }

    .marketplace-archive-table tr.marketplace-row--recently-modified {
        border-color: #f59e0b;
        border-right: 5px solid #f59e0b;
    }

    .marketplace-archive-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 0;
        border: none;
        border-bottom: 1px dashed #f1f5f9;
    }

    .marketplace-archive-table td:last-child {
        border-bottom: none;
    }

    .marketplace-archive-table td::before {
        content: attr(data-label);
        font-weight: 800;
        font-size: 0.85rem;
        color: #64748b;
        margin-left: 10px;
    }

    .marketplace-archive-table td.marketplace-product-name {
        padding-top: 0;
        font-size: 1.05rem;
        border-bottom: 1.5px solid #e2e8f0;
        padding-bottom: 10px;
    }

    .marketplace-archive-table td.marketplace-product-name::before {
        display: none;
    }

    .marketplace-archive-table td.marketplace-col-talabat,
    .marketplace-archive-table td.marketplace-col-instashop {
        padding: 8px 0;
    }

    .marketplace-archive-table .marketplace-custom-select {
        max-width: 65%;
    }

    .marketplace-archive-table .marketplace-custom-select__btn {
        min-height: 44px;
        font-size: 0.92rem;
    }
}

/* ===================================================
   🌟 Modern Suspended Button & Bottom Sheet Modal
   =================================================== */

/* Empty State: Neutral, calm, subtle */
.btn-suspended.is-empty {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #64748b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.btn-suspended.is-empty:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
    transform: translateY(-1px);
}
.btn-suspended.is-empty .suspended-badge {
    background: #e2e8f0;
    color: #64748b;
}

/* Active State: Has items - Candy Club Pulsing Glow! */
.btn-suspended.has-items {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border: 1.5px solid #f472b6;
    color: #be185d;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
    animation: suspendedPillGlow 2.5s infinite ease-in-out;
}
.btn-suspended.has-items:hover {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(236, 72, 153, 0.3);
}
.btn-suspended.has-items .btn-suspended-icon {
    color: #db2777;
    animation: folderWiggle 3s infinite ease-in-out;
}
.btn-suspended.has-items .suspended-badge {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(219, 39, 119, 0.4);
    animation: badgePop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.suspended-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    transition: all 0.2s ease;
}

@keyframes suspendedPillGlow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(236, 72, 153, 0.2), 0 0 0 0 rgba(236, 72, 153, 0.3);
    }
    50% {
        box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35), 0 0 0 6px rgba(236, 72, 153, 0);
    }
}

@keyframes folderWiggle {
    0%, 80%, 100% { transform: rotate(0deg); }
    85% { transform: rotate(-8deg); }
    90% { transform: rotate(8deg); }
    95% { transform: rotate(-4deg); }
}

@keyframes badgePop {
    0% { transform: scale(0.5); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes floatEmptyFolder {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Modal Bottom Sheet on Mobile & Center on Desktop */
.suspended-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.suspended-modal-overlay.active {
    display: flex !important;
    opacity: 1 !important;
}

.suspended-modal-content {
    background: #ffffff;
    border-radius: 24px;
    width: 94%;
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
    animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.bottom-sheet-handle {
    display: none;
    width: 44px;
    height: 5px;
    border-radius: 3px;
    background: #cbd5e1;
    margin: 10px auto 4px auto;
}

.suspended-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafafa;
}

.header-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-title-box .icon-bubble {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(236, 72, 153, 0.12);
    color: #db2777;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.header-title-box h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    font-family: 'Cairo', sans-serif;
}
.header-title-box p.sub-text {
    margin: 2px 0 0 0;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.close-x-btn {
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}
.close-x-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

.suspended-scroll-list {
    padding: 16px 18px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Mobile Bottom Sheet specific styles */
@media (max-width: 640px) {
    .suspended-modal-overlay {
        align-items: flex-end !important;
    }
    .suspended-modal-content {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 24px 24px 0 0 !important;
        max-height: 85vh !important;
        animation: bottomSheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
    .bottom-sheet-handle {
        display: block !important;
    }
    .btn-suspended {
        padding: 5px 10px !important;
        font-size: 0.78rem !important;
        gap: 5px !important;
    }
    .btn-suspended .btn-suspended-label {
        font-size: 0.78rem !important;
    }
    .btn-suspended-icon {
        font-size: 0.9rem !important;
    }
    .suspended-badge {
        min-width: 18px !important;
        height: 18px !important;
        font-size: 0.7rem !important;
        padding: 0 4px !important;
    }
}

@keyframes bottomSheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Dark Mode Support */
body.dark-mode .btn-suspended.is-empty {
    background: #1e2238;
    border-color: #2e3650;
    color: #94a3b8;
}
body.dark-mode .btn-suspended.has-items {
    background: #3b1428;
    border-color: #be185d;
    color: #f472b6;
}
body.dark-mode .suspended-modal-content {
    background: #181b2e;
    border-color: #2e3650;
}
body.dark-mode .suspended-modal-header {
    background: #141726;
    border-bottom-color: #2e3650;
}
body.dark-mode .header-title-box h3 {
    color: #f1f5f9;
}
body.dark-mode .close-x-btn {
    background: #242842;
    color: #94a3b8;
}

/* ==========================================
   Month Picker (Native Chromium & Cross-Browser)
   ========================================== */
#exportMonthInput {
    flex: 1;
    min-width: 160px;
    height: 38px;
    padding: 6px 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    color: var(--text-color, #0f172a);
    background: #ffffff;
    border: 1.5px solid #ec4899;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
#exportMonthInput:hover {
    border-color: #db2777;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}
#exportMonthInput:focus {
    border-color: #be185d;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.25);
}
body.dark-mode #exportMonthInput {
    background: #1e293b;
    color: #f8fafc;
    border-color: #ec4899;
    color-scheme: dark;
}

.custom-month-picker-wrapper {
    position: relative;
    flex: 1;
    min-width: 170px;
}

.custom-month-picker-wrapper.is-open {
    z-index: 999999 !important;
}

.custom-month-display-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 38px;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.custom-month-display-btn:hover {
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}

.custom-month-display-btn.is-active {
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
}

.custom-month-display-btn .cmp-placeholder {
    color: #94a3b8;
    font-weight: 600;
}

.custom-month-display-btn .cmp-selected-value {
    color: #be185d;
    font-weight: 800;
}

.custom-month-clear-btn {
    display: none;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
    margin-left: 4px;
}

.custom-month-clear-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

.custom-month-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 1000000 !important;
    width: 310px;
    max-width: calc(100vw - 30px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 20px 45px -10px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.08);
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    box-sizing: border-box;
    animation: cmpFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cmpFadeIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.cmp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.cmp-year-nav {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.cmp-year-nav:hover {
    background: #fdf2f8;
    color: #ec4899;
    border-color: #fbcfe8;
}

.cmp-year-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
}

.cmp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.cmp-month-btn {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 8px 4px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    text-align: center;
    transition: all 0.18s;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.cmp-month-btn .cmp-m-num {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

.cmp-month-btn:hover {
    background: #fdf2f8;
    border-color: #fbcfe8;
    color: #be185d;
    transform: translateY(-1px);
}

.cmp-month-btn.is-selected {
    background: linear-gradient(135deg, #ec4899, #d946ef) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
}

.cmp-month-btn.is-selected .cmp-m-num {
    color: rgba(255, 255, 255, 0.85) !important;
}

.cmp-month-btn.is-current:not(.is-selected) {
    border-color: #cbd5e1;
    box-shadow: inset 0 0 0 1.5px #3b82f6;
    color: #1d4ed8;
}

.cmp-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.cmp-btn-action {
    flex: 1;
    padding: 7px 10px;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.15s;
}

.cmp-btn-today {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.cmp-btn-today:hover {
    background: #dbeafe;
}

.cmp-btn-clear {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.cmp-btn-clear:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
}

/* Dark mode support */
body.dark-mode .custom-month-display-btn {
    background: #242740;
    color: var(--text-main);
    border-color: var(--border);
}
body.dark-mode .custom-month-popover {
    background: #1e2238;
    border-color: #2e3650;
    box-shadow: 0 20px 40px -12px rgba(0,0,0,0.5);
}
body.dark-mode .cmp-header {
    border-bottom-color: #2e3650;
}
body.dark-mode .cmp-year-nav {
    background: #242842;
    border-color: #2e3650;
    color: #94a3b8;
}
body.dark-mode .cmp-year-title {
    color: #f1f5f9;
}
body.dark-mode .cmp-month-btn {
    background: #242842;
    border-color: #2e3650;
    color: #cbd5e1;
}
body.dark-mode .cmp-footer {
    border-top-color: #2e3650;
}

/* ==========================================
   قسم عروض المحل والستوري (Offers & Stories Module)
   ========================================== */
.offers-section-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.offers-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1.5px solid #f1f5f9;
    margin-bottom: 24px;
}

.offers-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.offers-title-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    color: #ea580c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.22);
}

.offers-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

.offers-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-new-offer {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
    transition: all 0.2s ease;
}

.btn-new-offer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.45);
}

.btn-export-offers-pdf {
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-export-offers-pdf:hover {
    background: #1e293b;
    transform: translateY(-2px);
}

.btn-social-settings {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 10px 14px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
}

.btn-social-settings:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-2px);
}

/* Stories Daily Limit Bar & Auto-Publish Scheduler */
.offers-stories-limit-bar {
    background: linear-gradient(135deg, rgba(253, 242, 248, 0.95), rgba(239, 246, 255, 0.95));
    border: 1.5px solid #e0e7ff;
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1.6fr 1.2fr auto;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.05);
}

.stories-limit-info-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stories-limit-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 700;
}

.stories-icons-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    padding: 4px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    font-size: 1.1rem;
}

.stories-limit-badge strong {
    color: #e11d48;
    background: #ffe4e6;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.92rem;
    letter-spacing: 0.5px;
}

.stories-limit-progress-wrap {
    width: 100%;
    height: 7px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.stories-limit-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ec4899, #3b82f6);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.stories-limit-timer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.stories-timer-title {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stories-timer-digits {
    font-family: monospace, 'Tajawal', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    color: #2563eb;
    letter-spacing: 1px;
    direction: ltr;
}

.stories-limit-queue-col {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.stories-queue-badge {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.stories-queue-badge strong {
    background: #ea580c;
    color: #ffffff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
}

.btn-stories-sync-now {
    background: linear-gradient(135deg, #e11d48, #c026d3);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(225, 29, 72, 0.25);
    transition: all 0.2s ease;
}

.btn-stories-sync-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(225, 29, 72, 0.35);
}

/* Story Status Badges on Cards */
.offer-story-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    width: fit-content;
}

.offer-story-badge.is-scheduled {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    animation: pulseBorder 2.5s infinite;
}

.offer-story-badge.is-scheduled .story-timer-digit {
    direction: ltr;
    font-family: monospace;
    font-weight: 900;
    color: #1d4ed8;
}

.offer-story-badge.is-queued {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.offer-story-badge.is-published {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.offer-action-instagram {
    background: linear-gradient(135deg, #f43f5e, #a855f7) !important;
    color: white !important;
    border: none !important;
}

@keyframes pulseBorder {
    0%, 100% { border-color: #bfdbfe; }
    50% { border-color: #3b82f6; }
}

@media (max-width: 768px) {
    .offers-stories-limit-bar {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }
    .stories-limit-queue-col {
        justify-content: space-between;
    }
}

/* Stats Grid (3 Cards) */
.offers-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.offers-stat-card {
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    transition: transform 0.2s ease;
}

.offers-stat-card:hover {
    transform: translateY(-2px);
}

.offers-stat-total {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-color: #cbd5e1;
}
.offers-stat-total .offers-stat-icon {
    background: #e2e8f0;
    color: #475569;
}

.offers-stat-quantity {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #a7f3d0;
}
.offers-stat-quantity .offers-stat-icon {
    background: #10b981;
    color: #ffffff;
}

.offers-stat-expiring {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fde68a;
}
.offers-stat-expiring .offers-stat-icon {
    background: #f59e0b;
    color: #ffffff;
}

.offers-stat-info {
    display: flex;
    flex-direction: column;
}

.offers-stat-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
}

.offers-stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
}

.offers-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Toolbar & Filters */
.offers-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.offers-search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.offers-search-box i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
}

.offers-search-box input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px 10px 40px;
    padding-right: 40px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #ffffff;
    transition: all 0.2s;
}

.offers-search-box input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
    outline: none;
}

.offers-filter-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.offers-filter-pill {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 16px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.offers-filter-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.offers-filter-pill.active {
    background: #d97706;
    color: #ffffff;
    border-color: #d97706;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
}

/* شريط التحكم والتحديد الجماعي للعروض */
.offers-batch-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    flex-wrap: wrap;
}

.offers-select-all-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    cursor: pointer;
    user-select: none;
}

.offers-select-all-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #e11d48;
}

.selected-count-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.2s;
}

.selected-count-badge.has-selected {
    background: #fdf2f8;
    color: #be185d;
    border: 1px solid #fbcfe8;
}

.btn-publish-batch {
    background: linear-gradient(135deg, #e1306c, #1877f2);
    border: none;
    font-weight: 800;
    padding: 9px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(225, 48, 108, 0.35);
}

.btn-publish-batch:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 48, 108, 0.5);
}

.btn-publish-batch:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.offer-card-select-label {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    border-radius: 8px;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.offer-card-select-label:hover {
    transform: scale(1.1);
}

.offer-card-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #e11d48;
    margin: 0;
}

.offer-img-preview-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 4;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.85);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.offer-card-media:hover .offer-img-preview-btn {
    opacity: 1;
    transform: scale(1);
}

.offer-img-preview-btn:hover {
    background: #0f172a;
    transform: scale(1.15) !important;
}

/* Offers Grid & Cards */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
}

.offer-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: #fde68a;
}

.offer-card.is-inactive {
    opacity: 0.72;
    filter: grayscale(0.5);
    border-color: #e2e8f0;
}

.offer-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f8fafc;
    overflow: hidden;
}

.offer-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.offer-card:hover .offer-card-img {
    transform: scale(1.04);
}

.offer-discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.offer-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    z-index: 2;
}

.offer-status-badge.status-active {
    background: rgba(16, 185, 129, 0.95);
    color: #ffffff;
}

.offer-status-badge.status-ended {
    background: rgba(239, 68, 68, 0.95);
    color: #ffffff;
}

.offer-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.offer-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
    line-height: 1.35;
}

.offer-pricing-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.offer-price-current {
    font-size: 1.45rem;
    font-weight: 900;
    color: #b45309;
}

.offer-price-current small {
    font-size: 0.85rem;
    font-weight: 700;
    color: #92400e;
    margin-right: 2px;
}

.offer-price-original {
    font-size: 0.95rem;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: line-through;
}

.offer-bundle-pill {
    background: #fffbeb;
    color: #92400e;
    border: 1px dashed #f59e0b;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.offer-progress-box {
    margin-bottom: 14px;
}

.offer-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
}

.offer-progress-bar {
    height: 7px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.offer-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.offer-progress-fill.low-stock {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.offer-progress-fill.out-of-stock {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.offer-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.offer-action-btn {
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.15s;
}

.offer-action-btn:hover {
    background: #ffffff;
    border-color: #94a3b8;
    color: #0f172a;
}

.offer-action-story {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    border-color: transparent;
}

.offer-action-story:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff;
}

.offer-action-instagram {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(225, 48, 108, 0.3);
}

.offer-action-instagram:hover {
    background: linear-gradient(135deg, #5b247a, #dc1818, #f59e0b);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(225, 48, 108, 0.4);
}

.offer-action-delete {
    color: #dc2626;
    border-color: #fecaca;
    background: #fff5f5;
}

.offer-action-delete:hover {
    background: #fee2e2;
}

/* Empty State */
.offers-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
    margin-top: 20px;
}

.offers-empty-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3c7, #ffedd5);
    color: #ea580c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 16px;
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.15);
}

.offers-empty-state h3 {
    margin: 0 0 8px 0;
    color: #0f172a;
    font-size: 1.3rem;
    font-weight: 800;
}

.offers-empty-state p {
    margin: 0 0 20px 0;
    color: #64748b;
    font-size: 0.95rem;
    max-width: 420px;
    margin-inline: auto;
}

/* ============================================================
   Pagination Controls for Offers and Recurring Stories
   ============================================================ */
.offers-pagination-container {
    width: 100%;
    margin-top: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.offers-pagination-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 8px 16px;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
    justify-content: center;
}

.page-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-nav-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.page-nav-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: #e2e8f0;
    background: #f8fafc;
}

.page-numbers-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-num-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.page-num-btn:hover:not(.active) {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.page-num-btn.active {
    background: linear-gradient(135deg, #e11d48, #be185d);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.3);
}

.page-dots {
    color: #94a3b8;
    font-weight: 800;
    padding: 0 4px;
}

.page-summary-badge {
    margin-right: 8px;
    padding: 6px 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Modal Layout */
.offer-modal-content {
    max-width: 860px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    padding: 24px;
    box-sizing: border-box;
}

.offer-modal-close-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.offer-modal-close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
    transform: rotate(90deg) scale(1.08);
}

.offer-camera-scan-btn {
    height: 46px;
    padding: 0 16px;
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.offer-camera-scan-btn:hover {
    background: #0369a1;
    transform: translateY(-1px);
}

.offer-form-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 15px;
}

@media (min-width: 768px) {
    .offer-form-layout {
        grid-template-columns: 1.35fr 0.85fr;
        gap: 24px;
    }
}

.offer-type-selector-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 14px;
}

.offer-type-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 500px) {
    .offer-type-pills {
        grid-template-columns: 1fr;
    }
}

.offer-type-pill {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-align: center;
}

.offer-type-pill:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.offer-type-pill.active {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #f59e0b;
    color: #b45309;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.bundle-qty-quick-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.bundle-qty-btn {
    padding: 7px 12px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bundle-qty-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.bundle-qty-btn.active {
    background: #d97706;
    color: #ffffff;
    border-color: #d97706;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.custom-date-trigger-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-date-trigger-box:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.date-trigger-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.date-trigger-btn {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    padding: 6px 12px;
    border-radius: 6px;
}

.date-preset-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.date-chip-btn {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #bfdbfe;
    background: #ffffff;
    color: #1e40af;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.date-chip-btn:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.offer-sub-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    user-select: none;
}

.offer-sub-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

/* خيار حسب رصيد المحل الفعلي - أزرق مريح وبارز */
.offer-sub-radio-label.offer-qty-mode-stock {
    background: #f8fafc;
    border-color: #93c5fd;
    color: #1e3a8a;
}

.offer-sub-radio-label.offer-qty-mode-stock input[type="radio"] {
    accent-color: #2563eb;
}

.offer-sub-radio-label.offer-qty-mode-stock:hover {
    background: #eff6ff;
    border-color: #3b82f6;
}

.offer-sub-radio-label.offer-qty-mode-stock:has(input:checked) {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #2563eb;
    border-width: 2px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.16);
    font-weight: 700;
}

/* خيار تحديد كمية مخصصة للعرض - برتقالي عنبري حيوي ومميز */
.offer-sub-radio-label.offer-qty-mode-custom {
    background: #fffbf5;
    border-color: #fdba74;
    color: #7c2d12;
}

.offer-sub-radio-label.offer-qty-mode-custom input[type="radio"] {
    accent-color: #ea580c;
}

.offer-sub-radio-label.offer-qty-mode-custom:hover {
    background: #fff7ed;
    border-color: #f97316;
}

.offer-sub-radio-label.offer-qty-mode-custom:has(input:checked) {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #ea580c;
    border-width: 2px;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.18);
    font-weight: 700;
}

.offer-pricing-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: #fffbeb;
    padding: 14px;
    border-radius: 12px;
    border: 1.5px solid #fde68a;
    margin-top: 10px;
}

@media (max-width: 600px) {
    .offer-pricing-box {
        grid-template-columns: 1fr;
    }
}

.offer-photo-uploader {
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.offer-photo-uploader:hover {
    border-color: #d97706;
    background: #fffbeb;
}

.offer-photo-placeholder {
    padding: 30px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.offer-photo-preview-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.offer-photo-preview-wrapper img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
}

.offer-photo-preview-wrapper .btn-remove-photo {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(239, 68, 68, 0.9);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.offer-expiry-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.offer-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155;
    transition: all 0.2s;
}

.offer-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #d97706;
    cursor: pointer;
}

.offer-radio-label:has(input:checked) {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #b45309;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.offer-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    z-index: 1050;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
    max-height: 250px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.offer-search-item {
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: background 0.15s ease;
    user-select: none;
}

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

.offer-search-item:hover,
.offer-search-item:active {
    background: #fff7ed;
}

.offer-search-barcode-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: 700;
}

.offer-search-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #047857;
    background: #ecfdf5;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 700;
}

/* Active Offers Order Picker */
.order-offers-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    padding: 10px 0;
}

.order-offer-picker-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
}

.order-offer-picker-card:hover {
    border-color: #f43f5e;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.15);
}

.order-offer-picker-media {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

.order-offer-picker-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-offer-picker-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.order-offer-picker-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.order-offer-picker-prices {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}

.order-offer-picker-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #e11d48;
}

.order-offer-picker-old {
    font-size: 0.8rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.btn-add-offer-to-order {
    margin-top: auto;
    width: 100%;
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: #ffffff;
    border: none;
    padding: 7px 10px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.15s;
}

.btn-add-offer-to-order:hover {
    background: #be185d;
}

/* Customer PDF Catalog Styles */
.copdf-wrapper {
    max-width: 900px;
    margin: 20px auto;
    background: #ffffff;
    padding: 24px 28px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    color: #0f172a;
    direction: rtl;
}

.copdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 3px solid #e11d48;
    margin-bottom: 18px;
}

.copdf-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.copdf-logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    border-radius: 12px;
}

.copdf-title {
    font-size: 1.55rem;
    font-weight: 900;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.copdf-tagline {
    font-size: 0.92rem;
    color: #e11d48;
    font-weight: 800;
    margin: 3px 0 0 0;
}

.copdf-date-badge {
    background: #fff1f2;
    border: 1.5px solid #fecdd3;
    border-radius: 12px;
    padding: 8px 16px;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.copdf-date-badge .date-label {
    font-size: 0.88rem;
    font-weight: 900;
    color: #9f1239;
}

.copdf-date-badge .date-sub {
    font-size: 0.76rem;
    color: #e11d48;
    font-weight: 700;
}

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

.copdf-item {
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    break-inside: avoid;
    page-break-inside: avoid;
}

.copdf-item-img-wrap {
    width: 100%;
    height: 155px;
    background: #f8fafc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
}

.copdf-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.copdf-item-body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.copdf-item-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.35;
    min-height: 34px;
}

.copdf-pricing-card {
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    padding: 6px 8px;
}

.copdf-bundle-badge {
    background: #e11d48;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 5px;
    display: inline-block;
    margin-bottom: 4px;
}

.copdf-single-badge {
    background: #0284c7;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 5px;
    display: inline-block;
    margin-bottom: 4px;
}

.copdf-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.copdf-price-main {
    font-size: 1.15rem;
    font-weight: 900;
    color: #e11d48;
}

.copdf-price-old {
    font-size: 0.8rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.copdf-discount-pill {
    background: #ecfdf5;
    color: #059669;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid #a7f3d0;
}

.copdf-unit-info {
    margin-top: 4px;
    font-size: 0.74rem;
    color: #64748b;
    font-weight: 600;
}

.copdf-footer {
    margin-top: 22px;
    padding-top: 14px;
    border-top: 2px solid #e2e8f0;
    text-align: center;
}

.copdf-footer-warning {
    color: #b91c1c;
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.copdf-footer-sub {
    font-size: 0.76rem;
    color: #64748b;
    font-weight: 600;
}

@media print {
    body.is-printing-offers-catalog {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    body.is-printing-offers-catalog * {
        visibility: hidden;
    }
    body.is-printing-offers-catalog #customerOffersPdfContainer,
    body.is-printing-offers-catalog #customerOffersPdfContainer * {
        visibility: visible;
    }
    body.is-printing-offers-catalog #customerOffersPdfContainer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        display: block !important;
    }
}

/* Dark mode */
body.dark-mode .offers-section-card {
    background: #1e2238;
    border-color: #2e3650;
}

body.dark-mode .offers-title {
    color: #f1f5f9;
}

body.dark-mode .offers-stat-card {
    background: #242842;
    border-color: #2e3650;
}

body.dark-mode .offers-stat-value {
    color: #f1f5f9;
}

body.dark-mode .offer-card {
    background: #242842;
    border-color: #2e3650;
}

body.dark-mode .offer-card-title {
    color: #f1f5f9;
}

body.dark-mode .offers-search-box input {
    background: #1e2238;
    border-color: #2e3650;
    color: #f1f5f9;
}

body.dark-mode .offers-filter-pill {
    background: #1e2238;
    border-color: #2e3650;
    color: #94a3b8;
}

body.dark-mode .offers-filter-pill.active {
    background: #e11d48;
    color: #ffffff;
}

body.dark-mode .offer-action-btn {
    background: #1e2238;
    border-color: #2e3650;
    color: #cbd5e1;
}

body.dark-mode .offers-stories-limit-bar {
    background: linear-gradient(135deg, #1f243d, #1a2035);
    border-color: #334155;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

body.dark-mode .stories-limit-badge {
    color: #f1f5f9;
}

body.dark-mode .stories-icons-pill {
    background: #242842;
    box-shadow: none;
}

body.dark-mode .stories-limit-timer-col {
    background: #242842;
    border-color: #334155;
}

body.dark-mode .stories-timer-title {
    color: #94a3b8;
}

body.dark-mode .stories-timer-digits {
    color: #60a5fa;
}

body.dark-mode .btn-social-settings {
    background: #242842;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark-mode .btn-social-settings:hover {
    background: #2e3650;
    color: #f8fafc;
}

body.dark-mode .offer-story-badge.is-scheduled {
    background: rgba(37, 99, 235, 0.15);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.3);
}

body.dark-mode .offer-story-badge.is-scheduled .story-timer-digit {
    color: #93c5fd;
}

body.dark-mode .offer-story-badge.is-queued {
    background: rgba(234, 88, 12, 0.15);
    color: #fdba74;
    border-color: rgba(249, 115, 22, 0.3);
}

body.dark-mode .offer-story-badge.is-published {
    background: rgba(22, 163, 74, 0.15);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.3);
}

/* ===================================================
   🚨 نظام إجبار الشحن والتوصيل (SLA Lockout & Warnings)
   =================================================== */

.moderator-warning-banner {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    animation: slideDownWarning 0.3s ease;
}

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

.warning-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.warning-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f59e0b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    animation: pulseWarnIcon 2s infinite ease-in-out;
}

@keyframes pulseWarnIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.warning-banner-text h4 {
    margin: 0 0 4px 0;
    color: #b45309;
    font-size: 1.05rem;
    font-weight: 800;
}

.warning-banner-text p {
    margin: 0;
    color: #92400e;
    font-size: 0.88rem;
    font-weight: 600;
}

.warning-banner-badge {
    background: #d97706;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
}

/* الكارت الصارم لقفل إنشاء الأوردرات */
.moderator-lockout-card {
    background: linear-gradient(145deg, #ffffff 0%, #fff5f5 100%);
    border: 2px solid #ef4444;
    border-radius: 24px;
    padding: 28px 24px;
    margin-bottom: 24px;
    box-shadow: 0 15px 40px rgba(239, 68, 68, 0.16);
    position: relative;
    overflow: hidden;
    animation: popInLockout 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popInLockout {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.lockout-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.lockout-shield-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
    flex-shrink: 0;
    animation: lockShieldPulse 2.5s infinite;
}

@keyframes lockShieldPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35); }
    50% { transform: scale(1.05); box-shadow: 0 12px 30px rgba(239, 68, 68, 0.5); }
}

.lockout-header-info h3 {
    margin: 0 0 6px 0;
    color: #991b1b;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.lockout-header-info p {
    margin: 0;
    color: #7f1d1d;
    font-size: 0.93rem;
    line-height: 1.55;
    font-weight: 600;
}

.overdue-orders-container {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #fee2e2;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 20px;
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.overdue-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: 12px;
    padding: 10px 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.overdue-order-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12);
}

.overdue-order-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.overdue-order-id {
    background: #ef4444;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 3px 9px;
    border-radius: 8px;
    font-family: monospace;
}

.overdue-order-name {
    color: #1e293b;
    font-weight: 700;
    font-size: 0.95rem;
}

.overdue-order-dest {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
}

.overdue-order-badge {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #f87171;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.lockout-actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-resolve-shipping {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s;
    font-family: inherit;
}

.btn-resolve-shipping:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

/* بادج أحمر في شاشات الشحن للأوردرات المتأخرة */
.badge-order-late {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #f87171;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    animation: latePulse 2s infinite ease-in-out;
}

@keyframes latePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

/* Dark Mode */
body.dark-mode .moderator-warning-banner {
    background: linear-gradient(135deg, #2a2215 0%, #3d2d14 100%);
    border-color: #b45309;
}
body.dark-mode .warning-banner-text h4 { color: #fde68a; }
body.dark-mode .warning-banner-text p { color: #fef3c7; }

body.dark-mode .moderator-lockout-card {
    background: linear-gradient(145deg, #241416 0%, #2f171b 100%);
    border-color: #ef4444;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}
body.dark-mode .lockout-header-info h3 { color: #fca5a5; }
body.dark-mode .lockout-header-info p { color: #fecaca; }
body.dark-mode .overdue-orders-container {
    background: #1a0f12;
    border-color: #451a1e;
}
body.dark-mode .overdue-order-row {
    background: #281216;
    border-color: #4c1d24;
}
body.dark-mode .overdue-order-name { color: #f1f5f9; }
body.dark-mode .overdue-order-dest { color: #94a3b8; }

/* 🛡️ لوحة التحكم في رقابة المودريتور والإلزام بالشحن (Admin SLA Dashboard) */
.sla-admin-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1.5px solid #e2e8f0;
    padding: 28px;
    margin-top: 30px;
    text-align: right;
    direction: rtl;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sla-admin-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, #3b82f6, #6366f1, #8b5cf6);
}

.sla-admin-card.is-active::before {
    background: linear-gradient(90deg, #10b981, #059669, #047857);
}

.sla-admin-card.is-disabled::before {
    background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

.sla-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 18px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 15px;
}

.sla-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sla-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transition: all 0.3s ease;
}

.sla-admin-card.is-active .sla-card-icon {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.sla-card-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sla-card-desc {
    margin: 4px 0 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Status Pill Badge */
.sla-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 800;
    transition: all 0.3s ease;
}

.sla-status-pill.active {
    background: #ecfdf5;
    color: #059669;
    border: 1.5px solid #a7f3d0;
}

.sla-status-pill.disabled {
    background: #f1f5f9;
    color: #64748b;
    border: 1.5px solid #cbd5e1;
}

.sla-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.sla-status-pill.disabled .sla-status-dot {
    box-shadow: none;
    background: #94a3b8;
}

/* iOS Modern Switch */
.sla-switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.sla-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    margin: 0;
    flex-shrink: 0;
}

.sla-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sla-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
}

.sla-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.sla-switch input:checked + .sla-slider {
    background-color: #10b981;
}

.sla-switch input:focus + .sla-slider {
    box-shadow: 0 0 1px #10b981;
}

.sla-switch input:checked + .sla-slider:before {
    transform: translateX(26px);
}

/* Control Options Grid */
.sla-controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.sla-control-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sla-control-box label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sla-input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.sla-input-with-unit input {
    width: 100%;
    padding: 10px 14px;
    padding-left: 55px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    text-align: center;
    background: #ffffff;
    box-sizing: border-box;
}

.sla-input-with-unit .unit {
    position: absolute;
    left: 14px;
    color: #64748b;
    font-weight: 700;
    font-size: 0.88rem;
    pointer-events: none;
}

/* Live Audit / Delayed Orders Section */
.sla-audit-section {
    background: #fff;
    border: 1.5px dashed #cbd5e1;
    border-radius: 14px;
    padding: 16px;
    margin-top: 15px;
}

.sla-audit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.sla-audit-count {
    background: #fee2e2;
    color: #dc2626;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 800;
}

.sla-audit-count.zero {
    background: #ecfdf5;
    color: #059669;
}

/* Dark mode for admin sla */
body.dark-mode .sla-admin-card {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode .sla-card-title { color: #f8fafc; }
body.dark-mode .sla-card-desc { color: #94a3b8; }
body.dark-mode .sla-card-header { border-color: #334155; }
body.dark-mode .sla-control-box,
body.dark-mode .sla-switch-container {
    background: #0f172a;
    border-color: #334155;
}
body.dark-mode .sla-control-box label { color: #cbd5e1; }
body.dark-mode .sla-input-with-unit input {
    background: #1e293b;
    border-color: #475569;
    color: #f8fafc;
}
body.dark-mode .sla-audit-section {
    background: #0f172a;
    border-color: #334155;
}

/* ========================================================
   CUSTOM LOCATION PICKER (المخازن، الفروع، الموردين)
   ======================================================== */
.clp-wrapper {
    position: relative;
    width: 100%;
    font-family: inherit;
    user-select: none;
    margin-bottom: 0;
}

/* Trigger Button */
.clp-trigger {
    width: 100%;
    min-height: 44px;
    padding: 8px 14px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}
.clp-trigger:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}
.clp-trigger:focus,
.clp-wrapper.clp-open .clp-trigger {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Color Accents for Triggers */
.clp-wrapper.clp-accent-blue .clp-trigger {
    border-color: #3b82f6;
}
.clp-wrapper.clp-accent-green .clp-trigger {
    border-color: #10b981;
}
.clp-wrapper.clp-accent-pink .clp-trigger {
    border-color: #ec4899;
}

/* Trigger Content */
.clp-trigger-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.clp-trigger-placeholder {
    color: #94a3b8;
    font-size: 0.92rem;
    font-weight: 500;
}
.clp-trigger-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    overflow: hidden;
}
.clp-trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badges */
.clp-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 6px;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 0;
}
.clp-badge-warehouse {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.clp-badge-branch {
    background: #fdf2f8;
    color: #be185d;
    border: 1px solid #fbcfe8;
}
.clp-badge-supplier {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.clp-badge-custom {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.clp-arrow {
    color: #64748b;
    font-size: 0.85rem;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.clp-wrapper.clp-open .clp-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.clp-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 14px 36px -4px rgba(15, 23, 42, 0.16), 0 4px 12px -2px rgba(15, 23, 42, 0.08);
    z-index: 1050;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: clpFadeIn 0.18s ease-out;
}
@keyframes clpFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.clp-wrapper.clp-open .clp-dropdown {
    display: flex;
}

/* Search Box */
.clp-search-box {
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    display: flex;
    align-items: center;
}
.clp-search-box i.clp-search-icon {
    position: absolute;
    right: 22px;
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
}
.clp-search-input {
    width: 100%;
    padding: 8px 34px 8px 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.88rem;
    outline: none;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.clp-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* Options List Container */
.clp-list {
    max-height: 270px;
    overflow-y: auto;
    padding: 6px 0;
    scroll-behavior: smooth;
}
.clp-list::-webkit-scrollbar {
    width: 6px;
}
.clp-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Category Group Header */
.clp-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px 4px 14px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.clp-group-header.group-warehouse { color: #1d4ed8; }
.clp-group-header.group-branch { color: #be185d; }
.clp-group-header.group-supplier { color: #047857; }

/* Item Row */
.clp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    margin: 2px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.92rem;
    color: #334155;
    font-weight: 600;
}
.clp-item:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: translateX(-2px);
}
.clp-item.clp-selected {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}
.clp-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.clp-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.clp-item-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.clp-icon-warehouse { background: #dbeafe; color: #1d4ed8; }
.clp-icon-branch { background: #fce7f3; color: #be185d; }
.clp-icon-supplier { background: #d1fae5; color: #047857; }

.clp-no-results {
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.88rem;
}

/* Bottom Action for Manual Entry (Pure CSS Plus Icon, NO Emoji) */
.clp-footer {
    padding: 8px 10px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
.clp-manual-btn {
    width: 100%;
    padding: 9px 12px;
    background: #ffffff;
    border: 1.5px dashed #f59e0b;
    border-radius: 8px;
    color: #b45309;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}
.clp-manual-btn:hover {
    background: #fffbeb;
    border-color: #d97706;
    color: #92400e;
}

/* Pure CSS Plus Icon Container */
.clp-plus-icon-box {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d97706;
    font-size: 0.78rem;
    flex-shrink: 0;
}

/* Manual Input Mode Active Container */
.clp-manual-active-box {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}
.clp-manual-active-input {
    flex: 1;
    min-height: 44px;
    padding: 8px 14px;
    background: #fffdf9;
    border: 1.5px solid #f59e0b;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: bold;
    color: #78350f;
    outline: none;
    font-family: inherit;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.12);
    box-sizing: border-box;
}
.clp-manual-active-input:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}
.clp-revert-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    flex-shrink: 0;
}
.clp-revert-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #ef4444;
}

/* Dark Mode Support */
body.dark-mode .clp-trigger {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode .clp-trigger:hover {
    background: #0f172a;
    border-color: #475569;
}
body.dark-mode .clp-trigger-value {
    color: #f8fafc;
}
body.dark-mode .clp-dropdown {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 14px 36px -4px rgba(0, 0, 0, 0.5);
}
body.dark-mode .clp-search-box {
    background: #0f172a;
    border-color: #334155;
}
body.dark-mode .clp-search-input {
    background: #1e293b;
    border-color: #475569;
    color: #f8fafc;
}
body.dark-mode .clp-item {
    color: #cbd5e1;
}
body.dark-mode .clp-item:hover {
    background: #334155;
    color: #f8fafc;
}
body.dark-mode .clp-footer {
    background: #0f172a;
    border-color: #334155;
}
body.dark-mode .clp-manual-btn {
    background: #1e293b;
    border-color: #b45309;
    color: #fbbf24;
}
body.dark-mode .clp-manual-active-input {
    background: #291b0f;
    border-color: #b45309;
    color: #fef3c7;
}
body.dark-mode .clp-revert-btn {
    background: #1e293b;
    border-color: #475569;
    color: #94a3b8;
}

/* =========================================================
   Instagram & Facebook Story Automation Panel & Controls
   ========================================================= */
.offers-story-automation-panel {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(88, 28, 135, 0.9), rgba(157, 23, 77, 0.85));
    border: 1px solid rgba(244, 114, 182, 0.35);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    color: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(136, 19, 55, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}
.offers-story-automation-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.25) 0%, transparent 70%);
    pointer-events: none;
}
.story-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
.story-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}
.story-panel-title i.fa-instagram {
    font-size: 1.4rem;
    background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.story-panel-title i.fa-facebook {
    font-size: 1.3rem;
    color: #3b82f6;
}
.story-panel-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}
.story-panel-switch:hover {
    background: rgba(255, 255, 255, 0.2);
}
.story-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.story-counter-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.story-counter-label {
    font-size: 0.78rem;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.story-counter-val {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
}
.story-limit-track {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    margin-top: 6px;
}
.story-limit-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #10b981, #f59e0b);
    transition: width 0.4s ease, background 0.4s ease;
}
.story-limit-fill.is-warning {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}
.story-panel-hint {
    font-size: 0.75rem;
    color: #fbcfe8;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

/* بطاقات أزرار النشر والاستوري في كروت العروض */
.offer-action-btn.offer-action-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #ffffff;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(220, 39, 67, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.offer-action-btn.offer-action-instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 39, 67, 0.5);
    filter: brightness(1.08);
}
.offer-action-btn.offer-action-story {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}
.offer-action-btn.offer-action-story:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.45);
    filter: brightness(1.1);
}

.offer-story-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    width: fit-content;
}
.offer-story-badge.badge-published {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.offer-story-badge.badge-scheduled {
    background: rgba(217, 119, 6, 0.15);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.3);
}
body.dark-mode .offer-story-badge.badge-published {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}
body.dark-mode .offer-story-badge.badge-scheduled {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}
.story-timer-digit {
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* ========================================================
   🔥 تصميم شريط التبويبات الفخم: عروض المحل | الستوري المتكرر
   ======================================================== */
.offers-subtabs-bar {
    display: flex;
    gap: 12px;
    margin: 18px 0 20px 0;
    padding: 6px;
    background: #f1f5f9;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}
.offers-subtab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 0.98rem;
    font-weight: 800;
    color: #64748b;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.offers-subtab-btn:hover {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.6);
}
.offers-subtab-btn.active {
    background: #ffffff;
    color: #e11d48;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
}
.subtab-counter-badge {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 20px;
    transition: all 0.2s ease;
}
.offers-subtab-btn.active .subtab-counter-badge {
    background: #ffe4e6;
    color: #e11d48;
}

/* بطاقات دورة وتكرار النشر */
.cycle-opt-card {
    transition: all 0.2s ease;
}
.cycle-opt-card:hover {
    border-color: #94a3b8 !important;
}
.cycle-opt-card.active {
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

/* كروت الستوري المتكرر */
.recurring-stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.recurring-story-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1.5px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    position: relative;
}
.recurring-story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}
.recurring-story-card.is-inactive {
    opacity: 0.65;
    filter: grayscale(0.5);
}
.recurring-card-media {
    position: relative;
    width: 100%;
    height: 320px;
    background: #0f172a;
    overflow: hidden;
    cursor: zoom-in;
}
.recurring-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.recurring-card-media:hover .recurring-card-img {
    transform: scale(1.04);
}
.recurring-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}
.recurring-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ========================================================
   ✨ تحسين وتنسيق كروت العروض والستوري المتكرر (Modern Card UI)
   ======================================================== */
.story-status-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 4px 0 8px;
}

.story-cycle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
}

.cycle-pill-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 800;
}
.cycle-pill-type.is-unlimited {
    color: #059669;
}
.cycle-pill-type.is-count {
    color: #d97706;
}
.cycle-pill-type.is-date {
    color: #2563eb;
}

.cycle-count-badge {
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.story-state-pill {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
    box-sizing: border-box;
}

.story-state-pill.is-scheduled {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    animation: pulseBorder 2.5s infinite;
}
.story-state-pill.is-scheduled .story-timer-digit {
    direction: ltr;
    font-family: monospace;
    font-weight: 900;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
}

.story-state-pill.is-new {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.story-state-pill.is-due {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.story-state-pill.is-queued {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.story-state-pill.is-paused {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

/* أزرار الإجراءات المتناسقة (سلسة ومقسمة على سطرين أنيقين بدون تداخل) */
.recurring-card-footer, .offer-card-footer {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.offer-publish-main-btn {
    width: 100%;
    padding: 9px 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #e1306c, #833ab4);
    color: #ffffff !important;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(225, 48, 108, 0.28);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.offer-publish-main-btn:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 5px 15px rgba(225, 48, 108, 0.4);
    background: linear-gradient(135deg, #c1275d, #6c2f94);
}

.card-secondary-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.btn-card-util {
    flex: 1;
    padding: 7px 8px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-card-util:hover {
    background: #ffffff;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-card-util.btn-card-delete {
    flex: 0 0 38px;
    padding: 7px 0;
    color: #dc2626;
    background: #fff5f5;
    border-color: #fecaca;
}

.btn-card-util.btn-card-delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

/* Dark Mode Overrides */
body.dark-mode .story-status-panel {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .cycle-count-badge {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark-mode .story-state-pill.is-scheduled {
    background: rgba(29, 78, 216, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}
body.dark-mode .story-state-pill.is-scheduled .story-timer-digit {
    color: #60a5fa;
}

body.dark-mode .story-state-pill.is-new {
    background: rgba(217, 119, 6, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

body.dark-mode .story-state-pill.is-due {
    background: rgba(5, 150, 105, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

body.dark-mode .story-state-pill.is-paused {
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(148, 163, 184, 0.3);
    color: #94a3b8;
}

body.dark-mode .btn-card-util {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}
body.dark-mode .btn-card-util:hover {
    background: #334155;
    color: #f8fafc;
}

body.dark-mode .btn-card-util.btn-card-delete {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}


/* Dark mode for recurring stories */
body.dark-mode .offers-subtabs-bar {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .offers-subtab-btn {
    color: #94a3b8;
}
body.dark-mode .offers-subtab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
}
body.dark-mode .offers-subtab-btn.active {
    background: #0f172a;
    color: #fb7185;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
body.dark-mode .subtab-counter-badge {
    background: #334155;
    color: #94a3b8;
}
body.dark-mode .offers-subtab-btn.active .subtab-counter-badge {
    background: rgba(225, 29, 72, 0.2);
    color: #fb7185;
}
body.dark-mode .recurring-story-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .recurring-card-title {
    color: #f8fafc;
}
body.dark-mode .recurring-card-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* ========================================================
   📱 تحسينات العرض وتجربة المستخدم على الموبايل (Mobile UX)
   قسم عروض المحل والستوري المتكرر والنوافذ المنبثقة
   ======================================================== */
@media (max-width: 768px) {
    /* 1. كارت قسم العروض والترويسة */
    .offers-section-card {
        padding: 14px 12px !important;
        border-radius: 14px !important;
    }

    .offers-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-bottom: 14px;
        margin-bottom: 14px;
    }

    .offers-title {
        font-size: 1.25rem;
        gap: 8px;
    }

    .offers-title-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    .offers-subtitle {
        font-size: 0.8rem;
        line-height: 1.45;
    }

    /* وضع أزرار الترويسة بنظام شبكي مريح للموبايل */
    .offers-header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    /* زر الإضافة الرئيسي يأخذ الأولوية والواجهة كاملة للموبايل */
    .offers-header-actions .btn-new-offer {
        grid-column: span 2;
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.98rem;
        border-radius: 12px;
        box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
    }

    /* الأزرار الإضافية كصف ثنائي أنيق أسفل الزر الرئيسي */
    .offers-header-actions .btn-social-settings,
    .offers-header-actions .btn-export-offers-pdf {
        padding: 9px 10px;
        font-size: 0.82rem;
        border-radius: 10px;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }

    /* 2. شريط ليميت النشر التلقائي - مريح ومضغوط للموبايل */
    .offers-stories-limit-bar {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 12px 14px;
        border-radius: 14px;
        margin-bottom: 14px;
    }

    .stories-limit-info-col {
        width: 100%;
    }

    .stories-limit-badge {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 0.86rem;
    }

    .stories-limit-badge strong {
        font-size: 0.82rem;
        padding: 2px 8px;
    }

    .stories-limit-progress-wrap {
        height: 6px;
        margin-top: 4px;
    }

    /* مؤقت التجديد في سطر مدمج */
    .stories-limit-timer-col {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 6px 12px;
        border-radius: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .stories-timer-title {
        font-size: 0.78rem;
    }

    .stories-timer-digits {
        font-size: 1.1rem;
    }

    /* طابور الانتظار وزر الفحص والنشر جنباً إلى جنب */
    .stories-limit-queue-col {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 8px;
    }

    .stories-queue-badge {
        flex: 1;
        justify-content: center;
        padding: 7px 10px;
        font-size: 0.8rem;
    }

    .btn-stories-sync-now {
        flex: 1;
        justify-content: center;
        padding: 7px 12px;
        font-size: 0.82rem;
    }

    /* 3. شريط التبويبات الفخم: عروض المحل | الستوري المتكرر */
    .offers-subtabs-bar {
        gap: 6px;
        padding: 4px;
        margin: 12px 0 16px 0;
        border-radius: 12px;
    }

    .offers-subtab-btn {
        padding: 9px 6px;
        gap: 5px;
        font-size: 0.82rem;
        font-weight: 800;
        white-space: nowrap;
        border-radius: 9px;
    }

    .offers-subtab-btn i {
        font-size: 0.88rem;
    }

    .subtab-counter-badge {
        font-size: 0.72rem;
        padding: 1px 6px;
        min-width: 18px;
        text-align: center;
    }

    /* 4. كروت الإحصائيات السريعة - 2 عمود مع كارت إجمالي عريض */
    .offers-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 16px;
    }

    .offers-stat-card {
        padding: 10px 12px;
        border-radius: 12px;
    }

    .offers-stat-card.offers-stat-total {
        grid-column: span 2;
        padding: 12px 14px;
    }

    .offers-stat-label {
        font-size: 0.75rem;
        margin-bottom: 2px;
    }

    .offers-stat-value {
        font-size: 1.35rem;
    }

    .offers-stat-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        border-radius: 9px;
    }

    /* 5. شريط البحث والتصفية */
    .offers-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 14px;
    }

    .offers-search-box {
        min-width: 100%;
    }

    .offers-search-box input {
        height: 42px;
        font-size: 0.88rem;
        padding-right: 38px;
    }

    .offers-search-box i {
        font-size: 0.88rem;
        right: 12px;
    }

    .offers-filter-pills {
        width: 100%;
        gap: 6px;
        padding-bottom: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .offers-filter-pill {
        padding: 6px 12px;
        font-size: 0.8rem;
        border-radius: 16px;
    }

    /* 6. شريط التحديد والنشر الجماعي */
    .offers-batch-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .offers-batch-bar > div:first-child {
        justify-content: space-between;
        width: 100%;
    }

    .offers-batch-bar .btn-publish-batch {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    /* 7. شبكات كروت العروض والستوري على الموبايل - كارتين مريحين للعين جنب بعض (2 Columns Grid) */
    .offers-grid,
    .recurring-stories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .offer-card,
    .recurring-story-card {
        border-radius: 12px !important;
        border-width: 1px !important;
    }

    .offer-card-media,
    .recurring-card-media {
        height: 165px !important;
        aspect-ratio: auto !important;
    }

    /* إظهار زر العين دائماً على شاشات اللمس والموبايل لتكبير الصورة بنقرة واحدة */
    .offer-img-preview-btn {
        opacity: 0.95 !important;
        transform: scale(1) !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 0.85rem !important;
        bottom: 6px !important;
        right: 6px !important;
    }

    .offer-card-select-label {
        top: 6px !important;
        left: auto !important;
        right: 6px !important;
        width: 26px !important;
        height: 26px !important;
    }

    .offer-discount-badge {
        font-size: 0.68rem !important;
        padding: 2px 6px !important;
        top: 6px !important;
        right: 36px !important;
    }

    .offer-status-badge {
        font-size: 0.68rem !important;
        padding: 2px 6px !important;
        top: 6px !important;
        left: 6px !important;
    }

    .offer-card-body,
    .recurring-card-body {
        padding: 8px !important;
        gap: 4px !important;
    }

    .offer-card-title,
    .recurring-card-title {
        font-size: 0.82rem !important;
        margin-bottom: 2px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .offer-pricing-row {
        margin-bottom: 4px !important;
        gap: 4px !important;
    }

    .offer-price-current {
        font-size: 1rem !important;
    }

    .offer-price-original {
        font-size: 0.75rem !important;
    }

    .offer-bundle-pill {
        font-size: 0.68rem !important;
        padding: 2px 5px !important;
    }

    .offer-progress-box {
        margin: 4px 0 !important;
    }

    .offer-progress-labels {
        font-size: 0.68rem !important;
    }

    .offer-story-badge {
        font-size: 0.68rem !important;
        padding: 3px 6px !important;
    }

    .offer-card-footer,
    .recurring-card-footer {
        flex-wrap: nowrap !important;
        gap: 3px !important;
        margin-top: 6px !important;
    }

    .offer-action-btn,
    .recurring-action-btn {
        padding: 3px 5px !important;
        font-size: 0.72rem !important;
        min-height: 28px !important;
        border-radius: 6px !important;
        flex: 1 !important;
    }

    .offer-action-delete {
        flex: 0 0 28px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* شريط الترقيم على الموبايل */
    .offers-pagination-bar {
        padding: 6px 8px !important;
        gap: 4px !important;
        width: 100% !important;
    }

    .page-nav-btn {
        padding: 5px 8px !important;
        font-size: 0.75rem !important;
    }

    .page-num-btn {
        min-width: 28px !important;
        height: 28px !important;
        font-size: 0.78rem !important;
        padding: 0 4px !important;
    }

    .page-summary-badge {
        width: 100% !important;
        text-align: center !important;
        margin-right: 0 !important;
        margin-top: 4px !important;
        font-size: 0.72rem !important;
        padding: 4px 8px !important;
    }

    /* 8. النوافذ المنبثقة على الموبايل (Offer Modal & Recurring Story Modal) */
    .offer-modal-content {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 94vh !important;
        padding: 16px 14px !important;
        border-radius: 16px !important;
    }

    .offer-modal-content .modal-header {
        margin-bottom: 12px !important;
        padding-bottom: 10px !important;
    }

    .offer-modal-content .modal-header h3 {
        font-size: 1.05rem !important;
    }

    .offer-modal-close-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .offer-form-layout {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        margin-top: 10px !important;
    }

    /* خيارات تكرار الستوري في نافذة الإضافة */
    .recurring-cycle-options {
        gap: 6px !important;
    }

    .cycle-opt-card {
        padding: 8px 4px !important;
        border-radius: 10px !important;
    }

    .cycle-opt-card > div {
        font-size: 0.8rem !important;
        margin-bottom: 2px !important;
    }

    .cycle-opt-card small {
        font-size: 0.68rem !important;
        line-height: 1.25 !important;
    }

    /* رافع الصورة والمعاينة على الموبايل */
    .offer-photo-uploader {
        min-height: 170px !important;
    }

    .offer-photo-placeholder {
        padding: 18px 10px !important;
    }

    .offer-photo-preview-wrapper {
        max-height: 240px !important;
    }

    .offer-photo-preview-wrapper img {
        max-height: 240px !important;
    }

    /* أزرار نافذة الإضافة في الأسفل */
    .offer-modal-content .modal-footer {
        margin-top: 16px !important;
        padding-top: 12px !important;
        gap: 8px !important;
    }

    .offer-modal-content .modal-footer button {
        flex: 1;
        justify-content: center;
        padding: 10px 14px !important;
        font-size: 0.88rem !important;
    }

    .offer-modal-content .modal-footer button[type="submit"] {
        flex: 1.8;
    }

    .batch-recurring-grid {
        grid-template-columns: 1fr !important;
        max-height: 380px !important;
    }
}

/* ==========================================================================
   📸 رفع استوريهات متعددة دفعة واحدة (Batch Recurring Stories)
   ========================================================================== */
.batch-modal-content {
    max-width: 980px !important;
    width: 95% !important;
}

.batch-recurring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    max-height: 440px;
    overflow-y: auto;
    padding: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
}

.batch-item-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.batch-item-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.batch-item-thumb-wrap {
    position: relative;
    width: 100%;
    height: 140px;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.batch-item-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.batch-item-thumb-wrap:hover img {
    transform: scale(1.05);
}

.batch-item-remove-btn {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(254, 226, 226, 0.95);
    border: 1px solid #fca5a5;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    z-index: 2;
}

.batch-item-remove-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

.batch-item-index-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 2;
}



/* Shipping-only presentation: operational controls and existing courier accounts. */
#shipping-tab .section-card { border-width: 1px; border-color: #eadfe8; box-shadow: 0 5px 18px rgba(70, 35, 70, .06); }
#shipping-tab .section-card:hover { transform: none; }
#shippingSubTabs { flex-wrap: wrap; }
#shippingSubTabs .shipping-subtab-pill { flex: 1 1 170px; justify-content: center; min-height: 48px; }
#shippingSubTabs .shipping-subtab-pill[data-subtab="shipping-accounts"].active { background: #fff7ed; color: #9a3412; border-color: #fdba74; }
#shipping-tab .settlement-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shipping-courier-native { display: none !important; }
.shipping-courier-picker { position: relative; flex: 1; width: 100%; min-width: 0; direction: rtl; }
.courier-picker-trigger { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; color: #334155; font: inherit; font-weight: 800; cursor: pointer; text-align: right; box-sizing: border-box; }
.courier-picker-trigger[aria-expanded="true"] { border-color: #0284c7; box-shadow: 0 0 0 3px rgba(2,132,199,.1); }
.courier-picker-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.courier-picker-count, .courier-picker-option-count { flex-shrink: 0; background: #e0f2fe; color: #0369a1; padding: 5px 9px; border-radius: 9px; font-size: .8rem; font-weight: 800; }
.courier-picker-panel { margin-top: 8px; padding: 10px; border: 1px solid #bae6fd; border-radius: 12px; background: #fff; box-shadow: 0 8px 20px rgba(15,23,42,.08); }
.courier-picker-panel[hidden], .courier-picker-count[hidden] { display: none !important; }
.courier-picker-search { width: 100%; min-height: 44px; margin: 0 0 8px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 9px; background: #f8fafc; font: inherit; box-sizing: border-box; }
.courier-picker-options { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 5px; }
.courier-picker-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 10px 12px; border: 1px solid transparent; border-radius: 9px; background: #fff; color: #334155; font: inherit; font-weight: 700; text-align: right; cursor: pointer; }
.courier-picker-option > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.courier-picker-option:hover, .courier-picker-option[aria-selected="true"] { background: #f0f9ff; border-color: #bae6fd; }
.courier-picker-trigger:focus-visible, .courier-picker-option:focus-visible, .courier-picker-clear:focus-visible { outline: 2px solid #0284c7; outline-offset: 2px; }
.courier-picker-clear { width: 100%; min-height: 40px; margin-top: 8px; border: 0; border-top: 1px solid #e2e8f0; background: #fff; color: #64748b; font: inherit; cursor: pointer; }
.courier-picker-empty { padding: 12px; text-align: center; color: #64748b; }
#subtab-shipping-accounts .financials-page-card { padding: 20px; }
#subtab-shipping-accounts .financials-header-row { flex-direction: column; align-items: stretch !important; gap: 16px !important; }
#subtab-shipping-accounts .financials-header-row h2 { font-size: 1.2rem; }
#subtab-shipping-accounts #financialsTotalAmount { font-size: 1rem; margin-top: 8px !important; }
#subtab-shipping-accounts .financials-controls { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px !important; width: 100%; }
#subtab-shipping-accounts .financials-filter-search { display: contents !important; }
#subtab-shipping-accounts .financials-add-driver-form,
#subtab-shipping-accounts .financials-month-filter,
#subtab-shipping-accounts .financials-order-search { flex-wrap: wrap; align-items: center; gap: 8px !important; padding: 10px !important; min-width: 0; }
#subtab-shipping-accounts .financials-add-driver-form input { flex: 1 1 100px; width: auto !important; min-width: 0; }
#subtab-shipping-accounts .financials-order-search input { flex: 1; width: auto !important; min-width: 120px; }
#subtab-shipping-accounts .financials-controls button { min-height: 42px; }
#subtab-shipping-accounts .financials-display-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)) !important; gap: 16px !important; }
@media (max-width: 700px) {
    #shippingSubTabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    #shippingSubTabs .shipping-subtab-pill { min-width: 0; white-space: normal; padding: 10px 6px; font-size: .82rem; }
    #shipping-tab .settlement-driver-row { flex-wrap: wrap; }
    #shipping-tab .settlement-driver-row .shipping-courier-picker { flex-basis: 100%; }
    #subtab-shipping-accounts .financials-page-card { padding: 12px 8px; }
    #subtab-shipping-accounts .financials-controls { grid-template-columns: minmax(0, 1fr); }
    .courier-picker-count { font-size: .72rem; padding: 5px 7px; }
}

/* ========================================================= */
/* ✏️ Order Edit Action Button & Mode Banner                 */
/* ========================================================= */
.order-action-icon-btn.edit-action-btn {
    background: #fdf2f8 !important;
    color: #be185d !important;
    border-color: #fbcfe8 !important;
}

.order-action-icon-btn.edit-action-btn i {
    font-size: 15px !important;
    line-height: 1 !important;
    color: #be185d !important;
    pointer-events: none !important;
}

.order-action-icon-btn.edit-action-btn:hover,
.order-action-icon-btn.edit-action-btn:active {
    background: linear-gradient(135deg, #e91e63, #c2185b) !important;
    border-color: #be185d !important;
    color: #ffffff !important;
    transform: scale(1.08);
    box-shadow: 0 3px 8px rgba(190, 24, 93, 0.35) !important;
}

.order-action-icon-btn.edit-action-btn:hover i,
.order-action-icon-btn.edit-action-btn:active i {
    color: #ffffff !important;
}

body.dark-mode .order-action-icon-btn.edit-action-btn {
    background: rgba(236, 72, 153, 0.18) !important;
    border-color: rgba(244, 114, 182, 0.4) !important;
    color: #f472b6 !important;
}
body.dark-mode .order-action-icon-btn.edit-action-btn i {
    color: #f472b6 !important;
}

.order-edit-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #fde68a;
    border-radius: 14px;
    padding: 12px 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
    animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.order-edit-banner-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-edit-banner-icon {
    font-size: 1.5rem;
    color: #d97706;
    animation: pulseEdit 2s infinite ease-in-out;
}

.order-edit-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-edit-banner-label {
    font-size: 0.82rem;
    color: #92400e;
    font-weight: 700;
}

.order-edit-banner-id {
    font-size: 1.1rem;
    color: #78350f;
    font-weight: 900;
    font-family: monospace;
}

.order-edit-banner-sub {
    font-size: 0.78rem;
    color: #b45309;
    font-weight: 600;
}

.order-edit-cancel-btn {
    padding: 6px 14px !important;
    font-size: 0.84rem !important;
    font-weight: 800 !important;
    color: #92400e !important;
    background: #ffffff !important;
    border: 1px solid #fcd34d !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.order-edit-cancel-btn:hover {
    background: #fef3c7 !important;
    color: #78350f !important;
    transform: translateY(-1px) !important;
}

@keyframes pulseEdit {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); color: #b45309; }
}

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

/* History Card Interactive Hover */
.history-item {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.history-item:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-1.5px);
}



/* Compact courier account workspace. Presentation only; amounts use the existing renderer. */
#shippingSubTabs { width: 100%; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
#shippingSubTabs .shipping-subtab-pill { min-width: 0; min-height: 48px; padding: 10px 8px; white-space: normal; line-height: 1.5; }
#shipping-tab .shipping-nav-wrapper { overflow: visible; }
#shipping-tab .shipping-search-box[hidden] { display: none !important; }
#subtab-shipping-accounts .financials-page-card { border-radius: 16px !important; padding: 18px; }
#subtab-shipping-accounts .financials-header-row { display: flex !important; flex-direction: row; align-items: center !important; justify-content: space-between; gap: 12px !important; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid #e2e8f0; }
#subtab-shipping-accounts .courier-accounts-title h2 { margin: 0; color: #334155; font-size: 1.15rem; }
#subtab-shipping-accounts #financialsTotalAmount { margin: 5px 0 0 !important; font-size: .88rem; color: #047857; }
.courier-manage-tools { min-width: 0; }
.courier-manage-tools > summary { padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; color: #475569; font-size: .85rem; font-weight: 800; cursor: pointer; }
#subtab-shipping-accounts .financials-add-driver-form { display: flex; margin-top: 10px; border: 1px solid #e2e8f0; border-radius: 10px; max-width: 400px; }
.courier-accounts-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
#subtab-shipping-accounts .financials-month-filter,
#subtab-shipping-accounts .financials-order-search { display: flex; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
#subtab-shipping-accounts .financials-month-filter input { flex: 1; min-width: 100px; width: auto; }
#subtab-shipping-accounts .financials-month-filter label { margin: 0; font-size: .82rem; font-weight: 700; }
#subtab-shipping-accounts .courier-accounts-toolbar input { padding: 8px 10px; min-height: 40px; margin: 0; border-radius: 8px; box-sizing: border-box; box-shadow: none; }
#subtab-shipping-accounts .courier-accounts-toolbar button { min-height: 40px; padding: 8px 12px; font-size: .82rem; border-radius: 8px; }
.courier-selection-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 40px; padding: 8px 10px; margin-bottom: 14px; border-radius: 10px; background: #f8fafc; font-size: .82rem; }
.courier-selection-toolbar .financials-select-all { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
#selectAllFinancialsCheckbox { width: 18px; height: 18px; margin: 0; accent-color: #0284c7; }
#courierSelectedCount { color: #0369a1; font-weight: 700; }
#subtab-shipping-accounts #closeSelectedFinancialsBtn { min-height: 36px; padding: 7px 12px; margin-inline-start: auto; border-radius: 8px; }
#subtab-shipping-accounts #financialsDisplayList { display: block !important; width: 100%; min-width: 0; }
.courier-accounts-workspace { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.courier-accounts-sidebar, .courier-accounts-detail { min-width: 0; }
.courier-list-panel { border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #fff; }
.courier-list-summary { padding: 12px; font-weight: 800; color: #334155; background: #f8fafc; cursor: pointer; }
.courier-list-summary-hint { display: block; margin-top: 4px; font-size: .72rem; color: #64748b; font-weight: 600; }
.courier-list-content { padding: 10px; }
.courier-account-search { width: 100%; box-sizing: border-box; padding: 10px; min-height: 42px; margin: 0 0 8px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; font: inherit; font-size: .85rem; }
.courier-accounts-list { display: flex; flex-direction: column; gap: 7px; max-height: 440px; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.courier-account-choice { display: block; width: 100%; padding: 11px; border: 1px solid #e2e8f0; border-radius: 10px; text-align: start; background: #fff; color: #334155; font: inherit; cursor: pointer; }
.courier-account-choice[aria-pressed="true"] { background: #f0f9ff; border-color: #38bdf8; box-shadow: inset -3px 0 #0284c7; }
.courier-account-choice-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .9rem; font-weight: 800; }
.courier-account-choice-title > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.courier-account-choice-count { flex-shrink: 0; font-size: .72rem; padding: 3px 6px; border-radius: 6px; background: #e2e8f0; color: #475569; }
.courier-account-choice-status { display: block; margin-top: 6px; font-size: .72rem; line-height: 1.6; color: #64748b; }
.courier-accounts-empty { padding: 12px; text-align: center; color: #64748b; font-size: .85rem; }
#subtab-shipping-accounts .courier-account-detail { margin: 0 !important; padding: 14px !important; opacity: 1 !important; box-shadow: none !important; border-radius: 12px !important; }
#subtab-shipping-accounts .courier-account-detail .financial-header { padding-bottom: 10px !important; margin-bottom: 12px !important; }
#subtab-shipping-accounts .courier-account-detail .financial-metric-label { white-space: normal !important; }
#subtab-shipping-accounts .courier-account-detail .financial-status { padding: 10px !important; font-size: .88rem !important; }
.courier-payment-tabs { display: flex; gap: 8px; margin: 12px 0 0; }
.courier-payment-tab { flex: 1; min-height: 42px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 9px; background: #f8fafc; color: #475569; font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer; }
.courier-payment-tab[aria-selected="true"] { background: #ecfdf5; color: #047857; border-color: #6ee7b7; }
#subtab-shipping-accounts .courier-payment-panel { margin-top: 10px !important; padding: 8px !important; border-radius: 10px !important; }
.courier-payment-panel > div:first-child { display: none !important; }
.courier-payment-panel > div:last-child { max-height: min(46vh, 420px); overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
#subtab-shipping-accounts .courier-payment-panel .financial-order-item { padding: 8px !important; gap: 6px !important; box-shadow: none !important; }
.courier-performance { margin-top: 12px; border-top: 1px solid #e2e8f0; padding-top: 10px; }
.courier-performance > summary { font-size: .82rem; font-weight: 700; color: #64748b; cursor: pointer; padding: 6px; }
.courier-performance > div { margin: 0 !important; padding-top: 10px !important; border: 0 !important; }
.courier-performance > div > strong { display: none !important; }
.courier-account-choice:focus-visible, .courier-payment-tab:focus-visible, .courier-list-summary:focus-visible { outline: 2px solid #0284c7; outline-offset: 2px; }
.courier-account-detail[hidden], .courier-account-choice[hidden], .courier-payment-panel[hidden], .courier-accounts-empty[hidden], .courier-selection-toolbar[hidden] { display: none !important; }
@media (max-width: 1100px) { #shippingSubTabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
    #subtab-shipping-accounts .financials-page-card { padding: 12px 8px !important; }
    #subtab-shipping-accounts .financials-header-row { flex-wrap: wrap; }
    #subtab-shipping-accounts .courier-accounts-title h2 { font-size: 1rem; }
    .courier-accounts-toolbar { grid-template-columns: minmax(0, 1fr); }
    .courier-accounts-workspace { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .courier-accounts-list { max-height: 240px; }
    .courier-list-summary-hint { display: inline; margin-inline-start: 8px; }
    #subtab-shipping-accounts .courier-account-detail { padding: 10px !important; }
    .courier-payment-panel > div:last-child { max-height: 46vh; }
    .courier-payment-panel .financial-order-item > div:first-child { flex-wrap: wrap; }
}
@media (max-width: 480px) { #shippingSubTabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* ========================================================
   🌐 شارة طلبات صفحة الروابط (Hub Customer Requests)
   ======================================================== */
.waitlist-source-badge.is-hub {
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
    color: #be185d;
    border: 1px solid #f472b6;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 6px rgba(219, 39, 119, 0.12);
}

body.dark-mode .waitlist-source-badge.is-hub {
    background: rgba(219, 39, 119, 0.15);
    color: #f472b6;
    border-color: rgba(244, 114, 182, 0.3);
}

/* Hub Visits Analytics Card */
.hub-visits-card {
    transition: all 0.3s ease;
}
.hub-stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hub-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
body.dark-mode .hub-visits-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}
body.dark-mode .hub-visits-card h3 {
    color: #f8fafc !important;
}
body.dark-mode .hub-visits-card p {
    color: #94a3b8 !important;
}
body.dark-mode .hub-stat-card {
    background: #0f172a !important;
    border-color: #334155 !important;
}


/* ========================================================
   Modern Expiry Dashboard UI/UX Redesign
   ======================================================== */

.modern-expiry-parent {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 12px 18px !important;
    margin-bottom: 10px !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
    position: relative;
    overflow: hidden;
}

.modern-expiry-parent::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--primary, #e04c7e), #be185d);
    border-radius: 0 14px 14px 0;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.modern-expiry-parent:hover {
    background: #fdfafb !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 6px 16px rgba(224, 76, 126, 0.08) !important;
    transform: translateY(-1px);
}

.modern-expiry-parent.expanded {
    border-color: var(--primary, #e04c7e) !important;
    background: #fffcfd !important;
    box-shadow: 0 4px 12px rgba(224, 76, 126, 0.12) !important;
}

.batch-parent-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    flex-wrap: wrap;
}

.batch-product-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 240px;
    min-width: 200px;
}

.batch-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(224, 76, 126, 0.12), rgba(190, 24, 93, 0.18));
    color: var(--primary, #e04c7e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.batch-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.batch-product-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main, #1e293b);
    line-height: 1.4;
}

.batch-count-pill {
    background: rgba(224, 76, 126, 0.1);
    color: var(--primary, #e04c7e);
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(224, 76, 126, 0.25);
    white-space: nowrap;
}

.batch-expiry-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 800;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    transition: transform 0.2s;
}

.batch-expiry-badge .expiry-text {
    font-weight: 800;
}

.batch-expiry-badge .expiry-date-tag {
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0.9;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.batch-meta-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.batch-qty-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 800;
    white-space: nowrap;
}

.batch-qty-pill.active {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.batch-qty-pill.zero {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.batch-chevron-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.modern-expiry-parent:hover .batch-chevron-btn {
    background: rgba(224, 76, 126, 0.12);
    color: var(--primary, #e04c7e);
}

.batch-children-container {
    margin-top: -4px;
    margin-bottom: 14px;
    padding-right: 18px;
    position: relative;
}

.batch-children-container::before {
    content: '';
    position: absolute;
    right: 6px;
    top: 0;
    bottom: 8px;
    width: 2px;
    background: #e2e8f0;
    border-radius: 2px;
}

.batch-child-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 0 !important;
}

.batch-child-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04) !important;
}

.batch-zero-card {
    background: #f8fafc !important;
    border: 1px dashed #cbd5e1 !important;
    opacity: 0.92;
}

.child-batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e2e8f0;
    flex-wrap: wrap;
}

.child-batch-left-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.child-batch-select-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.child-batch-select-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary, #e04c7e);
    margin: 0;
}

.batch-order-badge {
    background: #f1f5f9;
    color: #334155;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.78rem;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.batch-barcode-chip {
    background: #f8fafc;
    color: #475569;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: monospace;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.batch-barcode-chip:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: translateY(-1px);
}

.batch-no-barcode-chip {
    font-size: 0.76rem;
    color: #94a3b8;
    background: #f8fafc;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px dashed #cbd5e1;
}

.child-batch-qty-wrap {
    display: flex;
    align-items: center;
}

.qty-active-tag {
    background: #f0fdf4;
    color: #15803d;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.86rem;
    font-weight: 700;
    border: 1px solid #bbf7d0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.qty-zero-tag {
    background: #fee2e2;
    color: #b91c1c;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 800;
    border: 1px solid #fecaca;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.child-batch-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}

.batch-detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.84rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-weight: 600;
}

.batch-detail-chip strong {
    font-weight: 800;
}

.batch-detail-chip .chip-days-sub {
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0.9;
    margin-right: 2px;
}

.child-batch-notes {
    margin-top: 4px;
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px dashed #fde68a;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.83rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

/* Dark Mode Overrides for Expiry Dashboard */
body.dark-mode .modern-expiry-parent {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .modern-expiry-parent:hover {
    background: #1e293b !important;
    border-color: var(--primary, #e04c7e) !important;
}

body.dark-mode .modern-expiry-parent.expanded {
    background: #0f172a !important;
    border-color: var(--primary, #e04c7e) !important;
}

body.dark-mode .batch-product-name {
    color: #f1f5f9 !important;
}

body.dark-mode .batch-chevron-btn {
    background: #334155;
    color: #cbd5e1;
}

body.dark-mode .batch-children-container::before {
    background: #334155;
}

body.dark-mode .batch-child-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .batch-zero-card {
    background: #0f172a !important;
    border-color: #334155 !important;
}

body.dark-mode .child-batch-header {
    border-bottom-color: #334155;
}

body.dark-mode .batch-order-badge {
    background: #334155;
    color: #f1f5f9;
    border-color: #475569;
}

body.dark-mode .batch-barcode-chip {
    background: #0f172a;
    color: #94a3b8;
    border-color: #334155;
}

body.dark-mode .batch-detail-chip {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .child-batch-notes {
    background: #2a1f0a;
    border-color: #78350f;
    color: #fcd34d;
}

@media (max-width: 640px) {
    .batch-parent-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .batch-meta-right {
        width: 100%;
        justify-content: space-between;
    }
    .batch-expiry-badge {
        width: 100%;
        justify-content: center;
    }
}



/* ========================================================
   Cashier Details & Analytics Modal Styles
   ======================================================== */

.cashier-modal-backdrop,
.cashier-detail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 15px;
    box-sizing: border-box;
    animation: cashierModalFadeIn 0.25s ease-out;
}

@keyframes cashierModalFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.cashier-modal-content {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 950px;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.cashier-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%);
    border-bottom: 1px solid #f0abfc;
    gap: 15px;
    flex-wrap: wrap;
}

.cashier-modal-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cashier-modal-avatar {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, #8e24aa, #6a1b9a);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(142, 36, 170, 0.3);
}

.cashier-modal-name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #701a75;
}

.cashier-modal-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.cashier-modal-period {
    font-size: 0.85rem;
    color: #86198f;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 10px;
    border-radius: 12px;
}

.cashier-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-export-pdf-single {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-export-pdf-single:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.35);
}

.btn-close-cashier-modal {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #64748b;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.btn-close-cashier-modal:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #ef4444;
}

.cashier-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cashier-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.cmd-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cmd-stat-card.kpi-highlight {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.cmd-stat-card.kpi-highlight .kpi-num {
    color: #059669;
}

.cmd-stat-card.kpi-discounts {
    background: #fffbeb;
    border-color: #fde68a;
}

.cmd-stat-card.kpi-discounts .kpi-num {
    color: #d97706;
}

.cmd-stat-card.kpi-total-sales {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.cmd-stat-card.kpi-total-sales .kpi-num {
    color: #2563eb;
}

.kpi-icon {
    font-size: 1.3rem;
    opacity: 0.85;
}

.kpi-info {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
}

.kpi-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    margin-top: 2px;
}

.cashier-analytics-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cashier-section-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.cashier-box-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 8px;
}

.empty-msg-mini {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 15px 0;
}

.peak-hour-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.peak-hour-label {
    width: 105px;
    font-size: 0.82rem;
    color: #475569;
    font-weight: 600;
}

.peak-hour-track {
    flex: 1;
    height: 10px;
    background: #f1f5f9;
    border-radius: 5px;
    overflow: hidden;
}

.peak-hour-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    border-radius: 5px;
    transition: width 0.4s ease;
}

.peak-hour-count {
    width: 65px;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
}

.top-prod-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.88rem;
}

.top-prod-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-prod-rank {
    width: 22px;
    height: 22px;
    background: #8e24aa;
    color: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.top-prod-name {
    font-weight: 700;
    color: #1e293b;
}

.top-prod-meta {
    font-size: 0.82rem;
    color: #64748b;
    display: flex;
    gap: 6px;
}

.top-prod-qty {
    font-weight: 800;
    color: #059669;
}

.cashier-top-customers-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.top-cust-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    border-radius: 10px;
    padding: 8px 10px;
}

.top-cust-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f472b6;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.top-cust-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #831843;
    display: block;
}

.top-cust-sub {
    font-size: 0.75rem;
    color: #9d174d;
}

.platform-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.platform-name {
    font-weight: 700;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.platform-count {
    font-weight: 800;
    color: #0284c7;
}

.platform-sales {
    color: #64748b;
    font-size: 0.8rem;
}

/* Rank Badges */
.cashier-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 800;
}
.rank-badge-gold { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.rank-badge-silver { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.rank-badge-bronze { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.rank-badge-default { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }

/* Dark mode modal support */
body.dark-mode .cashier-modal-content {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}
body.dark-mode .cashier-modal-header {
    background: #0f172a;
    border-color: #334155;
}
body.dark-mode .cashier-modal-name {
    color: #f472b6;
}
body.dark-mode .cmd-stat-card {
    background: #0f172a;
    border-color: #334155;
}
body.dark-mode .kpi-num {
    color: #f1f5f9;
}
body.dark-mode .cashier-section-box {
    background: #0f172a;
    border-color: #334155;
}
body.dark-mode .cashier-box-title {
    color: #e2e8f0;
    border-color: #334155;
}
body.dark-mode .top-prod-row,
body.dark-mode .top-cust-chip,
body.dark-mode .platform-stat-row {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode .top-prod-name,
body.dark-mode .top-cust-name {
    color: #f1f5f9;
}


/* ========================================================
   Modern Cashier Team Shelf, Toolbar & Badges (No Emojis)
   ======================================================== */

.moderators-add-form-modern {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.mod-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.mod-input-icon {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
}

.mod-input-wrap input {
    width: 100%;
    padding: 10px 42px 10px 14px !important;
    border: 1.5px solid var(--border, #e2e8f0);
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    background: #ffffff;
    color: #1e293b;
    margin-bottom: 0 !important;
    transition: all 0.2s ease;
}

.mod-input-wrap input:focus {
    border-color: #00bcd4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15);
}

.btn-add-cashier-modern {
    background: linear-gradient(135deg, #00bcd4, #0097a7);
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.25);
    transition: all 0.2s ease;
}

.btn-add-cashier-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 188, 212, 0.35);
}

/* Modern Cashier Team Grid (Shelf) */
.moderators-team-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    min-height: 52px;
    align-items: center;
}

.cashier-team-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.cashier-team-chip:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.chip-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8e24aa, #ab47bc);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.chip-info {
    display: flex;
    flex-direction: column;
}

.chip-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e293b;
    line-height: 1.2;
}

.chip-role {
    font-size: 0.72rem;
    color: #059669;
    font-weight: 600;
}

.chip-delete-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #fee2e2;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    margin-right: 4px;
}

.chip-delete-btn:hover {
    background: #ef4444;
    color: #ffffff;
    transform: scale(1.1);
}

/* Modern Toolbar */
.moderators-toolbar-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: 12px 18px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border, #e2e8f0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    gap: 15px;
    flex-wrap: wrap;
}

.mod-toolbar-title-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.mod-toolbar-title {
    margin: 0;
    font-size: 1.05rem;
    color: #334155;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mod-toolbar-title i {
    color: #8e24aa;
}

.mod-export-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-pdf-export-month {
    background: #8e24aa;
    color: #ffffff;
    border: none;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-pdf-export-month:hover {
    background: #7b1fa2;
    transform: translateY(-1px);
}

.btn-pdf-export-range {
    background: #fdf4ff;
    color: #8e24aa;
    border: 1.5px solid #e9d5ff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-pdf-export-range:hover {
    background: #fae8ff;
    border-color: #d8b4fe;
    transform: translateY(-1px);
}

.mod-toolbar-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mod-filter-label {
    margin: 0;
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 700;
    white-space: nowrap;
}

.mod-month-picker {
    margin-bottom: 0 !important;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    font-family: 'Cairo', sans-serif;
    font-size: 0.88rem;
    width: 145px;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.mod-month-picker:focus {
    border-color: #8e24aa;
    outline: none;
    background: #fff;
}

/* Pure CSS Rank Badges (NO EMOJIS) */
.cashier-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.2px;
}

.rank-badge-gold {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

.rank-badge-gold i {
    color: #d97706;
}

.rank-badge-silver {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.rank-badge-silver i {
    color: #64748b;
}

.rank-badge-bronze {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #fdba74;
}

.rank-badge-bronze i {
    color: #ea580c;
}

.rank-badge-default {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Range PDF Picker Modal */
.custom-range-modal-box {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid #e2e8f0;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
}

.range-modal-title {
    margin: 0 0 16px 0;
    font-size: 1.15rem;
    color: #1e293b;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}

.range-modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.range-modal-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.range-modal-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}

.range-modal-group input {
    padding: 8px 12px !important;
    border-radius: 8px !important;
    border: 1.5px solid #cbd5e1 !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    margin-bottom: 0 !important;
}

.range-modal-actions {
    display: flex;
    gap: 10px;
}

.btn-confirm-range-pdf {
    flex: 1;
    background: #8e24aa;
    color: #ffffff;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-cancel-range-pdf {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}

/* Dark mode support */
body.dark-mode .moderators-team-grid {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .cashier-team-chip {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .chip-name {
    color: #f1f5f9;
}

body.dark-mode .mod-input-wrap input {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .moderators-toolbar-modern {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .mod-toolbar-title {
    color: #f1f5f9;
}

body.dark-mode .mod-month-picker {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .custom-range-modal-box {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}


/* ==========================================================================
   Marketplace Sort Custom Select (Zero Emojis, Pure CSS)
   ========================================================================== */
.marketplace-sort-custom-select {
    position: relative;
    width: 100%;
}

.marketplace-sort-btn {
    width: 100%;
    min-height: 42px;
    padding: 7px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
}

.marketplace-sort-btn:hover {
    border-color: #0284c7;
    background: #f8fafc;
}

.marketplace-sort-btn:focus-visible {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.marketplace-sort-btn-content {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketplace-sort-btn-content .sort-icon-indicator {
    color: #0284c7;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.marketplace-sort-btn .sort-chevron {
    font-size: 0.75rem;
    color: #64748b;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.marketplace-sort-custom-select.is-open .marketplace-sort-btn {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.marketplace-sort-custom-select.is-open .sort-chevron {
    transform: rotate(180deg);
}

.marketplace-sort-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    z-index: 160;
    background: #ffffff;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.12), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    padding: 6px;
    display: none;
    animation: dropMenuIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.marketplace-sort-custom-select.is-open .marketplace-sort-dropdown {
    display: block;
}

.marketplace-sort-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #334155;
    margin-bottom: 2px;
}

.marketplace-sort-option:last-child {
    margin-bottom: 0;
}

.marketplace-sort-option .sort-option-icon {
    font-size: 0.9rem;
    color: #0284c7;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.marketplace-sort-option:hover {
    background: #f0f9ff;
    color: #0284c7;
}

.marketplace-sort-option.is-selected {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 800;
}

body.dark-mode .marketplace-sort-btn {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}
body.dark-mode .marketplace-sort-dropdown {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode .marketplace-sort-option {
    color: #cbd5e1;
}
body.dark-mode .marketplace-sort-option:hover {
    background: #334155;
    color: #38bdf8;
}
body.dark-mode .marketplace-sort-option.is-selected {
    background: #0369a1;
    color: #ffffff;
}

/* ==========================================================================
   Marketplace Export Chooser Modal
   ========================================================================== */
.marketplace-export-modal-box {
    max-width: 520px;
    width: 95%;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.18);
    border: 1.5px solid #e2e8f0;
}

.export-modal-subtitle {
    margin: 6px 0 16px 0;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    text-align: right;
}

.marketplace-export-options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.export-platform-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    text-align: right;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    width: 100%;
}

.export-platform-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.platform-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.platform-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.platform-card-title {
    font-size: 1rem;
    font-weight: 800;
}

.platform-card-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.35;
}

.platform-card-arrow {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.export-platform-card:hover .platform-card-arrow {
    transform: translateX(-4px);
}

/* Talabat Card */
.export-platform-card--talabat {
    border-color: #fed7aa;
}
.export-platform-card--talabat:hover {
    border-color: #ea580c;
    background: #fff7ed;
}
.export-platform-card--talabat .platform-card-icon {
    background: #ffedd5;
    color: #ea580c;
}
.export-platform-card--talabat .platform-card-title {
    color: #c2410c;
}

/* InstaShop Card */
.export-platform-card--instashop {
    border-color: #fbcfe8;
}
.export-platform-card--instashop:hover {
    border-color: #db2777;
    background: #fdf2f8;
}
.export-platform-card--instashop .platform-card-icon {
    background: #fce7f3;
    color: #db2777;
}
.export-platform-card--instashop .platform-card-title {
    color: #be185d;
}

/* Both Card */
.export-platform-card--both {
    border-color: #e9d5ff;
}
.export-platform-card--both:hover {
    border-color: #8e24aa;
    background: #faf5ff;
}
.export-platform-card--both .platform-card-icon {
    background: #f3e8ff;
    color: #8e24aa;
}
.export-platform-card--both .platform-card-title {
    color: #7e22ce;
}

body.dark-mode .marketplace-export-modal-box {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}
body.dark-mode .export-platform-card {
    background: #0f172a;
    border-color: #334155;
}
body.dark-mode .export-platform-card:hover {
    background: #1e293b;
}
body.dark-mode .export-modal-subtitle {
    color: #94a3b8;
}
body.dark-mode .platform-card-desc {
    color: #94a3b8;
}


/* ==========================================================================
   Catalogue: offers first, bounded search results & card grid
   ========================================================================== */
#catalog-tab { 
    background: #f7f7fc; 
    border-radius: 24px; 
    padding: clamp(16px, 2.3vw, 30px); 
    box-sizing: border-box;
    width: 100%;
}
#catalog-tab .catalog-workspace { 
    max-width: 1320px; 
    margin: auto; 
    color: #20283e; 
}
#catalog-tab button, #catalog-tab input { 
    font-family: inherit; 
}
#catalog-tab .catalog-heading { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 20px; 
    margin-bottom: 24px; 
}
#catalog-tab .catalog-eyebrow { 
    color: #80659d; 
    font-size: .8rem; 
    font-weight: 700; 
}
#catalog-tab .catalog-heading h2 { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-size: clamp(1.25rem, 2vw, 1.8rem); 
    margin: 6px 0; 
    color: #35234e; 
    line-height: 1.5; 
    font-weight: 800;
}
#catalog-tab .catalog-heading h2 i { 
    background: #eee8f6; 
    color: #8051a6; 
    padding: 12px; 
    border-radius: 14px; 
    font-size: 1.15rem; 
}
#catalog-tab .catalog-heading p { 
    color: #67728a; 
    margin: 4px 0 0; 
    font-size: .9rem; 
}
#catalog-tab .catalog-scan-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px; 
    flex-shrink: 0; 
    min-height: 46px; 
    padding: 10px 18px; 
    border: 1px solid #d6c8e7; 
    border-radius: 12px; 
    background: #fff; 
    color: #714394; 
    font-weight: 800; 
    cursor: pointer; 
    transition: all 0.2s ease;
}
#catalog-tab .catalog-toolbar { 
    padding: 20px; 
    background: white; 
    border: 1px solid #e5dfed; 
    border-radius: 18px; 
    box-shadow: 0 3px 16px rgba(52, 33, 79, 0.04); 
}
#catalog-tab .catalog-search-label { 
    display: block; 
    margin-bottom: 9px; 
    font-size: .9rem; 
    font-weight: 800; 
    color: #354056; 
}
#catalog-tab .catalog-search-row { 
    display: flex; 
    align-items: stretch; 
    gap: 12px; 
}
#catalog-tab .catalog-search-field { 
    position: relative; 
    flex: 1; 
    min-width: 0; 
}
#catalog-tab .catalog-search-field > i { 
    position: absolute; 
    inset-inline-start: 16px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: #8b789f; 
    pointer-events: none; 
}
#catalog-tab #catalogSearchInput { 
    width: 100%; 
    box-sizing: border-box; 
    margin: 0; 
    padding: 13px 44px 13px 14px; 
    min-height: 50px; 
    border: 1px solid #dce0e9; 
    background: #fafbfe; 
    color: #273449; 
    border-radius: 12px; 
    font-size: .95rem; 
    box-shadow: none; 
    font-family: inherit;
}
#catalog-tab #catalogSearchInput:focus { 
    border-color: #9564b9; 
    outline: 3px solid rgba(149, 100, 185, 0.15); 
    background: #fff; 
}
#catalog-tab .catalog-offers-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    min-height: 50px; 
    padding: 10px 18px; 
    border-radius: 12px; 
    border: 1px solid #eadde7; 
    background: #fff; 
    color: #b42368; 
    font-size: .9rem; 
    font-weight: 800; 
    cursor: pointer; 
    transition: all 0.2s ease;
}
#catalog-tab .catalog-offers-btn[aria-pressed="true"] { 
    border-color: #edbad1; 
    background: #fff0f6; 
}
#catalog-tab .catalog-offers-btn span { 
    background: #fff; 
    border-radius: 6px; 
    padding: 1px 7px; 
    font-size: .8rem; 
}
#catalog-tab .catalog-toolbar-meta { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 10px; 
    min-height: 28px; 
    margin-top: 9px; 
}
#catalog-tab .catalog-toolbar-meta p { 
    font-size: .78rem; 
    color: #7b8598; 
    margin: 0; 
}
#catalog-tab .catalog-clear-btn { 
    padding: 2px 6px; 
    border: 0; 
    background: transparent; 
    color: #714394; 
    font-weight: 700; 
    cursor: pointer; 
    font-size: .8rem; 
}
#catalog-tab [hidden] { 
    display: none !important; 
}
#catalog-tab .catalog-results-heading { 
    display: flex; 
    flex-wrap: wrap; 
    align-items: baseline; 
    justify-content: space-between; 
    gap: 8px 20px; 
    margin: 24px 0 14px; 
}
#catalog-tab .catalog-results-heading h3 { 
    font-size: 1.1rem; 
    color: #354056; 
    margin: 0; 
    font-weight: 800;
}
#catalog-tab .catalog-results-heading p { 
    font-size: .82rem; 
    color: #747f93; 
    margin: 0; 
}
#catalog-tab .catalog-cards-grid { 
    display: grid; 
    grid-template-columns: repeat(3, minmax(0, 1fr)); 
    gap: 16px; 
}
#catalog-tab .catalog-card { 
    display: flex; 
    flex-direction: column; 
    min-width: 0; 
    padding: 18px; 
    border: 1px solid #e0e4ee; 
    border-radius: 16px; 
    background: white; 
    box-shadow: 0 4px 12px rgba(37, 54, 85, 0.04); 
    transition: all 0.2s ease;
}
#catalog-tab .catalog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 54, 85, 0.08);
}
#catalog-tab .catalog-card.card-on-offer { 
    border-color: #edc3d6; 
    border-top: 3px solid #cf377c; 
    padding-top: 16px; 
}
#catalog-tab .catalog-card-top { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    flex-wrap: wrap; 
    gap: 6px; 
    min-height: 32px; 
}
#catalog-tab .catalog-barcode-pill { 
    display: inline-flex; 
    align-items: center; 
    gap: 7px; 
    max-width: 100%; 
    min-height: 32px; 
    padding: 4px 8px; 
    border: 1px solid #e6e9f1; 
    background: #f6f8fc; 
    color: #59677d; 
    border-radius: 7px; 
    font-size: .75rem; 
    cursor: pointer; 
    transition: all 0.15s ease;
}
#catalog-tab .catalog-barcode-pill bdi { 
    overflow-wrap: anywhere; 
    letter-spacing: .035em; 
    font-weight: 700;
}
#catalog-tab .catalog-barcode-pill i { 
    color: #8794aa; 
}
#catalog-tab .catalog-offer-badge { 
    background: #fff0f6; 
    color: #b42368; 
    padding: 4px 8px; 
    border-radius: 6px; 
    font-size: .7rem; 
    font-weight: 800; 
}
#catalog-tab .catalog-no-barcode { 
    color: #8892a4; 
    font-size: .75rem; 
}
#catalog-tab .catalog-product-name { 
    margin: 16px 0; 
    color: #283449; 
    font-size: 1rem; 
    font-weight: 800;
    line-height: 1.6; 
    min-height: 3.2em; 
    overflow-wrap: anywhere; 
}
#catalog-tab .catalog-product-facts { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 12px; 
    background: #f8f9fc; 
    border-radius: 12px; 
    padding: 12px; 
    margin-top: auto; 
}
#catalog-tab .card-on-offer .catalog-product-facts { 
    background: #fff6fa; 
}
#catalog-tab .catalog-product-facts > div { 
    min-width: 0; 
}
#catalog-tab .catalog-fact-label { 
    display: block; 
    font-size: .72rem; 
    color: #7b8598; 
    margin-bottom: 5px; 
    font-weight: 700;
}
#catalog-tab .catalog-price { 
    display: block; 
    font-size: 1.2rem; 
    line-height: 1.5; 
    color: #29354b; 
    font-weight: 900;
}
#catalog-tab .card-on-offer .catalog-price { 
    color: #b42368; 
}
#catalog-tab .catalog-price small, #catalog-tab .catalog-stock small { 
    font-size: .74rem; 
    font-weight: 600; 
}
#catalog-tab .catalog-old-price { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    align-items: center; 
    font-size: .7rem; 
    color: #8f96a6; 
}
#catalog-tab .catalog-old-price b { 
    color: #b42368; 
    background: #fce4ee; 
    padding: 1px 5px; 
    border-radius: 4px; 
}
#catalog-tab .catalog-stock { 
    display: block; 
    font-size: 1.05rem; 
    line-height: 1.8; 
    font-weight: 800;
}
#catalog-tab .in-stock { 
    color: #18845b; 
}
#catalog-tab .out-of-stock { 
    color: #ba4b54; 
}
#catalog-tab .catalog-card-actions { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    border-top: 1px solid #eff1f5; 
    padding-top: 14px; 
    margin-top: 14px; 
}
#catalog-tab .catalog-offer-control { 
    display: inline-flex; 
    flex: 1; 
    align-items: center; 
    justify-content: space-between; 
    gap: 10px; 
    margin: 0; 
    font-size: .8rem; 
    color: #67728a; 
    font-weight: 700;
    cursor: pointer;
}
#catalog-tab .switch { 
    display: inline-block; 
    position: relative; 
    flex-shrink: 0; 
    width: 40px; 
    height: 23px; 
    margin: 0; 
}
#catalog-tab .switch input { 
    width: 100%; 
    height: 100%; 
    margin: 0; 
    opacity: 0; 
    position: absolute; 
    inset: 0; 
}
#catalog-tab .slider { 
    position: absolute; 
    inset: 0; 
    background: #cdd5e2; 
    cursor: pointer; 
    border-radius: 20px; 
    transition: background .15s; 
}
#catalog-tab .slider:before { 
    position: absolute; 
    content: ''; 
    height: 17px; 
    width: 17px; 
    left: 3px; 
    bottom: 3px; 
    background: white; 
    border-radius: 50%; 
    transition: transform .15s; 
}
#catalog-tab input:checked + .slider { 
    background: #cd347c; 
}
#catalog-tab input:checked + .slider:before { 
    transform: translateX(17px); 
}
#catalog-tab .switch input:focus-visible + .slider { 
    outline: 3px solid #8d61b4; 
    outline-offset: 3px; 
}
#catalog-tab .btn-cat-order { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 7px; 
    min-height: 40px; 
    padding: 9px 14px; 
    border: 1px solid #e5d9ef; 
    border-radius: 9px; 
    background: #f4eef9; 
    color: #714394; 
    font-size: .82rem; 
    font-weight: 800; 
    cursor: pointer; 
    font-family: inherit;
    transition: all 0.2s ease;
}
#catalog-tab button:focus-visible { 
    outline: 3px solid rgba(149, 100, 185, 0.36); 
    outline-offset: 3px; 
}
#catalog-tab .catalog-empty { 
    grid-column: 1 / -1; 
    background: white; 
    text-align: center; 
    padding: 48px 20px; 
    border: 1px dashed #ded8e8; 
    border-radius: 16px; 
    color: #7b8598; 
}
#catalog-tab .catalog-empty > i { 
    font-size: 2rem; 
    color: #ab91bf; 
}
#catalog-tab .catalog-empty h4 { 
    margin: 14px 0 6px; 
    color: #526078; 
    font-size: 1.1rem; 
    font-weight: 800;
}
#catalog-tab .catalog-empty p { 
    margin: 0; 
    font-size: .85rem; 
}

@media (hover: hover) { 
    #catalog-tab .catalog-barcode-pill:hover, 
    #catalog-tab .catalog-scan-btn:hover, 
    #catalog-tab .btn-cat-order:hover { 
        background: #eee7f6; 
        border-color: #c7afd9; 
    } 
}

@media (max-width: 1100px) { 
    #catalog-tab .catalog-cards-grid { 
        grid-template-columns: repeat(2, minmax(0, 1fr)); 
    } 
}

@media (max-width: 640px) {
    #catalog-tab { 
        padding: 16px 12px; 
        border-radius: 18px; 
    }
    #catalog-tab .catalog-heading { 
        gap: 14px; 
        align-items: flex-start; 
        flex-direction: column; 
        margin-bottom: 18px; 
    }
    #catalog-tab .catalog-heading h2 { 
        font-size: 1.3rem; 
    }
    #catalog-tab .catalog-heading p { 
        font-size: .8rem; 
    }
    #catalog-tab .catalog-scan-btn { 
        width: 100%; 
    }
    #catalog-tab .catalog-toolbar { 
        padding: 14px; 
    }
    #catalog-tab .catalog-search-row { 
        flex-wrap: wrap; 
    }
    #catalog-tab .catalog-search-field { 
        flex-basis: 100%; 
    }
    #catalog-tab .catalog-offers-btn { 
        min-height: 40px; 
        padding: 8px 14px; 
    }
    #catalog-tab .catalog-cards-grid { 
        grid-template-columns: minmax(0, 1fr); 
        gap: 12px; 
    }
    #catalog-tab .catalog-card { 
        padding: 16px; 
    }
    #catalog-tab .catalog-product-name { 
        min-height: 0; 
    }
}

/* Dark mode for catalog tab */
body.dark-mode #catalog-tab {
    background: #0f172a;
}
body.dark-mode #catalog-tab .catalog-workspace {
    color: #f1f5f9;
}
body.dark-mode #catalog-tab .catalog-heading h2 {
    color: #f1f5f9;
}
body.dark-mode #catalog-tab .catalog-heading p {
    color: #94a3b8;
}
body.dark-mode #catalog-tab .catalog-scan-btn {
    background: #1e293b;
    border-color: #334155;
    color: #c084fc;
}
body.dark-mode #catalog-tab .catalog-toolbar {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode #catalog-tab .catalog-search-label {
    color: #f1f5f9;
}
body.dark-mode #catalog-tab #catalogSearchInput {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}
body.dark-mode #catalog-tab .catalog-card {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode #catalog-tab .catalog-product-name {
    color: #f1f5f9;
}
body.dark-mode #catalog-tab .catalog-product-facts {
    background: #0f172a;
}
body.dark-mode #catalog-tab .catalog-price {
    color: #f1f5f9;
}
body.dark-mode #catalog-tab .catalog-barcode-pill {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}
body.dark-mode #catalog-tab .btn-cat-order {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}


/* ==========================================================================
   قاعدة العملاء وتحليلات العملاء والتصنيف التراكمي (Customer CRM & Analytics)
   ========================================================================== */
/* Customer database: simple cards, direct switching, CSS-drawn marks. */
.customer-base { --customer-ink:#25334b;--customer-muted:#8592a6;font-family:Cairo,Tajawal,Arial,sans-serif; }
.customer-base [hidden] { display:none!important; }
.customer-base-heading { display:flex;align-items:center;justify-content:space-between;gap:11px;margin-bottom:18px;flex-wrap:wrap; }
.customer-base-title { margin:0;font-size:25px;font-weight:800;color:var(--customer-ink);line-height:1.5; }
.customer-base-emblem.customer-nav-icon { width:40px;height:40px;flex-basis:40px;background:var(--customer-page-soft,#e8efff);border-radius:13px;color:var(--customer-page-accent,#245ac7); }
.customer-base-emblem.customer-nav-icon::before { left:10px;top:8px; }.customer-base-emblem.customer-nav-icon::after { left:17px;top:15px; }
.customer-header-actions { display:flex;align-items:center;gap:10px; }


/* =========================================================
   Quick Add Customer Button (Apps & Store ONLY)
   ========================================================= */
.quick-add-customer-btn {
    display: none !important;
    align-items: center;
    gap: 8px;
    color: #fff !important;
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, filter .2s;
}
.quick-add-customer-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}
.quick-add-customer-btn:active {
    transform: translateY(0);
}

/* Shown in Apps (Talabat / InstaShop) with a blend gradient of both brands */
#customers-tab[data-customer-theme="talabat"] .quick-add-customer-btn,
#customers-tab[data-customer-theme="instashop"] .quick-add-customer-btn,
#customers-tab[data-customer-theme="apps"] .quick-add-customer-btn {
    display: inline-flex !important;
    background: linear-gradient(135deg, #e54e00 0%, #db176e 100%) !important;
    box-shadow: 0 4px 14px rgba(229, 78, 0, 0.28) !important;
}

/* Shown in Store (المحل) with the Store theme color */
#customers-tab[data-customer-theme="store"] .quick-add-customer-btn {
    display: inline-flex !important;
    background: linear-gradient(135deg, #7951ab 0%, #9061d4 100%) !important;
    box-shadow: 0 4px 14px rgba(121, 81, 171, 0.28) !important;
}

/* Hidden in Online & Gifts */
#customers-tab[data-customer-theme="online"] .quick-add-customer-btn,
#customers-tab[data-customer-theme="gifts"] .quick-add-customer-btn {
    display: none !important;
}


/* Navigation & Tabs */
.customer-section-nav { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:20px; }
.customer-section-nav,.customer-app-switch { position:relative; }
.customer-tab-indicator { position:absolute;left:0;top:0;height:3px;border-radius:3px;background:var(--customer-accent,var(--customer-page-accent,#245ac7));pointer-events:none;transition:transform .36s cubic-bezier(.16,1,.3,1),width .36s cubic-bezier(.16,1,.3,1),background-color .25s; }
.customer-section-nav button { --section-accent:#245ac7;--section-soft:#edf3ff;display:flex;align-items:center;gap:11px;text-align:right;font-family:inherit;font-size:14px;font-weight:700;min-height:60px;padding:10px 13px;border:1px solid #e1e8f3;border-radius:14px;background:#fff;color:#62728b;cursor:pointer;box-shadow:0 2px 6px #20355004;transition:background-color .2s,border-color .2s,box-shadow .2s,transform .2s,color .2s; }
.customer-section-nav button[data-customer-section=store] { --section-accent:#7951ab;--section-soft:#f4effb; }
.customer-section-nav button[data-customer-section=gifts] { --section-accent:#087e74;--section-soft:#e9f7f3; }
.customer-section-nav button[data-customer-section=apps] { --section-accent:#e54e00;--section-soft:#fff1e6; }
.customer-section-nav button:hover { transform:translateY(-2px);border-color:var(--section-accent);box-shadow:0 5px 14px #2035500c; }
.customer-section-nav button[aria-pressed=true] { color:var(--section-accent);background:var(--section-soft);border-color:var(--section-accent);box-shadow:0 3px 10px #20355008; }
.customer-section-mark { width:36px;height:36px;flex:0 0 36px;border-radius:11px;background:var(--section-soft);color:var(--section-accent);display:flex;align-items:center;justify-content:center; }
.customer-section-nav button>span:last-child { min-width:0;overflow-wrap:anywhere;line-height:1.7; }
.customer-section-nav button[aria-pressed=true] .customer-section-mark { background:#fff; }
.customer-section-glyph { position:relative;width:20px;height:20px;display:block; }
.customer-section-glyph::before,.customer-section-glyph::after { content:"";position:absolute;box-sizing:border-box; }
.customer-glyph-online::before { width:17px;height:20px;top:0;left:2px;border:2px solid currentColor;border-radius:3px;background:linear-gradient(90deg,currentColor 2px,transparent 2px) 2px 0/2px 100% no-repeat; }.customer-glyph-online::after { width:6px;height:2px;top:5px;left:9px;background:currentColor;box-shadow:0 4px currentColor,0 8px currentColor; }
.customer-glyph-store::before { width:16px;height:13px;left:2px;top:7px;border:2px solid currentColor;border-radius:1px;background:linear-gradient(90deg,transparent 6px,currentColor 6px,currentColor 8px,transparent 8px); }.customer-glyph-store::after { width:20px;height:8px;left:0;top:0;border:2px solid currentColor;border-radius:3px 3px 5px 5px;background:repeating-linear-gradient(90deg,currentColor 0,currentColor 2px,transparent 2px,transparent 5px); }
.customer-glyph-gift::before { width:18px;height:13px;top:7px;left:1px;border:2px solid currentColor;background:linear-gradient(90deg,transparent 6px,currentColor 6px,currentColor 8px,transparent 8px); }.customer-glyph-gift::after { width:11px;height:8px;left:5px;top:0;border:2px solid currentColor;border-radius:7px 7px 0 0; }
.customer-glyph-apps::before { width:8px;height:8px;left:0;top:0;border-radius:2px;background:currentColor;box-shadow:12px 0 currentColor,0 12px currentColor,12px 12px currentColor; }

/* =========================================================
   Customer Analytics & Insights Dashboard (Pure CSS & FontAwesome)
   ========================================================= */
.customer-analytics-dashboard { background:#fff;border:1px solid #e1e8f3;border-radius:18px;padding:20px 22px;margin-bottom:20px;box-shadow:0 4px 16px rgba(32,53,80,0.04); }
.customer-analytics-header { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap; }
.customer-analytics-title-wrap { display:flex;align-items:center;gap:12px; }
.customer-analytics-icon { width:38px;height:38px;border-radius:11px;background:#eff6ff;color:#2563eb;display:flex;align-items:center;justify-content:center;font-size:16px; }
.customer-analytics-title { margin:0;font-size:18px;font-weight:800;color:#1e293b;line-height:1.4; }
.customer-analytics-subtitle { margin:2px 0 0;font-size:12px;color:#64748b; }
.customer-analytics-toggle-btn { display:inline-flex;align-items:center;gap:7px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:10px;padding:6px 14px;color:#475569;font-family:inherit;font-size:12px;font-weight:700;cursor:pointer;transition:all .2s; }
.customer-analytics-toggle-btn:hover { background:#f1f5f9;color:#1e293b;border-color:#94a3b8; }

.customer-kpi-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px; }
.customer-kpi-card { background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:14px 15px;display:flex;align-items:center;gap:12px;transition:all .2s ease;position:relative; }
.customer-kpi-card[role=button] { cursor:pointer; }
.customer-kpi-card[role=button]:hover { transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,0.06);border-color:#cbd5e1; }
.customer-kpi-card.is-filter-active { border-color:#2563eb!important;background:#eff6ff!important;box-shadow:0 0 0 2px rgba(37,99,235,0.2)!important; }
.customer-kpi-card .kpi-icon-wrap { width:40px;height:40px;flex:0 0 40px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:16px; }
.customer-kpi-card.kpi-total .kpi-icon-wrap { background:#eff6ff;color:#2563eb; }
.customer-kpi-card.kpi-regular .kpi-icon-wrap { background:#f1f5f9;color:#0284c7; }
.customer-kpi-card.kpi-new .kpi-icon-wrap { background:#ecfdf5;color:#059669; }
.customer-kpi-card.kpi-vip .kpi-icon-wrap { background:#fffbeb;color:#d97706; }
.customer-kpi-card.kpi-interest .kpi-icon-wrap { background:#fdf2f8;color:#db2777; }
.customer-kpi-card .kpi-info { display:flex;flex-direction:column;gap:2px;min-width:0; }
.customer-kpi-card .kpi-label { font-size:11px;font-weight:700;color:#64748b;line-height:1.4; }
.customer-kpi-card .kpi-val { font-size:18px;font-weight:800;color:#0f172a;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.customer-kpi-card .kpi-meta { font-size:10px;color:#94a3b8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;gap:4px; }

/* Interactive Category Filter Shelf */
.customer-categories-shelf { background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:14px 16px; }
.shelf-header { display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;flex-wrap:wrap; }
.shelf-title { font-size:12px;font-weight:800;color:#334155;display:inline-flex;align-items:center;gap:6px; }
.shelf-hint { font-size:11px;color:#94a3b8; }
.customer-category-filters { display:flex;flex-wrap:wrap;gap:8px; }
.category-filter-chip { display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border-radius:20px;font-family:inherit;font-size:12px;font-weight:700;border:1px solid #cbd5e1;background:#fff;color:#475569;cursor:pointer;transition:all .2s ease; }
.category-filter-chip:hover { border-color:#94a3b8;background:#f1f5f9;transform:translateY(-1px); }
.category-filter-chip.is-active { background:#1e293b;color:#fff;border-color:#1e293b;box-shadow:0 3px 8px rgba(30,41,59,0.25); }
.category-filter-chip .chip-dot { width:7px;height:7px;border-radius:50%;background:#94a3b8; }
.category-filter-chip.is-active .chip-dot { background:#38bdf8; }
.category-filter-chip .chip-count { font-size:10px;padding:2px 6px;border-radius:10px;background:#f1f5f9;color:#475569;font-weight:800; }
.category-filter-chip.is-active .chip-count { background:rgba(255,255,255,0.2);color:#fff; }


/* =========================================================
   Category Filter Chips - High Contrast & High Readability
   ========================================================= */
.customer-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 10px;
}
.category-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    color: #1e293b;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.category-filter-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.09);
    filter: brightness(0.97);
}
.category-filter-chip .chip-count {
    font-size: 10.5px;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(0,0,0,0.08);
    color: inherit;
    font-weight: 800;
}

/* Distinct pastel tints for unselected chips */
.cat-chip--chocolates { background:#fbf5ef!important;border-color:#d6b8a2!important;color:#4a2813!important; }
.cat-chip--candy { background:#fdf2f7!important;border-color:#f4a7c8!important;color:#831843!important; }
.cat-chip--snacks { background:#fff7ed!important;border-color:#fed7aa!important;color:#7c2d12!important; }
.cat-chip--biscuits { background:#fffbeb!important;border-color:#fde68a!important;color:#713f12!important; }
.cat-chip--coffee { background:#f8f4f0!important;border-color:#d7c4b7!important;color:#3e2417!important; }
.cat-chip--drinks { background:#f0f9ff!important;border-color:#bae6fd!important;color:#0369a1!important; }
.cat-chip--noodles { background:#fef2f2!important;border-color:#fecaca!important;color:#7f1d1d!important; }
.cat-chip--kitchen { background:#f7fee7!important;border-color:#d9f99d!important;color:#365314!important; }
.cat-chip--icecream { background:#faf5ff!important;border-color:#ddd6fe!important;color:#581c87!important; }
.cat-chip--gifts { background:#f0fdf4!important;border-color:#bbf7d0!important;color:#14532d!important; }

/* When ACTIVE / SELECTED: Deep solid color with PURE CRISP WHITE TEXT */
.category-filter-chip.is-active,
.category-filter-chip.is-active .chip-name,
.category-filter-chip.is-active i {
    color: #ffffff !important;
}
.category-filter-chip.is-active .chip-count {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}
.category-filter-chip[data-cat-filter="all"].is-active {
    background: #1e293b !important;
    border-color: #0f172a !important;
    box-shadow: 0 4px 14px rgba(30, 41, 59, 0.35) !important;
}
.cat-chip--chocolates.is-active { background:#6b3e20!important;border-color:#4a2813!important;box-shadow:0 4px 14px rgba(107,62,32,0.35)!important; }
.cat-chip--candy.is-active { background:#db176e!important;border-color:#9d174d!important;box-shadow:0 4px 14px rgba(219,23,110,0.35)!important; }
.cat-chip--snacks.is-active { background:#ea580c!important;border-color:#c2410c!important;box-shadow:0 4px 14px rgba(234,88,12,0.35)!important; }
.cat-chip--biscuits.is-active { background:#d97706!important;border-color:#b45309!important;box-shadow:0 4px 14px rgba(217,119,6,0.35)!important; }
.cat-chip--coffee.is-active { background:#4e2f1d!important;border-color:#382012!important;box-shadow:0 4px 14px rgba(78,47,29,0.35)!important; }
.cat-chip--drinks.is-active { background:#0284c7!important;border-color:#0369a1!important;box-shadow:0 4px 12px rgba(2,132,199,0.35)!important; }
.cat-chip--noodles.is-active { background:#dc2626!important;border-color:#b91c1c!important;box-shadow:0 4px 12px rgba(220,38,38,0.35)!important; }
.cat-chip--kitchen.is-active { background:#65a30d!important;border-color:#4d7c0f!important;box-shadow:0 4px 12px rgba(101,163,13,0.35)!important; }
.cat-chip--icecream.is-active { background:#7c3aed!important;border-color:#6d28d9!important;box-shadow:0 4px 12px rgba(124,58,237,0.35)!important; }
.cat-chip--gifts.is-active { background:#059669!important;border-color:#047857!important;box-shadow:0 4px 12px rgba(5,150,105,0.35)!important; }


/* =========================================================
   Directory & Card Styles
   ========================================================= */
.customer-directory { --customer-accent:#245ac7;--customer-soft:#eff5ff;--customer-line:#dce6f6;font-family:Cairo,Tajawal,Arial,sans-serif;background:#fff;border:1px solid var(--customer-line);border-radius:18px;padding:22px;color:#26334a;box-shadow:0 5px 18px #233b6004;scroll-margin-top:calc(var(--header-height,100px) + 20px); }
.customer-directory[data-theme=online] { --customer-accent:#245ac7;--customer-soft:#eff5ff;--customer-line:#dce6f6; }
.customer-directory[data-theme=vip] { --customer-accent:#936008;--customer-soft:#fff2ca;--customer-line:#e5bf61;background:linear-gradient(145deg,#fff9e8,#fff 45%); }
.customer-directory[data-theme=vip] .customer-simple-header { border-color:#f0dfac; }
.customer-directory[data-theme=vip] .customer-simple-count { background:#fff0bc;color:#825805; }
.customer-directory[data-theme=store] { --customer-accent:#7951ab;--customer-soft:#f5effc;--customer-line:#e7d9f4; }
.customer-directory[data-theme=gifts] { --customer-accent:#087e74;--customer-soft:#edf9f5;--customer-line:#c8e9df; }
.customer-directory[data-theme=talabat] { --customer-accent:#e54e00;--customer-soft:#fff1e6;--customer-line:#ffd4b5;font-family:Tajawal,Arial,sans-serif; }
.customer-directory[data-theme=instashop] { --customer-accent:#db176e;--customer-soft:#fff0f6;--customer-line:#f8cde0;font-family:Cairo,Arial,sans-serif; }
.customer-directory *,.customer-app-directory * { box-sizing:border-box; }
.customer-directory h2,.customer-directory h3,.customer-directory p { margin:0; }
.customer-simple-header { position:relative;display:flex;align-items:center;justify-content:space-between;gap:15px;padding-bottom:14px;margin-bottom:18px;border-bottom:1px solid #f0f3f8;flex-wrap:wrap; }
.customer-simple-header>div { display:flex;align-items:center;gap:12px;flex-wrap:wrap; }
.customer-simple-header h2 { color:var(--customer-accent);font-size:23px;font-weight:800;line-height:1.5; }
.customer-simple-count { font-size:12px;color:#8b98ac;background:#f7f9fc;border-radius:7px;padding:3px 8px; }
.customer-loading { display:inline-flex;align-items:center;gap:7px;color:#8a98ac;font-size:11px; }
.customer-loading::before { content:"";width:12px;height:12px;border:2px solid var(--customer-line);border-top-color:var(--customer-accent);border-radius:50%;animation:customerSpin .7s linear infinite; }
.customer-simple-cards { display:grid;grid-template-columns:repeat(auto-fill,minmax(265px,1fr));gap:16px; }
.customer-simple-card { border:1px solid #e4eaf2;border-top:3px solid var(--customer-accent);border-radius:13px;background:#fff;padding:18px;content-visibility:auto;contain-intrinsic-size:auto 220px;position:relative;display:flex;flex-direction:column; }
.customer-simple-card.is-vip { border-color:#dfba56;border-top-color:#c99213;background:linear-gradient(145deg,#fff0bc,#fff9e5 38%,#fffdf7 75%);box-shadow:0 4px 14px #b78a1210; }
.customer-simple-card.is-vip .customer-card-numbers { background:linear-gradient(120deg,#ffe7a0,#fff2c8); }
.customer-simple-card.is-vip .customer-card-location dt { color:#86600e; }
.customer-card-top { display:flex;align-items:center;gap:10px;position:relative;margin-bottom:10px; }
.customer-card-top>.customer-symbol { color:var(--customer-accent);width:34px;height:34px;background:var(--customer-soft);border-radius:10px;flex:0 0 34px; }
.customer-card-top h3 { font-size:16px;line-height:1.6;color:#26334a;font-weight:800;overflow-wrap:anywhere; }
.customer-card-phone { font:13px/1.6 Arial,sans-serif;color:#7d8ba0;text-align:right;letter-spacing:.2px; }
.customer-card-top-badges { margin-right:auto;display:flex;flex-direction:column;gap:4px;align-items:flex-end; }
.customer-vip { font:700 11px/1.5 Arial,sans-serif;color:#624307;background:linear-gradient(120deg,#efc65b,#ffe7a0);border:1px solid #d8ad42;border-radius:7px;padding:2px 7px;display:inline-block; }
.customer-badge-new { font-size:10px;font-weight:700;color:#fff;background:linear-gradient(135deg,#10b981,#059669);border-radius:6px;padding:2px 7px;display:inline-flex;align-items:center;gap:4px;box-shadow:0 2px 5px rgba(16,185,129,0.25); }

/* Dominant Category Row on Customer Card */
.customer-card-category-row { margin-bottom:10px; }
.customer-card-category-badge { display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:10px;font-size:11px;font-weight:700;border:1px solid transparent;line-height:1.4; }
.customer-card-category-badge small { font-size:9.5px;padding:1px 5px;border-radius:6px;background:rgba(0,0,0,0.06);font-weight:800; }

/* 10 Pure CSS Category Badges */
.cat--chocolates { background:#fdf7f2;color:#6b4226;border-color:#e8d5c4; }
.cat--candy { background:#fdf2f6;color:#c2185b;border-color:#f8bbd0; }
.cat--snacks { background:#fff7ed;color:#c2410c;border-color:#fed7aa; }
.cat--biscuits { background:#fffbeb;color:#b45309;border-color:#fde68a; }
.cat--coffee { background:#f8f3ef;color:#5b3726;border-color:#dcc8bc; }
.cat--drinks { background:#f0f9ff;color:#0369a1;border-color:#bae6fd; }
.cat--noodles { background:#fef2f2;color:#b91c1c;border-color:#fecaca; }
.cat--kitchen { background:#f7fee7;color:#4d7c0f;border-color:#d9f99d; }
.cat--icecream { background:#f5f3ff;color:#6d28d9;border-color:#ddd6fe; }
.cat--gifts { background:#ecfdf5;color:#047857;border-color:#a7f3d0; }

.customer-card-address { color:#7d8ba0;font-size:12px;line-height:1.8;min-height:20px;margin-bottom:10px!important;overflow-wrap:anywhere; }
.customer-card-location { margin:0 0 10px;display:grid;gap:6px;font-size:12px;line-height:1.8; }
.customer-card-location>div { display:grid;grid-template-columns:50px minmax(0,1fr);gap:9px; }
.customer-card-location dt { color:#9a875c;font-weight:700; }.customer-card-location dd { margin:0;color:#59667c;overflow-wrap:anywhere; }
.customer-card-interest { border:1px solid var(--customer-line);background:var(--customer-soft);border-radius:10px;padding:9px 11px;display:grid;gap:4px;margin-bottom:10px; }
.customer-card-interest>span { color:var(--customer-accent);font-size:11px; }.customer-card-interest strong { color:#59471e;font-size:12px;line-height:1.7;overflow-wrap:anywhere; }.customer-card-interest small { font-size:10px;color:#958463; }
.customer-card-numbers { display:grid;grid-template-columns:1fr 1fr;gap:10px;background:var(--customer-soft);border-radius:9px;padding:11px;margin:10px 0; }
.customer-card-numbers div { display:flex;flex-direction:column;gap:4px; }
.customer-card-numbers span { color:#7a879b;font-size:11px; }
.customer-card-numbers strong { color:var(--customer-accent);font-size:16px;line-height:1.5;overflow-wrap:anywhere; }
.customer-card-date { text-align:left;font-size:11px;color:#97a2b3;margin-top:auto!important;padding-top:8px; }
.customer-no-history { font-size:12px;color:#95a0b0;background:#f8fafc;padding:12px 10px;border-radius:9px;margin:10px 0!important; }
.customer-simple-empty { grid-column:1/-1;text-align:center;padding:45px 15px;color:#8b97a9;font-size:14px; }
.customer-simple-status { font-size:12px;line-height:1.8;color:#9b782e;background:#fffaf0;border:1px solid #f0e1bb;border-radius:8px;padding:9px 12px;margin-bottom:15px!important; }
.customer-pagination { display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:16px 0;color:var(--customer-accent);font-size:12px; }
.customer-pagination:last-child { margin-bottom:0;padding-top:14px;border-top:1px solid var(--customer-line); }
.customer-pagination>div { display:flex;align-items:center;gap:10px; }.customer-pagination [data-customer-page-position] { direction:ltr;min-width:50px;text-align:center;font:700 12px Arial,sans-serif; }
.customer-pagination button { font:700 12px Cairo,Tajawal,Arial,sans-serif;min-height:42px;padding:8px 18px;border:1px solid var(--customer-line);border-radius:9px;background:var(--customer-soft);color:var(--customer-accent);cursor:pointer;transition:background-color .2s,transform .2s; }
.customer-pagination button:hover:not(:disabled) { background:var(--customer-accent);color:#fff; }.customer-pagination button:disabled { opacity:.4;cursor:default; }
.customer-app-switch { width:min(460px,100%);display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:5px;margin:0 auto 18px;border:1px solid #e3e8f2;border-radius:16px;background:#fff;box-shadow:0 4px 16px #233b6006; }
.customer-app-switch button { --customer-accent:var(--customer-brand);min-width:0;min-height:60px;border:1px solid var(--customer-brand-line);border-radius:12px;padding:9px 14px;cursor:pointer;background:var(--customer-brand-soft);color:var(--customer-brand);display:flex;align-items:center;justify-content:center;gap:10px;font-family:Cairo,Tajawal,Arial,sans-serif;font-size:11px;font-weight:700;transition:background-color .22s,color .22s,box-shadow .22s,transform .22s; }
.customer-switch-wordmark { font:800 22px/1.2 'Trebuchet MS',Arial,sans-serif;direction:ltr;letter-spacing:-.6px; }
.customer-app-switch button[data-open-customer-app=talabat] { --customer-brand:#e54e00;--customer-brand-soft:#fff1e6;--customer-brand-line:#ffd4b5; }
.customer-app-switch button[data-open-customer-app=instashop] { --customer-brand:#db176e;--customer-brand-soft:#fff0f6;--customer-brand-line:#f8cde0; }
.customer-app-switch button[aria-pressed=true] { color:#fff;background:var(--customer-brand);border-color:var(--customer-brand);box-shadow:0 3px 9px #20355018; }
.customer-app-switch button:hover { transform:translateY(-1px); }
.customer-symbol,.customer-nav-icon { position:relative;display:inline-block;width:18px;height:18px;flex:0 0 18px; }
.customer-symbol::before,.customer-symbol::after,.customer-nav-icon::before,.customer-nav-icon::after { content:"";position:absolute;box-sizing:border-box; }
.customer-symbol-person::before { width:7px;height:7px;left:13px;top:6px;border:2px solid currentColor;border-radius:50%; }
.customer-symbol-person::after { width:16px;height:10px;left:9px;top:17px;border:2px solid currentColor;border-radius:8px 8px 2px 2px; }
.customer-nav-icon { width:34px;height:34px;flex-basis:34px;border-radius:11px;background:var(--customer-page-soft,#e8efff);color:var(--customer-page-accent,#245ac7); }
.customer-nav-icon::before { width:22px;height:24px;left:7px;top:5px;border:2px solid currentColor;border-radius:4px;background:linear-gradient(90deg,currentColor 2px,transparent 2px) 3px 0/2px 100% no-repeat; }.customer-nav-icon::after { width:8px;height:2px;left:14px;top:12px;background:currentColor;box-shadow:0 5px currentColor,0 10px currentColor; }
#app-sidebar .nav-item[data-target=customers-tab].active { background:#eaf1ff!important;color:#245ac7!important; }
#app-sidebar .nav-item[data-target=customers-tab].active::before { background:#245ac7; }
.customer-directory :focus-visible,.customer-app-directory :focus-visible,.customer-section-nav button:focus-visible { outline:3px solid var(--customer-accent,#245ac7);outline-offset:3px; }
.customer-section-nav button:focus:not(:focus-visible),.customer-app-switch button:focus:not(:focus-visible) { outline:none; }
body:has(#customers-tab.active[data-customer-theme=online]) { background:#f3f6fd; }
body:has(#customers-tab.active[data-customer-theme=store]) { background:#f6f1fc; }
body:has(#customers-tab.active[data-customer-theme=gifts]) { background:#f0faf6; }
body:has(#customers-tab.active[data-customer-theme=talabat]) { background:#fff3e8; }
body:has(#customers-tab.active[data-customer-theme=instashop]) { background:#fff0f6; }
body:has(#customers-tab.active) { transition:background-color .32s ease; }
#customers-tab { --customer-page-accent:#245ac7;--customer-page-soft:#edf3ff;--customer-page-line:#dce6f6;--customer-accent:var(--customer-page-accent);overflow-x:clip; }
#customers-tab[data-customer-theme=store] { --customer-page-accent:#7951ab;--customer-page-soft:#f4effb;--customer-page-line:#e7d9f4; }
#customers-tab[data-customer-theme=gifts] { --customer-page-accent:#087e74;--customer-page-soft:#e9f7f3;--customer-page-line:#c8e9df; }
#customers-tab[data-customer-theme=talabat] { --customer-page-accent:#e54e00;--customer-page-soft:#fff1e6;--customer-page-line:#ffd4b5; }
#customers-tab[data-customer-theme=instashop] { --customer-page-accent:#db176e;--customer-page-soft:#fff0f6;--customer-page-line:#f8cde0; }
#customers-tab .customer-base-title { color:var(--customer-page-accent);transition:color .25s; }
#customers-tab:is([data-customer-theme=talabat],[data-customer-theme=instashop]) .customer-section-nav button { --section-accent:var(--customer-page-accent);--section-soft:var(--customer-page-soft);border-color:var(--customer-page-line);color:var(--customer-page-accent); }
#customers-tab:is([data-customer-theme=talabat],[data-customer-theme=instashop]) .customer-simple-status { background:var(--customer-soft);border-color:var(--customer-line);color:var(--customer-accent); }
#customers-tab:is([data-customer-theme=talabat],[data-customer-theme=instashop]) :is(.customer-simple-count,.customer-no-history) { background:var(--customer-soft);color:var(--customer-accent); }
#customers-tab:is([data-customer-theme=talabat],[data-customer-theme=instashop]) .customer-simple-header { border-color:var(--customer-line); }
.customer-panel-enter { animation:customerPanelIn .38s cubic-bezier(.16,1,.3,1) both; }
@keyframes customerPanelIn { from { opacity:0;transform:translateX(var(--customer-enter-x,18px)) translateY(5px); } to { opacity:1;transform:translateX(0) translateY(0); } }
@keyframes customerPanelFade { from { opacity:0; } to { opacity:1; } }
@keyframes customerSpin { to { transform:rotate(360deg); } }

/* =========================================================
   Quick Customer & Order Modal (Pure CSS & FontAwesome)
   ========================================================= */
.quick-customer-modal-backdrop { position:fixed;inset:0;background:rgba(15,23,42,0.65);backdrop-filter:blur(5px);z-index:99999;display:none;align-items:center;justify-content:center;padding:16px;animation:modalFadeIn .25s ease-out; }
.quick-customer-modal-backdrop.is-active { display:flex!important; }
.quick-customer-modal-backdrop[hidden], .quick-customer-modal-backdrop.is-hidden { display:none!important; }
@keyframes modalFadeIn { from { opacity:0; } to { opacity:1; } }

.quick-customer-modal-dialog { width:100%;max-width:580px;max-height:88vh;background:#fff;border-radius:18px;box-shadow:0 20px 45px -10px rgba(15,23,42,0.3);overflow-y:auto;display:flex;flex-direction:column;border:1px solid #e2e8f0;font-family:Cairo,Tajawal,Arial,sans-serif; }
.quick-customer-modal-header { padding:16px 20px;border-bottom:1px solid #f1f5f9;display:flex;align-items:center;justify-content:space-between;gap:12px;background:linear-gradient(180deg,#fafcff,#fff); }
.quick-customer-modal-header .modal-title-box { display:flex;align-items:center;gap:12px; }
.quick-customer-modal-header .modal-icon { width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#e54e00,#ff6f1f);color:#fff;display:flex;align-items:center;justify-content:center;font-size:16px;box-shadow:0 4px 10px rgba(229,78,0,0.22); }
.quick-customer-modal-header h3 { margin:0;font-size:17px;font-weight:800;color:#1e293b; }
.quick-customer-modal-header .modal-subtitle { margin:2px 0 0;font-size:11.5px;color:#64748b; }
.quick-modal-close-btn { width:32px;height:32px;border:none;border-radius:9px;background:#f1f5f9;color:#64748b;font-size:20px;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s; }
.quick-modal-close-btn:hover { background:#fee2e2;color:#ef4444; }

.quick-customer-modal-form { padding:18px 20px;display:flex;flex-direction:column;gap:14px; }
.form-row-platforms { display:flex;flex-direction:column;gap:6px; }
.form-label { font-size:12.5px;font-weight:800;color:#334155;display:flex;align-items:center;gap:4px; }
.required-star { color:#ef4444; }

.quick-platform-toggle { display:flex;gap:8px; }
.platform-btn { flex:1;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:9px 12px;border-radius:11px;font-family:inherit;font-size:12.5px;font-weight:700;border:1px solid #cbd5e1;background:#fff;color:#64748b;cursor:pointer;transition:all .2s ease; }
.platform-btn:hover { border-color:#94a3b8;background:#f8fafc; }
.platform-btn[data-platform=talabat].is-active { background:#e54e00;color:#fff;border-color:#e54e00;box-shadow:0 3px 8px rgba(229,78,0,0.25); }
.platform-btn[data-platform=instashop].is-active { background:#db176e;color:#fff;border-color:#db176e;box-shadow:0 3px 8px rgba(219,23,110,0.25); }
.platform-btn[data-platform=store].is-active { background:#7951ab;color:#fff;border-color:#7951ab;box-shadow:0 3px 8px rgba(121,81,171,0.25); }
.platform-btn[data-platform=online].is-active { background:#245ac7;color:#fff;border-color:#245ac7;box-shadow:0 3px 8px rgba(36,90,199,0.25); }

.form-grid-2 { display:grid;grid-template-columns:1fr 1fr;gap:12px; }
.form-group { display:flex;flex-direction:column;gap:5px; }
.form-input-wrap { position:relative;display:flex;align-items:center; }
.form-input-wrap .input-icon { position:absolute;right:12px;color:#94a3b8;font-size:13px;pointer-events:none; }
.form-input-wrap .form-control { width:100%;height:40px;border:1px solid #cbd5e1;border-radius:10px;padding:8px 34px 8px 12px;font-family:inherit;font-size:13px;color:#1e293b;background:#fff;transition:border-color .2s,box-shadow .2s; }
.form-input-wrap .form-control:focus { outline:none;border-color:#e54e00;box-shadow:0 0 0 3px rgba(229,78,0,0.15); }

.form-group-categories { display:flex;flex-direction:column;gap:4px; }
.category-select-help { margin:0 0 4px;font-size:11px;color:#64748b; }
.quick-category-grid { display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin-top:2px; }
.quick-cat-card { display:inline-flex;align-items:center;gap:8px;padding:8px 11px;border-radius:10px;border:1.5px solid #e2e8f0;background:#f8fafc;cursor:pointer;font-family:inherit;font-size:11.5px;font-weight:700;color:#334155;transition:all .2s ease;text-align:right;min-height:38px; }
.quick-cat-card .cat-icon-wrap { font-size:13px;width:26px;height:26px;border-radius:7px;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0.05);flex:0 0 26px; }
.quick-cat-card:hover { border-color:#94a3b8;background:#f1f5f9;transform:translateY(-1px); }
.quick-cat-card.is-selected { box-shadow:0 3px 8px rgba(0,0,0,0.12);transform:translateY(-1px); }

/* Category Active Styling with Pure White Text & High Contrast */
.quick-cat-card.cat--chocolates.is-selected { background:#78350f!important;color:#fff!important;border-color:#78350f!important; }
.quick-cat-card.cat--candy.is-selected { background:#db2777!important;color:#fff!important;border-color:#db2777!important; }
.quick-cat-card.cat--crackers_biscuits.is-selected { background:#b45309!important;color:#fff!important;border-color:#b45309!important; }
.quick-cat-card.cat--snacks.is-selected { background:#c2410c!important;color:#fff!important;border-color:#c2410c!important; }
.quick-cat-card.cat--coffee.is-selected { background:#451a03!important;color:#fff!important;border-color:#451a03!important; }
.quick-cat-card.cat--drinks.is-selected { background:#0284c7!important;color:#fff!important;border-color:#0284c7!important; }
.quick-cat-card.cat--noodles.is-selected { background:#b91c1c!important;color:#fff!important;border-color:#b91c1c!important; }
.quick-cat-card.cat--kitchen_cheese.is-selected { background:#4d7c0f!important;color:#fff!important;border-color:#4d7c0f!important; }
.quick-cat-card.cat--ice_cream.is-selected { background:#7c3aed!important;color:#fff!important;border-color:#7c3aed!important; }
.quick-cat-card.cat--gift_supplies.is-selected { background:#0f766e!important;color:#fff!important;border-color:#0f766e!important; }
.quick-cat-card.is-selected .cat-icon-wrap { background:rgba(255,255,255,0.25)!important;color:#fff!important; }

.quick-modal-status { padding:9px 12px;border-radius:9px;font-size:12px;font-weight:700;line-height:1.5;text-align:center; }
.quick-modal-status.is-error { background:#fef2f2;border:1px solid #fecaca;color:#b91c1c; }
.quick-modal-status.is-success { background:#ecfdf5;border:1px solid #a7f3d0;color:#047857; }

.quick-customer-modal-footer { display:flex;align-items:center;justify-content:flex-end;gap:10px;padding-top:10px;border-top:1px solid #f1f5f9;margin-top:2px; }
.quick-customer-modal-footer .btn-cancel { padding:9px 18px;border:1px solid #cbd5e1;background:#fff;color:#64748b;border-radius:10px;font-family:inherit;font-size:12.5px;font-weight:700;cursor:pointer;transition:all .2s; }
.quick-customer-modal-footer .btn-cancel:hover { background:#f8fafc;color:#1e293b;border-color:#94a3b8; }
.quick-customer-modal-footer .btn-save { padding:9px 20px;border:none;background:linear-gradient(135deg,#059669,#10b981);color:#fff;border-radius:10px;font-family:inherit;font-size:12.5px;font-weight:800;cursor:pointer;display:inline-flex;align-items:center;gap:7px;box-shadow:0 3px 10px rgba(16,185,129,0.25);transition:all .2s; }
.quick-customer-modal-footer .btn-save:hover { filter:brightness(1.05);transform:translateY(-1px);box-shadow:0 5px 14px rgba(16,185,129,0.32); }
.quick-customer-modal-footer .btn-save:disabled { opacity:.6;cursor:not-allowed;transform:none; }

@media(max-width:700px) {
 .customer-base-heading { gap:9px;margin-bottom:14px; }.customer-base-title { font-size:22px; }
 .customer-section-nav { grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px; }.customer-section-nav button { min-height:58px;gap:8px;padding:9px;font-size:12px;border-radius:12px; }.customer-section-mark { width:32px;height:32px;flex-basis:32px;border-radius:10px; }
 .customer-kpi-grid { grid-template-columns:1fr 1fr;gap:8px; }
 .customer-directory { padding:15px;border-radius:13px; }.customer-simple-header { gap:10px; }.customer-simple-header h2 { font-size:20px; }
 .customer-simple-cards { grid-template-columns:1fr;gap:12px; }.customer-simple-card { padding:16px; }
 .customer-app-switch { gap:4px;padding:4px;border-radius:13px; }.customer-app-switch button { min-height:55px;padding:8px;gap:4px;flex-direction:column;font-size:10px; }.customer-switch-wordmark { font-size:20px; }
 .customer-pagination { justify-content:center;font-size:11px; }.customer-pagination>span { width:100%;text-align:center; }.customer-pagination button { min-height:44px; }
 .quick-platform-toggle { grid-template-columns:1fr;gap:6px; }
 .form-grid-2 { grid-template-columns:1fr;gap:10px; }
 .quick-category-grid { grid-template-columns:1fr; }
}
@media(prefers-reduced-motion:reduce) {
 .customer-panel-enter { animation:customerPanelFade .22s ease-out both!important; }
 .customer-loading::before { animation:none!important; }
 .customer-tab-indicator,.customer-section-nav button,.customer-app-switch button,.customer-pagination button,#customers-tab .customer-base-title,body:has(#customers-tab.active) { transition:background-color .18s ease,color .18s ease,border-color .18s ease!important; }
 .customer-section-nav button:hover,.customer-app-switch button:hover { transform:none; }
}

