/* Custom RTL Styles for Purple Theme */

/* RTL Direction */
body {
    direction: rtl;
    text-align: right;
    font-family: 'iransans', 'Tahoma', sans-serif;
}

/* Float adjustments */
.float-end {
    float: left !important;
}

.float-start {
    float: right !important;
}

/* Margin adjustments */
.me-1 {
    margin-left: 0.25rem !important;
    margin-right: 0 !important;
}

.ms-1 {
    margin-right: 0.25rem !important;
    margin-left: 0 !important;
}

.me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

.ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

.me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

.ms-3 {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}

/* Padding adjustments */
.pe-1 {
    padding-left: 0.25rem !important;
    padding-right: 0 !important;
}

.ps-1 {
    padding-right: 0.25rem !important;
    padding-left: 0 !important;
}

.pe-2 {
    padding-left: 0.5rem !important;
    padding-right: 0 !important;
}

.ps-2 {
    padding-right: 0.5rem !important;
    padding-left: 0 !important;
}

.pe-3 {
    padding-left: 1rem !important;
    padding-right: 0 !important;
}

.ps-3 {
    padding-right: 1rem !important;
    padding-left: 0 !important;
}
.markItUp *{
    margin: 5px !important;
}
/* Text alignment */
/* .text-md-end {
    text-align: left !important;
}

.text-md-start {
    text-align: right !important;
} */

/* Dropdown positioning */
.dropdown-menu-end {
    right: auto !important;
    left: 0 !important;
}

.dropdown-menu-start {
    /* left: auto !important; */
    left: 0 !important;
}


