/* Griffin CRM Styles */
.griffin-crm-container {
    font-family: 'Shabnam', Tahoma, sans-serif;
    direction: rtl;
    display: flex;
    gap: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.griffin-crm-form-section {
    flex: 1;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
}

.griffin-crm-list-section {
    flex: 2;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
}

h3, h4 {
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: bold;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.stage-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.stage-item span {
    flex-grow: 1;
}

.stage-icon {
    font-size: 1.2em;
    color: #ccc;
}

.stage-icon.completed {
    color: #28a745;
}

.stage-icon.next {
    color: #ffc107;
}

.user-select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.button-primary {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

#crm-leads-list {
    list-style: none;
    padding: 0;
}

#crm-leads-list li {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#crm-leads-list li:last-child {
    border-bottom: none;
}

#crm-leads-list .lead-info {
    flex-grow: 1;
    min-width: 200px;
}

#crm-leads-list .lead-source-icon {
    margin-left: 10px;
    font-size: 1.2em;
    color: #0073aa;
}

#crm-leads-list .lead-stages {
    display: flex;
    gap: 5px;
}

#crm-leads-list .lead-stages .stage-button {
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 5px 10px;
    position: relative;
    font-size: 0.9em;
    cursor: pointer;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#crm-leads-list .lead-stages .stage-button.stage-completed {
    background-color: #28a745;
    color: #fff;
    border-color: #28a745;
}

#crm-leads-list .lead-stages .stage-button.stage-in-progress {
    background-color: #ffc107;
    color: #333;
    border-color: #ffc107;
}

#crm-leads-list .lead-stages .stage-button.stage-cancelled {
    background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

#crm-leads-list .lead-stages .stage-button .stage-name {
    font-weight: bold;
}

#crm-leads-list .lead-stages .stage-button .stage-user {
    font-size: 0.8em;
    font-weight: normal;
    opacity: 0.8;
}

#crm-leads-list .lead-notes {
    position: relative;
    cursor: pointer;
    font-size: 1.2em;
    color: #ffc107;
}

#crm-leads-list .lead-notes .note-dot {
    width: 8px;
    height: 8px;
    background-color: #dc3545;
    border-radius: 50%;
    position: absolute;
    top: -2px;
    right: -2px;
    border: 1px solid #fff;
    display: none;
}

#crm-leads-list .lead-notes.has-note .note-dot {
    display: block;
}

#crm-leads-list .lead-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Styles for icon buttons */
#crm-leads-list .lead-actions .icon-btn {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
}

#crm-leads-list .lead-actions .icon-btn.delete-btn {
    color: #dc3545;
}

#crm-leads-list .lead-actions .customer-type-btn {
    font-size: 0.9em;
    cursor: pointer;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    color: #fff;
}

#crm-leads-list .lead-actions .customer-type-btn.technical_consultation {
    background-color: #6c757d;
}

#crm-leads-list .lead-actions .customer-type-btn.customer {
    background-color: #28a745;
}

/* Modal Styles */
.griffin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.griffin-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    direction: rtl;
}

.griffin-modal-content .close-modal {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.stage-modal-status, .customer-type-modal-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.stage-modal-status label, .customer-type-modal-status label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
    cursor: pointer;
}

.stage-modal-status input[type="radio"], .customer-type-modal-status input[type="radio"] {
    width: auto;
    cursor: pointer;
}