/* ===== Components Styles ===== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--white);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--white);
}

.btn-outline-secondary {
    background: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline-secondary:hover:not(:disabled) {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    background-color: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-valid {
    border-color: var(--success);
}

.form-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.form-text.text-danger {
    color: var(--danger);
}

.form-text.text-success {
    color: var(--success);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    line-height: 1;
}

.badge-primary {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.badge-secondary {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--secondary-color);
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background-color: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal.show .modal-dialog {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--gray-100);
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: var(--gray-800);
    color: var(--white);
    text-align: center;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity var(--transition-fast);
    font-size: 0.75rem;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--gray-800) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 1.5px;
}

.spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

/* Progress Bars */
.progress {
    width: 100%;
    height: 8px;
    background-color: var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    transition: width var(--transition-normal);
}

.progress-sm {
    height: 4px;
}

.progress-lg {
    height: 12px;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
}

.dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--gray-100);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--gray-50);
    color: var(--primary-color);
}

/* Responsive Components */
@media (max-width: 768px) {
    .modal-dialog {
        width: 95%;
        margin: 1rem;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .card-header,
    .card-body,
    .card-footer {
        padding: 1rem;
    }
}

/* ===== Customer Detail Modal ===== */
.customer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.customer-modal.show {
    display: flex;
}

.customer-modal-dialog {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    position: relative;
}

.customer-modal .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    position: relative;
    z-index: 10;
}

.customer-modal .modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
    z-index: 11;
    position: relative;
}

.customer-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.customer-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.customer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.customer-basic-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.customer-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.customer-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.customer-source {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.customer-source.instagram {
    background: #e1306c;
    color: white;
}

.customer-source.facebook {
    background: #1877f2;
    color: white;
}

.customer-source.google {
    background: #ea4335;
    color: white;
}

.customer-status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
}

.customer-status.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.customer-status.confirmed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.customer-status.follow {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.customer-status.disqualified {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.customer-date {
    font-size: 0.875rem;
    opacity: 0.8;
}

.customer-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Sol Taraf - Müşteri Bilgileri */
.customer-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.info-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-item span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-900);
}

.source-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.source-badge.instagram {
    background: #e1306c;
    color: white;
}

.source-badge.facebook {
    background: #1877f2;
    color: white;
}

.source-badge.google {
    background: #ea4335;
    color: white;
}

.quick-actions {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
}

.quick-actions h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.75rem;
    pointer-events: auto;
    z-index: 10;
    position: relative;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.action-btn.call-btn:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.action-btn.whatsapp-btn:hover {
    background: #25d366;
    color: white;
    border-color: #25d366;
}

.action-btn.email-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.action-btn.transfer-btn:hover {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.action-btn.appointment-btn:hover {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
}

.action-btn.reminder-btn:hover {
    background: #06b6d4;
    color: white;
    border-color: #06b6d4;
}

.action-btn.follow-btn:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.action-btn.disqualify-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.action-btn i {
    font-size: 1rem;
}

.action-btn span {
    font-size: 0.625rem;
    font-weight: 500;
}

/* Sağ Taraf - Tab Bölümü */
.customer-tabs-section {
    display: flex;
    flex-direction: column;
}

.customer-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1rem;
}

.customer-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.customer-tab:hover {
    color: var(--primary-color);
    background: var(--gray-50);
}

.customer-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.customer-tab-content {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

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

.tab-header h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Notlar */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.note-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.note-author {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
}

.note-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.note-content {
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.5;
}

/* Dosyalar */
.files-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 1.25rem;
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-900);
}

.file-size {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

/* Hatırlatmalar */
.reminders-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reminder-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
}

.reminder-item.urgent {
    border-left: 4px solid #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.reminder-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-600);
}

.reminder-item.urgent .reminder-icon {
    background: #ef4444;
    color: white;
}

.reminder-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.reminder-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-900);
}

.reminder-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Loglar */
.logs-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.log-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
}

.log-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.log-icon.call {
    background: #10b981;
    color: white;
}

.log-icon.email {
    background: #3b82f6;
    color: white;
}

