/**
 * Medical Management System - Dashboard Styles
 * File: assets/css/dashboard.css
 */

/* Dashboard Container */
.mms-dashboard {
    min-height: 100vh;
    /* width: 100%; */
    background: #F9FAFB;
}

/* Dashboard Header */
.mms-dashboard-header {
    background: white;
    border-bottom: 1px solid #E5E7EB;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mms-header-content {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mms-header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mms-header-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1F2937;
}

.mms-header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Mobile Menu Toggle - جدید */
.mms-mobile-menu-toggle {
    display: none;
    padding: 0.5rem;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.mms-mobile-menu-toggle:hover {
    background: #F3F4F6;

}

.mms-mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    color: #374151;
}

/* Notification Bell */
.mms-notification-bell {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.mms-notification-bell:hover {
    background: #F3F4F6;
}

.mms-notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #EF4444;
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    font-weight: 600;
}

/* User Menu */
.mms-user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: background 0.2s;
}

.mms-user-menu:hover {
    background: #F3F4F6;
}

.mms-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.mms-user-info h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1F2937;
}

.mms-user-info p {
    font-size: 0.75rem;
    color: #6B7280;
}

/* Dashboard Content */
.mms-dashboard-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Sidebar */
.mms-sidebar {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    height: fit-content;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Sidebar Overlay - جدید */
.mms-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mms-sidebar-overlay.active {
    display: block;
    opacity: 1;
    margin: 20px;
}

/* Body no scroll when menu is open - جدید */
body.no-scroll {
    overflow: hidden;
}

.mms-sidebar-menu {
    list-style: none;
}

.mms-sidebar-menu li {
    margin-bottom: 0.5rem;
}

.mms-sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    color: #6B7280;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.mms-sidebar-menu a:hover {
    background: #F3F4F6;
    color: #1F2937;
}

.mms-sidebar-menu a.active {
    background: #EEF2FF;
    color: #4F46E5;
    font-weight: 600;
}

.mms-sidebar-menu svg {
    width: 20px;
    height: 20px;
}

/* Main Content */
.mms-main-content {
    min-height: 600px;
}

/* Dashboard Stats */
.mms-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mms-stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.mms-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.mms-stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.mms-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mms-stat-icon.primary {
    background: #EEF2FF;
    color: #4F46E5;
}

.mms-stat-icon.success {
    background: #D1FAE5;
    color: #10B981;
}

.mms-stat-icon.warning {
    background: #FEF3C7;
    color: #F59E0B;
}

.mms-stat-icon.danger {
    background: #FEE2E2;
    color: #EF4444;
}

.mms-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 0.25rem;
}

.mms-stat-label {
    font-size: 0.875rem;
    color: #6B7280;
}

/* Section */
.mms-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mms-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #F3F4F6;
}

.mms-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1F2937;
}

/* Chat Container */
.mms-chat-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 600px;
    max-height: 600px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
}

/* Contacts List */
.mms-contacts-list {
    border-left: 1px solid #E5E7EB;
    background: #F9FAFB;
    display: flex;
    flex-direction: column;
}

.mms-contacts-header {
    padding: 1rem;
    border-bottom: 1px solid #E5E7EB;
    background: white;
}

.mms-contacts-search {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
}

.mms-contacts-body {
    flex: 1;
    overflow-y: auto;
}

.mms-contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid #E5E7EB;
    transition: background 0.2s;
}

.mms-contact-item:hover {
    background: white;
}

.mms-contact-item.active {
    background: white;
    border-right: 3px solid #4F46E5;
}

.mms-contact-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.mms-contact-info {
    flex: 1;
    min-width: 0;
}

.mms-contact-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 0.25rem;
}

.mms-contact-last-message {
    font-size: 0.75rem;
    color: #6B7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mms-contact-badge {
    background: #EF4444;
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

/* Chat Area */
.mms-chat-area {
    display: flex;
    flex-direction: column;
    background: white;
    height: 100%;
    max-height: 600px;
}

.mms-chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mms-chat-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1F2937;
}

.mms-chat-header p {
    font-size: 0.75rem;
    color: #6B7280;
}

.mms-chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #F9FAFB;
    min-height: 0;
}

