/* استایل مینیمال و مدرن برای سیستم تیکتینگ */

.royal-ticketing-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;

}

/* فرم‌ها */
.royal-form {
    background: #393737;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.royal-form h2 {
    margin-top: 0;
    margin-bottom: 30px;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
}

.royal-form-group {
    margin-bottom: 25px;
}

.royal-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.royal-button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.royal-button-primary {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 115, 170, 0.2);
}

.royal-button-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a6f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 115, 170, 0.3);
}

.royal-button-primary:active {
    transform: translateY(0);
}

.required {
    color: #dc3232;
}

/* Badge ها */
.royal-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.royal-ticket-number {
    color: #666;
    font-size: 13px;
    font-weight: 600;
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 6px;
}

.royal-priority-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* لیست تیکت‌ها - جدول */
.royal-tickets-table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.royal-tickets-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.royal-tickets-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.royal-tickets-table thead th {
    padding: 15px 12px;
    text-align: right;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.royal-tickets-table tbody td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    vertical-align: middle;
}

.royal-tickets-table tbody tr {
    transition: background 0.3s;
    cursor: pointer;
}

.royal-tickets-table tbody tr:hover {
    background: #f9f9f9;
}

.royal-tickets-table tbody tr:last-child td {
    border-bottom: none;
}

.royal-ticket-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.royal-ticket-link:hover {
    color: #005a87;
    text-decoration: underline;
}

.royal-button-small {
    padding: 8px 16px;
    font-size: 13px;
}

.royal-no-tickets {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.royal-ticket-view-header {
    margin-bottom: 20px;
}

.royal-back-link {
    display: inline-block;
    padding: 10px 20px;
    background: #fff;
    color: #0073aa;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.royal-back-link:hover {
    background: #f0f0f0;
    color: #005a87;
    transform: translateX(-5px);
}

.royal-ticket-view {
    background: #c5bbbb45;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.royal-ticket-content {
    margin-top: 30px;
}

.royal-content {
    line-height: 1.8;
    color: #fff;
    margin-bottom: 20px;
    font-size: 15px;
}

.royal-ticket-info {
    display: flex;
    gap: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.royal-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.royal-info-label {
    font-weight: 600;
    color: #fff;
    font-size: 13px;
}

.royal-info-value {
    color: #fff;
    font-size: 13px;
}

/* تاریخچه تغییرات */
.royal-ticket-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.royal-stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s;
}

.royal-stat-box:hover {
    transform: translateY(-5px);
}

.royal-stat-box h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

.royal-stat-value {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.royal-ticket-history {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.royal-ticket-history h3 {
    margin-bottom: 25px;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.royal-history-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    transition: background 0.3s;
}

.royal-history-toggle:hover {
    background: #e8e8e8;
}

.royal-toggle-icon {
    display: inline-block;
    transition: transform 0.3s;
    font-size: 14px;
}

.royal-history-toggle.active .royal-toggle-icon {
    transform: rotate(180deg);
}

.royal-history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.royal-history-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border-left: 4px solid #0073aa;
    transition: all 0.3s;
}

.royal-history-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateX(5px);
    border-left-color: #005a87;
}

.royal-history-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
}

.royal-history-content {
    flex: 1;
}

.royal-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.royal-history-header strong {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.royal-history-date {
    color: #666;
    font-size: 12px;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 4px;
}

.royal-history-changes {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.royal-history-old {
    background: #fee;
    color: #c33;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: line-through;
    border: 1px solid #fcc;
}

.royal-history-arrow {
    color: #666;
    font-weight: bold;
    font-size: 16px;
}

.royal-history-new {
    background: #efe;
    color: #3c3;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #cfc;
}

.royal-history-user {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* پاسخ‌ها */
.royal-replies {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.royal-replies h3 {
    margin-bottom: 25px;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.royal-reply {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #0073aa;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.royal-reply:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.royal-reply.internal {
    border-left-color: #ff9800;
    background: #fff8e1;
    position: relative;
}

.royal-reply.internal::before {
    content: '🔒';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 18px;
    opacity: 0.7;
}

.royal-reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.royal-reply-author {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.royal-reply-header strong {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.royal-reply-date {
    color: #666;
    font-size: 12px;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 4px;
}

.royal-internal-badge {
    background: #ff9800;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.2);
}

.royal-reply-content {
    color: #555;
    line-height: 1.8;
    font-size: 14px;
}

.royal-add-reply {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #eee;
}

.royal-add-reply h4 {
    margin-bottom: 20px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.royal-reply-options {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.royal-reply-options .description {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* فیلترها */
.royal-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
    flex-wrap: wrap;
    background: #cabdbd66;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* فیلدهای سفارشی */
.royal-custom-fields {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #eee;
}

.royal-custom-fields h3 {
    margin-bottom: 20px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.royal-field-wrapper {
    margin-bottom: 25px;
}

.royal-checkbox-label,
.royal-radio-label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.3s;
}

.royal-checkbox-label:hover,
.royal-radio-label:hover {
    background: #f5f5f5;
}

.royal-checkbox-label input,
.royal-radio-label input {
    margin-left: 8px;
    cursor: pointer;
}

/* پیام‌ها */
#royal-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

#royal-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

#royal-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* جداول */
.royal-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.royal-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.royal-table th {
    padding: 15px;
    text-align: right;
    font-weight: 600;
    font-size: 14px;
}

.royal-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.royal-table tbody tr {
    transition: background 0.3s;
}

.royal-table tbody tr:hover {
    background: #f9f9f9;
}

.royal-table tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .royal-ticketing-wrapper {
        padding: 10px;
    }
    
    .royal-form {
        padding: 20px;
    }
    
    .royal-ticket-view {
        padding: 20px;
    }
    
    .royal-ticket-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .royal-history-item {
        flex-direction: column;
    }
}
