/* فونت‌های فارسی */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/font-face.css');
@import url('https://fonts.googleapis.com/css2?family=Sahel&display=swap');

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

body {
    font-family: 'Vazir', 'Sahel', 'Tahoma', 'Arial', sans-serif;
    line-height: 1.8;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    direction: rtl;
    text-align: right;
}

/* بهبود نمایش فونت‌های فارسی */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    font-weight: 700;
    line-height: 1.4;
}

p, span, div, label, button, input, textarea, select, table, th, td {
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

/* صفحه لاگین و ثبت نام */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    text-align: center;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.login-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 24px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    font-weight: 700;
}

.login-header p {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.login-form {
    text-align: right;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

/* استایل‌های جدید برای ثبت نام */
.success-message {
    background: #d5f4e6;
    color: #27ae60;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-right: 4px solid #27ae60;
    text-align: center;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    font-size: 14px;
}

.login-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.login-links a {
    color: #3498db;
    text-decoration: none;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.login-links a:hover {
    text-decoration: underline;
}

.password-examples {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: right;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.password-examples h4 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.password-examples p {
    margin: 5px 0;
    font-size: 12px;
    color: #7f8c8d;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    line-height: 1.6;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: #7f8c8d;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

/* هدر اصلی */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.header h1 {
    font-size: 20px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

/* کانتینر اصلی */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

/* فرم‌ها */
.form-group {
    margin-bottom: 20px;
    text-align: right;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    text-align: right;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* دکمه‌ها */
.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-admin {
    background: #27ae60;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    display: inline-block;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    display: inline-block;
}

.btn-back {
    background: #95a5a6;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    display: inline-block;
}

.btn-view {
    background: #3498db;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 12px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    display: inline-block;
}

.btn-profile {
    background: #9b59b6;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    display: inline-block;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    margin-left: 10px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* بخش‌های اصلی */
.ticket-form-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.tickets-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.profile-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

/* لیست تیکت‌ها */
.tickets-list {
    display: grid;
    gap: 15px;
}

.ticket-item {
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    background: white;
}

.ticket-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ticket-item[data-status="open"] {
    border-left: 5px solid #27ae60;
}

.ticket-item[data-status="pending"] {
    border-left: 5px solid #f39c12;
}

.ticket-item[data-status="closed"] {
    border-left: 5px solid #e74c3c;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.ticket-number {
    font-weight: bold;
    color: #2c3e50;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.ticket-status {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.status-open {
    background: #d5f4e6;
    color: #27ae60;
}

.status-pending {
    background: #fef5e7;
    color: #f39c12;
}

.status-closed {
    background: #fdeaea;
    color: #e74c3c;
}

.ticket-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.ticket-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 10px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.ticket-actions {
    text-align: left;
}

/* جزئیات تیکت */
.ticket-details {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.ticket-header-detail {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.ticket-main-info h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    font-weight: 700;
}

.ticket-meta-detail {
    display: flex;
    gap: 15px;
    align-items: center;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.ticket-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.ticket-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.ticket-description h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

/* پاسخ‌ها */
.ticket-replies {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.reply-item {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.admin-reply {
    background: #e8f4fd;
    border-right: 5px solid #3498db;
}

.user-reply {
    background: #f0f0f0;
    border-right: 5px solid #95a5a6;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.reply-author {
    font-weight: bold;
    color: #2c3e50;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.reply-time {
    color: #7f8c8d;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.reply-form {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

/* پنل ادمین */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

.admin-tickets {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Vazir', 'Sahel', 'Tahoma', sans-serif;
}

/* جدول */
.tickets-table {
    overflow-x: auto;
    font-family: 'Vaz