/* assets/css/style.css - استایل‌های سفارشی */

/* ============================================================
   تنظیمات پایه
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: #f0f2f5;
}

/* ============================================================
   کارت‌های آماری
   ============================================================ */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* ============================================================
   فرم‌ها
   ============================================================ */
.form-control {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.08);
}

/* ============================================================
   انیمیشن‌ها
   ============================================================ */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-down {
    animation: slideDown 0.4s ease-out;
}

/* ============================================================
   جدول واکنش‌گرا
   ============================================================ */
.table-responsive {
    overflow-x: auto;
}

/* ============================================================
   پیام‌ها
   ============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.alert-danger {
    background: #fecaca;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ============================================================
   لینک نام استاد
   ============================================================ */
.teacher-name-link {
    color: #1a237e;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.teacher-name-link:hover {
    color: #355C9C;
    text-decoration: underline;
}
.teacher-name-link i {
    transition: transform 0.2s;
}
.teacher-name-link:hover i {
    transform: translateX(-4px);
}

/* ============================================================
   وضعیت شبا با رنگ کامل
   ============================================================ */
.status-sheba {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    min-width: 90px;
    text-align: center;
}
.status-sheba-confirmed {
    background: #d1fae5;
    color: #065f46;
}
.status-sheba-pending {
    background: #fef3c7;
    color: #92400e;
}
.status-sheba-empty {
    background: #f3f4f6;
    color: #6b7280;
}

/* ============================================================
   وضعیت با رنگ کامل
   ============================================================ */
.status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    min-width: 70px;
    text-align: center;
}
.status-active {
    background: #d1fae5;
    color: #065f46;
}
.status-inactive {
    background: #fecaca;
    color: #991b1b;
}

/* ============================================================
   دکمه‌های عملیات با سایز یکسان
   ============================================================ */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: center;
}
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: white;
    flex-shrink: 0;
}
.btn-action i {
    font-size: 13px;
}
.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* ===== رنگ‌های دکمه‌ها ===== */
.btn-action-edit {
    background: #1a237e;
}
.btn-action-edit:hover {
    background: #0d1442;
}

.btn-action-confirm {
    background: #10b981;
}
.btn-action-confirm:hover {
    background: #059669;
}

.btn-action-disable {
    background: #dc3545;
}
.btn-action-disable:hover {
    background: #c82333;
}

.btn-action-enable {
    background: #10b981;
}
.btn-action-enable:hover {
    background: #059669;
}

.btn-action-delete {
    background: #dc3545;
}
.btn-action-delete:hover {
    background: #bd2130;
}

/* ============================================================
   دکمه‌های فیلتر
   ============================================================ */
.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-sm i {
    font-size: 12px;
}
.btn-primary {
    background: #1a237e;
    color: white;
}
.btn-primary:hover {
    background: #0d1442;
}
.btn-success {
    background: #10b981;
    color: white;
}
.btn-success:hover {
    background: #059669;
}
.btn-danger {
    background: #dc3545;
    color: white;
}
.btn-danger:hover {
    background: #c82333;
}

/* ============================================================
   جدول
   ============================================================ */
table {
    border-collapse: collapse;
    width: 100%;
}
.border {
    border: 1px solid #e5e7eb;
}
.hover\:bg-gray-50:hover {
    background: #f9fafb;
}
.text-center {
    text-align: center;
}

/* ============================================================
   کارت‌ها
   ============================================================ */
.card {
    transition: all 0.2s;
}
.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

/* ============================================================
   آیتم نقش‌ها (roles)
   ============================================================ */
.role-item {
    transition: all 0.2s;
}
.role-item:hover {
    border-color: #1a237e !important;
    box-shadow: 0 2px 8px rgba(26,35,126,0.06);
}

/* ============================================================
   آیتم ترم‌ها (terms)
   ============================================================ */
.term-item {
    transition: all 0.2s;
}
.term-item:hover {
    border-color: #1a237e !important;
    box-shadow: 0 2px 8px rgba(26,35,126,0.06);
}

/* ============================================================
   استایل‌های صفحه تنظیمات حق التدریس (salary-settings)
   ============================================================ */

