/* Persian Fonts */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* Base Styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --info-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

[data-bs-theme="dark"] {
    --bg-color: #1a1d29;
    --card-bg: #252836;
    --text-color: #e0e0e0;
    --border-color: #3a3f50;
}

* {
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    transition: var(--transition);
    line-height: 1.6;
}

[data-bs-theme="dark"] body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login-page .card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: var(--border-radius);
}

[data-bs-theme="dark"] .login-page .card {
    background: rgba(37, 40, 54, 0.95);
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin: 0 2px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    background: white;
}

[data-bs-theme="dark"] .card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

/* Stats Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-info {
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
}

.card.bg-success {
    background: linear-gradient(135deg, #4cc9f0, #4895ef) !important;
}

.card.bg-warning {
    background: linear-gradient(135deg, #f8961e, #f3722c) !important;
}

.card.bg-info {
    background: linear-gradient(135deg, #4895ef, #4361ee) !important;
}

/* Quick Actions */
.btn-outline-primary,
.btn-outline-success,
.btn-outline-info,
.btn-outline-secondary {
    border: 2px solid;
    transition: var(--transition);
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Dark Mode Toggle */
#darkModeToggle .bi-sun {
    display: none;
}

[data-bs-theme="dark"] #darkModeToggle .bi-moon {
    display: none;
}

[data-bs-theme="dark"] #darkModeToggle .bi-sun {
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .display-6 {
        font-size: 2.5rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: #2d3748;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}









/* استایل‌های جدید برای فایل منیجر پیشرفته */

/* سطرهای انتخاب شده */
.file-row.selected {
    background-color: var(--bs-primary-bg-subtle) !important;
}

.file-row:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
    cursor: pointer;
}

/* درخت پوشه‌ها */
.folder-children {
    border-right: 2px solid #e9ecef;
    margin-right: 10px;
}

.toggle-folder {
    transition: all 0.3s ease;
}

.toggle-folder:hover {
    background-color: var(--bs-primary) !important;
    color: white !important;
}

/* شمارنده انتخاب */
#selectionCounter {
    font-size: 0.8rem;
}

/* ناوبری صفحه کلید */
.file-row:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: -2px;
}

/* استایل برای حالت‌های مختلف */
.table-active {
    --bs-table-bg-state: rgba(var(--bs-primary-rgb), 0.1) !important;
}

/* responsive sidebar */
@media (max-width: 768px) {
    .col-md-3 {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 1040;
        transition: right 0.3s ease;
        overflow-y: auto;
    }
    
    .col-md-3.show {
        right: 0;
    }
    
    .col-md-9 {
        width: 100%;
    }
    
    /* دکمه toggle برای موبایل */
    .sidebar-toggle {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1050;
    }
}



/* استایل‌های جدید برای ساختار درختی و breadcrumb */

/* ساختار درختی - دکمه‌های + و - بدون border و بزرگتر */
.toggle-folder {
    color: #6c757d !important;
    transition: color 0.3s ease;
}

.toggle-folder:hover {
    color: var(--bs-primary) !important;
    background-color: transparent !important;
}

.toggle-folder .bi {
    font-weight: bold;
    font-size: 14px;
}


/* سطرهای انتخاب شده - استایل بهبود یافته */
.file-row.selected {
    background-color: rgba(var(--bs-primary-rgb), 0.15) !important;
    border-left: 3px solid var(--bs-primary);
}

.file-row.selected td {
    border-color: rgba(var(--bs-primary-rgb), 0.3);
}

/* چک‌باکس‌های انتخاب شده */
.file-checkbox:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* hover effect برای سطرها */
.file-row:hover {
    background-color: rgba(0, 123, 255, 0.08) !important;
    cursor: pointer;
}

/* استایل برای حالت انتخاب چندگانه */
.table-active {
    --bs-table-bg-state: rgba(var(--bs-primary-rgb), 0.1) !important;
}

