/* assets/css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #4e73df;
    --primary-dark: #3a5bc7;
    --secondary: #858796;
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --dark: #2c3e50;
    --light: #f8f9fc;
    --sidebar-width: 260px;
    --header-height: 60px;
}

* {
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background-color: #f0f2f5;
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =================== SIDEBAR =================== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh; /* تنظیم ارتفاع ثابت برای فعال شدن اسکرول داخلی */
    background: linear-gradient(180deg, var(--dark) 0%, #1a252f 100%);
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1001; /* یک درجه بالاتر از overlay */
    transition: all 0.3s ease;
    box-shadow: -2px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
    
    /* مخفی کردن اسکرول‌بار در فایرفاکس و اج */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-brand {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand h4 {
    color: #fff;
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
}

.sidebar-brand small {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
}

.sidebar-brand .brand-icon {
    font-size: 2rem;
    margin-bottom: 5px;
    display: block;
}

.sidebar-menu {
    padding: 15px 0;
    list-style: none;
    margin: 0;
}

.sidebar-menu .menu-header {
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    padding: 15px 20px 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.2s;
    border-right: 3px solid transparent;
    font-size: 0.9rem;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-right-color: var(--primary);
}

.sidebar-menu li a i {
    width: 24px;
    margin-left: 10px;
    font-size: 1rem;
    text-align: center;
}

.sidebar-menu li a .badge {
    margin-right: auto;
    font-size: 0.7rem;
}

/* =================== MAIN CONTENT =================== */
.main-content {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* =================== TOP HEADER =================== */
.top-header {
    background: #fff;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 999;
}

.top-header .page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.top-header .header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-header .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-header .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--dark);
    cursor: pointer;
    display: none;
}

/* =================== CONTENT AREA =================== */
.content-area {
    padding: 25px;
}

/* =================== DASHBOARD CARDS =================== */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stat-card .card-body {
    padding: 25px;
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.stat-card .stat-icon.bg-primary-soft { background: rgba(78,115,223,0.15); color: var(--primary); }
.stat-card .stat-icon.bg-success-soft { background: rgba(28,200,138,0.15); color: var(--success); }
.stat-card .stat-icon.bg-warning-soft { background: rgba(246,194,62,0.15); color: var(--warning); }
.stat-card .stat-icon.bg-info-soft { background: rgba(54,185,204,0.15); color: var(--info); }

.stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}

.stat-card .stat-label {
    color: var(--secondary);
    font-size: 0.85rem;
    margin-top: 2px;
}

/* =================== CARDS & TABLES =================== */
.content-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: none;
    margin-bottom: 25px;
}

.content-card .card-header {
    background: #fff;
    border-bottom: 1px solid #edf2f7;
    padding: 18px 25px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.content-card .card-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark);
}

.content-card .card-body {
    padding: 25px;
}

.table {
    margin: 0;
}

.table thead th {
    background: #f8f9fc;
    border-bottom: 2px solid #edf2f7;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 12px 15px;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f2f5;
}

.table tbody tr:hover {
    background: #f8f9fc;
}

/* =================== BUTTONS =================== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 18px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(78,115,223,0.3);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
}

.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* =================== FORMS =================== */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dde2e6;
    padding: 10px 15px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(78,115,223,0.15);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--danger);
}

/* =================== FILTER BOX =================== */
.filter-box {
    background: #f8f9fc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #edf2f7;
}

/* =================== PAGINATION =================== */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    color: var(--primary);
    border: 1px solid #dee2e6;
    font-size: 0.85rem;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* =================== ALERTS =================== */
.alert {
    border-radius: 10px;
    border: none;
    font-size: 0.9rem;
}

/* =================== LOGIN PAGE =================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.login-card .login-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 30px;
    text-align: center;
    color: #fff;
}

.login-card .login-header h3 {
    margin: 10px 0 5px;
    font-weight: 700;
}

.login-card .login-header p {
    opacity: 0.8;
    margin: 0;
    font-size: 0.85rem;
}

.login-card .login-body {
    padding: 35px;
}

.login-card .login-body .input-group-text {
    border-radius: 0 8px 8px 0;
    background: #f8f9fc;
    border-left: none;
}

.login-card .login-body .form-control {
    border-right: none;
}

/* =================== GRADE BADGES =================== */
.grade-A { background: #d4edda; color: #155724; }
.grade-B { background: #d1ecf1; color: #0c5460; }
.grade-C { background: #fff3cd; color: #856404; }
.grade-D { background: #f8d7da; color: #721c24; }

/* =================== RESPONSIVE =================== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .content-area {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .stat-card .stat-number {
        font-size: 1.4rem;
    }
    
    .content-card .card-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
}

/* =================== SCROLLBAR =================== */
.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

/* =================== ANIMATIONS =================== */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =================== EMPTY STATE =================== */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.3;
}
/* assets/css/style.css - اضافه کنید به آخر فایل */

/* =================== STAR RATING =================== */
.star-rating i {
    font-size: 0.85rem;
    margin: 0 1px;
}

/* =================== COURSE VIEW CARDS =================== */
.border.rounded-3 {
    transition: all 0.2s;
}

.border.rounded-3:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(78,115,223,0.1);
}

/* =================== MODAL =================== */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.modal-header {
    border-bottom: 1px solid #edf2f7;
    padding: 18px 25px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid #edf2f7;
    padding: 15px 25px;
}

/* =================== PROGRESS BARS =================== */
.progress {
    border-radius: 10px;
    background: #edf2f7;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* =================== CAPACITY CIRCLE =================== */
svg circle {
    transition: stroke-dasharray 0.6s ease;
}

/* =================== FORM CHECK =================== */
.form-check {
    padding: 8px 28px 8px 0;
    border-radius: 6px;
    transition: background 0.2s;
}

.form-check:hover {
    background: #f8f9fc;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* =================== STATUS BADGES =================== */
.badge {
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
}

/* =================== BORDER CARDS =================== */
.border-start.border-4 {
    border-radius: 12px !important;
}

/* =================== ENROLLMENT STATUS SELECT =================== */
.form-select-sm {
    padding: 3px 8px;
    font-size: 0.78rem;
    border-radius: 6px;
}
/* assets/css/style.css - اضافات نهایی */

/* =================== COLORED STAT CARDS =================== */
.stat-card.bg-primary, .stat-card.bg-success,
.stat-card.bg-info, .stat-card.bg-warning {
    border: none;
}

.stat-card.bg-primary:hover { background: var(--primary-dark) !important; }

/* =================== TAB STYLES =================== */
.nav-tabs {
    border-bottom: 2px solid #edf2f7;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--secondary);
    font-weight: 600;
    padding: 12px 20px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: none;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: #ddd;
}

/* =================== PRINT STYLES =================== */
@media print {
    .sidebar, .top-header, .btn, .alert, .no-print {
        display: none !important;
    }
    .main-content {
        margin: 0 !important;
    }
    .content-area {
        padding: 0 !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* =================== DROPDOWN =================== */
.dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #edf2f7;
}

.dropdown-item {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: #f8f9fc;
}

/* =================== STAR INPUT =================== */
.star-input .star-btn {
    transition: all 0.15s;
}
.star-input .star-btn:hover {
    transform: scale(1.2);
}