.log-icon.note {
    background: #f59e0b;
    color: white;
}

.log-icon.follow {
    background: #10b981;
    color: white;
}

.log-icon.disqualify {
    background: #ef4444;
    color: white;
}

.log-icon.appointment {
    background: #8b5cf6;
    color: white;
}

.log-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.log-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-900);
}

.log-details {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.log-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.customer-modal .modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: var(--gray-50);
}

.customer-modal .modal-footer .btn {
    pointer-events: auto;
    z-index: 10;
    position: relative;
}

/* SweetAlert2 z-index fix */
.swal2-container {
    z-index: 99999 !important;
}

.swal2-popup {
    z-index: 99999 !important;
}

.swal2-top-container {
    z-index: 99999 !important;
}

.swal2-top-container .swal2-popup {
    z-index: 99999 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .customer-modal-dialog {
        width: 95%;
        max-height: 95vh;
    }
    
    .customer-modal-body {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr 1fr 1fr;
    }
    
    .customer-tabs {
        overflow-x: auto;
    }
    
    .customer-tab {
        white-space: nowrap;
        min-width: 120px;
    }
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 5px;
    margin-right: 15px;
}

.view-btn {
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

/* Leads View Container */
.leads-view {
    margin-top: 20px;
}

/* Enhanced Kanban Pipeline */
.lead-pipeline {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 10px 0;
    min-height: 700px;
    white-space: nowrap;
    flex-wrap: nowrap;
}

/* Horizontal scrollbar styling */
.lead-pipeline::-webkit-scrollbar {
    height: 8px;
}

.lead-pipeline::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.lead-pipeline::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.lead-pipeline::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.pipeline-stage {
    flex: 0 0 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 2px dashed transparent;
    transition: all 0.3s ease;
    white-space: normal;
}

.pipeline-stage.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.02);
}

.stage-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.stage-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.stage-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.stage-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pipeline-stage:hover .stage-actions {
    opacity: 1;
}

.stage-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
    transition: background 0.3s ease;
}

.stage-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.stage-content {
    padding: 20px;
    min-height: 600px;
    max-height: 600px;
    overflow-y: auto;
}

/* Enhanced Lead Cards */
.lead-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-height: 160px;
}

.lead-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
    border-color: #667eea;
}

.lead-card.dragging {
    opacity: 0.5;
    cursor: grabbing !important;
    transform: rotate(5deg);
}

.lead-card.sortable-chosen {
    cursor: grab !important;
}

.lead-card.sortable-ghost {
    opacity: 0.3;
    background: #f3f4f6;
}

.lead-info {
    margin-bottom: 16px;
}

.lead-name {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.4;
}

