body, html {
    background: #f8f9fb;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Mobile Navigation Menu Toggle */
.nav-menu-toggle {
    position: relative;
    z-index: 100000;
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 16px;
}

.nav-menu-toggle:hover {
    background: transparent;
    transform: scale(1.05);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 20px;
    height: 16px;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background: #1d1d1f;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.nav-menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.nav-menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation Selector Dropdown */
.nav-selector {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 8px;
    margin-top: 8px;
    z-index: 100000;
    display: none;
    flex-direction: column;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-selector.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Navigation Links */
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(0, 115, 230, 0.1);
    color: #0073ea;
    transform: translateX(4px);
}

.nav-link.active {
    background: rgba(0, 115, 230, 0.15);
    color: #0073ea;
    font-weight: 600;
}

.nav-link i {
    width: 16px;
    text-align: center;
    font-size: 16px;
}

.main-content {
    background: #f8f9fb;
    padding: 24px;
    min-height: 100vh;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    position: relative;
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* Period Selector Section */
.period-selector-section {
    margin-bottom: 24px;
    padding: 0 24px;
}

.period-selector-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 300px;
}

.period-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #656d76;
    margin: 0;
}

.period-label i {
    color: #007AFF;
    font-size: 16px;
}

#periodSelector {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #d0d7de;
    background: #fff;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

#periodSelector:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Tab Navigation - macOS Style */
.tab-navigation {
    position: relative;
    margin-bottom: 32px;
}

.tab-container {
    display: flex;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    position: relative;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
    white-space: nowrap;
}

.tab-button:hover {
    color: #1a1a1a;
    transform: translateY(-1px);
}

.tab-button.active {
    color: #1a1a1a;
    font-weight: 600;
}

.tab-button i {
    font-size: 16px;
    opacity: 0.7;
}

.tab-button.active i {
    opacity: 1;
}

.tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

/* Tab Content */
.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

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

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

/* Grid Layouts */
.kpi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

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

/* Card Styles */
.kpi-card, .metric-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 24px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover, .metric-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.kpi-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.metric-card.large {
    grid-column: span 2;
}

.metric-card.extra-large {
    grid-column: span 3;
}

.metric-card.highlight {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
}

.metric-card.highlight .card-header h3,
.metric-card.highlight .metric-subtitle,
.metric-card.highlight .metric-change {
    color: rgba(255, 255, 255, 0.9);
}

.metric-card.highlight .metric-value {
    color: white;
}

/* KPI Card Elements */
.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #3b82f6;
}

.kpi-icon.revenue {
    background: #dcfce7;
    color: #16a34a;
}

.kpi-icon.profit {
    background: #fef3c7;
    color: #d97706;
}

.kpi-icon.projected {
    background: #dbeafe;
    color: #3b82f6;
}

.kpi-icon.projected-revenue {
    background: #f0f9ff;
    color: #0284c7;
}

.kpi-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* KPI title now handled by card-header h3 */

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    line-height: 1;
}

.kpi-change {
    font-size: 13px;
    color: #16a34a;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.kpi-change i {
    font-size: 12px;
}

/* Metric Card Elements */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.card-header i {
    color: #656d76;
    font-size: 20px;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.kpi-card .card-header i,
.metric-card .card-header i {
    color: #3b82f6;
    opacity: 1;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1;
}

.metric-subtitle {
    font-size: 14px;
    color: #656d76;
    margin-bottom: 8px;
}

.metric-change {
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.metric-change.up {
    color: #16a34a;
}

.metric-change.down {
    color: #ef4444;
}

/* Chart Containers */
.chart-container {
    height: 200px;
    position: relative;
}

.metric-card.large .chart-container {
    height: 250px;
}

/* Cash Flow Section */
.cash-flow-section {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 24px;
    margin-bottom: 32px;
}

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

.chart-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.chart-controls i {
    color: #656d76;
    cursor: pointer;
}

.cash-as-of {
    font-size: 14px;
    color: #656d76;
    margin-bottom: 8px;
}

.cash-amount {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 24px;
}

.cash-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 24px;
}

.cash-item {
    text-align: center;
}

.cash-label {
    font-size: 14px;
    color: #656d76;
    margin-bottom: 8px;
    font-weight: 500;
}

.cash-item.incoming .cash-label {
    color: #16a34a;
}

.cash-item.outgoing .cash-label {
    color: #ef4444;
}

.cash-value {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Customer List */
.customer-list {
    max-height: 300px;
    overflow-y: auto;
}

.customer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

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

.customer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.customer-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 2px 0;
}

.customer-details p {
    font-size: 12px;
    color: #656d76;
    margin: 0;
}

.customer-value {
    font-size: 14px;
    font-weight: 600;
    color: #16a34a;
}

/* Schedule Overview */
.schedule-overview {
    max-height: 300px;
    overflow-y: auto;
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
}

.schedule-time {
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6;
    min-width: 80px;
}

.schedule-details {
    flex: 1;
}

.schedule-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
}

