@font-face {
    font-family: 'IRANSans';
   src: url('../fonts/IRANSansXV.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSansXV.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}
/* Custom Dropdown Styles */
.crm-dropdown-wrap {
    position: relative;
    display: inline-block;
    user-select: none;
    font-family: inherit;
}
.crm-dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    transition: all 0.2s;
    min-width: 140px;
    gap: 8px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.crm-dropdown-selected:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}
.crm-dropdown-selected svg.caret {
    transition: transform 0.2s;
}
.crm-dropdown-wrap.open .crm-dropdown-selected svg.caret {
    transform: rotate(180deg);
}
.crm-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    overflow: hidden;
    padding: 4px 0;
}
.crm-dropdown-wrap.open .crm-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.crm-dropdown-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4b5563;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.crm-dropdown-item:hover {
    background: #f3f4f6;
    color: #111827;
}
.crm-dropdown-item svg {
    flex-shrink: 0;
}

/* Status specific colors */
.status-unread { color: #ef4444 !important; }
.status-in_progress { color: #f59e0b !important; }
.status-done { color: #10b981 !important; }

/* Filter Pills */
.crm-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.crm-filter-btn {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 6px 14px;
    border-radius: 8px; /* Changed to match settings button */
    font-size: 0.875rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.crm-filter-btn:hover {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}
.crm-filter-btn.active {
    background: #111827;
    color: #fff;
    border-color: #111827;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.crm-filter-btn.clear-filter {
    background: #e5e7eb; /* Gray */
    color: #4b5563;
    border-color: transparent;
}
.crm-filter-btn.clear-filter:hover {
    background: #d1d5db;
    color: #1f2937;
}

.crm-table-container {
    overflow: visible !important;
}

.crm-table th, .crm-table td {
    white-space: nowrap;
}
.crm-table td.message-col {
    white-space: normal;
}

@media (max-width: 768px) {
    .crm-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start !important;
    }
    .crm-toolbar {
        flex-direction: column;
    }
    .crm-table thead {
        display: none;
    }
    .crm-table tbody tr {
        display: flex;
        flex-direction: column;
        background: #fff;
        margin-bottom: 16px;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 16px;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    }
    .crm-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 8px 0 !important;
        border-bottom: 1px solid #f3f4f6;
        text-align: left !important;
        white-space: normal !important;
    }
    .crm-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
        margin-left: 16px;
        flex-shrink: 0;
    }
    .crm-table tbody td:last-child {
        border-bottom: none;
    }
    
    .crm-dropdown-wrap {
        width: 100%;
    }
    .crm-dropdown-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        top: auto;
        right: auto;
        width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 20px 16px;
        transform: translateY(100%);
        box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
    }
    .crm-dropdown-wrap.open .crm-dropdown-menu {
        transform: translateY(0);
    }
}
.crm-row:hover {
    background: #f9fafb;
}

/* Hide Scrollbars */
.crm-modal-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.crm-modal-content::-webkit-scrollbar {
    display: none;
}

/* Rounded Tables */
.crm-table, .crm-users-table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}
.crm-table th, .crm-users-table th {
    background: #f8f9fa;
}
.crm-table th:first-child, .crm-users-table th:first-child {
    border-top-right-radius: 12px;
}
.crm-table th:last-child, .crm-users-table th:last-child {
    border-top-left-radius: 12px;
}
.crm-table tr:last-child td:first-child, .crm-users-table tr:last-child td:first-child {
    border-bottom-right-radius: 12px;
}
.crm-table tr:last-child td:last-child, .crm-users-table tr:last-child td:last-child {
    border-bottom-left-radius: 12px;
}

/* Custom Alert/Confirm Modals */
.crm-alert-box {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    width: 400px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.crm-alert-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.crm-alert-icon.success { background: #d1fae5; color: #10b981; }
.crm-alert-icon.error { background: #fee2e2; color: #ef4444; }
.crm-alert-icon.confirm { background: #e0e7ff; color: #6366f1; }

/* Read/Unread Tags */
.crm-read-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0;
    color: #fff;
}
.crm-read-tag.unread {
    background-color: #ea580c; /* Orange */
}
.crm-read-tag.read {
    background-color: #1e40af; /* Darkish Blue */
}