/* ===== کارت‌های آمار با گرادیان ===== */
.stat-card-gradient {
    border-radius: 14px;
    padding: 18px 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: white;
}
.stat-card-gradient:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.stat-card-blue {
    background: linear-gradient(135deg, #355C9C, #4A7ABF);
}
.stat-card-green {
    background: linear-gradient(135deg, #059669, #10B981);
}
.stat-card-purple {
    background: linear-gradient(135deg, #7C3AED, #8B5CF6);
}

/* ===== بخش‌های کارت با هدر ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}
.section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.section-icon-blue {
    background: #dbeafe;
    color: #355C9C;
}
.section-icon-green {
    background: #d1fae5;
    color: #059669;
}
.section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}
.section-subtitle {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

/* ===== فیلدهای فرم ===== */
.input-with-suffix {
    position: relative;
}
.input-with-suffix .suffix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-weight: 600;
}
.input-with-suffix .form-control {
    padding-left: 30px;
}

/* ===== فیلدهای غیرفعال ===== */
.input-disabled {
    background: #f3f4f6 !important;
    cursor: not-allowed !important;
    color: #9ca3af !important;
    border-color: #f3f4f6 !important;
}
.input-disabled-text {
    display: block;
    color: #9ca3af;
    font-size: 10px;
    margin-top: 2px;
}

/* ===== برچسب نوع درس (شبیه به مدرسان) ===== */
.course-type-badge {
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}
.course-type-theoretical {
    background: #dbeafe;
    color: #1e40af;
}
.course-type-practical {
    background: #fef3c7;
    color: #92400e;
}

/* ===== برچسب نوع درس بزرگتر ===== */
.course-type-badge-large {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}
.course-type-theoretical-large {
    background: #dbeafe;
    color: #1e40af;
}
.course-type-practical-large {
    background: #fef3c7;
    color: #92400e;
}

/* ===== کارت‌های مقاطع ===== */
.card-degree {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}
.card-degree:hover {
    border-color: #355C9C;
    box-shadow: 0 4px 16px rgba(53, 92, 156, 0.06);
}

/* ===== آیتم نوع درس ===== */
.course-item {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s;
}
.course-item:hover {
    border-color: #355C9C;
    box-shadow: 0 2px 8px rgba(53, 92, 156, 0.05);
}
.course-item:last-child {
    margin-bottom: 0;
}

/* ===== تگ کمکی ===== */
.helper-tag {
    font-size: 11px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 10px;
    border-radius: 12px;
}

/* ===== ردیف‌های جدول ===== */
.table-row-hover {
    transition: background 0.2s;
}
.table-row-hover:hover {
    background: #f9fafb;
}
.table-row-hover td {
    background: transparent !important;
}

/* ===== دکمه‌ها با سایه ===== */
.btn-with-shadow {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.btn-with-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3) !important;
}

/* ===== راهنما ===== */
.legend-box {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
    padding: 14px 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
}
.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}
.legend-color-blue {
    background: #dbeafe;
}
.legend-color-yellow {
    background: #fef3c7;
}
.legend-lock {
    color: #9ca3af;
    font-size: 12px;
}

/* ============================================================
   اسکرول
   ============================================================ */
.max-h-\[500px\] {
    max-height: 500px;
}
.overflow-y-auto {
    overflow-y: auto;
}
.space-y-3 > * + * {
    margin-top: 12px;
}

/* ============================================================
   ریسپانسیو
   ============================================================ */
@media (max-width: 768px) {
    .action-buttons {
        gap: 3px;
    }
    .btn-action {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    .btn-action i {
        font-size: 11px;
    }
    .status-sheba, .status-badge {
        font-size: 11px;
        padding: 2px 8px;
        min-width: 60px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    .stat-card-gradient {
        padding: 14px 16px !important;
    }
    .stat-card-gradient .stat-value {
        font-size: 20px !important;
    }
    .card {
        padding: 16px 18px !important;
    }
}

@media (max-width: 640px) {
    .table th,
    .table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    .btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    .card-degree {
        padding: 16px;
    }
    .course-item {
        padding: 12px 14px;
    }
    .course-type-badge-large {
        font-size: 13px;
        padding: 4px 12px;
    }
}