@import url(fontiran.css); /* بارگذاری فونت‌های ایران‌سنس */

/* ==========================================================================
   ۱. پایه‌ها، فونت و ساختار کلی (Base & Typography)
   ========================================================================== */
:root {
    --portal-primary: #630c8a;
    --portal-secondary: #0087b0;
    --portal-gradient: linear-gradient(135deg, #0087b0 0%, #630c8a 100%);
    --portal-bg: #f1f5f9;
    --portal-card-bg: #ffffff;
    --portal-border: #e2e8f0;
    --portal-text-dark: #0f172a;
    --portal-text-muted: #64748b;
    --portal-teal: #0d9488;
}

body {
    font-family: IRANSansX, Tahoma, sans-serif !important;
    direction: rtl;
    text-align: right;
    background-color: var(--portal-bg) !important;
    color: #334155;
    margin: 0 !important;
    -webkit-font-smoothing: antialiased;
}

/* فعال‌سازی اعداد فارسی پیشرفته فونت */
.ss01 {
    -moz-font-feature-settings: "ss01" !important;
    -webkit-font-feature-settings: "ss01" !important;
    font-feature-settings: "ss01" !important;
}

h1, h2, h3, h4, h5, h6, input, select, textarea, button {
    font-family: IRANSansX, Tahoma, sans-serif !important;
}

/* اعداد، تاریخ و مقادیر انگلیسی/لاتین */
.eng-val, .ltr {
    direction: ltr !important;
    text-align: left;
    unicode-bidi: embed;
    font-family: inherit, monospace;
}
.eng-val {
    display: inline-block;
    font-weight: 600;
}

/* کلاس‌های کمکی تراز و متن */
.text-right  { text-align: right !important; }
.text-center { text-align: center !important; }
.text-left   { text-align: left !important; }

/* ==========================================================================
   ۲. هدرها، کارت‌ها و گرادیانت‌های اختصاصی
   ========================================================================== */
.card {
    border-radius: 12px !important;
    border: 1px solid var(--portal-border) !important;
    background-color: var(--portal-card-bg);
}

.bg-primary, .card-header.bg-primary {
    background: var(--portal-gradient) !important;
    color: #ffffff !important;
}

.portal-header-box {
    background: linear-gradient(to right, #EFF4FF, #F0FFF5);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid #e0e7ff;
}

/* ==========================================================================
   ۳. جداول مدرن پرتال (Unified Portal Tables)
   ========================================================================== */
.table-portal, 
.table-courses, 
.table-enrolls, 
.table-users, 
.table-teachers {
    width: 100%;
    margin-bottom: 0;
    vertical-align: middle;
}

.table-portal th, .table-portal td,
.table-courses th, .table-courses td,
.table-enrolls th, .table-enrolls td,
.table-users th, .table-users td,
.table-teachers th, .table-teachers td {
    font-size: 0.95rem !important;
    padding: 10px 8px !important;
    vertical-align: middle;
}

.table-portal thead th,
.table-courses thead th,
.table-enrolls thead th,
.table-users thead th,
.table-teachers thead th {
    font-size: 0.98rem !important;
    font-weight: 700;
    background-color: #f8fafc !important;
    color: #1e293b !important;
    border-bottom: 2px solid var(--portal-border) !important;
    white-space: nowrap;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc !important;
}

/* ==========================================================================
   ۴. اطلاعات چندخطی و برچسب‌های متادیتا (Stack Info & Badges)
   ========================================================================== */
.row-main-txt, 
.course-title-txt, 
.teacher-name-txt, 
.user-fullname-txt {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--portal-text-dark);
    margin-bottom: 3px;
    text-align: right;
}

.info-stack-box {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: right;
    font-size: 0.78rem;
}

.info-stack-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-tag-custom {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.teacher-avatar-img, .user-avatar-img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

/* ==========================================================================
   ۵. منوی شناور عملیات سه‌نقطه (Floating Action Menu)
   ========================================================================== */
.action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #334155;
    transition: all 0.15s ease-in-out;
}

.action-btn:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.floating-action-menu {
    display: none;
    position: fixed;
    min-width: 165px;
    background-color: #ffffff;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 9999999 !important;
    text-align: right;
    padding: 6px 0;
}

.floating-action-menu.show {
    display: block;
    animation: fadeInFast 0.12s ease-out;
}

@keyframes fadeInFast {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.floating-action-menu a, 
.floating-action-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    font-size: 0.90rem;
    color: #334155;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.1s;
}

.floating-action-menu a:hover, 
.floating-action-menu button:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.floating-action-menu .divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 5px 0;
}

.floating-action-menu .text-danger:hover {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
}

/* ==========================================================================
   ۶. بهینه‌سازی دکمه‌ها و المان‌های فرم (Buttons & Inputs)
   ========================================================================== */
.btn {
    border-radius: 8px;
    font-weight: 600;
}

.form-control, .form-select {
    border-radius: 8px;
    border-color: #cbd5e1;
}

.form-control:focus, .form-select:focus {
    border-color: var(--portal-secondary);
    box-shadow: 0 0 0 0.2rem rgba(0, 135, 176, 0.15);
}

.table-responsive {
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   ۷. کلاس‌های سازگاری قدیمی پرتال (Legacy Support)
   ========================================================================== */
.navbar-collapse.collapse.show {
    display: flex !important;
    flex-direction: column;
}

.fullwidth-wrapper {
    max-width: 1170px;
    width: 100%;
    margin: 0 auto 20px;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.fullwidth-wrapper a {
    flex: 1;
    display: block;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.fullwidth-wrapper a:hover { transform: scale(1.02); }
.fullwidth-wrapper img { width: 100%; height: 100%; object-fit: cover; border-radius: 1rem; }

@media (max-width: 768px) {
    .fullwidth-wrapper { flex-direction: column; }
    .fullwidth-wrapper a { width: 100%; margin-bottom: 10px; }
}

button, input[type="button"], input[type="submit"], .btn, .action-btn {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    -webkit-tap-highlight-color: transparent;
    vertical-align: middle;
    line-height: 1.5 !important;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

/* ==========================================================================
   ۸. استایل‌های فرم ثبت‌نام و ویرایش هنرجویان (Student Form Styles)
   ========================================================================== */
.student-form-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--portal-border);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.student-header {
    background: linear-gradient(135deg, #0f172a 0%, #2b446c  100%);
    color: #ffffff;
    padding: 18px 24px;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f766e;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px dashed #ccfbf1;
}

.required-star {
    color: #ef4444;
    margin-right: 3px;
}

.avatar-upload-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    padding: 10px 14px;
}

.avatar-preview-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--portal-teal);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    background: #ffffff;
}

.btn-submit {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    color: #ffffff !important;
    font-weight: 700;
    border-radius: 10px;
    padding: 10px 28px;
    border: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #0d9488, #0f766e);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}