/* Custom Scrollbar for Chat */
.mms-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.mms-chat-messages::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 4px;
}

.mms-chat-messages::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}

.mms-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

.mms-message {
    display: flex;
    gap: 0.75rem;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mms-message.sent {
    flex-direction: row-reverse;
}

.mms-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.mms-message-content {
    max-width: 60%;
}

.mms-message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.mms-message.received .mms-message-bubble {
    background: #F3F4F6;
    color: #1F2937;
    border-bottom-right-radius: 4px;
}

.mms-message.sent .mms-message-bubble {
    background: #4F46E5;
    color: white;
    border-bottom-left-radius: 4px;
}

.mms-message-time {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-top: 0.25rem;
    padding: 0 0.5rem;
}

.mms-message.sent .mms-message-time {
    text-align: left;
}

/* Chat Input */
.mms-chat-input {
    padding: 1rem 1.5rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 0.75rem;
    background: white;
    flex-shrink: 0;
}

.mms-chat-input textarea {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 0.875rem;
    resize: none;
    max-height: 120px;
    min-height: 42px;
    font-family: inherit;
}

.mms-chat-input textarea:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.mms-chat-send-btn {
    padding: 0.75rem 1.5rem;
    background: #4F46E5;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    align-self: flex-end;
    height: 42px;
}

.mms-chat-send-btn:hover {
    background: #4338CA;
    transform: translateY(-1px);
}

.mms-chat-send-btn:active {
    transform: translateY(0);
}

.mms-chat-send-btn:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
    transform: none;
}

/* Prescription Form */
.mms-prescription-form {
    max-width: 800px;
}

.mms-prescription-form .mms-form-group {
    margin-bottom: 1.5rem;
}

/* Table */
.mms-table {
    width: 100%;
    border-collapse: collapse;
}

.mms-table th,
.mms-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid #E5E7EB;
}

.mms-table th {
    background: #F9FAFB;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.mms-table td {
    font-size: 0.875rem;
    color: #6B7280;
}

.mms-table tr:hover {
    background: #F9FAFB;
}

/* Badge */
.mms-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mms-badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.mms-badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.mms-badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

/* Empty State */
.mms-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #9CA3AF;
}

.mms-empty-state svg {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

.mms-empty-state h3 {
    font-size: 1.125rem;
    color: #6B7280;
    margin-bottom: 0.5rem;
}

.mms-empty-state p {
    font-size: 0.875rem;
}

/* Responsive Enhancements for Dashboard Panels */

/* Tablets and smaller desktops */
@media (max-width: 1024px) {
    .mms-dashboard-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 2rem;
    }

    /* Mobile Menu Toggle - نمایش دادن */
    .mms-mobile-menu-toggle {
        display: block;
        order: -1;
    }

    /* Sidebar Mobile Styles - به‌روزرسانی */
    .mms-sidebar {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        z-index: 200;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        border-radius: 0;
        overflow-y: auto;
    }

    .mms-sidebar.active {
        top: 33px;
        right: 0;
    }

    /* Close button for mobile sidebar - جدید */
    .mms-sidebar::before {
        content: '✕';
        position: absolute;
        top: 1rem;
        left: 1rem;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #F3F4F6;
        border-radius: 50%;
        cursor: pointer;
        font-size: 1.25rem;
        color: #374151;
        z-index: 201;
    }

    .mms-chat-container {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
    }

    .mms-chat-area {
        max-height: none;
    }

    .mms-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Mobile phones */
@media (max-width: 640px) {
    .mms-dashboard-content {
        padding: 0.5rem 1rem;
    }

    .mms-header-content {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .mms-header-logo h1 {
        font-size: 1.25rem;
    }

    .mms-header-actions {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .mms-user-info {
        display: none;
    }

    .mms-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .mms-section {
        padding: 1rem;
    }

    .mms-chat-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .mms-contacts-list {
        display: none;
    }

    .mms-chat-input {
        flex-direction: column;
        gap: 0.5rem;
    }

    .mms-chat-send-btn {
        width: 100%;
        padding: 0.75rem;
    }

    .mms-message-content {
        max-width: 80%;
    }

    .mms-dashboard-header {
        padding: 1rem;
    }
}



/* =================================
   فونت‌های فارسی - گزینه 1: وزیر (پیشنهادی)
   ================================= */
/* @import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css'); */

/* گزینه 2: دانا */
/* @import url('https://cdn.jsdelivr.net/gh/rastikerdar/dana-font@v1.1.0/Dana-font-face.css'); */
/*  */
/* گزینه 3: استیج */
/* @import url('https://cdn.jsdelivr.net/gh/hajianone/estedad@v4.0.0/Estedad-font-face.css'); */

/* گزینه 4: یکان */
/* @import url('https://cdn.jsdelivr.net/gh/rastikerdar/yekan-font@7.0.0/yekan-font-face.css'); */

/* =================================
   لیست نسخه‌های پزشکی - استایل اصلی
   ================================= */

/* * {
    font-family: 'Dana-font', 'Segoe UI', Tahoma, sans-serif;
} */

.mms-prescriptions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    padding: 20px;
    direction: rtl;
    /* font-family: 'Dana', sans-serif; */
}

/* کارت نسخه */
.mms-prescription-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    position: relative;
}

.mms-prescription-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: #4f46e5;
}

