/* پس‌زمینه تیره پشت پاپ‌آپ */
.mc-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
    font-family: inherit;
}
/* کادر اصلی پاپ‌آپ */
.mc-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}
/* دکمه بستن */
.mc-modal-close {
    position: absolute;
    top: 15px; left: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}
.mc-modal-close:hover { color: #333; }
.mc-modal-header h3 { margin: 0 0 10px; color: #333; font-size: 20px; }
.mc-modal-header p { margin: 0 0 20px; color: #666; font-size: 14px; }
/* فیلدهای ورودی */
.mc-modal-content input[type="text"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    text-align: center;
    font-size: 16px;
    direction: ltr; /* برای تایپ راحت اعداد */
}
.mc-modal-content input[type="text"]:focus {
    border-color: #007cba;
    outline: none;
}
/* دکمه‌ها */
.mc-btn {
    width: 100%; padding: 12px;
    background: #007cba; color: #fff;
    border: none; border-radius: 8px;
    font-size: 16px; cursor: pointer;
    transition: background 0.3s;
}
.mc-btn:hover { background: #005a87; }
.mc-btn:disabled { background: #ccc; cursor: not-allowed; }
.mc-btn-text {
    background: none; border: none;
    color: #007cba; cursor: pointer;
    margin-top: 15px; font-size: 13px;
}
.mc-message { margin-top: 10px; font-size: 13px; font-weight: bold; }
.mc-error { color: #dc3232; }
.mc-success { color: #46b450; }
/* استایل‌های داشبورد کاربری */
.mc-dashboard-container { background: #fff; padding: 25px; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); margin: 20px 0; }
.mc-dashboard-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 25px; }
.mc-dashboard-header h2 { font-size: 20px; margin: 0; color: #333; }
.mc-btn-logout { color: #dc3232; text-decoration: none; font-size: 14px; font-weight: bold; border: 1px solid #dc3232; padding: 5px 15px; border-radius: 5px; }
.mc-btn-logout:hover { background: #dc3232; color: #fff; }
.mc-dashboard-tabs { display: flex; gap: 15px; margin-bottom: 25px; border-bottom: 2px solid #eee; }
.mc-tab-btn { background: none; border: none; padding: 10px 15px; font-size: 16px; cursor: pointer; color: #888; border-bottom: 2px solid transparent; margin-bottom: -2px; font-family: inherit; }
.mc-tab-btn.active { color: #007cba; border-bottom-color: #007cba; font-weight: bold; }
.mc-form-row { display: flex; gap: 20px; }
.mc-form-group { margin-bottom: 20px; text-align: right; }
.half-width { flex: 1; }
.mc-form-group label { display: block; margin-bottom: 8px; font-weight: bold; color: #444; font-size: 14px; }
.mc-form-group input[type="text"], .mc-form-group select, .mc-form-group textarea, .mc-form-group input[type="file"] { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-family: inherit; font-size: 15px; background: #fdfdfd; box-sizing: border-box; }
.mc-form-group input:focus, .mc-form-group textarea:focus { border-color: #007cba; outline: none; }
.mc-ticket-list { list-style: none; padding: 0; margin: 0; }
.mc-ticket-list li { display: flex; justify-content: space-between; align-items: center; padding: 15px; border: 1px solid #eee; border-radius: 8px; margin-bottom: 10px; background: #fafafa; }
.mc-ticket-list a { text-decoration: none; color: #007cba; font-size: 16px; }
.mc-status-badge { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; }
.mc-status-mc-pending { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.mc-status-mc-answered { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.mc-status-mc-closed { background: #e2e3e5; color: #383d41; border: 1px solid #d6d8db; }
@media(max-width: 768px) { .mc-form-row { flex-direction: column; gap: 0; } }

.mc-dashboard-wrapper {
    max-width: 900px;
    margin: 40px auto;
    font-family: 'IRANSans', tahoma, sans-serif;
    direction: rtl;
}

.mc-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.mc-tab-btn {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 15px;
}

.mc-tab-btn.active, .mc-tab-btn:hover {
    background: #0ea5e9;
    color: #fff;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.mc-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.mc-tab-content.active {
    display: block;
}

.mc-form-container {
    background: #ffffff;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.mc-form-title {
    font-size: 22px;
    color: #1e293b;
    margin-bottom: 25px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
}

.mc-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.mc-form-group {
    margin-bottom: 20px;
}

.mc-form-group.half {
    flex: 1;
    margin-bottom: 0;
}

.mc-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-weight: 600;
    font-size: 14px;
}

.mc-form-group input, 
.mc-form-group select, 
.mc-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    font-family: inherit;
    transition: border-color 0.3s;
}

.mc-form-group input:focus, 
.mc-form-group select:focus, 
.mc-form-group textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.mc-file-upload {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
    text-align: center;
}

.mc-submit-wrapper {
    text-align: left;
    margin-top: 30px;
}

.mc-submit-btn {
    background: #10b981;
    color: white;
    padding: 14px 35px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.mc-submit-btn:hover {
    background: #059669;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .mc-form-row {
        flex-direction: column;
        gap: 15px;
    }
}
/* ==================================================
   MED-CONSULTATION DASHBOARD & FORM STYLES
================================================== */
.mc-dashboard-container {
    max-width: 900px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: 'IRANSans', Tahoma, sans-serif;
    direction: rtl;
}

/* Tabs */
.mc-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}
.mc-tab-link {
    flex: 1;
    background: none;
    border: none;
    padding: 20px;
    font-size: 16px;
    font-weight: bold;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.mc-tab-link:hover {
    background: #f1f5f9;
    color: #3b82f6;
}
.mc-tab-link.active {
    color: #2563eb;
    background: #ffffff;
    border-bottom: 3px solid #2563eb;
}

/* Form Styles */
.mc-tab-content {
    padding: 30px;
}
.mc-elegant-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
}
.mc-required {
    color: #ef4444;
}
.mc-form-group {
    margin-bottom: 20px;
}
.mc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.mc-elegant-form input[type="text"],
.mc-elegant-form input[type="number"],
.mc-elegant-form input[type="date"],
.mc-elegant-form select,
.mc-elegant-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    font-family: inherit;
    transition: border 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}
.mc-elegant-form input:focus,
.mc-elegant-form select:focus,
.mc-elegant-form textarea:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: #ffffff;
}

/* Checkbox Cards */
.mc-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}
.mc-check-card {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    background: #fff;
}
.mc-check-card:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}
.mc-check-card input {
    margin-left: 10px;
    transform: scale(1.2);
}

/* Radio Pills */
.mc-radio-inline {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.mc-radio-pill {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: #f1f5f9;
    border-radius: 50px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.3s;
}
.mc-radio-pill:hover {
    background: #e2e8f0;
}
.mc-radio-pill input {
    margin-left: 8px;
}

/* Sections & Dynamic Rows */
.mc-form-section {
    background: #fbfdff;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}
.mc-form-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}
.mc-dynamic-box {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}
.mc-dynamic-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
}
.mc-dynamic-row.align-center {
    align-items: center;
    grid-template-columns: 1.5fr 1fr 1.5fr auto;
}
.mc-btn-icon-danger {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.mc-btn-icon-danger:hover {
    background: #fca5a5;
    color: #fff;
}
.mc-btn-add {
    background: none;
    border: 1px dashed #3b82f6;
    color: #3b82f6;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
    transition: 0.2s;
}
.mc-btn-add:hover {
    background: #eff6ff;
}

/* Submit Button */
.mc-form-actions {
    text-align: center;
    margin-top: 30px;
}
.mc-btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.mc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Empty State */
.mc-empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #64748b;
}
.mc-empty-icon {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .mc-form-grid, .mc-dynamic-row, .mc-dynamic-row.align-center {
        grid-template-columns: 1fr;
    }
}