/* Breadcrumb adjustments */
.page-title-right {
    text-align: left !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item {
    padding-right: 0.5rem;
    padding-left: 0;
}

/* Form elements */
.form-check {
    padding-right: 1.25rem;
    padding-left: 0;
}

.form-check-input {
    margin-right: -1.25rem;
    margin-left: 0;
}

/* Button groups */
.btn-group > .btn:not(:last-child):not(.dropdown-toggle) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.btn-group > .btn:not(:first-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

/* Input groups */
.input-group > .form-control:not(:last-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.input-group > .form-control:not(:first-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

/* Navbar adjustments */
.navbar-nav .nav-link {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

/* Sidebar adjustments */
.left-side-menu {
    right: 0;
    left: auto;
}

.left-side-menu .sidebar-menu {
    padding-right: 0;
    padding-left: 0;
}

.left-side-menu .sidebar-menu li a {
    padding: 12px 20px 12px 15px;
}

.left-side-menu .sidebar-menu li a i {
    margin-left: 8px;
    margin-right: 0;
}
.widget-news-title {
    font-size: 22px;
    font-weight: 500;
}
.widget-news-date {
    font-size: 12px;
    color: #c1c1c1;
    font-weight: 200;
}
.widget-news-content {
    padding-top: 15px;
    font-size: 16px;
}

/* Modern Tab Styles */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #495057;
    background-color: #f8f9fa;
}

.nav-tabs .nav-link.active {
    color: #7e57c2;
    background-color: transparent;
    border-bottom-color: #7e57c2;
}

.nav-pills .nav-link {
    border-radius: 0.375rem;
    color: #6c757d;
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.nav-pills .nav-link.active {
    background-color: #7e57c2;
    color: #fff;
}

/* Modern Table Styles */
.table {
    border: none;
    box-shadow: 0 0 0 1px #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border: none;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table tbody td {
    border: none;
    border-bottom: 1px solid #f1f3f4;
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(126, 87, 194, 0.02);
}

/* Modern Card Styles */
.card {
    border: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #7e57c2 0%, #9c27b0 100%);
    color: white;
    border: none;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 1.25rem 1.5rem;
}
.body.loading{
    visibility: hidden;
    opacity: 0;
}
.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.card-header .nav-pills {
    margin: 0;
}

.card-header .nav-pills .nav-link {
    color: rgba(255,255,255,0.8);
    background-color: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    margin: 0 0.25rem;
}

.card-header .nav-pills .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.card-header .nav-pills .nav-link.active {
    background-color: white;
    color: #7e57c2;
    border-color: white;
}

/* Modern Chart Container Styles */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

canvas {
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1rem;
}

/* RTL Specific Adjustments */
[dir="rtl"] .nav-pills .nav-link {
    margin: 0 0.25rem;
}

[dir="rtl"] .table thead th {
    text-align: right;
}

[dir="rtl"] .card-header .nav-pills {
    margin-right: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card-header {
        padding: 1rem;
    }
    
    .card-header .nav-pills .nav-link {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
        margin: 0.125rem;
    }
    
    .table-responsive {
        border-radius: 0.5rem;
    }
}

/* Enhanced Widget Styles */
.widget-rounded-circle {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
}

.widget-rounded-circle:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.avatar-lg {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
}

.bg-soft-info {
    background-color: rgba(126, 87, 194, 0.1);
    border-color: #7e57c2 !important;
}

.bg-soft-success {
    background-color: rgba(76, 175, 80, 0.1);
    border-color: #4caf50 !important;
}

.bg-soft-warning {
    background-color: rgba(255, 152, 0, 0.1);
    border-color: #ff9800 !important;
}

.bg-soft-danger {
    background-color: rgba(244, 67, 54, 0.1);
    border-color: #f44336 !important;
}

.text-info {
    color: #7e57c2 !important;
}

.text-success {
    color: #4caf50 !important;
}

.text-warning {
    color: #ff9800 !important;
}

.text-danger {
    color: #f44336 !important;
}

.btn-info {
    background-color: #7e57c2;
    border-color: #7e57c2;
}

.btn-info:hover {
    background-color: #6a4c93;
    border-color: #6a4c93;
}

.btn-success {
    background-color: #4caf50;
    border-color: #4caf50;
}

.btn-success:hover {
    background-color: #388e3c;
    border-color: #388e3c;
}

.btn-warning {
    background-color: #ff9800;
    border-color: #ff9800;
}

.btn-warning:hover {
    background-color: #f57c00;
    border-color: #f57c00;
}

.btn-danger {
    background-color: #f44336;
    border-color: #f44336;
}

.btn-danger:hover {
    background-color: #d32f2f;
    border-color: #d32f2f;
}

/* Modern Alert Styles */
.alert {
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.btn-close {
    /* background: none; */
    border: none;
    font-size: 1.25rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.btn-close:hover {
    opacity: 1;
}

/* Enhanced Typography */
.font-22 {
    font-size: 1.375rem;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* RTL Specific Button Adjustments */
[dir="rtl"] .btn i {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}
/* Topbar adjustments */


.navbar-custom .topnav-menu {
    float: left;
}
.navbar-custom .topnav-menu-left {
    float: right;
}
.logo-box {
    float: right;
}

/* Content adjustments */
.content-page {
    margin-right: 250px;
    margin-left: 0;
}

.content-page.left-side-menu-condensed {
    margin-right: 70px;
    margin-left: 0;
}

/* Footer adjustments */
.footer-links a {
    margin-right: 0;
    margin-left: 1rem;
}

.footer-links a:last-child {
    margin-left: 0;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .content-page {
        margin-right: 0;
        margin-left: 0;
    }
    
    .left-side-menu {
        right: 0;
        left: auto;
    }
    
    .left-side-menu.show {
        right: 0 !important;
        left: auto;
    }
}
.alert .btn-close{
    color: gray;
    font-size: 12px;
    

}
/* Dark mode support */
[data-bs-theme="dark"] {
    --bs-body-bg: #1a1a1a;
    --bs-body-color: #e9ecef;
}

/* Custom scrollbar for RTL */
.simplebar-scrollbar::before {
    background-color: rgba(0, 0, 0, 0.2);
}



.fe-arrow-left::before {
    content: "\\e92f";
}

/* Notification adjustments */
.notification-list .dropdown-menu {
    right: auto;
    left: 0;
}

.notification-list .dropdown-menu-end {
    right: 0;
    left: auto;
}

/* User dropdown adjustments */
.profile-dropdown {
    right: auto;
    left: 0;
}
.apexcharts-text, .apexcharts-legend-text, .apexcharts-tooltip, .apexcharts-xaxis text, .apexcharts-yaxis text,.apexcharts-tooltip-title,.apexcharts-tooltip-series-group{
    font-family: 'iransans' !important;
}
/* Search box adjustments */
.app-search-box .input-group {
    direction: rtl;
}

.app-search-box .input-group .form-control {
    border-radius: 0 0.25rem 0.25rem 0;
    color: white;
}
.app-search-box .input-group .form-control:placeholder{
    color: white;
}

.app-search-box .input-group .btn {
    border-radius: 0.25rem 0 0 0.25rem;
}

/* Mobile menu button */
.button-menu-mobile {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Page title adjustments */
.page-title-box h4 {
    text-align: right;
}

.page-title-box .breadcrumb {
    justify-content: flex-start;
}

/* Content area adjustments */
.container-fluid {
    padding-right: 1rem;
    padding-left: 1rem;
}

/* Card adjustments */
.card {
    text-align: right;
}

.card-header {
    text-align: right;
}

.card-title {
    text-align: right;
}

/* Table adjustments */
.table th,
.table td {
    text-align: right;
}

table .badge{
    padding: 5px 10px;
}



/* Form adjustments */
.form-label {
    text-align: right;
}

.form-text {
    text-align: right;
}

/* Alert adjustments */
.alert {
    text-align: right;
}

/* Badge adjustments */
.badge {
    margin-right: 0;
    margin-left: 0.25rem;
}

/* Progress bar adjustments */
.progress {
    direction: rtl;
}

/* Modal adjustments */
.modal-header .btn-close {
    margin: -0.5rem auto -0.5rem -0.5rem;
}

.modal-footer {
    justify-content: flex-start;
}

.modal-footer .btn {
    margin-right: 0;
    margin-left: 0.25rem;
}

.modal-footer .btn:last-child {
    margin-left: 0;
}

/* Tooltip adjustments */
.tooltip {
    direction: rtl;
}

/* Popover adjustments */
.popover {
    direction: rtl;
}

/* Dropdown adjustments */
.dropdown-item {
    text-align: right;
}

.dropdown-header {
    text-align: right;
}

/* Nav tabs adjustments */
.nav-tabs .nav-link {
    text-align: center;
}

/* Pagination adjustments */
.pagination {
    justify-content: flex-start;
}

.page-link {
    margin-right: 0;
    margin-left: -1px;
}

.page-item:first-child .page-link {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.page-item:last-child .page-link {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* List group adjustments */
.list-group-item {
    text-align: right;
}

/* Custom animations for RTL */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

.slide-out-right {
    animation: slideOutRight 0.3s ease-in;
} 
.table > :not(caption) > * > *{
    box-shadow: none !important;
    color: black !important;
}
.authentication-bg-pattern {
    background-image: url("./images/bg-pattern.png");
}
.left-side-menu-condensed:has(.authentication-bg){
    padding: 0 !important;
}
.authentication-bg {
    background-color: #7e57c2;
    background-size: cover;
    background-position: center;
    height: 100vh;
}
@media (max-width: 568px) {
    .card-header{
        display: block !important;

    }
    .card-title{
        padding: 10px 5px !important;
    }
    .card-header .nav-pills{
        justify-content: center;
    }
    .notification-list .dropdown-menu{
       width: 100%;
       right: 0 !important;
    }
}
@media(max-width: 768px){
   .logo-sm img{
    width: 100%;
    height: 25px;
   }
   #pagination_nav{
    flex-direction: column;
    gap: 20px;
   }
}

/* News Card Styles */
#lastnews .card {
    margin-bottom: 20px;
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
}

#lastnews .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 5px 20px rgba(0, 0, 0, 0.1);
}

#lastnews .card-body {
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    position: relative;
}

#lastnews .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(102, 126, 234, 0.3) 50%, transparent 100%);
}

/* Card Widgets (Header Section) */
#lastnews .card-widgets {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

#lastnews .card-widgets a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

#lastnews .card-widgets a:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    color: #5a6fd8;
}

#lastnews .card-widgets a:active {
    transform: translateY(0);
}

#lastnews .card-widgets i {
    font-size: 1rem;
    transition: all 0.3s ease;
}

#lastnews .card-widgets a:hover i {
    transform: scale(1.1);
}

/* Header Title */
#lastnews .header-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
    position: relative;
    z-index: 2;
}

/* Collapse Section */
#lastnews .collapse {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#lastnews .pt-3 {
    padding-top: 1rem !important;
}