.schedule-details p {
    font-size: 12px;
    color: #656d76;
    margin: 0;
}

.schedule-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.schedule-status.upcoming {
    background: #dbeafe;
    color: #1e40af;
}

.schedule-status.in-progress {
    background: #fef3c7;
    color: #92400e;
}

.schedule-status.completed {
    background: #dcfce7;
    color: #166534;
}

/* Equipment Status */
.equipment-status {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-item.good .status-badge {
    background: #dcfce7;
    color: #166534;
}

.status-item.warning .status-badge {
    background: #fef3c7;
    color: #92400e;
}

.status-item.danger .status-badge {
    background: #fee2e2;
    color: #991b1b;
}

/* Map Container */
.map-container {
    height: 300px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #656d76;
    font-size: 14px;
}

/* Leaderboard Styles */
.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.leaderboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #fef9e7 0%, #fff7d1 100%);
    border-color: #f6d55c;
    box-shadow: 0 4px 15px rgba(246, 213, 92, 0.2);
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-color: #a0aec0;
    box-shadow: 0 4px 15px rgba(160, 174, 192, 0.2);
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%);
    border-color: #f6ad55;
    box-shadow: 0 4px 15px rgba(246, 173, 85, 0.2);
}

.rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-right: 16px;
    flex-shrink: 0;
}

.rank-icon {
    font-size: 24px;
    font-weight: bold;
}

.rank-1 .rank-icon {
    font-size: 28px;
}

.rank-other .rank-icon {
    background: #3b82f6;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.leaderboard-item .customer-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.leaderboard-item .customer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    margin-right: 16px;
    flex-shrink: 0;
}

.customer-details {
    flex: 1;
    min-width: 0;
}

.customer-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-services {
    font-size: 13px;
    color: #718096;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-stats {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #a0aec0;
}

.stat-item {
    font-weight: 500;
}

.stat-divider {
    margin: 0 8px;
    opacity: 0.5;
}

.customer-revenue {
    text-align: right;
    flex-shrink: 0;
    margin-left: 16px;
}

.revenue-amount {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 2px;
}

.revenue-label {
    font-size: 11px;
    color: #a0aec0;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.no-customers {
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    padding: 32px;
}

/* iOS Glass Style Cards - Dark Mode Only - Bluish Theme */
.main-content[data-theme="dark"] {
    background: linear-gradient(195.44deg, #1E252E 10.74%, #071525 69.78%);
    min-height: 100vh;
    position: relative;
}

/* Bluish overlay effect */
.main-content[data-theme="dark"]::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #005BC8;
    mix-blend-mode: overlay;
    opacity: 0.9;
    filter: blur(300px);
    pointer-events: none;
    z-index: -1;
}

.main-content[data-theme="dark"] .kpi-card,
.main-content[data-theme="dark"] .metric-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content[data-theme="dark"] .kpi-card:hover,
.main-content[data-theme="dark"] .metric-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.15);
}

