/* assets/css/style.css - بهبود یافته */

/* استایل‌های کلی - از قالب پیش‌فرض استفاده می‌کنیم */
.lm-container {
    max-width: 1200px;
    margin: 20px auto;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    direction: rtl;
    text-align: right;
    font-family: inherit;
    position: relative;
}

/* استایل‌های پیغام‌های پاپ‌آپ - بهبود یافته */
.lm-notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100001;
    max-width: 400px;
    pointer-events: none;
}

.lm-notification-popup {
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    margin-bottom: 12px;
    border-right: 4px solid;
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: all;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.lm-notification-success { 
    border-right-color: #27ae60; 
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.95) 0%, rgba(46, 204, 113, 0.95) 100%);
    color: white;
}

.lm-notification-error { 
    border-right-color: #e74c3c; 
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.95) 0%, rgba(192, 57, 43, 0.95) 100%);
    color: white;
}

.lm-notification-warning { 
    border-right-color: #f39c12; 
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.95) 0%, rgba(230, 126, 34, 0.95) 100%);
    color: white;
}

.lm-notification-info { 
    border-right-color: #3498db; 
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.95) 0%, rgba(41, 128, 185, 0.95) 100%);
    color: white;
}

.lm-notification-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.lm-notification-icon {
    font-size: 20px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.lm-notification-text {
    flex: 1;
    font-weight: 500;
    line-height: 1.4;
    font-size: 14px;
}

.lm-notification-close {
    background: rgba(255,255,255,0.2);
    border: none;
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.lm-notification-close:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    transform: scale(1.1);
}

.lm-notification-fade-out {
    animation: slideOutRight 0.3s ease-in;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
    }
}

/* نوار ناوبری - ساده‌تر */
.lm-navigation {
    background: #f1f1f1;
    border-bottom: 1px solid #ccd0d4;
    padding: 15px 20px;
}

.lm-nav-tabs {
    list-style: none;
    margin: 0 0 15px 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lm-nav-item {
    position: relative;
}

.lm-nav-item a {
    display: block;
    padding: 8px 15px;
    background: #fff;
    color: #0073aa;
    text-decoration: none;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.lm-nav-item.active a,
.lm-nav-item a:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.lm-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: #d63638;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 10;
}

/* جستجو - ساده */
.lm-search-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#lm-search {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    font-size: 14px;
}

#lm-search-btn {
    padding: 6px 15px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

#lm-search-btn:hover {
    background: #005a87;
}

/* محتوای اصلی */
.lm-content {
    padding: 20px;
    min-height: 400px;
}

.lm-tab-content {
    display: none;
}

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

.lm-tab-content h3 {
    margin: 0 0 20px 0;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #ccd0d4;
    font-size: 18px;
    font-weight: 600;
}

/* فیلترها */
.lm-filters {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.lm-filters select {
    padding: 5px 8px;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    background: white;
    font-size: 13px;
    cursor: pointer;
}

/* لیست نامه‌ها - بهبود یافته */
.lm-letters-list {
    max-height: 600px;
    overflow-y: auto;
}

.lm-letter-item {
    padding: 15px;
    border: 1px solid #e5e5e5;
    margin-bottom: 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
}

.lm-letter-item:hover {
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #0073aa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,115,170,0.1);
}

.lm-letter-item.lm-forwarded {
    border-right: 4px solid #f0ad4e;
    background: linear-gradient(145deg, rgba(240, 173, 78, 0.05) 0%, rgba(240, 173, 78, 0.02) 100%);
}

.lm-letter-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.lm-letter-number {
    font-size: 11px;
    color: #0073aa;
    font-weight: bold;
    margin-bottom: 5px;
    background: rgba(0, 115, 170, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.lm-forwarded-badge {
    background: linear-gradient(135deg, #f0ad4e 0%, #ec971f 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 5px;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(240, 173, 78, 0.3);
}

.lm-letter-subject {
    margin: 0 0 8px 0;
    color: #23282d;
    font-size: 16px;
    font-weight: 600;
}

.lm-letter-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.lm-letter-meta span {
    white-space: nowrap;
}

.lm-recipients {
    color: #0073aa;
    font-weight: 500;
}

/* دکمه‌های عملیات - بهبود یافته */
.lm-letter-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.lm-letter-actions-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    display: none;
    gap: 5px;
    z-index: 5;
}

.lm-letter-item:hover .lm-letter-actions-overlay {
    display: flex;
}

.lm-btn {
    padding: 4px 8px;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    color: #0073aa;
    transition: all 0.2s ease;
}

.lm-btn:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,115,170,0.2);
}

.lm-btn-icon {
    padding: 6px 8px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.95);
    color: #0073aa;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.lm-btn-icon:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.lm-btn-print {
    border-color: rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.lm-btn-print:hover {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
}

.lm-btn-track {
    border-color: rgba(23, 162, 184, 0.3);
    color: #17a2b8;
}

.lm-btn-track:hover {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
    border-color: #17a2b8;
}

.lm-letter-preview {
    margin: 10px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.lm-letter-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

/* وضعیت‌ها و اولویت‌ها - بهبود یافته */
.lm-priority-urgent {
    color: #d63638;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(214, 54, 56, 0.2);
}

.lm-priority-important {
    color: #f0ad4e;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(240, 173, 78, 0.2);
}

.lm-priority-normal {
    color: #00a32a;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 163, 42, 0.2);
}

.lm-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
    border: 1px solid;
}

.lm-status-pending {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-color: #ffeaa7;
}

.lm-status-read {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #c3e6cb;
}

.lm-status-signed {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-color: #bee5eb;
}

.lm-status-sent {
    background: linear-gradient(135deg, #cce5f0 0%, #b3d7f0 100%);
    color: #004085;
    border-color: #b3d7f0;
}

.lm-status-archived {
    background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
    color: #383d41;
    border-color: #d6d8db;
}

/* انتخاب کاربران - بهبود یافته */
.lm-recipients-container {
    border: 1px solid #ccd0d4;
    border-radius: 5px;
    padding: 12px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
}

.lm-search-users {
    position: relative;
    margin-bottom: 12px;
}

.lm-search-users input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.lm-search-users input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.lm-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.lm-user-option {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    transition: all 0.2s ease;
}

.lm-user-option:hover {
    background: linear-gradient(135deg, #f0f6fc 0%, #e6f3ff 100%);
    transform: translateX(-2px);
}

.lm-user-option:last-child {
    border-bottom: none;
}

.lm-user-name {
    display: block;
    font-weight: 600;
    color: #23282d;
    margin-bottom: 2px;
}

.lm-user-email {
    display: block;
    font-size: 11px;
    color: #666;
}

.lm-selected-users {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 32px;
    padding: 6px 0;
}

.lm-selected-user {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,115,170,0.2);
    transition: all 0.2s ease;
}

.lm-selected-user:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,115,170,0.3);
}

