/* Lead Management System Custom Styles */

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container-fluid {
    flex: 1;
}

/* Login Page Styles */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
}

.login-page .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.login-page .card-body {
    padding: 2rem;
}

.login-page .btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-page .btn-primary:hover {
    background: linear-gradient(45deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Navigation Styles */
.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 5px;
    margin: 0 2px;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f1f3f4;
    border-radius: 10px 10px 0 0 !important;
    padding: 1rem 1.5rem;
}

.card-title {
    font-weight: 600;
    color: #495057;
}

/* Statistics Cards */
.card.bg-primary,
.card.bg-secondary,
.card.bg-success,
.card.bg-danger,
.card.bg-warning,
.card.bg-info,
.card.bg-dark {
    border-radius: 12px;
    background: linear-gradient(45deg, var(--bs-primary), var(--bs-primary-dark, #0056b3));
}

.card.bg-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
}

.card.bg-success {
    background: linear-gradient(45deg, #28a745, #1e7e34);
}

.card.bg-warning {
    background: linear-gradient(45deg, #ffc107, #d39e00);
}

.card.bg-info {
    background: linear-gradient(45deg, #17a2b8, #117a8b);
}

.card.bg-danger {
    background: linear-gradient(45deg, #dc3545, #bd2130);
}

.card.bg-secondary {
    background: linear-gradient(45deg, #6c757d, #545b62);
}

.card.bg-dark {
    background: linear-gradient(45deg, #343a40, #1d2124);
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #1e7e34);
}

.btn-warning {
    background: linear-gradient(45deg, #ffc107, #d39e00);
    color: #212529;
}

.btn-danger {
    background: linear-gradient(45deg, #dc3545, #bd2130);
}

.btn-info {
    background: linear-gradient(45deg, #17a2b8, #117a8b);
}

.btn-block {
    width: 100%;
    margin-bottom: 10px;
}

/* Table Styles */
.table {
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background-color: #f5f5f5;
    transition: all 0.3s ease;
}

.table-warning {
    background-color: #fff3cd !important;
}

.table-warning:hover {
    background-color: #ffeaa7 !important;
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    padding: 0.5em 0.75em;
    border-radius: 6px;
    font-weight: 500;
    color:red;
}

.badge-purple {
    background-color: #6f42c1;
    color: white;
}

/* Admin Note Styles */
.admin-note-form {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
}

.admin-note-form textarea {
    resize: vertical;
    min-height: 60px;
}

/* Campaign Default Agent Indicator */
.default-agent-indicator {
    background: linear-gradient(45deg, #17a2b8, #138496);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    display: inline-block;
}

/* Auto-assignment notification */
.auto-assign-note {
    background: #e7f3ff;
    border-left: 4px solid #0066cc;
    padding: 0.5rem;
    margin: 0.5rem 0;
    border-radius: 0 4px 4px 0;
    font-size: 0.875rem;
}

/* Form Styles */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 2px solid #f1f3f4;
    border-radius: 15px 15px 0 0;
    background-color: #f8f9fa;
}

.modal-title {
    font-weight: 600;
    color: #495057;
}

/* Progress Bar Styles */
.progress {
    border-radius: 10px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(45deg, #007bff, #0056b3);
    font-weight: 600;
    color: white;
    text-align: center;
    line-height: 1.2;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: linear-gradient(45deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(45deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(45deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.alert-info {
    background: linear-gradient(45deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* Pagination Styles */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: #007bff;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-color: #007bff;
}

/* Footer Styles */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0 10px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .modal-dialog {
        margin: 10px;
    }
}

/* Animation Classes */
.fadeIn {
    animation: fadeIn 0.5s ease-in;
}

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

.slideInUp {
    animation: slideInUp 0.6s ease-out;
}

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

/* WhatsApp Link Styles */
a[href*="wa.me"] {
    text-decoration: none;
    color: #25d366 !important;
    font-weight: 500;
}

a[href*="wa.me"]:hover {
    color: #128c7e !important;
    text-decoration: underline;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Dashboard Specific Styles */
.dashboard-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

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

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Status Specific Colors */
.status-new { color: #17a2b8; }
.status-in-progress { color: #ffc107; }
.status-closed { color: #28a745; }
.status-lost { color: #dc3545; }
.status-pending { color: #6c757d; }

/* Export Section Styles */
.export-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.export-section h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0;
}

.export-section .btn-group .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.export-section .btn-outline-success:hover {
    background: linear-gradient(45deg, #28a745, #1e7e34);
    border-color: #28a745;
    transform: translateY(-1px);
}

.export-section .btn-outline-primary:hover {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-color: #007bff;
    transform: translateY(-1px);
}

.export-section .btn-outline-info:hover {
    background: linear-gradient(45deg, #17a2b8, #117a8b);
    border-color: #17a2b8;
    transform: translateY(-1px);
}

/* Export Button Icons */
.export-section .btn i {
    margin-right: 0.5rem;
}

/* Loading State for Export Buttons */
.export-section .btn:disabled {
    opacity: 0.6;
    transform: none !important;
}

.export-section .btn .fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Notification Styles */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: none;
}

.notification-toast .alert-success {
    background: linear-gradient(45deg, #d4edda, #c3e6cb);
    border-left: 4px solid #28a745;
}

.notification-toast .alert-danger {
    background: linear-gradient(45deg, #f8d7da, #f5c6cb);
    border-left: 4px solid #dc3545;
}

.notification-toast .alert-info {
    background: linear-gradient(45deg, #d1ecf1, #bee5eb);
    border-left: 4px solid #17a2b8;
}

/* Export Statistics in CSV */
.export-metadata {
    font-style: italic;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Responsive Export Section */
@media (max-width: 768px) {
    .export-section {
        padding: 0.75rem;
    }
    
    .export-section .row {
        text-align: center;
    }
    
    .export-section .btn-group {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .export-section .btn-group .btn {
        flex: 1;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .notification-toast {
        left: 10px;
        right: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* Print Styles */
@media print {
    .export-section,
    .no-print,
    .btn,
    .pagination,
    .navbar,
    .card-header .btn-group {
        display: none !important;
    }
    
    .table {
        font-size: 10px;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .table th,
    .table td {
        padding: 0.3rem;
        border: 1px solid #ccc;
    }
}

/* Copy to Clipboard Success Animation */
.copy-success {
    animation: copyFeedback 0.3s ease-in-out;
}

@keyframes copyFeedback {
    0% { 
        transform: scale(1); 
        background-color: var(--bs-primary);
    }
    50% { 
        transform: scale(1.05); 
        background-color: var(--bs-success);
    }
    100% { 
        transform: scale(1); 
        background-color: var(--bs-primary);
    }
}

/* Export Modal Improvements */
.export-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.export-progress {
    margin: 1rem 0;
}

.export-progress .progress {
    height: 8px;
    border-radius: 4px;
}

/* CSV Preview Styles */
.csv-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    max-height: 200px;
    overflow-y: auto;
}

.csv-preview code {
    background: none;
    color: #495057;
    padding: 0;
}

/* Export Results Summary */
.export-summary {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.export-summary h6 {
    color: #1976d2;
    margin-bottom: 0.5rem;
}

.export-summary .summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.export-summary .summary-value {
    font-weight: 600;
    color: #1976d2;
}

/* Utilities */
.text-shadow {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.border-radius-lg {
    border-radius: 15px !important;
}

.box-shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}