/* Easy CRM - Professional Light Theme Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Professional color palette */
    --primary: #1E40AF;
    --primary-dark: #1E3A8A;
    --secondary: #64748B;
    --accent: #0891B2;
    --success: #059669;
    --danger: #DC2626;
    --warning: #D97706;
    
    /* Backgrounds */
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --bg-hover: #F1F5F9;
    
    /* Text colors */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    
    /* Borders */
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Bootstrap Icons - Navigation sizing */
.nav-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

/* Bootstrap Icons - Action button sizing */
.icon-edit, .icon-delete {
    font-size: 15px;
}

/* Button icon styling */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-icon.btn-danger {
    color: var(--text-secondary);
}

.btn-icon.btn-danger:hover {
    background: #FEE2E2;
    color: var(--danger);
    border-color: var(--danger);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EEF2FF 0%, #DBEAFE 50%, #FEF3C7 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-decoration {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -200px;
}

.login-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 3rem;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    position: relative;
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.input, input[type="text"], input[type="email"], input[type="password"], 
input[type="tel"], input[type="number"], textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.input:focus, input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

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

.btn-outline:hover {
    background: var(--bg-hover);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

.btn-danger:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* Demo Credentials */
.demo-credentials {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-hover);
    border-radius: 8px;
    text-align: center;
}

.demo-credentials p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.demo-credentials code {
    font-family: 'Courier New', monospace;
    color: var(--primary);
    font-size: 0.875rem;
    background: var(--bg-card);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Error/Success Messages */
.message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.message-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.message-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #6EE7B7;
}

/* Main App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.sidebar-header p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1) 0%, transparent 100%);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-icon {
    font-size: 1.25rem;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer .btn {
    width: 100%;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
    min-width: 0;
    max-width: calc(100vw - 260px);
    overflow-x: hidden;
    box-sizing: border-box;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

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

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, #F8FAFC 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    transform: translate(30%, -30%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.accent-blue { color: #3B82F6; }
.accent-green { color: var(--success); }
.accent-orange { color: var(--accent); }
.accent-red { color: var(--danger); }

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Sources List */
.source-item {
    margin-bottom: 1rem;
}

.source-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.source-name {
    color: var(--text-primary);
    font-weight: 500;
}

.source-percentage {
    color: var(--primary);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.status-item {
    padding: 1rem;
    background: var(--bg-hover);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.status-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.status-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Activity List */
.activity-item {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--bg-hover);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: var(--border-light);
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-description {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tasks List */
.task-item {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--bg-hover);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--accent);
}

.task-item.priority-high {
    border-left-color: var(--danger);
}

.task-item.priority-medium {
    border-left-color: var(--accent);
}

.task-item.priority-low {
    border-left-color: var(--success);
}

.task-content {
    flex: 1;
}

.task-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.task-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Table */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-hover);
}