.mms-prescription-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
}

/* هدر کارت */
.mms-prescription-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-bottom: 1px solid #e8e8e8;
}

.mms-prescription-doctor h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.8;
    font-family: 'Vazirmatn', sans-serif;
}

.mms-prescription-doctor p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    font-family: 'Vazirmatn', sans-serif;
    letter-spacing: 0.3px;
}

/* بج وضعیت */
.mms-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.5px;
    font-family: 'Vazirmatn', sans-serif;
}

.mms-badge-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.mms-badge-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* بدنه کارت */
.mms-prescription-body {
    padding: 25px;
    background: #ffffff;
}

.mms-prescription-section {
    margin-bottom: 20px;
}

.mms-prescription-section:last-child {
    margin-bottom: 0;
}

.mms-prescription-section strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #4f46e5;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
    position: relative;
    padding-right: 15px;
    font-family: 'Vazirmatn', sans-serif;
}

.mms-prescription-section strong::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, #4f46e5, #7c3aed);
    border-radius: 2px;
}

.mms-prescription-section p {
    margin: 0;
    font-size: 15px;
    line-height: 2;
    color: #475569;
    padding: 14px;
    background: #f8fafc;
    border-radius: 8px;
    border-right: 3px solid #e2e8f0;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
}

/* بخش داروها */
.mms-prescription-medications {
    font-size: 15px;
    line-height: 2.1;
    color: #1e293b;
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    border: 1px solid #fbbf24;
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
}

/* فوتر کارت */
.mms-prescription-footer {
    padding: 15px 25px;
    background: #f8fafc;
    border-top: 1px solid #e8e8e8;
    font-size: 14px;
    color: #64748b;
    text-align: center;
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
    letter-spacing: 0.3px;
}

.mms-prescription-footer::before {
    content: '📅';
    margin-left: 8px;
    font-size: 16px;
}



/* =================================
   فرم صدور نسخه پزشکی (بدون مودال)
   ================================= */

.mms-prescription-modal {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    padding: 20px;
}

/* محتوای فرم */
.mms-prescription-modal-content {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

/* هدر */
.mms-prescription-modal-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mms-prescription-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mms-prescription-modal-header h3::before {
    content: '📋';
    font-size: 28px;
}

/* مخفی کردن overlay */
.mms-prescription-modal-overlay {
    display: none;
}

/* بدنه */
.mms-prescription-modal-body {
    padding: 30px;
    max-height: none;
}

/* فرم */
#mms-prescription-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* گروه فرم */
.mms-form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mms-form-group label {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    padding-right: 20px;
}

.mms-form-group label::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #4f46e5, #7c3aed);
    border-radius: 2px;
}

/* Input و Select */
.mms-form-group select,
.mms-form-group input[type="text"],
.mms-form-group input[type="email"],
.mms-form-group input[type="tel"] {
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #1e293b;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.mms-form-group select:focus,
.mms-form-group input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background: #fafbff;
}

.mms-form-group select:hover,
.mms-form-group input:hover {
    border-color: #cbd5e1;
}

/* Textarea */
.mms-form-group textarea {
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #1e293b;
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.8;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
    outline: none;
}

.mms-form-group textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background: #fafbff;
}

