/* ===== استایل‌های مشترک بخش مشاوره ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Tahoma, 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 15px;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 25px;
}

/* ===== هدر ===== */
.main-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
}
.main-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}
.main-header p {
    opacity: 0.9;
    font-size: 14px;
}
.back-link {
    display: inline-block;
    color: #ffd700;
    text-decoration: none;
    margin-top: 8px;
    font-weight: 600;
    font-size: 14px;
}
.back-link:hover {
    text-decoration: underline;
}

/* ===== نوار مدیریت ===== */
.admin-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 8px;
}
.admin-bar .admin-info {
    font-size: 13px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 6px;
}
.admin-bar .admin-info .admin-name {
    color: #3498db;
    font-weight: bold;
}
.admin-bar .logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}
.admin-bar .logout-btn:hover {
    background: #c82333;
}

/* ===== دکمه‌ها ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: Tahoma;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.btn-primary {
    background: #3498db;
    color: white;
}
.btn-primary:hover {
    background: #2980b9;
}
.btn-success {
    background: #28a745;
    color: white;
}
.btn-success:hover {
    background: #218838;
}
.btn-danger {
    background: #dc3545;
    color: white;
}
.btn-danger:hover {
    background: #c82333;
}
.btn-warning {
    background: #ffc107;
    color: #2c3e50;
}
.btn-warning:hover {
    background: #e0a800;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}
.btn-block {
    width: 100%;
    justify-content: center;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== فرم‌ها ===== */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}
.form-group label .required {
    color: #dc3545;
}
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: Tahoma;
    font-size: 15px;
    transition: border 0.3s;
    box-sizing: border-box;
}
.form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.2);
}
textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ===== پیام‌ها ===== */
.message-item {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    background: #fff;
    transition: all 0.3s;
}
.message-item:hover {
    border-color: #3498db;
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);
}
.message-item.pending {
    border-right: 4px solid #ffc107;
}
.message-item.answered {
    border-right: 4px solid #28a745;
}
.message-item .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.message-item .patient-name {
    font-weight: 700;
    font-size: 16px;
    color: #2c3e50;
}
.message-item .status-badge {
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
}
.message-item .status-badge.pending {
    background: #fff3cd;
    color: #856404;
}
.message-item .status-badge.answered {
    background: #d4edda;
    color: #155724;
}
.message-item .question {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 8px 0;
    border-right: 3px solid #3498db;
}
.message-item .answer {
    background: #e8f5e9;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 8px 0;
    border-right: 3px solid #28a745;
}
.message-item .meta {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 8px;
}
.message-item .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.message-item .hidden-info {
    display: none;
}

/* ===== تالار گفتگو ===== */
.forum-item {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px 18px;
    margin-bottom: 15px;
    background: #fafbfc;
}
.forum-item .question {
    font-weight: 600;
    color: #2c3e50;
}
.forum-item .answer {
    margin-top: 8px;
    padding: 10px 14px;
    background: #e8f5e9;
    border-radius: 8px;
    border-right: 3px solid #28a745;
}
.forum-item .meta {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 6px;
}
.forum-item .consultant-name {
    color: #27ae60;
    font-weight: 600;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 600px) {
    .container { padding: 15px; }
    .main-header h1 { font-size: 20px; }
    .admin-bar { flex-direction: column; align-items: stretch; text-align: center; }
    .message-item .header { flex-direction: column; align-items: flex-start; }
    .message-item .actions { flex-direction: column; }
    .message-item .actions .btn { width: 100%; justify-content: center; }
    .form-group label { font-size: 14px; }
}