.data-table th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-new {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-contacted {
    background: #E9D5FF;
    color: #6B21A8;
}

.badge-qualified {
    background: #D1FAE5;
    color: #065F46;
}

.badge-converted {
    background: #FEF3C7;
    color: #92400E;
}

.badge-active {
    background: #D1FAE5;
    color: #065F46;
}

.badge-inactive {
    background: #F1F5F9;
    color: #475569;
}

.badge-admin {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-manager {
    background: #FEF3C7;
    color: #92400E;
}

.badge-user {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Filters */
.filters-card {
    margin-bottom: 1.5rem;
}

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

.filters-grid-with-action {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h2 {
    font-size: 1.75rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close-btn:hover {
    background: var(--bg-hover);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar-header h2 {
        font-size: 1rem;
    }
    
    .sidebar-header p,
    .nav-item span:not(.nav-icon) {
        display: none;
    }
    
    .nav-icon {
        margin: 0 auto;
    }
    
    .main-content {
        margin-left: 70px;
        padding: 1rem;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .filters-grid,
    .filters-grid-with-action {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* Animation Enhancements */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-in {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Enhanced Card Interactions */
.card.interactive {
    cursor: pointer;
}

.card.interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* Status Indicators */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-indicator.online {
    background-color: var(--success);
    box-shadow: 0 0 6px rgba(5, 150, 105, 0.4);
}

.status-indicator.offline {
    background-color: var(--danger);
}

.status-indicator.processing {
    background-color: var(--warning);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Enhanced Form Controls */
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-control.is-valid {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Accessibility Improvements */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.focus-visible {
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px !important;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   SAP FIORI STYLE FORM COMPONENTS
   ============================================ */

/* SAP Page Header Bar */
.sap-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.sap-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sap-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1rem;
    background: var(--bg-card);
}

.sap-back-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.sap-header-title {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sap-breadcrumb {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.sap-header-title h1 {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
}

.sap-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.sap-btn-cancel {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    border-radius: 6px;
    width: auto;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.sap-btn-cancel:hover {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.sap-btn-save {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    border-radius: 6px;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    cursor: pointer;
}

.sap-btn-save:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

/* SAP Section Container */
.sap-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.sap-section:hover {
    box-shadow: var(--shadow-md);
}

/* SAP Section Header */
.sap-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.875rem 1.5rem;
    background: #F8FAFC;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.01em;
    border-left: 3px solid var(--primary);
}

.sap-section-header i {
    font-size: 1rem;
    color: var(--primary);
}

/* SAP Section Body */
.sap-section-body {
    padding: 1.25rem 1.5rem;
}

/* SAP Form Row - always 3 columns */
.sap-form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.sap-form-row:last-child {
    margin-bottom: 0;
}

/* SAP Field */
.sap-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sap-field-full {
    grid-column: 1 / -1;
}

.sap-field-wide {
    grid-column: span 2;
}

.sap-field-empty {
    visibility: hidden;
}

/* SAP Label */
.sap-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sap-required {
    color: var(--danger);
    font-size: 0.9rem;
}

/* SAP Input */
.sap-input {
    width: 100%;
    padding: 0.55rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s ease;
    height: 38px;
}

.sap-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.08);
    background: #FAFBFF;
}

.sap-input:hover:not(:focus) {
    border-color: var(--text-muted);
}

select.sap-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
    cursor: pointer;
}

.sap-textarea {
    height: auto;
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* SAP Role Info Cards */
.sap-role-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.sap-role-card {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    font-size: 0.8rem;
}

.sap-role-card strong {
    display: block;
    color: var(--primary);
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.sap-role-card p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* SAP Responsive */
@media (max-width: 900px) {
    .sap-form-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .sap-field-wide {
        grid-column: span 1;
    }

    .sap-role-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .sap-form-row {
        grid-template-columns: 1fr;
    }

    .sap-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .sap-header-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ============================================
   LEADS LIST PAGE STYLES
   ============================================ */

/* Page Header */
.ls-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.ls-page-header-left h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ls-count-badge {
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    vertical-align: middle;
}

.ls-page-header-left p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.ls-page-header-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.ls-btn-export {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.ls-btn-export:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.ls-btn-new {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.ls-btn-new:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

/* Filter Card */
.ls-filter-card {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

/* SAP-style search row */
.ls-search-row {
    margin-bottom: 0.875rem;
}

/* SAP Search Bar */
.ls-sap-search {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-card);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 40px;
}

.ls-sap-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.08);
}

.ls-sap-search-label {
    padding: 0 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: #F1F5F9;
    border-right: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.ls-sap-search-icon {
    padding: 0 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.ls-sap-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-primary);
    background: transparent;
    padding: 0 0.5rem 0 0;
    height: 100%;
}

.ls-sap-search-input::placeholder {
    color: var(--text-muted);
}

.ls-sap-search-btn {
    padding: 0 1rem;
    background: var(--primary);
    color: white;
    border: none;
    height: 100%;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    letter-spacing: 0.02em;
    transition: background 0.2s;
    white-space: nowrap;
}

.ls-sap-search-btn:hover {
    background: var(--primary-dark);
}

/* Filter chips row */
.ls-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Filter chip - looks like a styled button/pill */
.ls-chip {
    position: relative;
    display: inline-block;
}

.ls-chip select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.35rem 2rem 0.35rem 0.875rem;
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s ease;
    height: 32px;
    outline: none;
    white-space: nowrap;
}

.ls-chip select:hover {
    border-color: var(--primary);
    background: #EFF6FF;
    color: var(--primary);
}

.ls-chip select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.08);
}

/* Active filter chip - highlighted */
.ls-chip.active select {
    background: #EFF6FF;
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.ls-chip-arrow {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    font-size: 0.65rem;
}

.ls-chip.active .ls-chip-arrow {
    color: var(--primary);
}

/* Clear filter button */
.ls-chip-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px dashed var(--danger);
    border-radius: 20px;
    padding: 0.35rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--danger);
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    height: 32px;
    transition: all 0.2s;
}

.ls-chip-clear:hover {
    background: #FEE2E2;
}

/* Active filter count indicator */
.ls-filter-active-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    margin-left: 0.25rem;
    vertical-align: middle;
}

/* Bulk Action Bar */
.ls-bulk-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

.ls-bulk-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.ls-bulk-actions {
    display: flex;
    gap: 0.625rem;
    align-items: center;
    flex-wrap: wrap;
}

.ls-bulk-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
    border-radius: 6px;
    width: auto;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
}

.ls-bulk-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.ls-bulk-delete {
    color: var(--danger);
    border-color: var(--danger);
}

.ls-bulk-delete:hover {
    background: #FEE2E2;
    border-color: var(--danger);
    color: var(--danger);
}

.ls-bulk-status-wrap {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

/* Table */
.ls-table-card {
    padding: 0;
    overflow: hidden;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ls-table {
    width: 100%;
    table-layout: auto;
}

.ls-table thead th {
    font-size: 0.75rem;
    padding: 0.875rem 0.875rem;
    white-space: nowrap;
}

.ls-table td {
    padding: 0.875rem 0.875rem;
    font-size: 0.875rem;
    vertical-align: middle;
}

.ls-th-check, .ls-td-check {
    width: 40px;
    text-align: center;
}

.ls-th-actions {
    text-align: center;
}

.ls-td-email {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Checkbox */
.ls-checkbox {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Sort links */
.ls-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.15s;
}

.ls-sort-link:hover {
    color: var(--primary);
}

.ls-sort-active {
    color: var(--primary);
}

.ls-sort-idle {
    opacity: 0.3;
}

/* Lead Score */
.ls-score {
    display: inline-block;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.ls-score-high { background: #D1FAE5; color: #065F46; }
.ls-score-mid  { background: #FEF3C7; color: #92400E; }
.ls-score-low  { background: #F1F5F9; color: #475569; }

/* Empty state */
.ls-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.ls-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

.ls-empty p {
    font-size: 0.9rem;
}

/* Row hover */
.ls-row:hover {
    background: #F8FAFF;
}

/* Pagination */
.ls-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ls-page-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ls-page-btns {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.ls-page-btn {
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    background: var(--bg-card);
    transition: all 0.15s;
    padding: 0 0.5rem;
}

.ls-page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #EFF6FF;
}

.ls-page-active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    pointer-events: none;
}

.ls-page-ellipsis {
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0 0.25rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .ls-filter-chips { gap: 0.4rem; }
    .ls-table { font-size: 0.8rem; }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 70px;
        max-width: calc(100vw - 70px);
        padding: 1rem;
    }
    .ls-page-header { flex-direction: column; gap: 0.75rem; }
    .ls-filter-chips { flex-direction: column; align-items: stretch; }
    .ls-chip select { width: 100%; }
    .ls-bulk-bar { flex-direction: column; align-items: flex-start; }
    .ls-sap-search { flex-wrap: wrap; height: auto; }
    .ls-sap-search-label { display: none; }
}

/* ============================================
   LEAD DETAIL PAGE STYLES
   ============================================ */

/* Lead name link in table */
.ld-name-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.ld-name-link:hover {
    text-decoration: underline;
}

/* Header Card */
.ld-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.ld-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.ld-header-left {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.ld-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ld-avatar i {
    font-size: 2.5rem;
    color: var(--primary);
}

.ld-header-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ld-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.ld-header-meta i {
    margin-right: 0.25rem;
}

.ld-divider {
    color: var(--border-color);
}

.ld-header-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ld-badge-source {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: #F1F5F9;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.ld-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ld-score-badge.high { background: #D1FAE5; color: #065F46; }
.ld-score-badge.mid  { background: #FEF3C7; color: #92400E; }
.ld-score-badge.low  { background: #F1F5F9; color: #475569; }

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

.ld-btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    text-decoration: none;
}

.ld-btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* Quick Actions Bar */
.ld-quick-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.ld-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.875rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.ld-action-btn i {
    font-size: 1.25rem;
    color: var(--primary);
}

.ld-action-btn:hover {
    background: #EFF6FF;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.ld-action-convert {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-color: var(--success);
}

.ld-action-convert i {
    color: var(--success);
}

.ld-action-convert:hover {
    background: var(--success);
    color: white;
}

.ld-action-convert:hover i {
    color: white;
}

/* Three Column Layout */
.ld-three-col {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 1.5rem;
}

/* Sidebar Cards */
.ld-sidebar-left, .ld-sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ld-info-card h3,
.ld-notes-card h3,
.ld-tasks-card h3,
.ld-tags-card h3,
.ld-timeline-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.ld-info-card h3 i,
.ld-notes-card h3 i,
.ld-tasks-card h3 i,
.ld-tags-card h3 i,
.ld-timeline-card h3 i {
    font-size: 1.1rem;
    color: var(--primary);
}

/* Contact Info */
.ld-info-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ld-info-item {
    display: flex;
    gap: 0.75rem;
}

.ld-info-item > i {
    width: 20px;
    font-size: 1rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.ld-info-item > div {
    flex: 1;
    min-width: 0;
}

.ld-info-item label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.ld-info-item span,
.ld-info-item a {
    display: block;
    font-size: 0.875rem;
    color: var(--text-primary);
    word-break: break-word;
}

.ld-info-item a {
    color: var(--primary);
    text-decoration: none;
}

.ld-info-item a:hover {
    text-decoration: underline;
}

/* Tags */
.ld-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ld-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ld-tag.tag-red {
    background: #FEE2E2;
    color: #991B1B;
}

.ld-tag.tag-blue {
    background: #DBEAFE;
    color: #1E3A8A;
}

/* Activity Timeline */
.ld-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ld-timeline-item {
    display: flex;
    gap: 1rem;
    position: relative;
}

.ld-timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 28px;
    bottom: -16px;
    width: 2px;
    background: var(--border-light);
}

.ld-timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid #EFF6FF;
    flex-shrink: 0;
    margin-top: 2px;
}

.ld-timeline-content {
    flex: 1;
}

.ld-timeline-header {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.ld-timeline-icon {
    color: var(--primary);
    font-size: 1rem;
}

.ld-timeline-desc {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.ld-timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Notes & Tasks */
.ld-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.ld-card-header h3 {
    margin-bottom: 0;
}

.ld-note-form,
.ld-task-form {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-hover);
    border-radius: 8px;
}

.ld-note-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    margin-bottom: 0.75rem;
}

.ld-note-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.08);
}

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

.ld-notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ld-note {
    padding: 0.875rem;
    background: var(--bg-hover);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.ld-note-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.ld-note-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.ld-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ld-task {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--bg-hover);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.ld-task-content {
    flex: 1;
}

.ld-task-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.ld-task-due {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Empty States */
.ld-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.ld-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.4;
}

.ld-empty p {
    font-size: 0.875rem;
}

.ld-empty-sm {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--text-muted);
}

.ld-empty-sm i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.35rem;
    opacity: 0.4;
}

.ld-empty-sm p {
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .ld-three-col {
        grid-template-columns: 260px 1fr;
    }
    
    .ld-sidebar-right {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .ld-three-col {
        grid-template-columns: 1fr;
    }
    
    .ld-sidebar-right {
        grid-template-columns: 1fr;
    }
    
    .ld-header-top {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ld-quick-actions {
        flex-wrap: wrap;
    }
    
    .ld-action-btn {
        min-width: calc(50% - 0.375rem);
    }
}

/* ============================================
   PROJECT DETAIL PAGE STYLES
   ============================================ */

/* Two Column Layout for Projects */
.pd-two-col {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 1.5rem;
}

/* Project Description Card */
.pd-desc-card {
    margin-top: 1.5rem;
}

.pd-description {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
}

/* Notes Card */
.pd-notes-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pd-notes-card h3 i {
    font-size: 1.1rem;
    color: var(--primary);
}

/* Notes Table */
.pd-notes-table {
    margin-top: 1rem;
}

.pd-notes-table td {
    vertical-align: top;
    padding: 0.75rem 0.875rem;
}

.pd-notes-table thead th {
    padding: 0.75rem 0.875rem;
}

.pd-note-author-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pd-note-author-cell i {
    font-size: 1.2rem;
    color: var(--primary);
}

.pd-note-content-cell {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

.pd-note-date-cell {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.875rem;
}

.pd-note-exact-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Notes Pagination */
.pd-notes-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pd-page-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.pd-page-btns {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

/* Responsive */
@media (max-width: 900px) {
    .pd-two-col {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   DEALS PIPELINE STYLES
   ============================================ */

/* Pipeline Page Header */
.dp-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dp-header-left h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.dp-header-left p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.dp-header-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.dp-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dp-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.dp-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.dp-header-actions {
    display: flex;
    gap: 0.75rem;
}

/* Pipeline Kanban Board */
.dp-pipeline {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Pipeline Stage Column */
.dp-stage {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dp-stage-header {
    padding: 0.75rem 0.875rem;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0.5rem;
}

.stage-discovery { background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%); }
.stage-demo { background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%); }
.stage-proposal { background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%); }
.stage-negotiation { background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%); }
.stage-won { background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%); }
.stage-lost { background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%); }

.dp-stage-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.dp-stage-title i {
    font-size: 0.9rem;
    color: var(--primary);
}

.dp-stage-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.dp-stage-count {
    font-weight: 600;
}

.dp-stage-value {
    font-weight: 600;
}

/* Deal Cards in Pipeline */
.dp-stage-deals {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    min-height: 200px;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.dp-deal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

.dp-deal-won {
    border-left: 3px solid var(--success);
}

.dp-deal-lost {
    border-left: 3px solid var(--danger);
    opacity: 0.7;
}

.dp-deal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
}

.dp-deal-header h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.dp-deal-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.dp-deal-value-lg {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.dp-deal-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.625rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dp-deal-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dp-deal-meta i {
    margin-right: 0.25rem;
}

.dp-deal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.625rem;
    border-top: 1px solid var(--border-light);
    gap: 0.5rem;
}

.dp-deal-close-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.dp-deal-probability {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    background: var(--bg-hover);
    border-radius: 4px;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Badge colors for deal stages */
.badge-discovery { background: #DBEAFE; color: #1E3A8A; }
.badge-demo { background: #E0E7FF; color: #3730A3; }
.badge-proposal { background: #E9D5FF; color: #6B21A8; }
.badge-negotiation { background: #FDE68A; color: #92400E; }
.badge-won { background: #A7F3D0; color: #065F46; }
.badge-lost { background: #FECACA; color: #991B1B; }

/* Responsive Pipeline */
@media (max-width: 1400px) {
    .dp-pipeline {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
    }
    
    .dp-stage:nth-child(n+4) {
        margin-top: 1rem;
    }
}

@media (max-width: 900px) {
    .dp-pipeline {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dp-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dp-header-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .dp-stat {
        text-align: center;
    }
    
    .dp-pipeline {
        grid-template-columns: 1fr;
    }
}