.mms-form-group textarea:hover {
    border-color: #cbd5e1;
}

.mms-form-group textarea::placeholder {
    color: #94a3b8;
    line-height: 1.8;
}

/* راهنماها */
.mms-form-group small {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-right: 3px solid #cbd5e1;
    margin-top: 5px;
}

.mms-form-group small::before {
    content: 'ℹ️';
    flex-shrink: 0;
    font-size: 14px;
}

/* دکمه‌های اکشن */
.mms-form-actions {
    display: flex;
    gap: 12px;
    padding-top: 10px;
    border-top: 2px solid #f1f5f9;
    margin-top: 10px;
    justify-content: flex-end;
}

/* دکمه‌ها */
.mms-btn {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    position: relative;
    overflow: hidden;
}

.mms-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.mms-btn:hover::before {
    width: 300px;
    height: 300px;
}

.mms-btn svg {
    position: relative;
    z-index: 1;
}

/* دکمه اصلی */
.mms-btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.mms-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.5);
}

.mms-btn-primary:active {
    transform: translateY(0);
}

/* دکمه ثانویه */
.mms-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mms-btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* استایل select سفارشی */
.mms-form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='%234f46e5'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 40px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .mms-prescription-modal {
        padding: 15px;
    }

    .mms-prescription-modal-content {
        border-radius: 20px;
    }

    .mms-prescription-modal-header {
        padding: 20px;
    }

    .mms-prescription-modal-header h3 {
        font-size: 19px;
    }

    .mms-prescription-modal-body {
        padding: 20px;
    }

    .mms-form-actions {
        flex-direction: column-reverse;
    }

    .mms-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mms-prescription-modal-header h3 {
        font-size: 17px;
    }

    .mms-form-group label {
        font-size: 14px;
    }

    .mms-form-group select,
    .mms-form-group input,
    .mms-form-group textarea {
        font-size: 14px;
        padding: 12px 14px;
    }

    .mms-form-group small {
        font-size: 12px;
    }
}

/* =================================
   بهبود رسپانسیو سیستم چت
   ================================= */

/* حالت موبایل - نمایش تب‌ها */
@media (max-width: 1024px) {
    /* کانتینر اصلی چت */
    .mms-chat-container {
        position: relative;
        height: 600px;
        max-height: 80vh;
    }
    
    /* تب‌های انتخاب بین لیست و چت */
    .mms-chat-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 50px;
        background: #ffffff;
        border-bottom: 1px solid #E5E7EB;
        z-index: 10;
    }
    
    /* دکمه‌های تب */
    .mms-chat-tabs {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 50px;
        display: flex;
        background: #ffffff;
        border-bottom: 1px solid #E5E7EB;
        z-index: 11;
        border-radius: 12px 12px 0 0;
    }
    
    .mms-chat-tab {
        flex: 1;
        padding: 12px;
        background: transparent;
        border: none;
        font-size: 14px;
        font-weight: 600;
        color: #6B7280;
        cursor: pointer;
        transition: all 0.3s;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .mms-chat-tab:hover {
        background: #F9FAFB;
    }
    
    .mms-chat-tab.active {
        color: #4F46E5;
        background: #EEF2FF;
    }
    
    .mms-chat-tab.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 20%;
        right: 20%;
        height: 3px;
        background: #4F46E5;
        border-radius: 3px 3px 0 0;
    }
    
    /* آیکون‌ها برای تب‌ها */
    .mms-chat-tab::before {
        font-size: 18px;
    }
    
    .mms-chat-tab.contacts-tab::before {
        content: '👥';
    }
    
    .mms-chat-tab.messages-tab::before {
        content: '💬';
    }
    
    /* تنظیم محتوا برای جا دادن تب‌ها */
    .mms-contacts-list,
    .mms-chat-area {
        padding-top: 50px;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    
    /* حالت‌های نمایش */
    .mms-contacts-list {
        display: flex;
        transform: translateX(0);
        opacity: 1;
        background: #FFFFFF;
        z-index: 5;
    }
    
    .mms-chat-area {
        transform: translateX(100%);
        opacity: 0;
        z-index: 4;
    }
    
    /* وقتی چت فعال است */
    .mms-chat-container.chat-active .mms-contacts-list {
        transform: translateX(-100%);
        opacity: 0;
        z-index: 4;
    }
    
    .mms-chat-container.chat-active .mms-chat-area {
        transform: translateX(0);
        opacity: 1;
        z-index: 5;
    }
    
    /* اضافه کردن دکمه برگشت در هدر چت */
    .mms-chat-header::before {
        content: '←';
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: #F3F4F6;
        border-radius: 8px;
        margin-left: 12px;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 18px;
        color: #4F46E5;
    }
    
    .mms-chat-header:hover::before {
        background: #E5E7EB;
        transform: translateX(-2px);
    }
    
    /* نشانگر تعداد پیام در لیست */
    .mms-contact-item {
        cursor: pointer;
        position: relative;
    }
    
    .mms-contact-item::after {
        content: '›';
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 20px;
        color: #CBD5DB;
        transition: all 0.2s;
    }
    
    .mms-contact-item:hover::after {
        color: #4F46E5;
        transform: translateY(-50%) translateX(3px);
    }
}

