/* ==========================================================================
   Merket POS & Store — Design System (mapp.sa Spec Aligned)
   Offline-First, Zero External Dependencies, High-Readability Arabic Typography
   ========================================================================== */

:root {
    color-scheme: dark;
    --bg: #0b0a1a;
    --s1: #13122a;
    --s2: #1b1a38;
    --ink: #f1f0ff;
    --mut: #9b99c4;
    --line: rgba(255, 255, 255, 0.09);
    --a: #7c5cff;
    --b: #22d3ee;
    --c: #ff5ca8;
    --grad: linear-gradient(120deg, #7c5cff, #22d3ee);
    --grad2: linear-gradient(120deg, #ff5ca8, #7c5cff);

    /* Design Tokens — Colors */
    --color-primary: #7c5cff;
    --color-primary-hover: #6a4bff;
    --color-primary-light: rgba(124, 92, 255, 0.15);
    --color-primary-50: rgba(124, 92, 255, 0.08);
    --color-primary-100: rgba(124, 92, 255, 0.18);
    --color-secondary: #22d3ee;
    --color-secondary-hover: #06b6d4;
    --color-secondary-light: rgba(34, 211, 238, 0.15);
    --color-text: #f1f0ff;
    --color-text-muted: #9b99c4;
    --color-bg: #0b0a1a;
    --color-bg-alt: #13122a;
    --color-border: rgba(255, 255, 255, 0.09);
    --color-border-hover: rgba(255, 255, 255, 0.2);
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #22d3ee;

    /* Legacy Tailwind Palette aliases for compatibility */
    --font-sans: 'Almarai', 'Cairo', 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --primary-50: rgba(124, 92, 255, 0.08);
    --primary-100: rgba(124, 92, 255, 0.18);
    --primary-500: #7c5cff;
    --primary-600: #6a4bff;
    --primary-700: #5833eb;
    --emerald-50: rgba(16, 185, 129, 0.08);
    --emerald-100: rgba(16, 185, 129, 0.18);
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --rose-50: rgba(244, 63, 94, 0.08);
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --amber-50: rgba(245, 158, 11, 0.08);
    --amber-500: #f59e0b;
    --amber-600: #d97706;

    /* Typography */
    --font-family-ar: 'Almarai', 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-size-hero: clamp(2rem, 4vw, 3.25rem);
    /* H1 */
    --font-size-h2: clamp(1.5rem, 3vw, 2.25rem);
    --font-size-h3: 1.5rem;
    --font-size-body: 1rem;
    /* 16px */
    --font-size-small: 0.875rem;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;
    --font-weight-black: 900;
    --line-height-body: 1.7;
    /* Arabic readability */

    /* Spacing (8px scale) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 32px;
    --space-6: 48px;
    --space-7: 80px;
    --section-padding-y: 80px;

    /* Layout */
    --container-max: 1200px;
    --container-padding: 16px;

    /* Shape */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-btn: 8px;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, .35);
    --shadow-hover: 0 12px 30px rgba(0, 0, 0, .50);

    /* Breakpoints */
    --bp-sm: 576px;
    --bp-md: 768px;
    --bp-lg: 992px;
    --bp-xl: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    font-family: var(--font-sans);
    background-color: #0b0a1a !important;
    color: #f1f0ff !important;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Common Layout Elements */
.container {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.grid {
    display: grid;
}

.hidden {
    display: none !important;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.flex-row {
    flex-direction: row;
}

.flex-col {
    flex-direction: column;
}

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

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

.justify-start {
    justify-content: flex-start;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.w-full {
    width: 100%;
}

.w-auto {
    width: auto;
}

.w-12 {
    width: 3rem;
}

.h-12 {
    height: 3rem;
}

.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

.w-8 {
    width: 2rem;
}

.h-8 {
    height: 2rem;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.h-full {
    height: 100%;
}

.min-h-screen {
    min-height: 100vh;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-lg {
    max-width: 32rem;
}

.max-w-xl {
    max-width: 36rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-6xl {
    max-width: 72rem;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-5 {
    padding: 1.25rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-1\.5 {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-2\.5 {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.pt-2 {
    padding-top: 0.5rem;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.pb-20 {
    padding-bottom: 5rem;
}

.m-0 {
    margin: 0;
}

.my-2 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.my-4 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Colors & Backgrounds */
.bg-white {
    background-color: #ffffff;
}

.bg-slate-50 {
    background-color: #f8fafc;
}

.bg-slate-100 {
    background-color: #f1f5f9;
}

.bg-slate-200 {
    background-color: #e2e8f0;
}

.bg-slate-800 {
    background-color: #1e293b;
}

.bg-slate-900 {
    background-color: #0f172a;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-blue-100 {
    background-color: #dbeafe;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.bg-blue-700 {
    background-color: #1d4ed8;
}

.bg-emerald-50 {
    background-color: #ecfdf5;
}

.bg-emerald-100 {
    background-color: #d1fae5;
}

.bg-emerald-500 {
    background-color: #10b981;
}

.bg-emerald-600 {
    background-color: #059669;
}

.bg-emerald-700 {
    background-color: #047857;
}

.bg-emerald-800 {
    background-color: #065f46;
}

.bg-amber-50 {
    background-color: #fffbeb;
}

.bg-amber-100 {
    background-color: #fef3c7;
}

.bg-amber-500 {
    background-color: #f59e0b;
}

.bg-amber-600 {
    background-color: #d97706;
}

.bg-rose-50 {
    background-color: #fff1f2;
}

.bg-rose-100 {
    background-color: #ffe4e6;
}

.bg-rose-600 {
    background-color: #e11d48;
}

.bg-purple-50 {
    background-color: #faf5ff;
}

.bg-purple-100 {
    background-color: #f3e8ff;
}

.bg-purple-600 {
    background-color: #9333ea;
}

.bg-indigo-50 {
    background-color: #eef2ff;
}

.bg-indigo-600 {
    background-color: #4f46e5;
}

/* Text */
.text-white {
    color: #ffffff;
}

.text-slate-400 {
    color: #94a3b8;
}

.text-slate-500 {
    color: #64748b;
}

.text-slate-600 {
    color: #475569;
}

.text-slate-700 {
    color: #334155;
}

.text-slate-800 {
    color: #1e293b;
}

.text-slate-900 {
    color: #0f172a;
}

.text-blue-600 {
    color: #2563eb;
}

.text-blue-700 {
    color: #1d4ed8;
}

.text-emerald-600 {
    color: #059669;
}

.text-emerald-700 {
    color: #047857;
}

.text-amber-600 {
    color: #d97706;
}

.text-amber-700 {
    color: #b45309;
}

.text-rose-600 {
    color: #e11d48;
}

.text-rose-700 {
    color: #be123c;
}

.text-purple-600 {
    color: #9333ea;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-black {
    font-weight: 900;
}

.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.text-center {
    text-align: center;
}

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

.text-left {
    text-align: left;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Borders & Rounded */
.border {
    border: 1px solid #e2e8f0;
}

.border-2 {
    border: 2px solid #e2e8f0;
}

.border-b {
    border-bottom: 1px solid #e2e8f0;
}

.border-t {
    border-top: 1px solid #e2e8f0;
}

.border-l {
    border-left: 1px solid #e2e8f0;
}

.border-r {
    border-right: 1px solid #e2e8f0;
}

.border-dashed {
    border-style: dashed;
}

.border-slate-200 {
    border-color: #e2e8f0;
}

.border-slate-300 {
    border-color: #cbd5e1;
}

.border-blue-200 {
    border-color: #bfdbfe;
}

.border-blue-500 {
    border-color: #3b82f6;
}

.border-emerald-300 {
    border-color: #6ee7b7;
}

.border-emerald-500 {
    border-color: #10b981;
}

.border-amber-300 {
    border-color: #fcd34d;
}

.border-rose-300 {
    border-color: #fca5a5;
}

.rounded-none {
    border-radius: 0;
}

.rounded-sm {
    border-radius: 0.125rem;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-3xl {
    border-radius: 1.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Shadows */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.shadow {
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* Mapp Design System Component Specifications */
.mapp-btn-primary,
.btn-brand {
    background-color: var(--color-primary);
    color: #ffffff !important;
    padding: 12px 28px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
}

.mapp-btn-primary:hover,
.btn-brand:hover {
    background-color: var(--color-primary-hover);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.mapp-btn-outline,
.btn-outline {
    background-color: transparent;
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary) !important;
    padding: 12px 28px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
}

.mapp-btn-outline:hover,
.btn-outline:hover {
    background-color: var(--color-primary-light);
    color: var(--color-primary-hover) !important;
}

.mapp-link {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.15s, transform 0.15s;
}

.mapp-link:hover {
    opacity: 0.85;
    transform: translateX(-4px);
}

/* Store Showcase Cards */
.store-card {
    background-color: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

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

/* Pricing Card & Toggles */
.pricing-card {
    background-color: var(--color-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.25s ease;
}

.pricing-card.featured {
    border: 2px solid var(--color-primary);
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(5, 150, 105, 0.12);
}

.pricing-card .price-old {
    text-decoration: line-through;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.pricing-card .price-new {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--color-text);
    line-height: 1.1;
}

.pricing-toggle {
    display: inline-flex;
    background-color: #f1f5f9;
    padding: 4px;
    border-radius: 9999px;
    border: 1px solid var(--color-border);
}

.pricing-toggle-btn {
    padding: 8px 24px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--color-text-muted);
}

.pricing-toggle-btn.active {
    background-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Feature Rows (Alternating Layout) */
.feature-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    align-items: center;
    margin-bottom: var(--space-7);
}

@media (min-width: 768px) {
    .feature-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Stat Box */
.stat-box {
    text-align: center;
    padding: var(--space-4);
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1.1;
    margin-bottom: var(--space-2);
}

.stat-desc {
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
    font-weight: 600;
}

/* Logical spacing utilities */
.ms-auto {
    margin-inline-start: auto;
}

.me-auto {
    margin-inline-end: auto;
}

.ps-4 {
    padding-inline-start: 1rem;
}

.pe-4 {
    padding-inline-end: 1rem;
}

/* Buttons & Interactive Elements */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    line-height: 1.25rem;
    user-select: none;
}

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

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

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-success {
    background-color: #059669;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #047857;
}

.btn-danger {
    background-color: #e11d48;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #be123c;
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

.btn-amber {
    background-color: #d97706;
    color: #ffffff;
}

.btn-amber:hover {
    background-color: #b45309;
}

/* Inputs & Form Controls */
.input,
.select,
.textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background-color: #ffffff;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.input-lg {
    font-size: 1.125rem;
    padding: 0.875rem 1.25rem;
    border-radius: 1rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-blue {
    background-color: #eff6ff;
    color: #1d4ed8;
}

.badge-green {
    background-color: #ecfdf5;
    color: #047857;
}

.badge-amber {
    background-color: #fffbeb;
    color: #b45309;
}

.badge-red {
    background-color: #fff1f2;
    color: #be123c;
}

.badge-slate {
    background-color: #f1f5f9;
    color: #475569;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 0.75rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
}

table.table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 0.875rem;
}

table.table th {
    background-color: #f8fafc;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

table.table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

table.table tr:hover td {
    background-color: #f8fafc;
}

/* Cards */
.card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
}

/* Modals & Overlays */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.modal-box {
    background-color: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}

/* Responsive Grid Utilities */
.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

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

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

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sm\:flex-row {
        flex-direction: row;
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .md\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .md\:flex {
        display: flex !important;
    }

    .md\:hidden {
        display: none !important;
    }

    .md\:block {
        display: block !important;
    }

    .md\:w-auto {
        width: auto;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lg\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .lg\:grid-cols-6 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* POS Specific Responsive Styling */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    height: calc(100vh - 4.5rem);
}

@media (min-width: 1024px) {
    .pos-layout {
        grid-template-columns: 1fr 400px;
    }
}

@media (min-width: 1280px) {
    .pos-layout {
        grid-template-columns: 1fr 440px;
    }
}

/* Mobile Bottom Sheet Modal for Checkout */
@media (max-width: 767px) {
    .mobile-bottom-sheet {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        border-top-left-radius: 1.5rem !important;
        border-top-right-radius: 1.5rem !important;
        max-height: 85vh !important;
        width: 100% !important;
        animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .modal-overlay.mobile-sheet-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* 80mm Thermal Receipt Styling */
.receipt-80mm {
    width: 80mm;
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
    padding: 12px;
    font-size: 11px;
    line-height: 1.4;
    color: #000000;
    font-family: var(--font-sans);
}

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

    .receipt-print-area,
    .receipt-print-area * {
        visibility: visible;
    }

    .receipt-print-area {
        position: fixed;
        left: 0;
        top: 0;
        width: 80mm;
        margin: 0;
        padding: 4mm;
    }

    .no-print {
        display: none !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}



/* ==========================================================================
   MERKET FIGMA DESIGN SYSTEM — EXACT TOKENS, UTILITIES & ESCAPED CLASSES
   ========================================================================== */

/* Design Tokens */
:root {
    --merket-emerald: #087F6D;
    --merket-emerald-hover: #066B5C;
    --merket-emerald-light: #E8F5F0;
    --merket-blue: #315FBA;
    --merket-blue-light: #EDF3FF;
    --merket-amber: #A56618;
    --merket-amber-light: #FFF4E4;
    --merket-dark: #172C42;
    --merket-card-title: #53697D;
    --merket-muted: #687B8E;
    --merket-placeholder: #81909F;
    --merket-canvas: #F6F8FA;
    --merket-border: #E3EAF0;
    --merket-input-border: #DCE5ED;
    --merket-tab-bg: #EAF0F3;
    --merket-danger: #B53030;
    --merket-danger-light: #FEECEC;
}

/* Dedicated Design System Component Classes */
.merket-kpi-card {
    background-color: #FFFFFF !important;
    border: 1px solid #E3EAF0 !important;
    border-radius: 16px !important;
    padding: 24px !important;
    min-height: 190px !important;
    box-shadow: 0px 3px 8px rgba(20, 43, 64, 0.025) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.merket-kpi-badge {
    width: 40px !important;
    height: 40px !important;
    border-radius: 11px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.merket-kpi-badge.emerald {
    background-color: #E8F5F0 !important;
    color: #087F6D !important;
}

.merket-kpi-badge.blue {
    background-color: #EDF3FF !important;
    color: #315FBA !important;
}

.merket-kpi-badge.amber {
    background-color: #FFF4E4 !important;
    color: #A56618 !important;
}

.merket-kpi-badge.danger {
    background-color: #FEECEC !important;
    color: #B53030 !important;
}

.merket-kpi-title {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    color: #53697D !important;
    line-height: 26px !important;
}

.merket-kpi-value {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 35px !important;
    line-height: 56px !important;
    letter-spacing: -0.02em !important;
}

.merket-kpi-muted {
    font-family: 'Cairo', sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #687B8E !important;
    line-height: 24px !important;
}

.merket-segment-bar {
    height: 62px !important;
    background-color: #EAF0F3 !important;
    border-radius: 12px !important;
    padding: 6px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    overflow-x: auto !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.merket-segment-tab {
    height: 48px !important;
    padding: 0 20px !important;
    border-radius: 9px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
    border: none !important;
    cursor: pointer !important;
}

.merket-segment-tab.active {
    background-color: #FFFFFF !important;
    color: #087F6D !important;
    box-shadow: 0 2px 5px rgba(20, 43, 64, 0.07) !important;
}

.merket-segment-tab:not(.active) {
    background-color: transparent !important;
    color: #687B8E !important;
}

.merket-segment-tab:not(.active):hover {
    color: #172C42 !important;
}

.merket-btn-primary {
    height: 48px !important;
    padding: 0 24px !important;
    border-radius: 10px !important;
    background-color: #087F6D !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border: none !important;
    transition: background-color 0.2s ease !important;
    text-decoration: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    cursor: pointer !important;
}

.merket-btn-primary:hover {
    background-color: #066B5C !important;
}

.merket-btn-secondary {
    height: 48px !important;
    padding: 0 24px !important;
    border-radius: 10px !important;
    background-color: #FFFFFF !important;
    color: #172C42 !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    border: 1px solid #DCE5ED !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    cursor: pointer !important;
}

.merket-btn-secondary:hover {
    background-color: #F6F8FA !important;
}

.merket-input {
    height: 56px !important;
    padding: 0 16px !important;
    border-radius: 10px !important;
    background-color: #FFFFFF !important;
    border: 1px solid #DCE5ED !important;
    font-size: 14px !important;
    color: #172C42 !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    width: 100% !important;
}

.merket-input:focus {
    border-color: #087F6D !important;
    box-shadow: 0 0 0 1px #087F6D !important;
}

.merket-card {
    background-color: #FFFFFF !important;
    border: 1px solid #E3EAF0 !important;
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0px 3px 8px rgba(20, 43, 64, 0.025) !important;
}

/* Escaped Tailwind Arbitrary Classes for Seamless Blade Compatibility */
.h-\[48px\] {
    height: 48px !important;
}

.h-\[52px\] {
    height: 52px !important;
}

.h-\[56px\] {
    height: 56px !important;
}

.h-\[62px\] {
    height: 62px !important;
}

.h-\[96px\] {
    height: 96px !important;
}

.min-h-\[190px\] {
    min-height: 190px !important;
}

.min-h-\[96px\] {
    min-height: 96px !important;
}

.rounded-\[7px\] {
    border-radius: 7px !important;
}

.rounded-\[8px\] {
    border-radius: 8px !important;
}

.rounded-\[9px\] {
    border-radius: 9px !important;
}

.rounded-\[10px\] {
    border-radius: 10px !important;
}

.rounded-\[11px\] {
    border-radius: 11px !important;
}

.rounded-\[12px\] {
    border-radius: 12px !important;
}

.rounded-\[14px\] {
    border-radius: 14px !important;
}

.rounded-\[16px\] {
    border-radius: 16px !important;
}

.rounded-\[20px\] {
    border-radius: 20px !important;
}

.w-10 {
    width: 40px !important;
}

.h-10 {
    height: 40px !important;
}

.w-11 {
    width: 44px !important;
}

.h-11 {
    height: 44px !important;
}

.w-8 {
    width: 32px !important;
}

.h-8 {
    height: 32px !important;
}

.w-5 {
    width: 20px !important;
}

.h-5 {
    height: 20px !important;
}

.w-6 {
    width: 24px !important;
}

.h-6 {
    height: 24px !important;
}

.bg-\[\#F6F8FA\] {
    background-color: #F6F8FA !important;
}

.bg-\[\#E8F5F0\] {
    background-color: #E8F5F0 !important;
}

.bg-\[\#EDF3FF\] {
    background-color: #EDF3FF !important;
}

.bg-\[\#FFF4E4\] {
    background-color: #FFF4E4 !important;
}

.bg-\[\#EAF0F3\] {
    background-color: #EAF0F3 !important;
}

.bg-\[\#087F6D\] {
    background-color: #087F6D !important;
}

.bg-\[\#066B5C\] {
    background-color: #066B5C !important;
}

.bg-\[\#FEECEC\] {
    background-color: #FEECEC !important;
}

.bg-\[\#F1F5F9\] {
    background-color: #F1F5F9 !important;
}

.bg-\[\#F8FAFC\] {
    background-color: #F8FAFC !important;
}

.text-\[\#172C42\] {
    color: #172C42 !important;
}

.text-\[\#087F6D\] {
    color: #087F6D !important;
}

.text-\[\#066B5C\] {
    color: #066B5C !important;
}

.text-\[\#315FBA\] {
    color: #315FBA !important;
}

.text-\[\#A56618\] {
    color: #A56618 !important;
}

.text-\[\#53697D\] {
    color: #53697D !important;
}

.text-\[\#687B8E\] {
    color: #687B8E !important;
}

.text-\[\#81909F\] {
    color: #81909F !important;
}

.text-\[\#B53030\] {
    color: #B53030 !important;
}

.stroke-\[\#087F6D\] {
    stroke: #087F6D !important;
}

.stroke-\[\#687B8E\] {
    stroke: #687B8E !important;
}

.stroke-\[\#315FBA\] {
    stroke: #315FBA !important;
}

.border-\[\#E3EAF0\] {
    border-color: #E3EAF0 !important;
}

.border-\[\#DCE5ED\] {
    border-color: #DCE5ED !important;
}

.border-\[\#bfe7d9\] {
    border-color: #bfe7d9 !important;
}

.border-\[\#c6d9fb\] {
    border-color: #c6d9fb !important;
}

.border-\[\#f9dcbb\] {
    border-color: #f9dcbb !important;
}

.text-\[35px\] {
    font-size: 35px !important;
}

.leading-\[56px\] {
    line-height: 56px !important;
}

.text-\[32px\] {
    font-size: 32px !important;
}

.leading-\[53px\] {
    line-height: 53px !important;
}

.leading-\[46px\] {
    line-height: 46px !important;
}

.text-\[21px\] {
    font-size: 21px !important;
}

.leading-\[32px\] {
    line-height: 32px !important;
}

.text-\[20px\] {
    font-size: 20px !important;
}

.text-\[22px\] {
    font-size: 22px !important;
}

.text-\[24px\] {
    font-size: 24px !important;
}

.text-\[26px\] {
    font-size: 26px !important;
}

.text-\[28px\] {
    font-size: 28px !important;
}

.text-\[30px\] {
    font-size: 30px !important;
}

.text-\[13px\] {
    font-size: 13px !important;
}

.text-\[14px\] {
    font-size: 14px !important;
}

.text-\[15px\] {
    font-size: 15px !important;
}

.text-\[16px\] {
    font-size: 16px !important;
}

.text-\[17px\] {
    font-size: 17px !important;
}

.max-w-\[1740px\] {
    max-width: 1740px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.max-w-\[340px\] {
    max-width: 340px !important;
}

.font-inter {
    font-family: 'Inter', system-ui, sans-serif !important;
}

.font-cairo {
    font-family: 'Cairo', system-ui, sans-serif !important;
}


/* Spacing & Flow Utilities */
.space-y-1> :not([hidden])~ :not([hidden]) {
    margin-top: 0.25rem !important;
    margin-bottom: 0 !important;
}

.space-y-2> :not([hidden])~ :not([hidden]) {
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
}

.space-y-3> :not([hidden])~ :not([hidden]) {
    margin-top: 0.75rem !important;
    margin-bottom: 0 !important;
}

.space-y-4> :not([hidden])~ :not([hidden]) {
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
}

.space-y-5> :not([hidden])~ :not([hidden]) {
    margin-top: 1.25rem !important;
    margin-bottom: 0 !important;
}

.space-y-6> :not([hidden])~ :not([hidden]) {
    margin-top: 1.5rem !important;
    margin-bottom: 0 !important;
}

.space-y-7> :not([hidden])~ :not([hidden]) {
    margin-top: 1.75rem !important;
    margin-bottom: 0 !important;
}

.space-y-8> :not([hidden])~ :not([hidden]) {
    margin-top: 2rem !important;
    margin-bottom: 0 !important;
}

.gap-1 {
    gap: 0.25rem !important;
}

.gap-1\.5 {
    gap: 0.375rem !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.gap-2\.5 {
    gap: 0.625rem !important;
}

.gap-3 {
    gap: 0.75rem !important;
}

.gap-3\.5 {
    gap: 0.875rem !important;
}

.gap-4 {
    gap: 1rem !important;
}

.gap-5 {
    gap: 1.25rem !important;
}

.gap-6 {
    gap: 1.5rem !important;
}

.gap-7 {
    gap: 1.75rem !important;
}

.gap-8 {
    gap: 2rem !important;
}

.py-5 {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
}

.py-6 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.py-7 {
    padding-top: 1.75rem !important;
    padding-bottom: 1.75rem !important;
}

.pb-12 {
    padding-bottom: 3rem !important;
}

.pb-16 {
    padding-bottom: 4rem !important;
}

/* 12-Column Grid Utilities */
.grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
}

.col-span-1 {
    grid-column: span 1 / span 1 !important;
}

.col-span-2 {
    grid-column: span 2 / span 2 !important;
}

.col-span-3 {
    grid-column: span 3 / span 3 !important;
}

.col-span-4 {
    grid-column: span 4 / span 4 !important;
}

.col-span-5 {
    grid-column: span 5 / span 5 !important;
}

.col-span-6 {
    grid-column: span 6 / span 6 !important;
}

.col-span-7 {
    grid-column: span 7 / span 7 !important;
}

.col-span-8 {
    grid-column: span 8 / span 8 !important;
}

.col-span-9 {
    grid-column: span 9 / span 9 !important;
}

.col-span-10 {
    grid-column: span 10 / span 10 !important;
}

.col-span-11 {
    grid-column: span 11 / span 11 !important;
}

.col-span-12 {
    grid-column: span 12 / span 12 !important;
}

@media (min-width: 640px) {
    .sm\:grid-cols-12 {
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    }
    .sm\:col-span-1 { grid-column: span 1 / span 1 !important; }
    .sm\:col-span-2 { grid-column: span 2 / span 2 !important; }
    .sm\:col-span-3 { grid-column: span 3 / span 3 !important; }
    .sm\:col-span-4 { grid-column: span 4 / span 4 !important; }
    .sm\:col-span-5 { grid-column: span 5 / span 5 !important; }
    .sm\:col-span-6 { grid-column: span 6 / span 6 !important; }
    .sm\:col-span-7 { grid-column: span 7 / span 7 !important; }
    .sm\:col-span-8 { grid-column: span 8 / span 8 !important; }
    .sm\:col-span-9 { grid-column: span 9 / span 9 !important; }
    .sm\:col-span-10 { grid-column: span 10 / span 10 !important; }
    .sm\:col-span-11 { grid-column: span 11 / span 11 !important; }
    .sm\:col-span-12 { grid-column: span 12 / span 12 !important; }
    .sm\:flex-row { flex-direction: row !important; }
    .sm\:items-center { align-items: center !important; }
}

@media (min-width: 768px) {
    .md\:grid-cols-12 {
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    }
    .md\:col-span-1 { grid-column: span 1 / span 1 !important; }
    .md\:col-span-2 { grid-column: span 2 / span 2 !important; }
    .md\:col-span-3 { grid-column: span 3 / span 3 !important; }
    .md\:col-span-4 { grid-column: span 4 / span 4 !important; }
    .md\:col-span-5 { grid-column: span 5 / span 5 !important; }
    .md\:col-span-6 { grid-column: span 6 / span 6 !important; }
    .md\:col-span-7 { grid-column: span 7 / span 7 !important; }
    .md\:col-span-8 { grid-column: span 8 / span 8 !important; }
    .md\:col-span-9 { grid-column: span 9 / span 9 !important; }
    .md\:col-span-10 { grid-column: span 10 / span 10 !important; }
    .md\:col-span-11 { grid-column: span 11 / span 11 !important; }
    .md\:col-span-12 { grid-column: span 12 / span 12 !important; }
    .md\:flex-row { flex-direction: row !important; }
    .md\:items-center { align-items: center !important; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-12 {
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    }
    .lg\:col-span-1 { grid-column: span 1 / span 1 !important; }
    .lg\:col-span-2 { grid-column: span 2 / span 2 !important; }
    .lg\:col-span-3 { grid-column: span 3 / span 3 !important; }
    .lg\:col-span-4 { grid-column: span 4 / span 4 !important; }
    .lg\:col-span-5 { grid-column: span 5 / span 5 !important; }
    .lg\:col-span-6 { grid-column: span 6 / span 6 !important; }
    .lg\:col-span-7 { grid-column: span 7 / span 7 !important; }
    .lg\:col-span-8 { grid-column: span 8 / span 8 !important; }
    .lg\:col-span-9 { grid-column: span 9 / span 9 !important; }
    .lg\:col-span-10 { grid-column: span 10 / span 10 !important; }
    .lg\:col-span-11 { grid-column: span 11 / span 11 !important; }
    .lg\:col-span-12 { grid-column: span 12 / span 12 !important; }

    .lg\:flex-row {
        flex-direction: row !important;
    }

    .lg\:items-center {
        align-items: center !important;
    }
}

[x-cloak] {
    display: none !important;
}

/* Shadows */
.shadow-2xs {
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05) !important;
}

.shadow-xs {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.shadow-sm {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1) !important;
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1) !important;
}

/* =========================================================================
   RESPONSIVE DUAL-MODE NAVIGATION SYSTEM (Figma Design Token Compliant)
   - Large Desktop (>= 1024px): Top Navigation Header Bar prominently visible
   - Mobile & Tablet (< 1024px): Sidebar Drawer prominently visible on trigger
   ========================================================================= */

@media (min-width: 1024px) {

    .merket-desktop-nav,
    .lg\:flex,
    .xl\:flex {
        display: flex !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        align-items: center !important;
    }

    .lg\:hidden,
    .xl\:hidden {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    .merket-desktop-nav {
        display: none !important;
    }
}

/* Nav Item styling for Top Bar matching Dark Luxury Theme */
.merket-nav-link {
    height: 52px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: #9b99c4;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    position: relative;
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    border: none;
    font-family: 'Cairo', 'Almarai', sans-serif;
}

@media (min-width: 1280px) {
    .merket-nav-link {
        padding: 0 14px;
        font-size: 14px;
        gap: 8px;
    }
}

.merket-nav-link:hover {
    background-color: #1b1a38;
    color: #f1f0ff;
}

.merket-nav-link.active {
    background-color: #1b1a38 !important;
    color: #22d3ee !important;
    font-weight: 700 !important;
}

.merket-nav-link.active svg {
    stroke: #22d3ee !important;
}

.merket-nav-link .merket-nav-indicator {
    display: none;
}

.merket-nav-link.active .merket-nav-indicator {
    display: block;
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 2px;
    background: linear-gradient(120deg, #7c5cff, #22d3ee);
    border-radius: 1px;
}

/* Luxury Dark Dropdown Menus for Header Sections */
.merket-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 290px;
    background-color: #13122a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 8px;
    z-index: 60;
}

.merket-dropdown-header {
    padding: 8px 12px 6px;
    font-size: 11px;
    font-weight: 700;
    color: #9b99c4;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.merket-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    color: #f1f0ff;
    background-color: transparent;
}

.merket-dropdown-item:hover {
    background-color: #1b1a38;
    color: #22d3ee;
    transform: translateX(-2px);
}

.merket-dropdown-item.active {
    background-color: #1b1a38 !important;
    color: #22d3ee !important;
}

.merket-dropdown-item.active .dropdown-title {
    color: #22d3ee !important;
    font-weight: 700 !important;
}

.merket-dropdown-item .dropdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background-color: #1b1a38;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.15s ease-in-out;
}

.merket-dropdown-item:hover .dropdown-icon {
    background-color: #25244c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.merket-dropdown-item.active .dropdown-icon {
    background-color: #25244c;
    border-color: #7c5cff;
}

.merket-dropdown-item .dropdown-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #f1f0ff;
    line-height: 20px;
}

.merket-dropdown-item .dropdown-desc {
    font-size: 11px;
    color: #9b99c4;
    line-height: 16px;
}

/* =========================================================================
   HOVER-TRIGGERED DROPDOWN MENUS WITH SMOOTH KEYFRAME ANIMATIONS
   - Dropdowns open instantly on mouse hover without needing a click
   - Invisible bridge (::after) prevents cursor disconnect when moving mouse
   ========================================================================= */

.merket-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Invisible hover bridge connecting trigger button to menu */
.merket-dropdown-wrapper::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    height: 14px;
    background: transparent;
    z-index: 55;
}

@media (min-width: 1024px) {

    /* Initial state for smooth reveal */
    .merket-dropdown-menu {
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px) scale(0.97);
        transform-origin: top right;
        transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
            transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
            visibility 0.22s;
        pointer-events: none;
    }

    /* Hover state: Instant, butter-smooth reveal */
    .merket-dropdown-wrapper:hover .merket-dropdown-menu,
    .merket-dropdown-wrapper:focus-within .merket-dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
        pointer-events: auto !important;
    }

    /* Chevron rotation on hover */
    .merket-dropdown-wrapper:hover .merket-nav-link svg.transition-transform {
        transform: rotate(180deg) !important;
        stroke: #22d3ee !important;
    }

    /* Nav link highlight on hover */
    .merket-dropdown-wrapper:hover .merket-nav-link {
        background-color: #1b1a38 !important;
        color: #f1f0ff !important;
    }

    .merket-dropdown-wrapper:hover .merket-nav-link svg:first-child {
        stroke: #22d3ee !important;
    }
}

/* =========================================================================
   BULLETPROOF MOBILE SLIDE-OVER DRAWER (Independent of Tailwind Runtime)
   ========================================================================= */

.merket-drawer-container {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    overflow: hidden !important;
}

#merket-mobile-drawer[style*="display: none"] {
    display: none !important;
}

@keyframes slideInDrawerRtl {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes fadeInDrawerBackdrop {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.merket-drawer-backdrop {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(5, 4, 15, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 99998 !important;
    animation: fadeInDrawerBackdrop 0.2s ease-out forwards !important;
}

.merket-drawer-panel {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    width: 85vw !important;
    max-width: 340px !important;
    background-color: #13122a !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7) !important;
    z-index: 100000 !important;
    display: flex !important;
    flex-direction: column !important;
    border-left: 1px solid rgba(255, 255, 255, 0.09) !important;
    overflow-y: hidden !important;
    animation: slideInDrawerRtl 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.merket-drawer-close-btn {
    background-color: #1b1a38 !important;
    color: #9b99c4 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.merket-drawer-close-btn:hover {
    background-color: rgba(255, 92, 168, 0.15) !important;
    color: #ff5ca8 !important;
    border-color: #ff5ca8 !important;
}

/* Position utilities to avoid missing classes */
.fixed {
    position: fixed !important;
}

.inset-0 {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
}

.inset-y-0 {
    top: 0 !important;
    bottom: 0 !important;
}

.right-0 {
    right: 0 !important;
}

.left-0 {
    left: 0 !important;
}

.top-0 {
    top: 0 !important;
}

.bottom-0 {
    bottom: 0 !important;
}

.z-50 {
    z-index: 50 !important;
}

.z-40 {
    z-index: 40 !important;
}

/* Dedicated Styles for Top Header Buttons (Logout, Sidebar Toggle) */
.merket-btn-icon-logout {
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background-color: #1b1a38 !important;
    color: #9b99c4 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
    outline: none !important;
}

.merket-btn-icon-logout:hover {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}

.merket-sidebar-btn {
    height: 42px !important;
    padding: 0 16px !important;
    border-radius: 10px !important;
    background-color: #1b1a38 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #22d3ee !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
    outline: none !important;
    font-family: 'Cairo', 'Almarai', sans-serif !important;
}

.merket-sidebar-btn:hover {
    background-color: #25244c !important;
    border-color: #7c5cff !important;
    color: #f1f0ff !important;
}

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

/* Slide-Over Drawer Links */
.merket-drawer-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    height: 44px !important;
    padding: 0 14px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    color: #9b99c4 !important;
    background-color: transparent !important;
    transition: all 0.15s ease-in-out !important;
    font-family: 'Cairo', 'Almarai', sans-serif !important;
}

.merket-drawer-link:hover {
    background-color: #1b1a38 !important;
    color: #f1f0ff !important;
}

.merket-drawer-link.active {
    background-color: #1b1a38 !important;
    color: #22d3ee !important;
    font-weight: 700 !important;
}

/* =========================================================================
   RESPONSIVE UTILITY EXTENSIONS (Flex, Self, Breakpoint Grids)
   ========================================================================= */

.shrink-0 { flex-shrink: 0 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.grow { flex-grow: 1 !important; }
.self-start { align-self: flex-start !important; }
.self-end { align-self: flex-end !important; }
.self-center { align-self: center !important; }
.self-stretch { align-self: stretch !important; }
.self-auto { align-self: auto !important; }

@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row !important; }
    .sm\:flex-col { flex-direction: column !important; }
    .sm\:items-center { align-items: center !important; }
    .sm\:items-start { align-items: flex-start !important; }
    .sm\:justify-between { justify-content: space-between !important; }
    .sm\:justify-start { justify-content: flex-start !important; }
    .sm\:justify-end { justify-content: flex-end !important; }
    .sm\:self-auto { align-self: auto !important; }
    .sm\:self-start { align-self: flex-start !important; }
}

@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row !important; }
    .md\:flex-col { flex-direction: column !important; }
    .md\:items-center { align-items: center !important; }
    .md\:items-start { align-items: flex-start !important; }
    .md\:justify-between { justify-content: space-between !important; }
    .md\:justify-start { justify-content: flex-start !important; }
    .md\:justify-end { justify-content: flex-end !important; }
    .md\:self-auto { align-self: auto !important; }
    .md\:self-start { align-self: flex-start !important; }
}

@media (min-width: 1024px) {
    .lg\:flex-row { flex-direction: row !important; }
    .lg\:flex-col { flex-direction: column !important; }
    .lg\:items-center { align-items: center !important; }
    .lg\:items-start { align-items: flex-start !important; }
    .lg\:justify-between { justify-content: space-between !important; }
    .lg\:self-auto { align-self: auto !important; }
    .lg\:self-start { align-self: flex-start !important; }
}

@media (min-width: 1280px) {
    .xl\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
    .xl\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
    .xl\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
    .xl\:flex-row { flex-direction: row !important; }
}

@media (min-width: 1536px) {
    .2xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .2xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}

/* =========================================================================
   COMPREHENSIVE DARK THEME UTILITIES & OVERRIDES (STRICTLY SCOPED)
   ========================================================================= */

html.dark body,
body.theme-dark,
[data-theme="dark"] body {
    background-color: #0b0a1a !important;
    color: #f1f0ff !important;
}

html.dark .bg-white,
html.dark [class*="bg-white"],
html.dark .merket-card,
html.dark .merket-panel,
html.dark .merket-kpi-card,
body.theme-dark .bg-white,
[data-theme="dark"] .bg-white {
    background-color: #13122a !important;
    color: #f1f0ff !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

html.dark .bg-\[\#F6F8FA\],
html.dark .bg-\[\#F8FAFC\],
html.dark .bg-slate-50,
html.dark .bg-gray-50,
html.dark .bg-slate-100,
body.theme-dark .bg-\[\#F6F8FA\],
[data-theme="dark"] .bg-\[\#F6F8FA\] {
    background-color: #0b0a1a !important;
}

html.dark .bg-\[\#EAF0F3\],
html.dark .bg-\[\#F0F4F7\],
body.theme-dark .bg-\[\#EAF0F3\],
[data-theme="dark"] .bg-\[\#EAF0F3\] {
    background-color: #1b1a38 !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

html.dark .text-\[\#172C42\],
html.dark .text-slate-800,
html.dark .text-gray-900,
html.dark .text-slate-900,
html.dark .text-gray-800,
body.theme-dark .text-\[\#172C42\],
[data-theme="dark"] .text-\[\#172C42\] {
    color: #f1f0ff !important;
}

html.dark .text-\[\#687B8E\],
html.dark .text-\[\#81909F\],
html.dark .text-\[\#53697D\],
html.dark .text-slate-500,
html.dark .text-gray-500,
html.dark .text-slate-400,
body.theme-dark .text-\[\#687B8E\],
[data-theme="dark"] .text-\[\#687B8E\] {
    color: #9b99c4 !important;
}

html.dark .text-\[\#087F6D\],
body.theme-dark .text-\[\#087F6D\],
[data-theme="dark"] .text-\[\#087F6D\] {
    color: #22d3ee !important;
}

html.dark .border-\[\#E3EAF0\],
html.dark .border-\[\#DCE5ED\],
html.dark .border-slate-200,
html.dark .border-gray-200,
html.dark .border-slate-100,
html.dark .border-gray-100,
html.dark .border-\[\#bfe7d9\],
body.theme-dark .border-\[\#E3EAF0\],
[data-theme="dark"] .border-\[\#E3EAF0\] {
    border-color: rgba(255, 255, 255, 0.09) !important;
}

html.dark input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html.dark select,
html.dark textarea,
body.theme-dark input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
body.theme-dark select,
body.theme-dark textarea,
[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: #1b1a38 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f1f0ff !important;
}

html.dark input:not([type="checkbox"]):not([type="radio"]):focus,
html.dark select:focus,
html.dark textarea:focus,
body.theme-dark input:focus,
[data-theme="dark"] input:focus {
    border-color: #7c5cff !important;
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25) !important;
    outline: none !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder,
[data-theme="dark"] input::placeholder {
    color: #6d6b99 !important;
}

html.dark table,
[data-theme="dark"] table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

html.dark thead,
html.dark thead tr,
html.dark thead th,
[data-theme="dark"] thead th {
    background-color: #1b1a38 !important;
    color: #9b99c4 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
    font-weight: 700 !important;
}

html.dark tbody tr,
[data-theme="dark"] tbody tr {
    background-color: #13122a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #f1f0ff !important;
    transition: background-color 0.15s ease-in-out !important;
}

html.dark tbody tr:hover,
[data-theme="dark"] tbody tr:hover {
    background-color: #1b1a38 !important;
}

html.dark tbody td,
[data-theme="dark"] tbody td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #f1f0ff !important;
}

/* =========================================================================
   COMPREHENSIVE LIGHT THEME RULES (FIGMA DESIGN SYSTEM STANDARDS)
   ========================================================================= */

html.light body,
body.theme-light,
[data-theme="light"] body {
    background-color: #F6F8FA !important;
    color: #111e2e !important;
}

html.light .bg-white,
body.theme-light .bg-white,
[data-theme="light"] .bg-white {
    background-color: #FFFFFF !important;
    color: #111e2e !important;
    border-color: #E3EAF0 !important;
}

html.light .text-\[\#172C42\],
[data-theme="light"] .text-\[\#172C42\] {
    color: #111e2e !important;
    font-weight: 700;
}

html.light .text-\[\#087F6D\],
[data-theme="light"] .text-\[\#087F6D\] {
    color: #087F6D !important;
}

html.light .text-\[\#687B8E\],
[data-theme="light"] .text-\[\#687B8E\] {
    color: #364F65 !important;
    font-weight: 500;
}

html.light .text-\[\#53697D\],
[data-theme="light"] .text-\[\#53697D\] {
    color: #172C42 !important;
    font-weight: 700;
}

html.light .text-\[\#81909F\],
[data-theme="light"] .text-\[\#81909F\] {
    color: #4b6175 !important;
}

html.light .bg-\[\#EAF0F3\],
html.light .bg-\[\#F0F4F7\],
[data-theme="light"] .bg-\[\#EAF0F3\],
[data-theme="light"] .bg-\[\#F0F4F7\] {
    background-color: #EAF0F3 !important;
    border-color: #DCE5ED !important;
}

html.light .bg-\[\#E8F5F0\],
[data-theme="light"] .bg-\[\#E8F5F0\] {
    background-color: #E8F5F0 !important;
    color: #065f46 !important;
    font-weight: 700;
}

html.light input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html.light select,
html.light textarea,
[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
[data-theme="light"] select,
[data-theme="light"] textarea {
    background-color: #FFFFFF !important;
    border: 1px solid #DCE5ED !important;
    color: #111e2e !important;
    font-weight: 600;
}

html.light input:focus,
html.light select:focus,
html.light textarea:focus,
[data-theme="light"] input:focus {
    border-color: #087F6D !important;
    box-shadow: 0 0 0 3px rgba(8, 127, 109, 0.15) !important;
    outline: none !important;
}

html.light input::placeholder,
html.light textarea::placeholder,
[data-theme="light"] input::placeholder {
    color: #687B8E !important;
    font-weight: 500;
}

html.light table,
[data-theme="light"] table {
    border-color: #E3EAF0 !important;
}

html.light thead,
html.light thead tr,
html.light thead th,
[data-theme="light"] thead th {
    background-color: #F8FAFC !important;
    color: #111e2e !important;
    border-bottom: 1px solid #E3EAF0 !important;
    font-weight: 800 !important;
}

html.light tbody tr,
[data-theme="light"] tbody tr {
    background-color: #FFFFFF !important;
    border-bottom: 1px solid #F0F4F7 !important;
    color: #111e2e !important;
}

html.light tbody tr:hover,
[data-theme="light"] tbody tr:hover {
    background-color: #F8FAFC !important;
}

html.light tbody td,
[data-theme="light"] tbody td {
    border-bottom: 1px solid #F0F4F7 !important;
    color: #111e2e !important;
    font-weight: 600;
}

/* =========================================================================
   NAVY SURROUNDING ICONS IN DARK MODE (اللون الكحلي يحيط بالأيقونات في الداكن)
   ========================================================================= */

html.dark .pos-pemoji,
[data-theme="dark"] .pos-pemoji,
body.theme-dark .pos-pemoji {
    background-color: #1b1a38 !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

html.dark .w-10.h-10.rounded-\[11px\],
html.dark .w-11.h-11.rounded-\[12px\],
html.dark .w-12.h-12.rounded-\[13px\],
[data-theme="dark"] .w-10.h-10.rounded-\[11px\],
[data-theme="dark"] .w-11.h-11.rounded-\[12px\],
[data-theme="dark"] .w-12.h-12.rounded-\[13px\] {
    background-color: #1b1a38 !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
}

html.dark [class*="bg-\[\#E8F5F0\]"],
[data-theme="dark"] [class*="bg-\[\#E8F5F0\]"],
body.theme-dark [class*="bg-\[\#E8F5F0\]"] {
    background-color: #1b1a38 !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

html.dark [class*="bg-\[\#EDF3FF\]"],
[data-theme="dark"] [class*="bg-\[\#EDF3FF\]"],
body.theme-dark [class*="bg-\[\#EDF3FF\]"] {
    background-color: #1b1a38 !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

/* =========================================================================
   MERKET KPI BADGES & ACTION PILLS (ضمان ظهور خلفيات وأيقونات الكروت والأزرار)
   ========================================================================= */

.merket-kpi-badge {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1px 3px rgba(20, 43, 64, 0.05) !important;
}

.merket-kpi-badge svg {
    width: 22px !important;
    height: 22px !important;
}

.merket-kpi-badge.emerald {
    background-color: #E8F5F0 !important;
    border: 1.5px solid #a3e3cb !important;
    color: #087F6D !important;
}

.merket-kpi-badge.blue {
    background-color: #EDF3FF !important;
    border: 1.5px solid #bdd3fb !important;
    color: #315FBA !important;
}

.merket-kpi-badge.amber {
    background-color: #FFF4E4 !important;
    border: 1.5px solid #fad296 !important;
    color: #A56618 !important;
}

.merket-kpi-badge.rose {
    background-color: #FEECEC !important;
    border: 1.5px solid #fcbaba !important;
    color: #B53030 !important;
}

.merket-kpi-badge.purple {
    background-color: #F3E8FF !important;
    border: 1.5px solid #d8b4fe !important;
    color: #7c5cff !important;
}

/* Dark mode overrides for KPI badges - High Contrast & Vivid */
html.dark .merket-kpi-badge,
[data-theme="dark"] .merket-kpi-badge,
body.theme-dark .merket-kpi-badge {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
}

html.dark .merket-kpi-badge.emerald, [data-theme="dark"] .merket-kpi-badge.emerald {
    background-color: rgba(16, 185, 129, 0.22) !important;
    border: 1.5px solid rgba(52, 211, 153, 0.5) !important;
}
html.dark .merket-kpi-badge.emerald svg, [data-theme="dark"] .merket-kpi-badge.emerald svg { color: #34d399 !important; }

html.dark .merket-kpi-badge.blue, [data-theme="dark"] .merket-kpi-badge.blue {
    background-color: rgba(49, 95, 186, 0.25) !important;
    border: 1.5px solid rgba(129, 140, 248, 0.5) !important;
}
html.dark .merket-kpi-badge.blue svg, [data-theme="dark"] .merket-kpi-badge.blue svg { color: #818cf8 !important; }

html.dark .merket-kpi-badge.amber, [data-theme="dark"] .merket-kpi-badge.amber {
    background-color: rgba(245, 158, 11, 0.22) !important;
    border: 1.5px solid rgba(251, 191, 36, 0.5) !important;
}
html.dark .merket-kpi-badge.amber svg, [data-theme="dark"] .merket-kpi-badge.amber svg { color: #fbbf24 !important; }

html.dark .merket-kpi-badge.rose, [data-theme="dark"] .merket-kpi-badge.rose {
    background-color: rgba(244, 63, 94, 0.22) !important;
    border: 1.5px solid rgba(248, 113, 113, 0.5) !important;
}
html.dark .merket-kpi-badge.rose svg, [data-theme="dark"] .merket-kpi-badge.rose svg { color: #f87171 !important; }

html.dark .merket-kpi-badge.purple, [data-theme="dark"] .merket-kpi-badge.purple {
    background-color: rgba(124, 92, 255, 0.25) !important;
    border: 1.5px solid rgba(167, 139, 250, 0.5) !important;
}
html.dark .merket-kpi-badge.purple svg, [data-theme="dark"] .merket-kpi-badge.purple svg { color: #a78bfa !important; }

/* Coordinated Action Pills (أزرار التوريد والتعديل والحذف) */
.merket-btn-inflow {
    height: 34px !important;
    padding: 0 11px !important;
    border-radius: 9px !important;
    background-color: #EDF3FF !important;
    border: 1px solid #bdd3fb !important;
    color: #315FBA !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
}
.merket-btn-inflow:hover {
    background-color: #315FBA !important;
    color: #ffffff !important;
}

.merket-btn-edit {
    height: 34px !important;
    padding: 0 11px !important;
    border-radius: 9px !important;
    background-color: #E8F5F0 !important;
    border: 1px solid #a3e3cb !important;
    color: #087F6D !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
}
.merket-btn-edit:hover {
    background-color: #087F6D !important;
    color: #ffffff !important;
}

.merket-btn-delete {
    height: 34px !important;
    padding: 0 11px !important;
    border-radius: 9px !important;
    background-color: #FEECEC !important;
    border: 1px solid #fcbaba !important;
    color: #B53030 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
}
.merket-btn-delete:hover {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

/* Action pills in Dark Mode - High Contrast Soft Tints */
html.dark .merket-btn-inflow, [data-theme="dark"] .merket-btn-inflow {
    background-color: rgba(49, 95, 186, 0.25) !important;
    border: 1px solid rgba(129, 140, 248, 0.5) !important;
    color: #93c5fd !important;
}
html.dark .merket-btn-inflow:hover, [data-theme="dark"] .merket-btn-inflow:hover {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

html.dark .merket-btn-edit, [data-theme="dark"] .merket-btn-edit {
    background-color: rgba(16, 185, 129, 0.22) !important;
    border: 1px solid rgba(52, 211, 153, 0.5) !important;
    color: #6ee7b7 !important;
}
html.dark .merket-btn-edit:hover, [data-theme="dark"] .merket-btn-edit:hover {
    background-color: #10b981 !important;
    color: #ffffff !important;
}

html.dark .merket-btn-delete, [data-theme="dark"] .merket-btn-delete {
    background-color: rgba(239, 68, 68, 0.22) !important;
    border: 1px solid rgba(248, 113, 113, 0.5) !important;
    color: #fca5a5 !important;
}
html.dark .merket-btn-delete:hover, [data-theme="dark"] .merket-btn-delete:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}

/* Top Action Buttons (Secondary Action Style) */
.merket-top-btn {
    height: 46px !important;
    padding: 0 16px !important;
    border-radius: 10px !important;
    border: 1px solid #E3EAF0 !important;
    background-color: #FFFFFF !important;
    color: #172C42 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
    transition: all 0.15s ease !important;
}
.merket-top-btn:hover {
    background-color: #F8FAFC !important;
}
html.dark .merket-top-btn, [data-theme="dark"] .merket-top-btn {
    background-color: #1b1a38 !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #f1f0ff !important;
}
html.dark .merket-top-btn:hover, [data-theme="dark"] .merket-top-btn:hover {
    background-color: #26244d !important;
}

/* Segmented Navigation Bars */
.merket-segment-bar {
    padding: 6px !important;
    border-radius: 14px !important;
    background-color: #EAF0F3 !important;
    border: 1px solid #DCE5ED !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}
html.dark .merket-segment-bar, [data-theme="dark"] .merket-segment-bar {
    background-color: #1b1a38 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* User Status Toggle Pills (تعطيل وتفعيل) */
.merket-btn-toggle-deactivate {
    height: 34px !important;
    padding: 0 11px !important;
    border-radius: 9px !important;
    background-color: #FFF4E4 !important;
    border: 1px solid #fad296 !important;
    color: #A56618 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
}
.merket-btn-toggle-deactivate:hover {
    background-color: #f59e0b !important;
    color: #ffffff !important;
}
html.dark .merket-btn-toggle-deactivate, [data-theme="dark"] .merket-btn-toggle-deactivate {
    background-color: rgba(245, 158, 11, 0.22) !important;
    border: 1px solid rgba(251, 191, 36, 0.5) !important;
    color: #fbbf24 !important;
}
html.dark .merket-btn-toggle-deactivate:hover, [data-theme="dark"] .merket-btn-toggle-deactivate:hover {
    background-color: #d97706 !important;
    color: #ffffff !important;
}

.merket-btn-toggle-activate {
    height: 34px !important;
    padding: 0 11px !important;
    border-radius: 9px !important;
    background-color: #E8F5F0 !important;
    border: 1px solid #a3e3cb !important;
    color: #087F6D !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
}
.merket-btn-toggle-activate:hover {
    background-color: #087F6D !important;
    color: #ffffff !important;
}
html.dark .merket-btn-toggle-activate, [data-theme="dark"] .merket-btn-toggle-activate {
    background-color: rgba(16, 185, 129, 0.22) !important;
    border: 1px solid rgba(52, 211, 153, 0.5) !important;
    color: #34d399 !important;
}
html.dark .merket-btn-toggle-activate:hover, [data-theme="dark"] .merket-btn-toggle-activate:hover {
    background-color: #059669 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   MERKET VISUAL EFFECTS & MICRO-INTERACTIONS (نظام التأثيرات والحركات التفاعلية)
   Fluid 60fps animations, 3D card elevation, button glows, glassmorphism, 
   smooth theme transitions, and live status pulses.
   ========================================================================== */

/* 1. Global Theme Switch Transition (انتقال ناعم بين الثيم النهاري والليلي) */
html, body, header, nav, footer,
.merket-card, .merket-kpi-card, .merket-panel, .merket-segment-bar,
input, select, textarea, table, thead, tbody, tr, td, th {
    transition: background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.24s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 2. Sleek Custom Scrollbar (شريط تمرير عصري وأنيق) */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.28);
    border-radius: 9999px;
    transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.55);
}
html.dark ::-webkit-scrollbar-thumb, [data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
}
html.dark ::-webkit-scrollbar-thumb:hover, [data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 211, 238, 0.45);
}

/* 3. Header Glassmorphism (تأثير زجاجي حديث لشريط التنقل العلوي) */
header.no-print {
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
}
html.light header.no-print {
    background-color: rgba(255, 255, 255, 0.92) !important;
}
html.dark header.no-print, [data-theme="dark"] header.no-print {
    background-color: rgba(19, 18, 42, 0.92) !important;
}

/* 4. Action Buttons Hover, Elevation & Glow (تأثيرات الأزرار الحركية والتوهج) */
.merket-btn-inflow,
.merket-btn-edit,
.merket-btn-delete,
.merket-btn-toggle-deactivate,
.merket-btn-toggle-activate,
.merket-top-btn,
button[class*="rounded-[10px]"],
button[class*="rounded-[12px]"],
a[class*="rounded-[10px]"],
a[class*="rounded-[12px]"] {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.2s ease,
                border-color 0.2s ease,
                color 0.15s ease !important;
    position: relative;
    will-change: transform, box-shadow;
}

/* Button Hover Lift */
.merket-btn-inflow:hover,
.merket-btn-edit:hover,
.merket-btn-delete:hover,
.merket-btn-toggle-deactivate:hover,
.merket-btn-toggle-activate:hover,
.merket-top-btn:hover {
    transform: translateY(-2px) !important;
}

/* Button Active Press Effect */
.merket-btn-inflow:active,
.merket-btn-edit:active,
.merket-btn-delete:active,
.merket-btn-toggle-deactivate:active,
.merket-btn-toggle-activate:active,
.merket-top-btn:active,
button:active:not(:disabled) {
    transform: translateY(0) scale(0.97) !important;
}

/* Color-Specific Glow Effects */
.merket-btn-inflow:hover {
    box-shadow: 0 4px 14px rgba(49, 95, 186, 0.35) !important;
}
.merket-btn-edit:hover {
    box-shadow: 0 4px 14px rgba(8, 127, 109, 0.35) !important;
}
html.dark .merket-btn-edit:hover {
    box-shadow: 0 4px 14px rgba(34, 211, 238, 0.35) !important;
}
.merket-btn-delete:hover {
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35) !important;
}
.merket-btn-toggle-deactivate:hover {
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
}
.merket-btn-toggle-activate:hover {
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

/* Button Icon Micro-Rotation on Hover */
.merket-btn-inflow:hover svg,
.merket-btn-edit:hover svg,
.merket-btn-delete:hover svg,
.merket-btn-toggle-deactivate:hover svg,
.merket-btn-toggle-activate:hover svg,
.merket-top-btn:hover svg {
    transform: scale(1.14);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Primary Button Shimmer Light-Sweep (تأثير انعكاس الضوء على الأزرار البارزة) */
.merket-shimmer-btn,
button[style*="linear-gradient"],
a[style*="linear-gradient"],
button[style*="background-color: #087F6D"],
a[style*="background-color: #087F6D"],
.btn-primary {
    position: relative;
    overflow: hidden !important;
}
.merket-shimmer-btn::after,
button[style*="linear-gradient"]::after,
a[style*="linear-gradient"]::after,
button[style*="background-color: #087F6D"]::after,
a[style*="background-color: #087F6D"]::after,
.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    bottom: -50%;
    left: -50%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.22) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg) translate(-150%, 0);
    transition: transform 0.75s ease;
    pointer-events: none;
}
.merket-shimmer-btn:hover::after,
button[style*="linear-gradient"]:hover::after,
a[style*="linear-gradient"]:hover::after,
button[style*="background-color: #087F6D"]:hover::after,
a[style*="background-color: #087F6D"]:hover::after,
.btn-primary:hover::after {
    transform: rotate(30deg) translate(150%, 0);
}

/* 5. KPI & Summary Cards 3D Elevation & Ambient Glow (رفع وتوهج كروت المؤشرات) */
.merket-kpi-card,
.bg-white[style*="min-height: 190px"],
.bg-white[style*="min-height: 160px"],
div[class*="rounded-[16px]"][class*="border"],
div[class*="rounded-[18px]"][class*="border"] {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease !important;
    will-change: transform, box-shadow;
}

html.light .merket-kpi-card:hover,
html.light .bg-white[style*="min-height: 190px"]:hover,
html.light div[class*="rounded-[16px]"][class*="border"]:hover,
html.light div[class*="rounded-[18px]"][class*="border"]:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 14px 30px -6px rgba(20, 43, 64, 0.08), 0 0 0 1.5px rgba(8, 127, 109, 0.18) !important;
}

html.dark .merket-kpi-card:hover,
html.dark [data-theme="dark"] .merket-kpi-card:hover,
html.dark div[class*="rounded-[16px]"][class*="border"]:hover,
html.dark div[class*="rounded-[18px]"][class*="border"]:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(34, 211, 238, 0.35), 0 0 24px rgba(124, 92, 255, 0.16) !important;
    border-color: rgba(34, 211, 238, 0.35) !important;
}

/* KPI Badge Icon Micro-Animation on Card Hover */
.merket-kpi-card:hover .merket-kpi-badge,
.merket-kpi-card:hover [class*="rounded-[11px]"],
.merket-kpi-card:hover [class*="rounded-[12px]"] {
    transform: scale(1.1) rotate(4deg);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* 6. Interactive Table Rows (تفاعل صفوف الجداول مع المؤشر) */
table tbody tr {
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease !important;
}
html.light table tbody tr:hover {
    background-color: #F8FAFC !important;
    box-shadow: inset 3.5px 0 0 #087F6D !important;
}
html.dark table tbody tr:hover, [data-theme="dark"] table tbody tr:hover {
    background-color: #1b1a38 !important;
    box-shadow: inset 3.5px 0 0 #22d3ee !important;
}

/* 7. Form Controls & Search Inputs Glow (توهج حقول الإدخال والبحث عند التركيز) */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select, textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease !important;
}
html.light input:focus, html.light select:focus, html.light textarea:focus {
    border-color: #087F6D !important;
    box-shadow: 0 0 0 3.5px rgba(8, 127, 109, 0.2), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    outline: none !important;
}
html.dark input:focus, html.dark select:focus, html.dark textarea:focus {
    border-color: #7c5cff !important;
    box-shadow: 0 0 0 3.5px rgba(124, 92, 255, 0.3), 0 0 18px rgba(34, 211, 238, 0.18) !important;
    outline: none !important;
}

/* 8. Segmented Navigation Tabs Spring Transition (انتقال علامات التبويب) */
.merket-segment-bar button,
.merket-segment-tab {
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform;
}
.merket-segment-bar button:hover:not(.active),
.merket-segment-tab:hover:not(.active) {
    transform: translateY(-1px) scale(1.01) !important;
}
.merket-segment-bar button.active,
.merket-segment-tab.active {
    transform: scale(1.02) !important;
}

/* 9. Live Status Indicator Pulse (نبض الحالة المباشرة للمؤشرات المتصلة) */
.merket-pulse-dot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.merket-pulse-dot::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background-color: currentColor;
    opacity: 0.6;
    animation: merketPulseRing 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes merketPulseRing {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    60% {
        transform: scale(2.4);
        opacity: 0;
    }
    100% {
        transform: scale(2.6);
        opacity: 0;
    }
}

/* 10. Smooth Entrance Animations (حركات الدخول السلسة للصفحات والعناصر) */
.merket-animate-fade-in {
    animation: merketFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.merket-animate-slide-up {
    animation: merketSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes merketFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes merketSlideUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered entrance for KPI cards */
.grid > .merket-kpi-card:nth-child(1),
.grid > div[class*="rounded-[16px]"]:nth-child(1) {
    animation: merketSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
}
.grid > .merket-kpi-card:nth-child(2),
.grid > div[class*="rounded-[16px]"]:nth-child(2) {
    animation: merketSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}
.grid > .merket-kpi-card:nth-child(3),
.grid > div[class*="rounded-[16px]"]:nth-child(3) {
    animation: merketSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}
.grid > .merket-kpi-card:nth-child(4),
.grid > div[class*="rounded-[16px]"]:nth-child(4) {
    animation: merketSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}

/* 11. Modal Backdrop Blur & Pop-in (تأثير النوافذ المنبثقة) */
.modal-backdrop,
div[x-show*="Modal"] > div.fixed.inset-0.bg-black\/50,
div[x-show*="modal"] > div.fixed.inset-0.bg-black\/50,
div[x-show*="Modal"] > div.fixed.inset-0.bg-slate-900\/60,
div[x-show*="modal"] > div.fixed.inset-0.bg-slate-900\/60 {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    animation: merketFadeIn 0.25s ease-out both !important;
}

.modal-dialog,
div[x-show*="Modal"] > div.relative,
div[x-show*="modal"] > div.relative,
div[role="dialog"] > div {
    animation: merketModalPop 0.3s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}
@keyframes merketModalPop {
    0% {
        opacity: 0;
        transform: scale(0.93) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* =========================================================================
   14. MODERN SEGMENTED THEME TOGGLE (نهاري / ليلي)
   ========================================================================= */
.merket-theme-segmented {
    position: relative;
    user-select: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.theme-segment-btn {
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.theme-segment-btn:hover {
    opacity: 1 !important;
}
.theme-segment-btn:active {
    transform: scale(0.96) !important;
}

