/* Custom styles for ECRM - Modern Enterprise Design */
:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --purple-color: #8b5cf6;
    --pink-color: #ec4899;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    z-index: 1050;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar .nav-link {
    color: #1e293b !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.navbar .nav-link:hover {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    z-index: 1060;
}

.dropdown-item:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #475569;
    padding: 0.875rem 1.25rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar .nav-link.active {
    background-color: rgba(102, 126, 234, 0.15);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* Main content */
main {
    padding-top: 1rem;
    min-height: calc(100vh - 120px);
}

/* Cards */
.card {
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: white;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f91 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 0.625rem 0.875rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-label {
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
}

/* Input groups for login/register */
.input-group-text {
    border-radius: 8px 0 0 8px;
    border: 2px solid #e2e8f0;
    border-right: none;
}

.input-group .form-control {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.05);
    color: var(--primary-color);
}

.input-group:focus-within .form-control {
    border-color: var(--primary-color);
}

/* Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.table thead th {
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    padding: 1rem;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.table-actions {
    white-space: nowrap;
}

.table-actions .btn {
    margin-right: 0.25rem;
    padding: 0.375rem 0.625rem;
}

/* Badges */
.badge {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
}

.badge-custom {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    border-left: 4px solid;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success-color);
    color: #065f46;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-left-color: var(--danger-color);
    color: #991b1b;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning-color);
    color: #92400e;
}

.alert-info {
    background-color: rgba(6, 182, 212, 0.1);
    border-left-color: var(--info-color);
    color: #155e75;
}

/* Stats Cards */
.stat-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    background: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #64748b;
    margin-bottom: 0;
}

/* Progress bars */
.progress {
    height: 10px;
    border-radius: 10px;
    background-color: #e2e8f0;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Modals */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: none;
    padding: 1rem 1.5rem 1.5rem;
}

/* Footer */
footer {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
}

footer .text-center {
    padding: 1.25rem;
    font-weight: 500;
    color: #475569;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        top: 0;
    }
    
    main {
        padding-left: 0;
    }
}

/* Print styles */
@media print {
    .sidebar, .navbar, .no-print {
        display: none !important;
    }
    
    main {
        padding: 0;
    }
}
