/* Import Modern Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&family=Vazirmatn:wght@400;700;900&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
}

/* Global Modern Font Stack */
body {
    font-family: 'Inter', 'Vazirmatn', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

/* AGGRESSIVE NUMERAL FORCING: Applied to ALL elements */
* {
    font-variant-numeric: lining-nums tabular-nums !important;
    -webkit-font-feature-settings: "lnum" 1, "tnum" 1, "onum" 0, "pnum" 0 !important;
    font-feature-settings: "lnum" 1, "tnum" 1, "onum" 0, "pnum" 0 !important;
}

/* Force standard Latin font for ANY digits */
input, select, textarea, button, .en-nums, [x-text], td, span, p, h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 'Vazirmatn', sans-serif !important;
}

/* Force LTR for numeric inputs ONLY if they are numbers, otherwise keep RTL for text */
input[type="number"], 
input[inputmode="decimal"],
.en-nums {
    direction: ltr !important;
    text-align: right !important;
}

input, select, textarea {
    unicode-bidi: plaintext !important;
}

/* Hide number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Global Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* Glassmorphism */
.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom Scrollbar (Slim) */
.slim-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.slim-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.slim-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.slim-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.animate-shake {
    animation: shake 0.2s ease-in-out 0s 2;
}

@keyframes slideInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.animate-slide-up {
    animation: slideInUp 0.4s ease-out forwards;
}

/* Table Enhancements */
.table-container {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: 1px solid #f1f5f9;
    overflow: hidden;
}

.modern-table {
    width: 100%;
    text-align: right;
}

.modern-table thead tr {
    background-color: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.modern-table th {
    padding: 0.55rem 0.75rem;
    font-weight: 800;
    font-size: 0.825rem;
    color: #475569;
}

.modern-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.modern-table tbody tr:nth-child(even) {
    background-color: rgba(248, 250, 252, 0.8);
}

.modern-table tbody tr:hover {
    background-color: rgba(238, 242, 255, 0.6);
}

/* Custom UI Notifications (Toasts) */
#notification-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 100;
    display: flex;
    flex-col-reverse: row;
    gap: 0.75rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    border-right: 4px solid #4f46e5;
    display: flex;
    items-center: center;
    gap: 0.75rem;
    animation: slideInLeft 0.3s ease-out;
}

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

/* Force English Font/Digits in Flatpickr */
.flatpickr-calendar, .flatpickr-calendar * {
    font-family: 'Inter', sans-serif !important;
    font-variant-numeric: lining-nums !important;
}

/* ── تقرير حركة المتجر ── */
.store-movement-report .store-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.store-movement-report .store-row:hover {
    background-color: #f8fafc;
    border-color: #f1f5f9;
}
.store-movement-report .store-row.compact {
    padding: 0.625rem 0.875rem;
}
.store-movement-report .store-row-highlight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 1rem;
    border: 1px solid;
}
.store-movement-report .store-row-highlight.compact {
    padding: 0.75rem 1rem;
}
.store-movement-report .store-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    text-align: right;
    line-height: 1.4;
}
.store-movement-report .store-value {
    font-size: 1rem;
    font-weight: 900;
    white-space: nowrap;
    flex-shrink: 0;
}
.store-movement-report .pay-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.625rem 0.5rem;
    border-radius: 0.875rem;
    border: 1px solid;
    text-align: center;
    min-height: 3.5rem;
}
.store-movement-report .pay-chip-label {
    font-size: 0.625rem;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.store-movement-report .pay-chip-val {
    font-size: 0.75rem;
    font-weight: 900;
}
.store-movement-report .store-kpi {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-movement-report .store-kpi:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
@media print {
    .store-movement-report .store-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