.lead-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.lead-phone, .lead-email {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lead-phone i, .lead-email i {
    width: 12px;
    color: #9ca3af;
}

.lead-service {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
    display: inline-block;
}

.lead-source {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.lead-value {
    font-weight: 700;
    color: #059669;
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lead-value::before {
    content: '💰';
    font-size: 14px;
}

.lead-date {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lead-date::before {
    content: '🕐';
    font-size: 12px;
}

/* Multiple Staff Assignment */
.lead-assignees {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.lead-assignees-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.assignees-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.assignee-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.assignee-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.assignee-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.assignee-name {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
}

.assignee-role {
    font-size: 9px;
    color: #6b7280;
    font-weight: 500;
}

/* Lead Actions */
.lead-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    justify-content: space-between;
}

.lead-card:hover .lead-actions {
    opacity: 1;
}

.lead-action-btn {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.lead-action-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.lead-action-btn.primary {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.lead-action-btn.primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

/* Priority Indicators */
.lead-priority {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lead-priority.high {
    background: #ef4444;
}

.lead-priority.medium {
    background: #f59e0b;
}

.lead-priority.low {
    background: #10b981;
}

/* Source Badge Styles */
.lead-source.instagram {
    background: linear-gradient(135deg, #E4405F, #C13584);
    color: white;
}

.lead-source.facebook {
    background: linear-gradient(135deg, #1877F2, #42A5F5);
    color: white;
}

.lead-source.google {
    background: linear-gradient(135deg, #4285F4, #34A853);
    color: white;
}

.lead-source.website {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.lead-source.referral {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
}

/* Empty State */
.stage-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #9ca3af;
    text-align: center;
}

.stage-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.stage-empty h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

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

/* Filter Animation */
.kanban-filters.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design for Lead Cards */
@media (max-width: 1200px) {
    .lead-pipeline {
        flex-wrap: wrap;
    }
    
    .pipeline-stage {
        flex: 0 0 calc(50% - 10px);
        min-width: 300px;
    }
}

@media (max-width: 768px) {
    .lead-pipeline {
        flex-direction: column;
        gap: 15px;
        flex-wrap: nowrap;
    }
    
    .pipeline-stage {
        flex: none;
        width: 100%;
        min-width: auto;
    }
    
    .lead-card {
        padding: 16px;
        min-height: 140px;
    }
    
    .assignees-list {
        flex-direction: column;
        gap: 6px;
    }
    
    .filters-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Loading State for Filters */
.filters-loading {
    opacity: 0.6;
    pointer-events: none;
}

.filters-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

/* Enhanced Scrollbar for Stage Content */
.stage-content::-webkit-scrollbar {
    width: 6px;
}

.stage-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.stage-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.stage-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Table View Styles */
.table-controls {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.table-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.table-filters .form-control {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.table-filters .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* DataTable Customization */
.dataTables_wrapper {
    padding: 20px;
}

.dataTables_length,
.dataTables_filter {
    margin-bottom: 20px;
}

.dataTables_length select,
.dataTables_filter input {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 10px;
}

.dataTables_filter input {
    margin-left: 10px;
}

#leadsTable {
    width: 100% !important;
}

#leadsTable thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 15px 12px;
    border: none;
    font-size: 14px;
}

#leadsTable tbody td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    font-size: 14px;
}

#leadsTable tbody tr:hover {
    background: #f8fafc;
}

.table-source-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.table-assignee {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.table-value {
    font-weight: 600;
    color: #059669;
}

.table-actions {
    display: flex;
    gap: 5px;
}

.table-action-btn {
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.table-action-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.table-action-btn.primary {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.table-action-btn.primary:hover {
    background: #5a67d8;
}

/* Stage Management Modal */
.stage-modal .modal-dialog {
    max-width: 600px;
}

.stages-list {
    max-height: 400px;
    overflow-y: auto;
}

.stage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    background: white;
    cursor: grab;
}

.stage-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stage-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.stage-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stage-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #d1d5db;
}

.stage-name {
    font-weight: 600;
    color: #1f2937;
}

.stage-count-badge {
    background: #f3f4f6;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.stage-actions {
    display: flex;
    gap: 5px;
}

.stage-action {
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stage-action:hover {
    background: #f3f4f6;
}

.stage-action.delete {
    color: #dc2626;
    border-color: #fecaca;
}

.stage-action.delete:hover {
    background: #fef2f2;
}

/* Add Stage Form */
.add-stage-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.add-stage-form input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
}

.add-stage-form input[type="color"] {
    width: 50px;
    padding: 2px;
}

.add-stage-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-stage-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .lead-pipeline {
        flex-direction: column;
        gap: 15px;
    }
    
    .pipeline-stage {
        flex: none;
        width: 100%;
    }
    
    .table-filters {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .view-toggle {
        flex-direction: column;
        gap: 5px;
        margin-right: 10px;
    }
    
    .header-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Animation for drag and drop */
@keyframes dragEnter {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1.02); }
}

.pipeline-stage.drag-enter {
    animation: dragEnter 0.3s ease;
}

/* Loading states */
.loading-stages {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6b7280;
}

.loading-stages i {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

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

/* Success/Error states */
.stage-success {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.05) !important;
}

.stage-error {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

/* Tooltip for assignees */
.assignee-tooltip {
    position: relative;
}

.assignee-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.assignee-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1f2937;
    z-index: 1000;
}

/* Kanban Filters */
.kanban-filters {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
}

.filters-container {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    color: #374151;
    font-size: 13px;
}

.filter-group .form-control {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.filter-group .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-actions .btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Multiple Assignees in Table */
.table-assignees-multiple {
    display: flex;
    align-items: center;
    gap: 4px;
}

.table-assignee-avatar.small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.extra-count {
    background: #f3f4f6;
    color: #6b7280;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
}

/* Products Page Styles */
.product-categories {
    margin-bottom: 30px;
}

.category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 8px 16px;
    border: 2px solid #e1e8ff;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #667eea;
}

.category-tab.active,
.category-tab:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.product-info {
    padding: 20px;
}

.product-info h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.product-info p {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 14px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.old-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
}

.stock {
    color: #28a745;
    font-weight: 500;
}

.category {
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
    color: #666;
}

.product-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}

/* Files Page Styles */
.file-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.breadcrumb-path {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.path-item {
    cursor: pointer;
    transition: color 0.3s ease;
}

.path-item:hover {
    color: #667eea;
}

.path-item.current {
    color: #667eea;
    font-weight: 600;
}

.view-options {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 8px 12px;
    border: 1px solid #e1e8ff;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #667eea;
}

.view-btn.active,
.view-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.file-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.file-item.folder .file-icon i {
    color: #ffc107;
}

.file-icon {
    text-align: center;
    margin-bottom: 15px;
}

.file-icon i {
    font-size: 48px;
    color: #667eea;
}

.file-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.file-meta {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-bottom: 15px;
}

.file-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Chat Page Styles */
.chat-container {
    display: flex;
    height: 600px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chat-sidebar {
    width: 300px;
    border-right: 1px solid #e1e8ff;
    background: #f8f9fa;
}

.chat-search {
    padding: 20px;
    border-bottom: 1px solid #e1e8ff;
}

.chat-list {
    height: calc(100% - 80px);
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    border-bottom: 1px solid #e1e8ff;
    position: relative;
}

.chat-item:hover,
.chat-item.active {
    background: white;
}

.chat-avatar {
    position: relative;
    margin-right: 12px;
}

.chat-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.status.online {
    background: #28a745;
}

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

.chat-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.chat-info p {
    margin: 0;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 11px;
    color: #999;
    display: block;
    margin-top: 2px;
}

.chat-badge {
    background: #667eea;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e8ff;
    background: white;
}

.chat-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.user-info .status {
    position: static;
    width: auto;
    height: auto;
    border: none;
    background: none;
    color: #28a745;
    font-size: 12px;
    font-weight: 500;
}

.chat-actions {
    display: flex;
    gap: 10px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.message.sent {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
}

.message.received .message-content {
    background: white;
    border-bottom-left-radius: 4px;
}

.message.sent .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    display: block;
    margin-top: 4px;
}

.chat-input {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-top: 1px solid #e1e8ff;
    gap: 10px;
}

.chat-input .form-control {
    flex: 1;
    border: 1px solid #e1e8ff;
    border-radius: 25px;
    padding: 10px 15px;
}

/* Phone Page Styles */
.phone-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.phone-dialer {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dialer-display {
    margin-bottom: 20px;
}

.phone-number {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    text-align: center;
    border: 2px solid #e1e8ff;
    border-radius: 8px;
    background: #f8f9fa;
}

.dialer-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.keypad-btn {
    width: 60px;
    height: 60px;
    border: 2px solid #e1e8ff;
    border-radius: 50%;
    background: white;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.keypad-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.05);
}

.keypad-btn span {
    font-size: 10px;
    font-weight: 400;
    margin-top: 2px;
}

.dialer-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.call-btn {
    padding: 12px 30px;
    border-radius: 25px;
}

.clear-btn {
    padding: 12px 20px;
    border-radius: 8px;
}

.recent-calls {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.recent-calls h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.call-list {
    max-height: 400px;
    overflow-y: auto;
}

.call-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.call-item:last-child {
    border-bottom: none;
}

.call-info {
    flex: 1;
}

.call-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.call-number {
    font-size: 12px;
    color: #666;
}

.call-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 0 15px;
}

.call-type {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.call-type.incoming {
    background: #d4edda;
    color: #155724;
}

.call-type.outgoing {
    background: #d1ecf1;
    color: #0c5460;
}

.call-time,
.call-duration {
    font-size: 11px;
    color: #666;
}

.call-actions {
    display: flex;
    gap: 5px;
}

/* Task Kanban Styles */
.task-kanban {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.kanban-column {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.column-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.task-count {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.task-list {
    min-height: 200px;
}

.task-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #e1e8ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.task-priority {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.task-priority.high {
    background: #dc3545;
}

.task-priority.medium {
    background: #ffc107;
}

.task-priority.low {
    background: #28a745;
}

.task-card h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.task-card p {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.task-assignee {
    color: #667eea;
    font-weight: 500;
}

.task-due {
    color: #666;
}

/* Report Categories */
/* Customer Insights */
.customer-insights {
    margin: 30px 0;
}

.insights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.insight-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.insight-header h4 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.insight-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Lifecycle Chart */
.lifecycle-chart {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lifecycle-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.stage-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    margin-bottom: 8px;
}

.stage-icon.lead {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stage-icon.prospect {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stage-icon.customer {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.stage-icon.advocate {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.stage-info {
    display: flex;
    flex-direction: column;
}

.stage-count {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.stage-label {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.stage-arrow {
    font-size: 16px;
    color: #999;
    margin: 0 10px;
}

/* Satisfaction Chart */
.satisfaction-chart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.satisfaction-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.satisfaction-emoji {
    font-size: 24px;
    width: 35px;
    text-align: center;
}

.satisfaction-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.satisfaction-label {
    min-width: 100px;
    font-size: 14px;
    color: #555;
}

.satisfaction-bar {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.satisfaction-progress {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.satisfaction-percent {
    font-weight: 600;
    color: #333;
    min-width: 35px;
    text-align: right;
}

/* Customer Metrics */
.customer-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: transform 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 20px;
}

.metric-content h5 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
}

.metric-trend {
    font-size: 12px;
    font-weight: 600;
}

.metric-trend.positive {
    color: #10b981;
}

.metric-trend.negative {
    color: #ef4444;
}

/* Source Performance Matrix */
.source-matrix {
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.matrix-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.matrix-header h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.matrix-legend {
    display: flex;
    gap: 15px;
}

.legend-item {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.legend-item.high {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.legend-item.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.legend-item.low {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.matrix-cell {
    border-radius: 12px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.matrix-cell.high {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

.matrix-cell.medium {
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.2);
}

.matrix-cell.low {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

.matrix-cell:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cell-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.cell-header i {
    font-size: 24px;
}

.cell-header span {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.cell-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.cell-metric {
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

/* Source Timeline */
.source-timeline {
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.timeline-header h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.timeline-controls {
    display: flex;
    gap: 10px;
}

.timeline-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-btn.active,
.timeline-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.timeline-chart {
    margin: 25px 0;
    height: 250px;
}

.timeline-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid transparent;
}

.insight-item.trending-up {
    background: rgba(16, 185, 129, 0.05);
    border-left-color: #10b981;
}

.insight-item.warning {
    background: rgba(245, 158, 11, 0.05);
    border-left-color: #f59e0b;
}

.insight-item.opportunity {
    background: rgba(59, 130, 246, 0.05);
    border-left-color: #3b82f6;
}

.insight-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.insight-item.trending-up .insight-icon {
    background: #10b981;
}

.insight-item.warning .insight-icon {
    background: #f59e0b;
}

.insight-item.opportunity .insight-icon {
    background: #3b82f6;
}

.insight-content h5 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.insight-content p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* Source Quality */
.source-quality {
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.source-quality h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 25px 0;
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.quality-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.quality-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.quality-header i {
    font-size: 24px;
}

.quality-header span {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-left: 10px;
}

.quality-score {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 700;
}

.quality-score.high {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.quality-score.medium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.quality-score.low {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.quality-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quality-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quality-bar span:first-child {
    min-width: 120px;
    font-size: 13px;
    color: #555;
}

.bar-container {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.8s ease;
}

.quality-bar span:last-child {
    min-width: 35px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-align: right;
}

/* Staff Performance Dashboard */
.staff-performance-dashboard {
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.performance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.performance-header h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.performance-filters {
    display: flex;
    gap: 15px;
}

.performance-filters select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 14px;
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.performance-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.performance-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.performance-card.top-performer {
    border: 2px solid #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.performance-card.needs-attention {
    border: 2px solid #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.performance-rank {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.performance-card.top-performer .performance-rank {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    font-size: 18px;
}

.performance-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.staff-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(102, 126, 234, 0.2);
}

.staff-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-details h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.staff-role {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.performance-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.metric {
    text-align: center;
    padding: 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
}

.metric-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.metric-value {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.metric-value.success {
    color: #10b981;
}

.metric-value.warning {
    color: #f59e0b;
}

.metric-value.danger {
    color: #ef4444;
}

.report-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #f0f0f0;
}

.category-card:hover,
.category-card.active {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.category-icon i {
    font-size: 24px;
    color: white;
}

.category-card h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.category-card p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.report-content {
    animation: fadeIn 0.3s ease;
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chart-card h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.chart-card canvas {
    max-height: 300px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Deal Info Styles */
.deal-info strong {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.deal-info small {
    color: #666;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
        height: auto;
    }
    
    .chat-sidebar {
        width: 100%;
        height: 200px;
    }
    
    .phone-container {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .report-categories {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Modal Styles */
.modal-lg {
    max-width: 900px;
    width: 90%;
}

.modal-sm {
    max-width: 400px;
    width: 90%;
}

.product-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.product-image-section {
    text-align: center;
}

.product-image-section img {
    width: 100%;
    max-width: 400px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.image-gallery {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail.active {
    border-color: #667eea;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-section {
    padding-left: 20px;
}

.product-info-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.product-info-section p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.price-section {
    margin-bottom: 25px;
}

.price-section .current-price {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
    margin-right: 15px;
}

.price-section .old-price {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
}

.product-meta-section {
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.meta-item label {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.meta-item span {
    color: #666;
}

.product-features {
    margin-bottom: 25px;
}

.product-features h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-features li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 20px;
}

.product-features li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.share-options h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.permission-settings {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.permission-item {
    margin-bottom: 10px;
}

.permission-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.permission-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.expiry-settings {
    margin-bottom: 20px;
}

.expiry-settings label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.share-link-section {
    margin-bottom: 20px;
}

.share-link-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.link-input-group {
    display: flex;
    gap: 10px;
}

.link-input-group input {
    flex: 1;
}

.link-input-group button {
    padding: 8px 15px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* Enhanced File Icons */
.file-icon i.fa-file-pdf {
    color: #dc3545;
}

.file-icon i.fa-file-excel {
    color: #28a745;
}

.file-icon i.fa-file-word {
    color: #007bff;
}

.file-icon i.fa-file-powerpoint {
    color: #fd7e14;
}

.file-icon i.fa-file-image {
    color: #6f42c1;
}

.file-icon i.fa-file-archive {
    color: #6c757d;
}

/* Animation for modals */
.modal {
    animation: fadeIn 0.3s ease;
}

.modal-content {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design for Modals */
@media (max-width: 768px) {
    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-info-section {
        padding-left: 0;
    }
    
    .modal-lg,
    .modal-sm {
        width: 95%;
        margin: 20px auto;
    }
    
    .image-gallery {
        flex-wrap: wrap;
    }
    
    .link-input-group {
        flex-direction: column;
    }
}

/* File Message Styles in Chat */
.file-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 5px;
}

.file-message i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.file-message span {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.download-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    color: inherit;
    cursor: pointer;
    transition: background 0.3s ease;
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.message.received .file-message {
    background: rgba(0, 0, 0, 0.05);
}

.message.received .download-btn {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.message.received .download-btn:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* Enhanced Badge Styles */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
}

.badge-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: white;
}

/* Enhanced Button Animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Enhanced Tooltip Styles */
.tooltip {
    position: relative;
}

.tooltip:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip:after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover:before,
.tooltip:hover:after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 5px);
}

/* Progress Bars */
.progress {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: progressAnimation 2s linear infinite;
}

@keyframes progressAnimation {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 60px 0;
    }
}

/* Enhanced Card Hover Effects */
.stat-card,
.product-card,
.file-item,
.task-card,
.category-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover,
.product-card:hover,
.file-item:hover,
.task-card:hover,
.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    margin-bottom: 10px;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #28a745;
}

.notification.error {
    border-left: 4px solid #dc3545;
}

.notification.warning {
    border-left: 4px solid #ffc107;
}

.notification.info {
    border-left: 4px solid #17a2b8;
}

/* Enhanced Search Functionality */
.search-highlight {
    background: yellow;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* Dark Theme Preparation */
.dark-theme {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --card-bg: #2d2d2d;
    --border-color: #404040;
}

.dark-theme body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.dark-theme .stat-card,
.dark-theme .product-card,
.dark-theme .file-item {
    background: var(--card-bg);
    border-color: var(--border-color);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* New Report Modal Styles */
.report-builder {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.data-selection {
    margin: 25px 0;
}

.data-selection h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.data-sources {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.data-source-group {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e1e8ff;
}

.data-source-group h5 {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: #667eea;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.1);
    accent-color: #667eea;
}

.report-options {
    margin: 25px 0;
}

.report-options h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Enhanced Table Styles */
.staff-info strong {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.staff-info small {
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.source-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.source-info i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.source-info strong {
    font-weight: 600;
    color: #333;
}

.conversion-rate {
    font-weight: 600;
    color: #667eea;
}

.rating {
    font-weight: 600;
    color: #28a745;
}

.negative {
    color: #dc3545;
    font-weight: 600;
}

/* Enhanced Source Icons */
.source-info .fab.fa-instagram {
    color: #E4405F;
}

.source-info .fab.fa-facebook {
    color: #1877F2;
}

.source-info .fab.fa-google {
    color: #4285F4;
}

.source-info .fas.fa-globe {
    color: #28a745;
}

.source-info .fas.fa-users {
    color: #fd7e14;
}

.source-info .fas.fa-phone {
    color: #6f42c1;
}

/* Report Category Enhancement */
.report-categories {
    margin-bottom: 30px;
}

.category-card {
    position: relative;
    overflow: hidden;
}

.category-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card.active:before,
.category-card:hover:before {
    transform: scaleX(1);
}

/* Chart Card Enhancements */
.chart-card {
    position: relative;
    overflow: hidden;
}

.chart-card:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2, #667eea);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chart-card:hover:before {
    opacity: 1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Table Value Highlighting */
.table-value {
    font-weight: 700;
    color: #667eea;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Progress Indicators */
.progress-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e1e8ff;
}

.progress-dot.active {
    background: #667eea;
}

/* Modal Scrollbar Enhancement */
.report-builder::-webkit-scrollbar {
    width: 6px;
}

.report-builder::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.report-builder::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.report-builder::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Mobile Responsiveness for Report Modal */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .data-sources {
        grid-template-columns: 1fr;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .report-builder {
        max-height: 60vh;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
}

/* Success/Error States */
.form-control.success {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73l.4-.4v1.67z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px 12px;
}

.form-control.error {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3e%3cpath fill='%23dc3545' d='M12 12L0 0h12z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px 12px;
}

/* Report Statistics Enhancement */
.report-stats .stat-card {
    position: relative;
    overflow: hidden;
}

.report-stats .stat-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--primary-color, #667eea) 0%, 
        var(--secondary-color, #764ba2) 100%);
}

/* Animation for Report Loading */
@keyframes reportLoad {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.report-content {
    animation: reportLoad 0.5s ease-out;
}

/* Print Styles for Reports */
@media print {
    .modal-header,
    .modal-actions,
    .header-actions {
        display: none;
    }
    
    .report-content {
        box-shadow: none;
    }
    
    .chart-card,
    .table-container {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}