.lm-selected-user .lm-user-name {
    margin-bottom: 0;
    color: white;
}

.lm-remove-user {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 14px;
    font-weight: bold;
    margin-right: 6px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lm-remove-user:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* فرم‌ها - بهبود یافته */
.lm-form-group {
    margin-bottom: 18px;
}

.lm-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #23282d;
    font-size: 14px;
}

.lm-form-group input,
.lm-form-group select,
.lm-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
}

.lm-form-group input:focus,
.lm-form-group select:focus,
.lm-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
    background: white;
}

.lm-form-group small {
    display: block;
    margin-top: 6px;
    color: #666;
    font-size: 12px;
}

.lm-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #ccd0d4;
}

#send-letter,
#save-draft,
#clear-form {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#send-letter {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0,115,170,0.3);
}

#send-letter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,115,170,0.4);
}

#save-draft {
    background: linear-gradient(135deg, #666 0%, #333 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102,102,102,0.3);
}

#save-draft:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,102,102,0.4);
}

#clear-form {
    background: linear-gradient(135deg, #d63638 0%, #b32d2e 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(214,54,56,0.3);
}

#clear-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(214,54,56,0.4);
}

/* مودال‌ها - بهبود یافته */
.lm-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.lm-modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    margin: 3% auto;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lm-close {
    color: #666;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    left: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.lm-close:hover {
    color: #000;
    background: rgba(0,0,0,0.1);
    transform: scale(1.1);
}

/* نمایش جزئیات نامه - بهبود یافته */
.lm-letter-detail {
    line-height: 1.6;
}