/* شمارنده انتخاب */
#selectionCounter {
    font-size: 0.8rem;
    background: var(--bs-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

/* responsive improvements */
@media (max-width: 768px) {
    .breadcrumb-step {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
        min-width: 60px;
    }
    
    .breadcrumb-arrow {
        padding: 0 0.25rem;
    }
}

/* استایل برای فایل‌منیجر */
.folder-children {
    border-right: 2px solid #e9ecef;
    margin-right: 10px;
    transition: all 0.3s ease;
}

/* انیمیشن برای collapse */
.collapse {
    transition: all 0.3s ease;
}












/* استایل‌های پیشرفته برای انتخاب مانند ویندوز */

/* سطرهای انتخاب شده */
.file-row.selected {
    background-color: rgba(13, 110, 253, 0.1) !important;
    border-left: 3px solid #0d6efd !important;
}

.file-row.selected td {
    border-color: rgba(13, 110, 253, 0.2) !important;
    position: relative;
}

/* hover effect برای سطرها */
.file-row:hover {
    background-color: rgba(0, 123, 255, 0.05) !important;
    cursor: pointer;
}

.file-row.selected:hover {
    background-color: rgba(13, 110, 253, 0.15) !important;
}

/* چک‌باکس‌ها */
.file-checkbox {
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-checkbox:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.file-checkbox:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* انتخاب تمام */
#selectAll:indeterminate {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* انیمیشن برای تغییر انتخاب */
.file-row {
    transition: all 0.2s ease;
}

/* جلوگیری از انتخاب متن */
.file-row {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* استایل برای حالت فوکوس (برای ناوبری صفحه کلید) */
.file-row:focus {
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
}

/* شمارنده انتخاب */
#selectionCounter {
    font-size: 0.8rem;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* استایل برای جدول */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.025);
}

/* responsive */
@media (max-width: 768px) {
    .file-row.selected {
        border-left: 2px solid #0d6efd !important;
    }
    
    #selectionCounter {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

/* استایل برای حالت‌های مختلف انتخاب */
.table-active {
    --bs-table-bg-state: rgba(13, 110, 253, 0.1) !important;
}

/* highlight برای آخرین آیتم انتخاب شده */
.file-row.selected:last-of-type {
    background-color: rgba(13, 110, 253, 0.12) !important;
}









.breadcrumb-arrow {
    height: 36px;
    padding: 0;
    line-height: 36px;
    list-style: none;
    background-color: #e6e9ed
}
.breadcrumb-arrow li:first-child a {
    border-radius: 4px 0 0 4px;
    -webkit-border-radius: 4px 0 0 4px;
    -moz-border-radius: 4px 0 0 4px
}
.breadcrumb-arrow li, .breadcrumb-arrow li a, .breadcrumb-arrow li span {
    display: inline-block;
    vertical-align: top
}
.breadcrumb-arrow li:not(:first-child) {
    margin-right: -1px
}
.breadcrumb-arrow li+li:before {
    padding: 0;
    content: ""
}
.breadcrumb-arrow li span {
    padding: 0 10px
}
.breadcrumb-arrow li a, .breadcrumb-arrow li:not(:first-child) span {
    height: 36px;
    padding: 0 10px 0 25px;
    line-height: 36px
}
.breadcrumb-arrow li:first-child a {
    padding: 0 10px
}
.breadcrumb-arrow li a {
    position: relative;
    color: #fff;
    text-decoration: none;
    background-color: #3bafda;
    border: 1px solid #3bafda
}
.breadcrumb-arrow li:first-child a {
    padding-right: 10px
}
.breadcrumb-arrow li a:after, .breadcrumb-arrow li a:before {
    position: absolute;
    top: -1px;
    width: 0;
    height: 0;
    content: '';
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent
}
.breadcrumb-arrow li a:before {
    left: -10px;
    z-index: 3;
    border-right-color: #3bafda;
    border-right-style: solid;
    border-right-width: 11px
}
.breadcrumb-arrow li a:after {
    left: -11px;
    z-index: 2;
    border-right: 11px solid #2494be
}
.breadcrumb-arrow li a:focus, .breadcrumb-arrow li a:hover {
    background-color: #4fc1e9;
    border: 1px solid #4fc1e9
}
.breadcrumb-arrow li a:focus:before, .breadcrumb-arrow li a:hover:before {
    border-right-color: #4fc1e9
}
.breadcrumb-arrow li a:active {
    background-color: #2494be;
    border: 1px solid #2494be
}
.breadcrumb-arrow li a:active:after, .breadcrumb-arrow li a:active:before {
    border-right-color: #2494be
}
.breadcrumb-arrow li span {
    color: #434a54
}
.breadcrumb-arrow li a,
.breadcrumb-arrow li.active{
    padding-right: 25px;
}