.main-content[data-theme="dark"] .cash-flow-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.main-content[data-theme="dark"] .tab-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.main-content[data-theme="dark"] .tab-indicator {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.main-content[data-theme="dark"] .tab-button {
    color: rgba(255, 255, 255, 0.7);
}

.main-content[data-theme="dark"] .tab-button:hover {
    color: rgba(255, 255, 255, 0.9);
}

.main-content[data-theme="dark"] .tab-button.active {
    color: #ffffff;
}

/* Dark mode text colors - Clean Theme */
.main-content[data-theme="dark"] .kpi-title,
.main-content[data-theme="dark"] .metric-subtitle,
.main-content[data-theme="dark"] .card-header h3,
.main-content[data-theme="dark"] .chart-header h2 {
    color: rgba(255, 255, 255, 0.8);
}

.main-content[data-theme="dark"] .card-header i {
    color: rgba(255, 255, 255, 0.6);
}

.main-content[data-theme="dark"] .kpi-card .card-header i,
.main-content[data-theme="dark"] .metric-card .card-header i {
    color: #60a5fa;
    opacity: 1;
}

.main-content[data-theme="dark"] .kpi-value,
.main-content[data-theme="dark"] .metric-value,
.main-content[data-theme="dark"] .cash-amount {
    color: #ffffff;
}

.main-content[data-theme="dark"] .kpi-change,
.main-content[data-theme="dark"] .metric-change {
    color: rgba(255, 255, 255, 0.9);
}

.main-content[data-theme="dark"] .kpi-change.up {
    color: #34d399;
}

.main-content[data-theme="dark"] .metric-change.up {
    color: #34d399;
}

.main-content[data-theme="dark"] .kpi-change.down {
    color: #f87171;
}

.main-content[data-theme="dark"] .metric-change.down {
    color: #f87171;
}

.main-content[data-theme="dark"] .cash-as-of,
.main-content[data-theme="dark"] .cash-label {
    color: rgba(255, 255, 255, 0.7);
}

.main-content[data-theme="dark"] .cash-value {
    color: #ffffff;
}

/* Dashboard header in dark mode */
.main-content[data-theme="dark"] .dashboard-header h1 {
    color: #ffffff;
}

.main-content[data-theme="dark"] #periodSelector {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.main-content[data-theme="dark"] #periodSelector:focus {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* Pipeline cards in dark mode */
.main-content[data-theme="dark"] .pipeline-header,
.main-content[data-theme="dark"] .analytics-card,
.main-content[data-theme="dark"] .pipeline-stage,
.main-content[data-theme="dark"] .automation-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.main-content[data-theme="dark"] .pipeline-title h2,
.main-content[data-theme="dark"] .analytics-value,
.main-content[data-theme="dark"] .stage-title,
.main-content[data-theme="dark"] .panel-header h3 {
    color: #ffffff;
}

.main-content[data-theme="dark"] .pipeline-title p,
.main-content[data-theme="dark"] .analytics-label,
.main-content[data-theme="dark"] .stage-value {
    color: rgba(255, 255, 255, 0.8);
}

/* Lead cards in dark mode */
.main-content[data-theme="dark"] .lead-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.main-content[data-theme="dark"] .lead-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.main-content[data-theme="dark"] .lead-name {
    color: #ffffff;
}

.main-content[data-theme="dark"] .lead-details {
    color: rgba(255, 255, 255, 0.7);
}

/* Stage content areas in dark mode */
.main-content[data-theme="dark"] .stage-content {
    background: rgba(0, 0, 0, 0.2);
}

.main-content[data-theme="dark"] .stage-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Additional elements with glass effect in dark mode */
.main-content[data-theme="dark"] .schedule-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .customer-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .customer-details h4,
.main-content[data-theme="dark"] .schedule-details h4 {
    color: #ffffff;
}

.main-content[data-theme="dark"] .customer-details p,
.main-content[data-theme="dark"] .schedule-details p {
    color: rgba(255, 255, 255, 0.7);
}

.main-content[data-theme="dark"] .customer-value,
.main-content[data-theme="dark"] .schedule-time {
    color: #34d399;
}

.main-content[data-theme="dark"] .equipment-status .status-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .leaderboard-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.main-content[data-theme="dark"] .customer-name {
    color: #ffffff;
}

.main-content[data-theme="dark"] .customer-services,
.main-content[data-theme="dark"] .customer-stats {
    color: rgba(255, 255, 255, 0.7);
}

.main-content[data-theme="dark"] .revenue-amount {
    color: #ffffff;
}

.main-content[data-theme="dark"] .revenue-label {
    color: rgba(255, 255, 255, 0.6);
}

/* Cleaning item details in dark mode */
.main-content[data-theme="dark"] .cleaning-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .cleaning-customer {
    color: #ffffff;
}

.main-content[data-theme="dark"] .cleaning-date {
    color: rgba(255, 255, 255, 0.7);
}

.main-content[data-theme="dark"] .cleaning-amount {
    color: #34d399;
}

/* Mobile nav menu toggle in dark mode */
.main-content[data-theme="dark"] .nav-menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.main-content[data-theme="dark"] .hamburger span {
    background: #ffffff;
}

/* Navigation selector dropdown in dark mode */
.main-content[data-theme="dark"] .nav-selector {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.main-content[data-theme="dark"] .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.main-content[data-theme="dark"] .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.main-content[data-theme="dark"] .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Revenue details in dark mode */
.main-content[data-theme="dark"] .revenue-details {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.main-content[data-theme="dark"] .revenue-details .details-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .revenue-details .details-header h4 {
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .metric-card.large {
        grid-column: span 1;
    }
    
    .metric-card.extra-large {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px;
        margin-left: 0;
    }
    
    /* Show mobile menu toggle */
    .nav-menu-toggle {
        display: flex;
    }
    
    /* Hide sidebar on mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .tab-container {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .tab-container::-webkit-scrollbar {
        display: none;
    }
    
    .tab-button {
        flex-shrink: 0;
        padding: 10px 16px;
    }
    
    .tab-button span {
        display: none;
    }
    
    .kpi-cards,
    .section-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .metric-card.large,
    .metric-card.extra-large {
        grid-column: span 1;
    }
    
    .cash-breakdown {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dashboard-header {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
    
    .period-selector-section {
        padding: 0 16px;
        margin-bottom: 16px;
    }
    
    .period-selector-container {
        max-width: 100%;
        padding: 10px 14px;
    }
    
    .period-label span {
        display: none;
    }
    
    .period-label {
        font-size: 12px;
    }
    
    #periodSelector {
        min-width: 120px;
        font-size: 13px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .kpi-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .kpi-content {
        text-align: center;
    }
}

/* Projected Revenue Expandable Card */
.projected-revenue-card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible; /* Allow expansion outside the card */
    z-index: 1;
}

.projected-revenue-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 100; /* Bring to front when expanded */
}

.projected-revenue-details {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 101;
}

.projected-revenue-card:hover .projected-revenue-details {
    max-height: 500px;
}

/* Revenue Expandable Card */
.revenue-card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible; /* Allow expansion outside the card */
    z-index: 1;
}

.revenue-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 100; /* Bring to front when expanded */
}