/* News Content Styles */
#quick-news-body {
    font-family: 'iransans', sans-serif;
}

#quick-news-body .row {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-left: 5px solid #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.08);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

#quick-news-body .row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#quick-news-body .row:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

#quick-news-body .row:hover::before {
    opacity: 1;
}

#quick-news-body .row:last-child {
    margin-bottom: 0;
}

#quick-news-body .widget-news-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#quick-news-body .widget-news-date {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    font-style: italic;
    background: linear-gradient(45deg, #6c757d, #495057);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#quick-news-body .widget-news-content {
    color: #495057;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 2;
}

#quick-news-body .widget-news-content p {
    margin-bottom: 0.75rem;
    text-align: justify;
}

#quick-news-body .widget-news-content p:last-child {
    margin-bottom: 0;
}

#quick-news-body a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 25px;
    border: 2px solid transparent;
    display: inline-block;
    position: relative;
    z-index: 2;
}

#quick-news-body a:hover {
    color: #5a6fd8;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Collapse Animation */
#newsCollapse.collapsing {
    height: 0;
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#newsCollapse.collapse:not(.show) {
    display: none;
}

#newsCollapse.collapsing {
    position: relative;
    height: 0;
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Loading Animation */
#lastnews.loading {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #lastnews .card-body {
        padding: 1.5rem;
    }
    
    #lastnews .card-widgets {
        top: 0.75rem;
        right: 0.75rem;
        gap: 0.25rem;
    }
    
    #lastnews .card-widgets a {
        width: 28px;
        height: 28px;
    }
    
    #lastnews .header-title {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
        padding-right: 3rem;
    }
    
    #quick-news-body .row {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    #quick-news-body .widget-news-title {
        font-size: 1.1rem;
    }
    
    #quick-news-body a {
        display: block;
        text-align: center;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    #lastnews .card {
        border-radius: 15px;
        margin-bottom: 15px;
    }
    
    #lastnews .card-body {
        padding: 1.25rem;
    }
    
    #lastnews .card-widgets {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    #lastnews .header-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    #quick-news-body .row {
        padding: 1rem;
        border-radius: 12px;
    }
}