/* Dashboard RTL Adjustments */
@font-face {
    font-family: 'YekanBakh';
    src: url('../profassets/fonts/YekanBakh/YekanBakh-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../profassets/fonts/YekanBakh/YekanBakh-SemiBold.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../profassets/fonts/YekanBakh/YekanBakh-Bold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../profassets/fonts/YekanBakh/YekanBakh-ExtraBold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../profassets/fonts/YekanBakh/YekanBakh-Black.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* Apply YekanBakh font to all dashboard elements */
.dashboard-layout *,
.dashboard-layout *::before,
.dashboard-layout *::after {
    font-family: 'YekanBakh', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Preserve icon fonts - KeenIcons */
.dashboard-layout .ki-duotone,
.dashboard-layout .ki-duotone::before,
.dashboard-layout .ki-duotone::after,
.dashboard-layout .ki-filled,
.dashboard-layout .ki-filled::before,
.dashboard-layout .ki-filled::after,
.dashboard-layout .ki-outline,
.dashboard-layout .ki-outline::before,
.dashboard-layout .ki-outline::after,
.dashboard-layout .ki-solid,
.dashboard-layout .ki-solid::before,
.dashboard-layout .ki-solid::after {
    font-family: inherit !important;
}

/* Specific KeenIcons font families */
.dashboard-layout .ki-duotone::before,
.dashboard-layout .ki-duotone::after {
    font-family: 'keenicons-duotone' !important;
}

.dashboard-layout .ki-filled::before,
.dashboard-layout .ki-filled::after {
    font-family: 'keenicons-filled' !important;
}

.dashboard-layout .ki-outline::before,
.dashboard-layout .ki-outline::after {
    font-family: 'keenicons-outline' !important;
}

.dashboard-layout .ki-solid::before,
.dashboard-layout .ki-solid::after {
    font-family: 'keenicons-solid' !important;
}

/* FontAwesome support */
.dashboard-layout .fa,
.dashboard-layout .fas,
.dashboard-layout .far,
.dashboard-layout .fal,
.dashboard-layout .fad,
.dashboard-layout .fab {
    font-family: 'Font Awesome 5 Pro' !important;
}

/* Other common icon libraries */
.dashboard-layout .icon,
.dashboard-layout [class^="icon-"],
.dashboard-layout [class*=" icon-"] {
    font-family: inherit !important;
}

/* Ensure icons are visible and properly sized */
.dashboard-layout i[class*="ki-"] {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

/* Icon sizing utilities */
.dashboard-layout .text-xs i[class*="ki-"] { font-size: 0.75rem; }
.dashboard-layout .text-sm i[class*="ki-"] { font-size: 0.875rem; }
.dashboard-layout .text-base i[class*="ki-"] { font-size: 1rem; }
.dashboard-layout .text-lg i[class*="ki-"] { font-size: 1.125rem; }
.dashboard-layout .text-xl i[class*="ki-"] { font-size: 1.25rem; }
.dashboard-layout .text-2xl i[class*="ki-"] { font-size: 1.5rem; }
.dashboard-layout .text-3xl i[class*="ki-"] { font-size: 1.875rem; }
.dashboard-layout .text-4xl i[class*="ki-"] { font-size: 2.25rem; }
.dashboard-layout .text-5xl i[class*="ki-"] { font-size: 3rem; }
.dashboard-layout .text-6xl i[class*="ki-"] { font-size: 3.75rem; }

/* Fallback icons for missing KeenIcons */
.dashboard-layout .ki-exit::before { content: "\e909"; } /* Use arrow-right as fallback */
.dashboard-layout .ki-external-link::before { content: "\e909"; } /* Use arrow-right as fallback */
.dashboard-layout .ki-link::before { content: "\e909"; } /* Use arrow-right as fallback */
.dashboard-layout .ki-palette::before { content: "\e909"; } /* Use color-swatch as fallback */
.dashboard-layout .ki-information::before { content: "\e909"; } /* Use information-2 as fallback */

/* Specific font applications for dashboard */
body {
    font-family: 'YekanBakh', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* All text elements in dashboard */
h1, h2, h3, h4, h5, h6,
p, span, div, a, button, input, textarea, select, label,
.card-title, .menu-title, .btn, .form-label, .alert,
.text-sm, .text-base, .text-lg, .text-xl, .text-2xl,
.font-medium, .font-semibold, .font-bold {
    font-family: 'YekanBakh', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Dashboard specific elements */
.card-body *,
.card-header *,
.menu *,
.dropdown *,
.btn *,
.form *,
.alert * {
    font-family: 'YekanBakh', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* RTL specific adjustments */
[dir="rtl"] * {
    font-family: 'YekanBakh', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Ensure all dashboard pages use YekanBakh */
html[dir="rtl"] body,
html[dir="rtl"] * {
    font-family: 'YekanBakh', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Dashboard Custom Styles */

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .me-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-3 { margin-left: 0.75rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-4 { margin-left: 1rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-5 { margin-left: 1.25rem !important; margin-right: 0 !important; }

[dir="rtl"] .ms-1 { margin-right: 0.25rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-3 { margin-right: 0.75rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-4 { margin-right: 1rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-5 { margin-right: 1.25rem !important; margin-left: 0 !important; }

[dir="rtl"] .pe-1 { padding-left: 0.25rem !important; padding-right: 0 !important; }
[dir="rtl"] .pe-2 { padding-left: 0.5rem !important; padding-right: 0 !important; }
[dir="rtl"] .pe-3 { padding-left: 0.75rem !important; padding-right: 0 !important; }
[dir="rtl"] .pe-4 { padding-left: 1rem !important; padding-right: 0 !important; }
[dir="rtl"] .pe-5 { padding-left: 1.25rem !important; padding-right: 0 !important; }

[dir="rtl"] .ps-1 { padding-right: 0.25rem !important; padding-left: 0 !important; }
[dir="rtl"] .ps-2 { padding-right: 0.5rem !important; padding-left: 0 !important; }
[dir="rtl"] .ps-3 { padding-right: 0.75rem !important; padding-left: 0 !important; }
[dir="rtl"] .ps-4 { padding-right: 1rem !important; padding-left: 0 !important; }
[dir="rtl"] .ps-5 { padding-right: 1.25rem !important; padding-left: 0 !important; }

/* RTL Transform */
[dir="rtl"] .rtl\:transform { transform: scaleX(-1); }
[dir="rtl"] .rtl\:rotate-180 { transform: rotate(180deg); }

/* RTL Position */
[dir="rtl"] .rtl\:start-0 { left: 0 !important; right: auto !important; }
[dir="rtl"] .rtl\:end-0 { right: 0 !important; left: auto !important; }

/* Custom Form Styles */
.form-control {
    @apply w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-colors duration-200;
}

.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
    @apply block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2;
}

.form-check {
    @apply flex items-center gap-2;
}

.form-check-input {
    @apply w-4 h-4 text-primary-600 bg-gray-100 border-gray-300 rounded focus:ring-primary-500 focus:ring-2;
}

.form-check-label {
    @apply text-sm text-gray-700 dark:text-gray-300;
}

/* Button Styles */
.btn {
    @apply inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-lg font-medium text-sm transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2;
}

.btn-primary {
    @apply bg-primary-600 text-white hover:bg-primary-700 focus:ring-primary-500;
}

.btn-success {
    @apply bg-green-600 text-white hover:bg-green-700 focus:ring-green-500;
}

.btn-warning {
    @apply bg-yellow-600 text-white hover:bg-yellow-700 focus:ring-yellow-500;
}

.btn-danger {
    @apply bg-red-600 text-white hover:bg-red-700 focus:ring-red-500;
}

.btn-light {
    @apply bg-gray-100 text-gray-700 hover:bg-gray-200 focus:ring-gray-500;
}

.btn-sm {
    @apply px-3 py-1.5 text-xs;
}

.btn-lg {
    @apply px-6 py-3 text-base;
}

.btn-icon {
    @apply p-2;
}

.btn-icon-lg {
    @apply p-3;
}

/* Card Styles */
.card {
    @apply bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700;
}

.card-flush {
    @apply border-0 shadow-none;
}

.card-header {
    @apply px-6 py-4 border-b border-gray-200 dark:border-gray-700;
}

.card-title {
    @apply text-lg font-semibold text-gray-900 dark:text-white;
}

.card-body {
    @apply p-6;
}

.card-toolbar {
    @apply flex items-center gap-2;
}

/* Alert Styles */
.alert {
    @apply p-4 rounded-lg border;
}

.alert-danger {
    @apply bg-red-50 border-red-200 text-red-700;
}

.alert-success {
    @apply bg-green-50 border-green-200 text-green-700;
}

.alert-warning {
    @apply bg-yellow-50 border-yellow-200 text-yellow-700;
}

.alert-info {
    @apply bg-blue-50 border-blue-200 text-blue-700;
}

/* Badge Styles */
.badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.badge-success {
    @apply bg-green-100 text-green-800;
}

.badge-warning {
    @apply bg-yellow-100 text-yellow-800;
}

.badge-danger {
    @apply bg-red-100 text-red-800;
}

.badge-info {
    @apply bg-blue-100 text-blue-800;
}

.badge-light-success {
    @apply bg-green-50 text-green-700 border border-green-200;
}

.badge-light-warning {
    @apply bg-yellow-50 text-yellow-700 border border-yellow-200;
}

.badge-light-danger {
    @apply bg-red-50 text-red-700 border border-red-200;
}

.badge-light-info {
    @apply bg-blue-50 text-blue-700 border border-blue-200;
}

.badge-circle {
    @apply rounded-full;
}

.badge-dot {
    @apply w-2 h-2 rounded-full;
}

/* Table Styles */
.table {
    @apply w-full;
}

.table-responsive {
    @apply overflow-x-auto;
}

.table-row-bordered {
    @apply border-b border-gray-200 dark:border-gray-700;
}

.table-row-gray-100 {
    @apply bg-gray-50 dark:bg-gray-700;
}

.table th {
    @apply px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-white;
}

/* Dropdown Styles */
.dropdown {
    @apply relative;
}

.dropdown-toggle {
    @apply cursor-pointer;
}

.dropdown-content {
    @apply absolute z-50 mt-2 w-48 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 py-1;
}

.dropdown-item {
    @apply block w-full px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700;
}

/* Menu Styles */
.menu {
    @apply relative;
}

.menu-item {
    @apply relative;
}

.menu-link {
    @apply flex items-center gap-3 px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors duration-200;
}

.menu-icon {
    @apply flex items-center justify-center w-5 h-5;
}

.menu-title {
    @apply flex-1;
}

.menu-arrow {
    @apply flex items-center justify-center w-4 h-4;
}

.menu-dropdown {
    @apply absolute z-50 mt-1 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 py-1;
}

/* Wizard Styles */
.wizard-step {
    @apply transition-all duration-300;
}

.wizard-step.hidden {
    @apply hidden;
}

/* Custom Colors */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
}

/* Dark Mode Support */
.dark {
    --primary-50: #1e3a8a;
    --primary-100: #1e40af;
    --primary-200: #1d4ed8;
    --primary-300: #2563eb;
    --primary-400: #3b82f6;
    --primary-500: #60a5fa;
    --primary-600: #93c5fd;
    --primary-700: #bfdbfe;
    --primary-800: #dbeafe;
    --primary-900: #eff6ff;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .container-fixed {
        @apply px-4;
    }

    .card-body {
        @apply p-4;
    }

    .card-header {
        @apply px-4 py-3;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

.slide-in-right {
    animation: slideInRight 0.3s ease-in-out;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Focus Styles */
.focus\:ring-2:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.focus\:ring-primary-500:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    .print-break {
        page-break-before: always;
    }
}
off-canvas-mobile-menu{
    display: none;
}
@media screen and (max-width: 799px) {
    #off-canvas-mobile-menu{
        display: block;
    }
}