.revenue-details {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 101;
}

.revenue-card:hover .revenue-details {
    max-height: 500px;
}

.details-header {
    padding: 16px 20px 8px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.details-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.resize-handle {
    cursor: nw-resize;
    padding: 4px;
    color: #9ca3af;
    font-size: 12px;
    transition: color 0.2s ease;
    user-select: none;
}

.resize-handle:hover {
    color: #3b82f6;
}

.projected-revenue-details.resizing {
    user-select: none;
    transition: none !important;
}

/* Interactive KPI Cards */
.interactive-kpi {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.interactive-kpi.chart-active {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

/* KPI icons removed - now using card-header icons */

/* Chart-active styling now uses outline only, text colors remain normal */

/* Dark mode chart-active styling */
.main-content[data-theme="dark"] .interactive-kpi.chart-active {
    border-color: #60a5fa;
    box-shadow: 0 8px 25px rgba(96, 165, 250, 0.2);
}

/* Hide cash breakdown when using interactive charts */
.cash-breakdown {
    display: none;
}

.details-content {
    padding: 0 20px 16px 20px;
    max-height: 350px;
    overflow-y: auto;
}

.tooltip-header {
    padding: 16px 20px 12px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.tooltip-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.tooltip-content {
    padding: 12px 20px 16px 20px;
    max-height: 300px;
    overflow-y: auto;
}

.cleaning-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

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

.cleaning-info {
    flex: 1;
}

.cleaning-customer {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.cleaning-date {
    font-size: 12px;
    color: #656d76;
    margin-bottom: 2px;
}

.cleaning-type {
    font-size: 11px;
    color: #3b82f6;
    background: #dbeafe;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.cleaning-amount {
    font-size: 14px;
    font-weight: 600;
    color: #16a34a;
    margin-left: 12px;
}

.loading {
    text-align: center;
    color: #656d76;
    font-size: 14px;
    padding: 20px;
}

.no-cleanings {
    text-align: center;
    color: #656d76;
    font-size: 14px;
    padding: 20px;
}

.tooltip-total {
    padding: 12px 0 0 0;
    margin-top: 12px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tooltip-total-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.tooltip-total-amount {
    font-size: 16px;
    font-weight: 700;
    color: #16a34a;
}

/* ===== SALES PIPELINE STYLES ===== */

.pipeline-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Pipeline Header */
.pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pipeline-title h2 {
    margin: 0 0 8px 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pipeline-title p {
    margin: 0;
    color: #656d76;
    font-size: 0.9rem;
}

.pipeline-actions {
    display: flex;
    gap: 12px;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #656d76;
    border: 1px solid #d0d7de;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

/* Pipeline Analytics */
.pipeline-analytics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.analytics-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease;
}

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

.analytics-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
}

.analytics-content {
    flex: 1;
}

.analytics-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.analytics-label {
    font-size: 0.9rem;
    color: #656d76;
    font-weight: 500;
}

/* Pipeline Stages */
.pipeline-stages {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 32px;
    min-height: 600px;
    align-items: stretch;
}

/* Responsive design for smaller screens */
@media (max-width: 1400px) {
    .pipeline-stages {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .pipeline-stages {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.pipeline-stage {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pipeline-stage:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.pipeline-stage.drag-over {
    border-color: #007aff;
    background: #f0f8ff;
}

.stage-header {
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.stage-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
}

.stage-title i {
    font-size: 16px;
    color: #007aff;
}

.stage-count {
    background: #007aff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
}

.stage-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #16a34a;
}

.stage-content {
    padding: 16px;
    min-height: 500px;
    background: #fafbfc;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    position: relative;
}

/* Ensure the content area expands to fill available space */
.stage-content:empty {
    min-height: 500px;
}

.stage-content:not(:empty) {
    min-height: auto;
}

/* Lead Cards */
.lead-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    cursor: grab;
    transition: all 0.2s ease;
    border-left: 4px solid #007aff;
    flex-shrink: 0;
    position: relative;
}

.lead-card:last-child {
    margin-bottom: 0;
}

/* Empty state styling */
.empty-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    text-align: center;
    padding: 40px 20px;
}

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

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

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

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

.lead-card:active {
    cursor: grabbing;
}

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

.lead-card-dragging {
    opacity: 0.3;
    transform: scale(0.95);
}

.lead-card-chosen {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
}

.lead-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.lead-name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

.lead-value {
    font-weight: 700;
    color: #16a34a;
    font-size: 14px;
}

.lead-details {
    font-size: 12px;
    color: #656d76;
    margin-bottom: 8px;
}

.lead-phone {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.lead-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lead-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.lead-action-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lead-action-btn.primary {
    background: #007aff;
    color: white;
}

.lead-action-btn.secondary {
    background: #f8f9fa;
    color: #656d76;
    border: 1px solid #d0d7de;
}

.lead-action-btn:hover {
    transform: translateY(-1px);
}

/* Follow-up indicators */
.follow-up-indicator {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: #ff6b6b;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Automation Panel */
.automation-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.automation-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #656d76;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #007aff;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.automation-rules {
    padding: 24px;
}

.automation-rule {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.automation-rule:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.automation-rule:last-child {
    margin-bottom: 0;
}

.rule-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
    color: white;
    font-size: 16px;
}

.rule-content {
    flex: 1;
}

.rule-title {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.rule-description {
    font-size: 12px;
    color: #656d76;
    margin-bottom: 4px;
}

.rule-status {
    font-size: 11px;
    font-weight: 600;
    color: #16a34a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .pipeline-stages {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .pipeline-stages {
        grid-template-columns: 1fr;
    }
    
    .pipeline-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .pipeline-actions {
        justify-content: center;
    }
    
    .pipeline-analytics {
        grid-template-columns: 1fr;
    }
}

/* Drag and Drop Visual Feedback */
.pipeline-stage.drag-over {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border-color: #007aff;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.lead-card.drag-over {
    border-color: #007aff;
    background: #f0f8ff;
}

/* Empty State */
.empty-stage {
    text-align: center;
    padding: 40px 20px;
    color: #656d76;
}

.empty-stage i {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-stage h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #656d76;
}

.empty-stage p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Modal Styles for Sales Pipeline */
.modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #656d76;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: #e9ecef;
    color: #1a1a1a;
}

.modal-body {
    padding: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid #f3f4f6;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #1a1a1a;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

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

/* Lead Details Styles */
.lead-details-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row label {
    font-weight: 600;
    color: #656d76;
    font-size: 14px;
}

.detail-row span {
    color: #1a1a1a;
    font-size: 14px;
}

.stage-badge {
    background: #007aff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

/* Cleanup Modal Styles */
.cleanup-summary {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cleanup-summary h3 {
    margin: 0 0 12px 0;
    color: #1a1a1a;
    font-size: 16px;
}

.cleanup-summary p {
    margin: 8px 0;
    color: #656d76;
    font-size: 14px;
}

.cleanup-section {
    margin-bottom: 20px;
}

.cleanup-section h4 {
    margin: 0 0 12px 0;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
}

.lead-list {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
}

.lead-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
}

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

.lead-item span:first-child {
    font-size: 14px;
    color: #1a1a1a;
}

.lead-stage {
    background: #dbeafe;
    color: #3b82f6;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}