.lm-letter-header-detail h2 {
    color: #23282d;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
    font-size: 22px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lm-letter-number-detail {
    font-size: 12px;
    color: #0073aa;
    font-weight: bold;
    margin-bottom: 15px;
    background: linear-gradient(135deg, rgba(0, 115, 170, 0.1) 0%, rgba(0, 115, 170, 0.05) 100%);
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(0, 115, 170, 0.2);
}

.lm-letter-actions-detail {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lm-letter-meta-detail {
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    border: 1px solid #e5e5e5;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.lm-meta-row {
    margin-bottom: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.lm-meta-row strong {
    color: #23282d;
    margin-left: 12px;
    min-width: 140px;
}

.lm-letter-content-detail h3,
.lm-letter-signatures h3 {
    color: #23282d;
    margin: 25px 0 15px 0;
    font-size: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e5e5;
}

.lm-content-text {
    background: white;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    line-height: 1.8;
    color: #23282d;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

/* پاراف‌ها - بهبود یافته */
.lm-signatures-list {
    margin: 15px 0 25px 0;
}

.lm-signature-item {
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid #e5e5e5;
    border-right: 4px solid #00a32a;
    box-shadow: 0 2px 8px rgba(0,163,42,0.1);
    transition: all 0.2s ease;
}

.lm-signature-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,163,42,0.15);
}

.lm-signature-user {
    font-weight: 600;
    color: #23282d;
    margin-bottom: 5px;
    font-size: 15px;
}

.lm-signature-date {
    font-size: 11px;
    color: #666;
    margin-bottom: 8px;
}

.lm-signature-text {
    color: #23282d;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
}

.lm-signature-comments {
    font-style: italic;
    color: #666;
    font-size: 12px;
    background: rgba(255,255,255,0.7);
    padding: 8px;
    border-radius: 4px;
}

.lm-no-signatures {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 30px;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

/* بخش عملیات پاراف - بهبود یافته */
.lm-action-form-section {
    margin: 25px 0;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 6px;
    background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.lm-action-form-section h4 {
    margin: 0 0 20px 0;
    color: #23282d;
    font-size: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e5e5;
}

.lm-action-input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lm-action-input-group label {
    font-weight: 600;
    color: #23282d;
    font-size: 14px;
}

.lm-action-input-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.lm-action-input-group textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.lm-forward-section {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.lm-action-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    margin-top: 20px;
    flex-wrap: wrap;
}

.lm-action-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lm-action-buttons button:first-child {
    background: linear-gradient(135deg, #00a32a 0%, #007a1e 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0,163,42,0.3);
}

.lm-action-buttons button:first-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,163,42,0.4);
}

.lm-action-buttons button:last-child {
    background: linear-gradient(135deg, #f0ad4e 0%, #ec971f 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(240,173,78,0.3);
}

.lm-action-buttons button:last-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240,173,78,0.4);
}

/* ردیابی - بهبود یافته */
.lm-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.lm-timeline::before {
    content: '';
    position: absolute;
    right: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #0073aa 0%, #e5e5e5 100%);
    border-radius: 2px;
}

.lm-timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-right: 45px;
}

.lm-timeline-marker {
    position: absolute;
    right: 6px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #e5e5e5, 0 2px 6px rgba(0,115,170,0.2);
}

.lm-timeline-title {
    font-weight: 600;
    color: #23282d;
    margin-bottom: 6px;
    font-size: 15px;
}

.lm-timeline-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.lm-timeline-details {
    color: #666;
    font-size: 13px;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
    margin-top: 8px;
}

/* لودینگ - بهبود یافته */
.lm-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
}

.lm-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e5e5;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* اعلان‌ها - بهبود یافته */
.lm-alert {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.lm-alert::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
}

.lm-alert-success {
    background: linear-gradient(145deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #c3e6cb;
}

.lm-alert-success::before {
    background: #28a745;
}

.lm-alert-error {
    background: linear-gradient(145deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-color: #f5c6cb;
}

.lm-alert-error::before {
    background: #dc3545;
}

.lm-alert-warning {
    background: linear-gradient(145deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-color: #ffeaa7;
}

.lm-alert-warning::before {
    background: #ffc107;
}

.lm-alert-info {
    background: linear-gradient(145deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-color: #bee5eb;
}

.lm-alert-info::before {
    background: #17a2b8;
}

/* وضعیت خالی */
.lm-empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #666;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.lm-empty-state p {
    font-size: 14px;
    margin: 0;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .lm-notifications-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .lm-container {
        margin: 10px;
        border-radius: 0;
    }

    .lm-navigation {
        padding: 10px;
    }

    .lm-nav-tabs {
        flex-direction: column;
        gap: 5px;
    }

    .lm-search-container {
        flex-direction: column;
        margin-top: 10px;
    }

    .lm-content {
        padding: 15px;
    }

    .lm-letter-header {
        flex-direction: column;
        gap: 10px;
    }

    .lm-letter-actions,
    .lm-letter-actions-overlay {
        position: static;
        display: flex;
        margin-top: 10px;
        justify-content: flex-end;
    }

    .lm-form-actions,
    .lm-action-buttons {
        flex-direction: column;
    }

    .lm-modal-content {
        width: 95%;
        margin: 3% auto;
        padding: 15px;
    }

    .lm-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .lm-letter-actions-detail {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .lm-letter-meta {
        flex-direction: column;
        gap: 5px;
    }

    .lm-timeline-item {
        padding-right: 35px;
    }

    .lm-timeline::before {
        right: 12px;
    }

    .lm-timeline-marker {
        right: 3px;
        width: 16px;
        height: 16px;
    }

    .lm-badge {
        right: -3px;
        top: -3px;
        width: 16px;
        height: 16px;
        font-size: 10px;
    }
}

/* چاپ */
@media print {
    .lm-navigation,
    .lm-letter-actions,
    .lm-letter-actions-detail,
    .lm-letter-actions-overlay,
    .lm-btn,
    .lm-btn-icon,
    .lm-action-form-section,
    .lm-notifications-container {
        display: none !important;
    }

    .lm-container {
        box-shadow: none;
        border: none;
        margin: 0;
    }

    .lm-letter-detail {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* حالت تاریک (اختیاری) */
@media (prefers-color-scheme: dark) {
    .lm-modal {
        background-color: rgba(0,0,0,0.8);
    }
    
    .lm-notification-popup {
        backdrop-filter: blur(15px);
    }
    
    .lm-modal-content {
        background: linear-gradient(145deg, #2c3e50 0%, #34495e 100%);
        color: #ecf0f1;
    }
}