:root {
    --color-primary: #1a237e;
    --color-secondary: #283593;
    --color-accent: #00bcd4;
    --color-accent-hover: #00acc1;
    --color-accent-amber: #ffa726;
    --color-bg-light: #f5f7fa;
    --color-bg-white: #FFFFFF;
    --color-text-primary: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-light: #94a3b8;
    --color-error: #ef4444;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-border: #e2e8f0;
    --color-shadow: rgba(0, 0, 0, 0.1);
    
    --font-primary: 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    --radius-sm: 0.375rem;
    --radius-md: 0.625rem;
    --radius-lg: 0.875rem;
    --radius-xl: 1.25rem;
    
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-light);
    min-height: 100vh;
    overflow-x: hidden;
}

body[dir="ltr"] {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    cursor: pointer;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #138496;
    text-decoration: underline;
}

.toast-container {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

body[dir="rtl"] .toast-container {
    right: auto;
    left: 16px;
}

.toast {
    background: #1F2937;
    color: #E5E7EB;
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    max-width: 380px;
    font-size: 0.875rem;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    pointer-events: auto;
    border-left: 3px solid var(--color-accent);
}

body[dir="ltr"] .toast {
    border-right: none;
    border-left: 3px solid var(--color-accent);
}

body[dir="rtl"] .toast {
    border-left: none;
    border-right: 3px solid var(--color-accent);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-error {
    border-left-color: #EF4444;
    background: #1F2937;
}

body[dir="ltr"] .toast-error {
    border-left-color: #EF4444;
}

body[dir="rtl"] .toast-error {
    border-right-color: #EF4444;
    border-left: none;
}

.toast-success {
    border-left-color: #10B981;
    background: #1F2937;
}

body[dir="ltr"] .toast-success {
    border-left-color: #10B981;
}

body[dir="rtl"] .toast-success {
    border-right-color: #10B981;
    border-left: none;
}

.toast-warning {
    border-left-color: #F59E0B;
    background: #1F2937;
}

body[dir="ltr"] .toast-warning {
    border-left-color: #F59E0B;
}

body[dir="rtl"] .toast-warning {
    border-right-color: #F59E0B;
    border-left: none;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .toast-container {
        bottom: 12px;
        right: 12px;
    }
    
    body[dir="rtl"] .toast-container {
        left: 12px;
        right: auto;
    }
    
    .toast {
        min-width: 240px;
        max-width: 320px;
        font-size: 0.8125rem;
        padding: 8px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Sidebar company info - larger fonts */
.sidebar-header .company-name {
    font-size: 1.25rem; /* 20px - increased from 18px */
    font-weight: 600;
    line-height: 1.4;
}

.sidebar-header .company-number {
    font-size: 0.9375rem; /* 15px - increased from 14px */
    font-weight: 500;
    opacity: 0.9;
}

/* Company name in header - same size as ERP System logo */
.header-company {
    display: flex;
    align-items: center;
}

#companyNameHeader {
    font-size: 1.5rem; /* 24px - same as logo */
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0;
    line-height: 1.2;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(23, 162, 184, 0.2);
    border-top-color: #17A2B8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