/* برای موبایل‌های کوچک‌تر */
@media (max-width: 640px) {
    .mms-chat-container {
        height: calc(100vh - 120px);
        border-radius: 0;
        border: none;
    }
    
    .mms-chat-tabs {
        border-radius: 0;
    }
    
    .mms-chat-tab {
        font-size: 13px;
        padding: 10px;
    }
    
    .mms-contacts-header {
        padding: 12px;
    }
    
    .mms-contact-item {
        padding: 12px;
    }
    
    .mms-contact-avatar {
        width: 42px;
        height: 42px;
    }
    
    .mms-chat-header {
        padding: 12px 16px;
    }
    
    .mms-chat-messages {
        padding: 12px;
    }
    
    .mms-message-content {
        max-width: 85%;
    }
    
    /* دکمه ارسال به صورت آیکون در موبایل */
    .mms-chat-send-btn {
        width: 42px;
        height: 42px;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
    }
    
    .mms-chat-send-btn::before {
        content: '➤';
        font-size: 18px;
    }
    
    .mms-chat-input {
        padding: 10px;
        gap: 10px;
        flex-direction: row;
    }
    
    .mms-chat-input textarea {
        min-height: 42px;
    }
}

/* انیمیشن‌های smooth */
@media (max-width: 1024px) {
    /* انیمیشن ورود لیست */
    @keyframes slideInFromLeft {
        from {
            transform: translateX(-100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
    
    /* انیمیشن ورود چت */
    @keyframes slideInFromRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
    
    .mms-chat-container.animating .mms-contacts-list {
        animation: slideInFromLeft 0.3s ease forwards;
    }
    
    .mms-chat-container.animating.chat-active .mms-chat-area {
        animation: slideInFromRight 0.3s ease forwards;
    }
}

/* حالت تمام صفحه برای موبایل */
@media (max-width: 480px) {
    .mms-chat-container.fullscreen {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        max-height: 100vh;
        z-index: 1000;
        border-radius: 0;
    }
    
    /* دکمه بستن در حالت fullscreen */
    .mms-chat-container.fullscreen::after {
        content: '✕';
        position: absolute;
        top: 15px;
        left: 15px;
        width: 30px;
        height: 30px;
        background: rgba(0, 0, 0, 0.5);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 12;
        cursor: pointer;
    }
}

/* حالت landscape برای موبایل */
@media (max-width: 768px) and (orientation: landscape) {
    .mms-chat-container {
        height: calc(100vh - 60px);
    }
    
    .mms-chat-tabs {
        height: 40px;
    }
    
    .mms-contacts-list,
    .mms-chat-area {
        padding-top: 40px;
    }
    
    .mms-chat-messages {
        padding: 8px;
    }
    
    .mms-message {
        margin-bottom: 8px;
    }
}

/* بهبود تجربه لمسی */
@media (hover: none) and (pointer: coarse) {
    .mms-contact-item,
    .mms-chat-tab {
        -webkit-tap-highlight-color: rgba(79, 70, 229, 0.1);
        touch-action: manipulation;
    }
    
    .mms-contact-item:active {
        background: #F3F4F6;
    }
    
    .mms-chat-send-btn:active {
        transform: scale(0.95);
    }
}