/* TCG Admin Panel Styles */
:root {
    --primary-color: #044EA3;
    --primary-dark: #033a7a;
    --secondary-color: #4DA6FC;
    --accent-color: #9DD1F4;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background-light: #f9fafb;
    --background-white: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --border-color: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.02);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08);
    --sidebar-width: 220px;
    --sidebar-collapsed-width: 220px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    gap: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.agency-info {
    width: 100%;
    text-align: center;
}

.agency-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
}

.logo-expanded {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.5rem;
}

.logo-icon {
    height: 48px;
    width: auto;
    max-width: 90%;
    object-fit: contain;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo-collapsed {
    height: 36px;
    width: 36px;
    object-fit: contain;
    display: none;
}

.sidebar.collapsed .logo-expanded {
    display: none;
}

.sidebar.collapsed .logo-collapsed {
    display: block;
}

.sidebar.collapsed .logo-container {
    justify-content: center;
    padding: 0;
}



/* Footer Actions */
.footer-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.logout-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}
.logout-btn .logout-text {
    font-size: 0.875rem;
    font-weight: 300;
    color: #6b7280;
}
.logout-btn:hover .logout-text { color: var(--text-primary); }

.logout-btn i {
    /* Dejar que Font Awesome controle el peso */
}

.logout-btn:hover {
    background-color: #f3f4f6;
    color: var(--text-primary);
}

.toggle-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.toggle-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.toggle-btn:hover {
    background-color: #f3f4f6;
    color: var(--text-primary);
}

.sidebar.collapsed .toggle-btn i {
    transform: rotate(180deg);
}

.sidebar.collapsed .logout-btn {
    display: none;
}

.sidebar.collapsed .footer-actions {
    justify-content: center;
}


/* Navigation Styles */
.sidebar-nav {
    flex-grow: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Sidebar Footer - User Profile */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(248, 250, 252, 0.5);
    margin-top: auto;
}

/* User Section - Minimal Design */
.user-section {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.25rem 0;
}

.user-avatar-minimal {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.user-details-minimal {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.user-name-minimal {
    font-size: 0.8rem;
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.logout-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.logout-icon:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.logout-icon .material-symbols-outlined {
    font-size: 18px;
}

/* Collapsed sidebar state */
.sidebar.collapsed .user-section {
    justify-content: center;
    padding: 0;
}

.sidebar.collapsed .user-details-minimal,
.sidebar.collapsed .logout-icon {
    display: none;
}

.sidebar.collapsed .user-avatar-minimal {
    width: 32px;
    height: 32px;
}

.nav-section {
    padding: 0 0.75rem;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    position: relative;
    margin-bottom: 0.125rem;
}

/* Nav loading state */
.nav-item-loading {
    display: flex;
    justify-content: center;
    padding: 1rem 0.75rem;
}

.nav-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #9ca3af;
    border-radius: 50%;
    animation: nav-spin 0.8s linear infinite;
}

@keyframes nav-spin {
    to {
        transform: rotate(360deg);
    }
}

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

.nav-item.active {
    background-color: rgba(4, 78, 163, 0.1);
    color: #044EA3;
}

.nav-item.active .material-symbols-outlined {
    color: #044EA3;
}

.nav-item .material-symbols-outlined {
    width: 18px;
    margin-right: 0.65rem;
    text-align: center;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

/* Nav item with submenu */
.nav-item-parent {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
}

.nav-item-content {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
}

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

.nav-item-parent.expanded .nav-item-content {
    background-color: transparent;
    color: var(--text-primary);
}

.nav-expand-icon {
    margin-left: auto;
    font-size: 16px !important;
    width: 16px !important;
    transition: transform 0.2s ease;
}

.nav-item-parent.expanded .nav-expand-icon {
    transform: rotate(180deg);
}

/* Submenu */
.nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: transparent;
}

.nav-item-parent.expanded .nav-submenu {
    max-height: 500px;
}

.nav-subitem {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.75rem 0.4rem 2.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    font-size: 0.85rem;
    background-color: transparent;
}

.nav-subitem:hover {
    color: var(--text-primary);
    background-color: transparent;
}

.nav-subitem.active {
    color: #044EA3;
    background-color: transparent;
    font-weight: 500;
}

.nav-text {
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease;
    font-size: 0.875rem;
}

/* Hide horizontal sub-tabs in content */
.sub-tabs {
    display: none;
}

/* Sub-tab content visibility */
.sub-tab-content {
    display: none;
}

.sub-tab-content.active {
    display: block;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    height: 0;
    margin: 0;
}

.sidebar.collapsed .nav-section {
    padding: 0 0.75rem;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .nav-item i,
.sidebar.collapsed .nav-item .material-symbols-outlined {
    margin-right: 0;
    width: auto;
}

/* Nav Badge */
.nav-badge {
    margin-left: auto;
    background: #044EA3;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

.sidebar.collapsed .nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 0.125rem 0.375rem;
    font-size: 0.625rem;
    min-width: 16px;
}

/* Sidebar collapsed state for user profile */
.sidebar.collapsed .sidebar-footer {
    padding: 0.5rem;
}





/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

.content-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 2.5rem 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-radius: 0 0 16px 16px;
    margin-bottom: 1rem;
}

.header-left {
    flex: 1;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.page-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    text-align: right;
}

.last-updated {
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 400;
}

/* ====================================
   BILLING WIDGET STYLES (COMPACT + SOLID BARS)
   ==================================== */
.sidebar-billing-widget {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin: 0 1rem 1rem 1rem;
    font-family: 'Inter', sans-serif;
}

/* Header */
.billing-widget-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.billing-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
}

/* Estilo "Included" - Verde transparente */
.billing-status-badge.included {
    background-color: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0 !important;
}

/* Estilo "Pay As You Go" - Azul transparente */
.billing-status-badge.overage {
    background-color: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe !important;
}

.badge-icon {
    font-size: 11px !important;
    color: inherit;
}

/* AI Employees Count */
.billing-employees-count {
    margin-bottom: 10px;
}

.employees-number {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 2px;
}

.employees-label {
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
}

/* Resource Item (Minutes/SMS) */
.billing-resource-item {
    margin-bottom: 12px;
}

.billing-resource-item:last-child {
    margin-bottom: 0;
}

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

.resource-name {
    font-size: 11px;
    font-weight: 600;
    color: #0f172a;
}

.resource-percentage {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.resource-percentage.over-limit {
    color: #4DA6FC;
}

/* Progress Bar - Diseño de dos capas (Included + Overage) */
.resource-progress-bar {
    height: 5px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden; /* Evitar que se salga */
    margin-bottom: 4px;
    position: relative;
    display: flex; /* Usar flexbox para las dos barras */
}

.progress-fill {
    height: 100%;
    background: var(--primary-color); /* Azul principal de la paleta */
    transition: width 0.3s ease;
    flex-shrink: 0;
}

/* Barra de overage (azul claro) continúa después de la azul principal */
.progress-overage {
    height: 100%;
    background: #4DA6FC; /* Azul claro de la paleta principal */
    transition: width 0.3s ease;
    width: 0; /* Por defecto oculto */
    flex-shrink: 0;
}

.resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resource-usage {
    font-size: 10px;
    color: #64748b;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.resource-overage {
    text-align: right;
}

.overage-amount {
    font-size: 12px;
    font-weight: 700;
    color: #4DA6FC;
    font-variant-numeric: tabular-nums;
}

.overage-label {
    font-size: 8px;
    font-weight: 600;
    color: #4DA6FC;
    letter-spacing: 0.5px;
}

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.live {
    background: #22c55e;
    color: white;
}

.status-badge.active {
    background: #4c63d2;
    color: white;
}

.content-body {
    padding: 2rem;
}

/* Building Pages */
.building-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.building-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.building-icon {
    margin-bottom: 1.5rem;
}

.building-icon i {
    font-size: 4rem;
    color: #044EA3;
    opacity: 0.8;
}

.building-content h2 {
    font-size: 2.25rem;
    font-weight: 300;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.building-content h3 {
    font-size: 1.25rem;
    font-weight: 300;
    color: #044EA3;
    margin-bottom: 1rem;
}

.building-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.building-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--background-white);
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.feature-item:hover {
    border-color: #044EA3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 78, 163, 0.1);
}

.feature-item i {
    color: #044EA3;
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

.feature-item span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.building-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(4, 78, 163, 0.05);
    border: 1px solid rgba(4, 78, 163, 0.2);
    border-radius: 8px;
    margin-top: 1rem;
}

.building-note i {
    color: #044EA3;
    font-size: 0.875rem;
}

.building-note span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Tab Content */
.tab-content {
    display: none;
}

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

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

.stat-card {
    background: var(--background-white);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.stat-info h3 {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.stat-number {
    font-size: 2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-change.positive {
    color: var(--accent-color);
}

.stat-change.negative {
    color: var(--danger-color);
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: var(--background-white);
    padding: 1.75rem;
    border-radius: 12px;
    border: 1px solid #f5f5f5;
    transition: all 0.2s ease;
}

.chart-card:hover {
    border-color: #e5e7eb;
}

.chart-card h3 {
    font-size: 1.125rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.chart-placeholder {
    height: 200px;
    background: var(--background-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

/* KPI Grid Compact */
.kpi-grid-compact {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.kpi-card-compact {
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.kpi-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(4, 78, 163, 0.08);
    border-color: #e2e8f0;
}

.kpi-card-compact.blue-border,
.kpi-card-compact.orange-border,
.kpi-card-compact.green-border,
.kpi-card-compact.gray-border { border-left: none; }

.kpi-header-compact { display:flex; align-items:center; justify-content: space-between; margin-bottom: 0.25rem; }
.kpi-title-compact { font-size: 0.8rem; color: #718096; font-weight: 400; }
.kpi-icon-compact { width: 28px; height: 28px; border-radius: 8px; display:flex; align-items:center; justify-content:center; color: #044EA3; background: rgba(4,78,163,0.08); }
.kpi-value-compact { font-size: 2rem; font-weight: 300; color: #0f172a; letter-spacing: -0.02em; }
.kpi-subtitle-compact { font-size: 0.75rem; color: #64748b; margin-top: 0.25rem; line-height: 1.2; }
.kpi-building-indicator { font-size: 0.75rem; color: #94a3b8; }
.kpi-card-compact.disabled { background: #fbfbfc; border-style: dashed; }

@media (max-width: 1200px) { .kpi-grid-compact { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .kpi-grid-compact { grid-template-columns: 1fr; } }

/* Conversion funnel card polish */
.chart-card-large { border: 1px solid #eef2f7; }
.chart-header { margin-bottom: 0.75rem; }
.chart-icon.blue { background: rgba(4, 78, 163, 0.08); color: #044EA3; }
.chart-info h3 { font-weight: 300; }
.chart-info p { color: #94a3b8; }

/* Activity cards polish */
.activity-card-small { border: 1px solid #eef2f7; }
.activity-icon.blue { background: rgba(4, 78, 163, 0.08); color: #044EA3; }
.activity-icon.green { background: rgba(34, 197, 94, 0.08); color: #16a34a; }
.activity-icon.purple { background: rgba(139, 92, 246, 0.08); color: #7c3aed; }
.activity-icon.orange { background: rgba(249, 115, 22, 0.08); color: #f97316; }
.activity-info h4 { color: #475569; font-weight: 400; }

/* Funnel bars subtle shadows */
.funnel-bar { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); }
.funnel-bar span, .funnel-bar strong { text-shadow: 1px 1px 2px rgba(0,0,0,0.35); }

/* Chart Section Single */
.chart-section-single {
    margin-bottom: 2rem;
}

.chart-card-large {
    background: var(--background-white);
    padding: 1.75rem;
    border-radius: 12px;
    border: 1px solid #f5f5f5;
    transition: all 0.2s ease;
}

.chart-card-large:hover {
    border-color: #e5e7eb;
}

.chart-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chart-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.chart-icon.blue {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.chart-icon.green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.chart-info h3 {
    font-size: 1.125rem;
    font-weight: 300;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.01em;
}

.chart-info p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

.chart-content {
    height: 200px;
    position: relative;
}

/* Funnel Chart */
.funnel-chart {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0;
}

.funnel-bar {
    height: 35px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    min-width: 150px;
    position: relative;
}

.funnel-bar span {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.funnel-bar strong {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* Area Chart */
.area-chart {
    height: 100%;
    position: relative;
}

.area-chart-visual {
    height: 100%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.3) 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.area-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(34, 197, 94, 0.4), rgba(34, 197, 94, 0.1));
    border-radius: 0 0 8px 8px;
}

.chart-labels {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Activity Row */
.activity-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.activity-card-small {
    background: var(--background-white);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.activity-card-small:hover {
    border-color: #e5e7eb;
    transform: translateY(-2px);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-icon.blue {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.activity-icon.green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.activity-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.activity-icon.orange {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.activity-info {
    flex: 1;
}

.activity-info h4 {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.25rem 0;
    font-weight: 400;
}

.activity-number {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.activity-rate {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 400;
}

/* Financial Impact */
.financial-impact {
    background: var(--background-white);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.financial-impact:hover {
    border-color: #e5e7eb;
    transform: translateY(-2px);
}

.financial-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    font-size: 1rem;
    flex-shrink: 0;
}

.financial-info h4 {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    font-weight: 500;
}

.financial-info p {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

/* Pipeline Styles */
.pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.pipeline-header h3 {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.pipeline-stats {
    display: flex;
    gap: 2rem;
}

.pipeline-stat {
    text-align: center;
}

.pipeline-stat .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    color: #6366f1;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.pipeline-stat .stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
}

/* Pipeline Filters */
.pipeline-filters {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--background-white);
    border-radius: 12px;
    border: 1px solid #f0f0f0;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 99, 210, 0.1);
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding: 0.75rem;
    min-height: 500px;
}

.kanban-column {
    flex: 1;
    min-width: 240px;
    background: var(--background-white);
    border: 1px solid #eef2f7;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    border-radius: 12px;
    padding: 1rem;
}

.kanban-column.not-interested {
    background: #fff8f8;
    border: 1px solid #ffe1e1;
    box-shadow: 0 1px 2px rgba(239,68,68,0.05);
}

.kanban-column.not-interested .column-header h4 {
    color: #ef4444;
}

.kanban-column.not-interested .column-subtitle {
    color: #b91c1c;
}

.kanban-column.not-interested .column-header::after {
    content: 'AI Only';
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}

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

.column-header h4 {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.budget-sum {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.column-subtitle {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.lead-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lead-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.lead-card:hover {
    border-color: #e2e8f0;
    box-shadow: 0 6px 18px rgba(4,78,163,0.08);
}

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

.lead-cards.drag-over {
    background-color: rgba(4, 78, 163, 0.06);
    border: 2px dashed #044EA3;
    border-radius: 8px;
    padding: 0.5rem;
    margin: -0.5rem;
}

.lead-cards.drag-over-forbidden {
    background-color: rgba(239, 68, 68, 0.06);
    border: 2px dashed #ef4444;
    border-radius: 8px;
    padding: 0.5rem;
    margin: -0.5rem;
}

.lead-card.ai-controlled {
    position: relative;
}

.lead-card.ai-controlled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(139, 92, 246, 0.02));
    border-radius: 8px;
    pointer-events: none;
}

.lead-card.ai-controlled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.lead-card:not(.ai-controlled):hover {
    cursor: grab;
}

.lead-card:not(.ai-controlled):active {
    cursor: grabbing;
}

.lead-card.assessment-locked {
    position: relative;
    border: 1px solid #4DA6FC;
}

.lead-card.assessment-locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 99, 210, 0.05), rgba(76, 99, 210, 0.02));
    border-radius: 8px;
    pointer-events: none;
}

.lead-card.deal-closed {
    border: 1px solid #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(34, 197, 94, 0.02));
}

.lead-card.rejected-card {
    opacity: 0.6;
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.03));
    position: relative;
}

.lead-card.rejected-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    border-radius: 8px;
    pointer-events: none;
}

.lead-card.rejected-card:hover {
    opacity: 0.7;
    transform: none;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
    border-color: #d97706;
}

/* Card actions layout */
.card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hide-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    opacity: 0;
}

.lead-card:hover .hide-btn {
    opacity: 1;
}

.hide-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.assessment-actions,
.rejected-decision-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap; /* Keep buttons in one row */
}

.assessment-btn,
.decision-btn {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    min-width: 0; /* Allow buttons to shrink */
}

/* Assessment buttons - minimalist design */
.deal-btn {
    background: #22c55e;
    color: white;
    border: 1px solid #16a34a;
}

.deal-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.rejected-btn {
    background: #ef4444;
    color: white;
    border: 1px solid #dc2626;
}

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

/* Assessment Buttons in Pipeline Cards */
.assessment-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid #f1f5f9;
}

.btn-assessment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 55px;
}

.btn-assessment i {
    font-size: 0.55rem;
}

.btn-deal {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.btn-deal:hover {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.5);
}

.btn-reject {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-reject:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Lead card color states */
.lead-card.card-deal {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.03));
    border-color: rgba(34, 197, 94, 0.25);
}

.lead-card.card-rejected {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.03));
    border-color: rgba(245, 158, 11, 0.25);
}

.lead-card.card-ai {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(139, 92, 246, 0.02));
    border-color: rgba(139, 92, 246, 0.15);
}

/* All lead cards are clickable (to open profile) */
.lead-card {
    cursor: pointer;
}

/* Decision buttons for rejected leads - REMOVED (no longer needed) */

.management-indicator.deal-closed {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
}

.management-indicator.rejected {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.card-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.lead-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #044EA3, #4DA6FC);
    box-shadow: 0 2px 6px rgba(4,78,163,0.28);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.lead-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.lead-name {
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--text-primary);
    margin: 0 0 0.2rem 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 10px);
}

.lead-meta {
    display: flex;
    align-items: baseline;
    gap: 0.1rem;
}

.budget-amount {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent-color);
}

.budget-period {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.lead-days {
    font-size: 0.6rem;
    color: var(--text-light);
    font-weight: 400;
    font-style: italic;
    opacity: 0.75;
    margin-top: 0.15rem;
    white-space: nowrap;
}

.management-indicator {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    flex-shrink: 0;
    position: absolute;
    top: 0;
    right: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

/* Hover states are now controlled by .clickable and .locked classes */

.management-indicator.ai {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    color: white;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.management-indicator.human {
    background: linear-gradient(135deg, #044EA3, #4DA6FC);
    color: white;
    box-shadow: 0 2px 4px rgba(76, 99, 210, 0.3);
}

.management-indicator.not-interested {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* Management indicator toggle states */
.management-indicator.clickable {
    cursor: pointer;
}

.management-indicator.clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.management-indicator.locked {
    cursor: not-allowed;
    opacity: 0.85;
}

.management-indicator.locked:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.card-bottom {
    margin-top: auto;
}

.lead-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.tag i {
    font-size: 0.55rem;
}

.tag.temperature.hot {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.2);
}

.tag.temperature.warm {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.2);
}

.tag.temperature.cold {
    background: linear-gradient(135deg, rgba(4, 78, 163, 0.1), rgba(4, 78, 163, 0.05));
    color: #044EA3;
    border-color: rgba(4, 78, 163, 0.25);
}

.tag.source {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
    color: #7c3aed;
    border-color: rgba(139, 92, 246, 0.2);
}

.tag.location {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    color: #059669;
    border-color: rgba(16, 185, 129, 0.2);
}

/* Not Interested Label Tags */
.tag.not-interested-label {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.2);
}

/* Inactive tag (based on is_active field) */
.tag.not-interested-label.inactive {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), rgba(107, 114, 128, 0.05));
    color: #6b7280;
    border-color: rgba(107, 114, 128, 0.2);
}

.tag.not-interested-label.editable {
    cursor: pointer;
    position: relative;
}

.tag.not-interested-label.editable:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
    border-color: rgba(239, 68, 68, 0.3);
}

.tag-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0.6rem;
    border: none;
    background: transparent;
}

.lead-timestamp {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

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

.badge {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Urgency Badges */
.badge.urgency.high {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge.urgency.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge.urgency.low {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

/* Temperature Badges */
.badge.temperature.hot {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge.temperature.warm {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge.temperature.cold {
    background: rgba(4, 78, 163, 0.1);
    color: #044EA3;
}

/* Source Badges */
.badge.source {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

/* Calendar Styles */
.calendar-container {
    padding: 2rem;
    background: var(--background-white);
    border-radius: 16px;
    border: 1px solid #f5f5f5;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: #3b4fd8;
    transform: translateY(-1px);
}

.calendar-nav h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 300;
    min-width: 300px;
    text-align: center;
    letter-spacing: -0.02em;
}

.calendar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.today-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.today-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.assessment-count {
    color: #6b7280;
    font-size: 0.9375rem;
    font-weight: 400;
}

.calendar-week-view {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    max-height: 500px;
}

.time-column {
    width: 80px;
    background: var(--background-light);
    border-right: 1px solid var(--border-color);
}

.time-header {
    height: 55px;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-white);
}

.time-slots {
    display: flex;
    flex-direction: column;
}

.time-slot {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

.days-container {
    flex: 1;
    display: flex;
}

.day-column {
    flex: 1;
    border-right: 1px solid var(--border-color);
}

.day-column:last-child {
    border-right: none;
}

.day-header {
    height: 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--background-white);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding: 0.5rem 0;
}

.day-name {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.day-number {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.day-header.today {
    background: linear-gradient(135deg, var(--primary-color), #3b4fd8);
    color: white;
}

.day-header.today .day-name,
.day-header.today .day-number {
    color: white;
}

.day-slots {
    display: flex;
    flex-direction: column;
}

.hour-slot {
    height: 40px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    background: var(--background-white);
}

.hour-slot:hover {
    background: rgba(76, 99, 210, 0.02);
}

.assessment-event {
    position: absolute;
    left: 2px;
    right: 2px;
    background: linear-gradient(135deg, var(--primary-color), #3b4fd8);
    color: white;
    border-radius: 3px;
    padding: 0.125rem 0.375rem;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(76, 99, 210, 0.3);
    top: 2px;
    bottom: 2px;
    overflow: hidden;
}

.assessment-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 99, 210, 0.4);
}

.assessment-event.confirmed {
    background: linear-gradient(135deg, var(--accent-color), #16a34a);
}

.assessment-event.pending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.event-title {
    font-weight: 700;
    margin-bottom: 0.0625rem;
    line-height: 1.1;
}

.event-time {
    font-size: 0.6rem;
    opacity: 0.9;
    line-height: 1;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.scheduled {
    background: linear-gradient(135deg, var(--primary-color), #3b4fd8);
}

.legend-color.confirmed {
    background: linear-gradient(135deg, var(--accent-color), #16a34a);
}

.legend-color.pending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Assessment Form Styles - Enhanced Design */
.assessment-section {
    border: 1px solid rgba(4, 78, 163, 0.2);
    background: rgba(4, 78, 163, 0.02);
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.assessment-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #044EA3, #4DA6FC);
    z-index: 1;
}

.assessment-section h3 {
    color: #044EA3;
    font-weight: 300;
    font-size: 1.25rem;
    position: relative;
    padding-left: 0.5rem;
    letter-spacing: -0.01em;
}

.assessment-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: #044EA3;
    border-radius: 2px;
}

.assessment-form {
    margin-bottom: 1.5rem;
    background: var(--background-white);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #f5f5f5;
}

.form-row {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group.full-width {
    flex: 100%;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #044EA3;
    display: inline-block;
}

.form-input {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.2s ease;
    background: var(--background-white);
    position: relative;
}

.form-input:focus {
    outline: none;
    border-color: #044EA3;
    box-shadow: 0 0 0 3px rgba(4, 78, 163, 0.1);
}

.form-input:valid {
    border-color: var(--accent-color);
}

.form-input:required:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.02);
}

.assessment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f5f5f5;
}

.assessment-actions .btn-primary {
    background: #044EA3;
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

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

.assessment-actions .btn-primary:hover::before {
    left: 100%;
}

.assessment-actions .btn-primary:hover {
    transform: translateY(-1px);
    background: #033a7a;
    box-shadow: 0 4px 12px rgba(4, 78, 163, 0.2);
}

.assessment-actions .btn-primary:active {
    transform: translateY(0);
}

.assessment-actions .btn-secondary {
    background: transparent;
    border: 1px solid #044EA3;
    color: #044EA3;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.assessment-actions .btn-secondary:hover {
    background: rgba(4, 78, 163, 0.08);
    transform: translateY(-1px);
}

.assessment-status {
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.05), rgba(156, 39, 176, 0.02));
    border-radius: 8px;
    border: 1px solid rgba(156, 39, 176, 0.2);
    border-left: 4px solid #9C27B0;
    margin-top: 1rem;
}

.assessment-status.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(34, 197, 94, 0.02));
    border-color: rgba(34, 197, 94, 0.2);
    border-left-color: var(--accent-color);
    color: var(--accent-color);
}

.assessment-status.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.02));
    border-color: rgba(239, 68, 68, 0.2);
    border-left-color: #ef4444;
    color: #dc2626;
}

.assessment-status i {
    margin-right: 0.5rem;
}

.assessment-status .status-timestamp {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Form validation icons */
.form-group.valid .form-input::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    font-size: 0.8rem;
}

/* Assessment saved animation and styles */
.assessment-form.assessment-saved {
    position: relative;
    animation: assessmentSavedPulse 2s ease-in-out;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.03));
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.2);
}

.assessment-form.assessment-saved::after {
    content: 'SAVED';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--accent-color), #16a34a);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    animation: savedBadgeSlide 2s ease-in-out;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

@keyframes assessmentSavedPulse {
    0% {
        background: linear-gradient(135deg, rgba(156, 39, 176, 0.05), rgba(156, 39, 176, 0.02));
        border-color: rgba(156, 39, 176, 0.1);
        box-shadow: 0 4px 12px rgba(156, 39, 176, 0.05);
    }
    25% {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.05));
        border-color: rgba(34, 197, 94, 0.4);
        box-shadow: 0 4px 25px rgba(34, 197, 94, 0.3);
        transform: scale(1.02);
    }
    75% {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.03));
        border-color: rgba(34, 197, 94, 0.3);
        box-shadow: 0 4px 20px rgba(34, 197, 94, 0.2);
        transform: scale(1.01);
    }
    100% {
        background: var(--background-white);
        border-color: rgba(156, 39, 176, 0.1);
        box-shadow: 0 4px 12px rgba(156, 39, 176, 0.05);
        transform: scale(1);
    }
}

@keyframes savedBadgeSlide {
    0% {
        opacity: 0;
        transform: translateX(20px) scale(0.8);
    }
    15% {
        opacity: 1;
        transform: translateX(0) scale(1.1);
    }
    25% {
        transform: scale(1);
    }
    75% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(20px) scale(0.8);
    }
}

/* Disabled form inputs styling */
.form-input:disabled {
    background-color: rgba(156, 39, 176, 0.02);
    border-color: rgba(156, 39, 176, 0.15);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.form-input:disabled:focus {
    box-shadow: none;
    border-color: rgba(156, 39, 176, 0.15);
    transform: none;
}

/* Remove the empty status container completely when no content */
.assessment-status:empty {
    display: none;
}

/* Mobile responsiveness for assessment form */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .assessment-actions {
        flex-direction: column;
    }
    
    .assessment-actions .btn-primary,
    .assessment-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .assessment-form.assessment-saved::after {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Contacts Section - Modern List Design */
.contacts-container {
    background: var(--background-white);
    padding: 0;
    border-radius: 16px;
    border: 1px solid #f5f5f5;
    height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.contacts-header {
    background: var(--background-white);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
}

.contacts-title h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: -0.01em;
}

.contacts-count {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 400;
    margin-left: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: #f9fafb;
    border-radius: 20px;
}

.contacts-search {
    display: flex;
    align-items: center;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    z-index: 1;
}

.search-box input {
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 400;
    width: 280px;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.search-box input:focus {
    outline: none;
    border-color: #044EA3;
    background: var(--background-white);
    box-shadow: 0 0 0 3px rgba(4, 78, 163, 0.1);
    width: 320px;
}

.contacts-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-card {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 72px;
}

.contact-card:hover {
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transform: translateX(4px);
}

.contact-header {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    gap: 0.875rem;
    flex-shrink: 0;
}

.contact-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), #5a73e5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(76, 99, 210, 0.2);
}

.contact-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.contact-stage {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.contact-stage.new-lead {
    background: linear-gradient(135deg, rgba(76, 99, 210, 0.15), rgba(76, 99, 210, 0.1));
    color: var(--primary-color);
}

.contact-stage.contacted {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.1));
    color: #d97706;
}

.contact-stage.qualified {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.1));
    color: #16a34a;
}

.contact-stage.assessment-scheduled {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.1));
    color: #7c3aed;
}

.contact-stage.not-interested {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.1));
    color: #dc2626;
}

.contact-details {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    min-width: 0;
}

.contact-detail {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 0;
    flex-shrink: 0;
}

.contact-detail:nth-child(1) { /* Phone */
    flex: 0 0 150px;
}

.contact-detail:nth-child(2) { /* Lead Source */
    flex: 0 0 140px;
}

.contact-detail i {
    width: 14px;
    margin-right: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.6;
}

.contact-detail span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



.contact-management {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
    flex-shrink: 0;
}

.contact-management.ai {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    color: white;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}

.contact-management.human {
    background: linear-gradient(135deg, #044EA3, #4DA6FC);
    color: white;
    box-shadow: 0 2px 4px rgba(76, 99, 210, 0.2);
}

.contact-management.rejected {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.contact-management.deal-closed {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

.contact-management.not-interested {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.contact-management.inactive {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2);
}

.no-contacts {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.no-contacts i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}

/* Contact loading and error states */
.loading-state, .error-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.error-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ef4444;
}

.error-state h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-state .btn-secondary {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* Removed contact-meta styles as they are no longer used */

/* Improved contact stage styles */
.contact-stage.hot {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.contact-stage.warm {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.contact-stage.cold {
    background: rgba(4, 78, 163, 0.1);
    color: #044EA3;
}

/* Pipeline loading and error states */
.loading-state, .error-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

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

.error-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ef4444;
}

.error-state h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-state .btn-secondary {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.error-state .btn-secondary:hover {
    background: var(--background-white);
    transform: translateY(-1px);
}

/* Enhanced pipeline toast notifications */
.pipeline-toast {
    animation: slideIn 0.3s ease-out;
}

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

/* Enhanced empty state */

/* Custom scrollbar for contacts list */
.contacts-list::-webkit-scrollbar {
    width: 6px;
}

.contacts-list::-webkit-scrollbar-track {
    background: var(--background-light);
    border-radius: 3px;
}

.contacts-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.contacts-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Other Tab Containers */
.settings-container {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar .nav-text,
    .sidebar .logo-text,
    .sidebar .agency-name,
    .sidebar .agency-status,
    .sidebar .user-details-minimal,
    .sidebar .logout-icon {
        display: none;
    }
    
    .sidebar .user-section {
        justify-content: center;
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
    
    .content-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-title {
        font-size: 2rem;
        font-weight: 300;
        letter-spacing: -0.02em;
    }
    
    .content-body {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .kpi-grid-compact {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .activity-row {
        grid-template-columns: 1fr;
    }
    
    .pipeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .pipeline-stats {
        gap: 1rem;
    }
    
    .kanban-board {
        flex-direction: column;
        gap: 1rem;
    }
    
    .kanban-column {
        min-width: auto;
    }
    
    .funnel-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    
    .funnel-step {
        min-width: auto;
    }
    
    .funnel-arrow {
        display: none;
    }
    
    .section-title {
        font-size: 1.125rem;
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    .funnel-number {
        font-size: 1.75rem;
    }
    
    .activity-number {
        font-size: 1.75rem;
    }
    
    /* Contacts responsive design */
    .contacts-container {
        height: calc(100vh - 120px);
    }
    
    .contacts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    .contacts-title {
        display: flex;
        align-items: center;
    }
    
    .search-box input {
        width: 100%;
        max-width: none;
    }
    
    .search-box input:focus {
        width: 100%;
    }
    
    .contacts-list {
        padding: 0.5rem;
    }
    
    .contact-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .contact-header {
        width: 100%;
    }
    
    .contact-details {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .contact-detail {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
    }
    
    .contact-detail:nth-child(1),
    .contact-detail:nth-child(2) {
        flex: 1 1 auto;
    }
    
    .contact-management {
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 0.6rem;
        padding: 0.15rem 0.35rem;
    }
}

@media (max-width: 480px) {
    .kpi-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .kpi-value-compact {
        font-size: 1.5rem;
    }
    
    .chart-card-large {
        padding: 1rem;
    }
}

@media (max-width: 360px) {
    .kpi-grid-compact {
        grid-template-columns: 1fr;
    }
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes expandWidth {
    from {
        width: 0%;
    }
    to {
        width: var(--target-width);
    }
}

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

.animate-card {
    opacity: 0;
    animation: slideInUp 0.6s ease forwards;
}

.animate-on-load {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.animate-bar {
    transition: width 1.5s ease-in-out;
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--background-light);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

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

.modal-content {
    background-color: var(--background-white);
    margin: 2% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), #5a73e5);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stage-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.close-modal {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.close-modal:hover {
    opacity: 1;
}

.modal-body {
    padding: 0;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

.profile-sections {
    padding: 2rem;
}

.profile-section {
    margin-bottom: 2rem;
    background: var(--background-light);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-section h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-section h3 i {
    color: var(--primary-color);
}

.contact-grid, .care-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.contact-item, .care-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-item label, .care-item label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-item span, .care-item span {
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin-top: 0.5rem;
}

.timeline::before { display: none !important; }

.timeline-item {
    position: relative;
    margin-bottom: 0.5rem;
    padding-left: 0;
}

.timeline-marker { display: none; }

.timeline-marker i {
    font-size: 8px;
    color: white;
}

.timeline-content {
    background: var(--background-white);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.5rem;
}

.timeline-content:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.timeline-main {
    flex: 1;
}

.timeline-content h4 {
    margin: 0 0 0.125rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.timeline-action {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

.timeline-meta {
    text-align: right;
    flex-shrink: 0;
    margin-left: 1rem;
}

.timeline-date {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 0.125rem;
}

.timeline-from {
    font-size: 0.65rem;
    color: var(--text-light);
    opacity: 0.8;
    line-height: 1.2;
}

/* Last timeline item styling */
.timeline-item:last-child .timeline-content {
    margin-bottom: 0;
}

/* Special styling for different stage types */
.timeline-item .timeline-marker.deal-closed {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.timeline-item .timeline-marker.rejected {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Enhanced compact timeline styling */
.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:last-child .timeline::before {
    display: none;
}

/* Action-specific styling */
.timeline-action {
    font-style: italic;
}

/* Special marker colors for actions */
.timeline-marker.deal-marker {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.timeline-marker.reject-marker {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Responsive timeline adjustments */
@media (max-width: 480px) {
    .timeline {
        padding-left: 1.75rem;
    }
    
    .timeline-marker {
        left: -1.5rem;
        width: 16px;
        height: 16px;
    }
    
    .timeline-marker i {
        font-size: 7px;
    }
    
    .timeline-content {
        padding: 0.375rem 0.5rem;
        min-height: 2rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-meta {
        margin-left: 0;
        margin-top: 0.25rem;
        text-align: left;
        width: 100%;
    }
    
    .timeline-content h4 {
        font-size: 0.8rem;
    }
    
    .timeline-action {
        font-size: 0.65rem;
    }
    
    .timeline-date {
        font-size: 0.65rem;
    }
    
    .timeline-from {
        font-size: 0.6rem;
    }
}

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

.timeline-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.timeline-type {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-type.call {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.timeline-type.email {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.timeline-type.sms {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.timeline-content {
    color: var(--text-primary);
    line-height: 1.5;
}

/* ===== STAGE HISTORY - ELEGANT TIMELINE ===== */

.timeline {
    position: relative;
    padding-left: 1.75rem;
    margin: 1rem 0;
}

/* Vertical line */
.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, 
        var(--primary-color) 0%, 
        rgba(100, 116, 139, 0.3) 100%
    );
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 0;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* Timeline dot */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.625rem;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    border: 2.5px solid var(--primary-color);
    box-shadow: 0 0 0 3px rgba(4, 78, 163, 0.1);
    z-index: 2;
}

.timeline-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0;
    background: transparent;
    border: none;
}

.timeline-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.timeline-main h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-action {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.timeline-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* alineado a la derecha */
    text-align: right;
    gap: 0.2rem;
    flex-shrink: 0;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}

.timeline-from {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0;
}

/* Moved by badges - elegant style */
.moved-by {
    font-size: 0.7rem;
    font-weight: 600;
    height: 28px;            /* altura fija para consistencia */
    min-width: 96px;         /* ancho consistente */
    padding: 0 0.6rem;       /* padding horizontal */
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center; /* centra texto */
    gap: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.moved-by i {
    font-size: 0.65rem;
}

.moved-by-ai {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
    color: #7c3aed;
    border-color: rgba(139, 92, 246, 0.3);
}

.moved-by-human {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.3);
}

.moved-by-system {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), rgba(107, 114, 128, 0.05));
    color: #6b7280;
    border-color: rgba(107, 114, 128, 0.3);
}

/* ===== CONVERSATION HISTORY - CHAT STYLE ===== */

.conversation-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
    max-height: 600px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.conversation-date-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.conversation-date-header {
    text-align: center;
    position: relative;
    margin: 1rem 0 0.5rem 0;
}

.conversation-date-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}

.conversation-date-text {
    background: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    position: relative;
    z-index: 2;
    display: inline-block;
}

.conversation-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.conversation-message.outbound {
    flex-direction: row-reverse;
}

.conversation-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.conversation-avatar.inbound {
    background: linear-gradient(135deg, #10b981, #059669);
}

.conversation-avatar.outbound {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.conversation-bubble {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.conversation-message.inbound .conversation-bubble {
    background: #f1f5f9;
    color: var(--text-primary);
    border-bottom-left-radius: 6px;
}

.conversation-message.outbound .conversation-bubble {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 6px;
}

.conversation-bubble-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.conversation-type-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.conversation-type-badge.sms {
    background: rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.conversation-type-badge.email {
    background: rgba(59, 130, 246, 0.2);
    color: #2563eb;
}

.conversation-type-badge.call {
    background: rgba(16, 185, 129, 0.2);
    color: #059669;
}

.conversation-message.outbound .conversation-type-badge {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.conversation-agent-badge {
    font-size: 0.55rem;
    font-weight: 700;
    padding: 0.1rem 0.3rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.conversation-agent-badge.ai {
    background: rgba(139, 92, 246, 0.2);
    color: #7c3aed;
}

.conversation-agent-badge.human {
    background: rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.conversation-message.outbound .conversation-agent-badge {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.conversation-content {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.conversation-purpose {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.conversation-message.outbound .conversation-purpose {
    color: rgba(255, 255, 255, 0.9);
}

.conversation-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    opacity: 0.7;
}

.conversation-message.outbound .conversation-meta {
    color: rgba(255, 255, 255, 0.8);
}

.conversation-time {
    font-weight: 500;
}

/* Recording button in call bubbles - INBOUND (gray bubble) */
.conversation-message.inbound .conversation-recording-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.6rem;
    margin-top: 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--primary-color);
    color: white;
}

.conversation-message.inbound .conversation-recording-btn:hover {
    background: #1e40af;
}

/* Recording button in call bubbles - OUTBOUND (blue bubble) */
.conversation-message.outbound .conversation-recording-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.6rem;
    margin-top: 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.conversation-message.outbound .conversation-recording-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.conversation-recording-btn i {
    font-size: 0.7rem;
}

/* Recording button states */
.conversation-recording-btn.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.conversation-message.inbound .conversation-recording-btn.sent {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    cursor: default;
    pointer-events: none;
}

.conversation-message.outbound .conversation-recording-btn.sent {
    background: rgba(34, 197, 94, 0.3);
    color: #bbf7d0;
    cursor: default;
    pointer-events: none;
}

/* Ongoing call bubble (outbound style - Blue theme) */
.conversation-call-ongoing-wrapper {
    /* Uses .conversation-message.outbound styles */
}

.conversation-call-ongoing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    border-radius: 12px;
    min-width: 180px;
}

.conversation-call-ongoing .call-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.conversation-call-ongoing .call-info {
    flex: 1;
}

.conversation-call-ongoing .call-title {
    font-weight: 600;
    color: white;
    font-size: 0.85rem;
}

.conversation-call-ongoing .call-status {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.conversation-call-ongoing .call-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* Date divider for conversation history */
.date-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.date-pill {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* Conversation date group */
.conversation-date-group {
    margin-bottom: 0.5rem;
}

/* Reply Interface */
/* ===== MINIMALIST CHAT BAR REPLY INTERFACE ===== */
.conversation-reply-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
}

/* Channel Selector Dropdown */
.reply-channel-dropdown {
    position: relative;
}

/* Channel badge button (SMS/EMAIL/CALL) */
.channel-badge-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    min-width: 50px;
}

.channel-badge-btn:hover {
    background: #1e40af;
    transform: scale(1.02);
}

.channel-badge-btn span {
    color: white;
}

.channel-dropdown-menu {
    position: absolute;
    bottom: 50px;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
    min-width: 140px;
    display: none;
    z-index: 1000;
}

.channel-dropdown-menu.active {
    display: block;
}

.channel-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.channel-dropdown-item:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.channel-dropdown-item.active {
    background: var(--primary-color);
    color: white;
}

/* Message Input */
.reply-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    resize: none;
    overflow-y: auto;
    min-height: 40px;
    max-height: 160px; /* permite 4-5 líneas antes de scrollear */
    line-height: 1.5;
    vertical-align: middle;
}

.reply-input::placeholder {
    color: #9ca3af;
}

/* Emoji Button (only for email) */
.emoji-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.emoji-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Send Button */
.reply-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    height: 40px;
    border-radius: 20px;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 70px;
}

.reply-send-btn:hover {
    background: #033d7a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(4, 78, 163, 0.3);
}

.reply-send-btn:active {
    transform: translateY(0);
}

.reply-send-btn span {
    white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .conversation-bubble {
        max-width: 85%;
        padding: 0.6rem 0.8rem;
    }
    
    .conversation-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .conversation-content {
        font-size: 0.85rem;
    }
    
    .reply-channel-selector {
        flex-direction: column;
    }
    
    .channel-option {
        width: 100%;
    }
}

/* Moved By Indicators */
.moved-by {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.moved-by-ai {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.moved-by-human {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.moved-by-unknown {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.moved-by i {
    font-size: 0.6rem;
}

/* AI Notes Styles */
/* AI Notes now use timeline styles like stage/conversation history */

/* Manual Notes Styles */
.manual-notes textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    background: var(--background-white);
    color: var(--text-primary);
}

.manual-notes textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 99, 210, 0.1);
}

.notes-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background: #3b4fd8;
    transform: translateY(-1px);
}

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

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

.saved-notes {
    margin-top: 1.5rem;
}

/* Conversation History now uses the same timeline styles as Stage History */

/* Enhanced Conversation History Styles */
.comm-purpose {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-style: normal;
}

.sent-content {
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.4;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
    border-left: 3px solid var(--border-color);
}

.full-summary {
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.timeline-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timeline-main h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timeline-under-date {
    margin-top: 0.5rem;
}

/* Agent badges (AI/HUMAN) - matching pipeline style */
.agent-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: none;
}

.ai-badge {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.human-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Direction badges (INBOUND/OUTBOUND) - matching pipeline style */
.direction-badge {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: none;
}

.inbound-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.outbound-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

/* Duration info */
.duration-info {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.duration-info.no-answer {
    color: #F44336;
    font-weight: 600;
}

/* Get record button - matching pipeline style */
.get-record-btn {
    background: linear-gradient(135deg, var(--primary-color), #3b4fd8);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(76, 99, 210, 0.3);
}

.get-record-btn:hover {
    background: linear-gradient(135deg, #3b4fd8, #2d3bc7);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 99, 210, 0.4);
}

/* Response status (icon only) */
.response-status {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.3rem 0.4rem;
    border-radius: 50%;
    cursor: help;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
}

.response-status.responded {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.response-status.no-response {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

/* AI Notes Timeline Styles (matching stage/conversation history) */
.priority-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: none;
}

.priority-high {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.priority-medium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.priority-low {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.confidence-info {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.important-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: none;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

/* Manual Notes Form Styles */
.manual-notes-form {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.manual-notes-form .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.manual-notes-form .form-row:last-of-type {
    margin-bottom: 1.5rem;
}

.manual-notes-form .form-group {
    flex: 1;
}

.manual-notes-form .form-group.full-width {
    flex: 100%;
}

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

.manual-notes-form label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.manual-notes-form .form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    background: var(--background-white);
}

.manual-notes-form .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 99, 210, 0.1);
}

.manual-notes-form select.form-input {
    cursor: pointer;
}

.manual-notes-form textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* Checkbox Labels */
.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    font-weight: 500 !important;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-label i {
    margin-left: 0.25rem !important;
    margin-right: 0.5rem !important;
}

/* Follow-up Date Row Animation */
#followUpDateRow {
    transition: all 0.3s ease;
    overflow: hidden;
}

#followUpDateRow.show {
    display: flex !important;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 100px;
        margin-bottom: 1rem;
    }
}

/* Notes Actions */
.notes-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Assessment Notes Display */
.assessment-notes {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
}

.assessment-notes h4 {
    margin: 0 0 0.75rem 0;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
}

.assessment-notes h4 i {
    margin-right: 0.5rem;
}

.assessment-notes-content {
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Manual Notes now use timeline styles like other sections */

/* Loading State */
.loading-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.loading-state i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .profile-sections {
        padding: 1rem;
    }
    
    .profile-section {
        padding: 1rem;
    }
    
    .contact-grid, .care-grid {
        grid-template-columns: 1fr;
    }
}

/* Role-based UI Styles */
.user-role-indicator {
    font-size: 0.7rem;
    margin-top: 0.25rem;
    text-align: left;
    font-weight: normal;
}

.admin-role {
    color: #dc3545;
}

.agency-role {
    color: #6c757d;
}

.role-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    color: white;
}

.role-badge.admin-role {
    background-color: #dc3545;
}

.role-badge.agency-role {
    background-color: #28a745;
}

/* Top bar agency name styling */
#topBarAgencyName {
    display: block !important;
    clear: both;
}

/* Ensure last-updated and agency name are on separate lines */
.last-updated {
    display: block;
    margin-bottom: 0;
}

/* Admin Dashboard Styles */
.admin-dashboard {
    padding: 1.5rem;
}

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

.admin-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

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

.admin-stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.stat-content h3 {
    margin: 0;
    font-size: 2rem;
    color: #2c3e50;
    font-weight: 300;
}

.stat-content p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.admin-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.admin-section {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-section h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    font-weight: 300;
}

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

.admin-agencies-table th,
.admin-agencies-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.admin-agencies-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.btn-view-agency,
.btn-edit-role {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.btn-edit-role {
    background: #6c757d;
}

.btn-view-agency:hover {
    background: #0056b3;
}

.btn-edit-role:hover {
    background: #545b62;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

/* Admin-only visibility */
[data-admin-only] {
    display: none;
}

/* Admin Interface Styles */
.admin-content {
    padding: 2rem;
    max-width: 100%;
}

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

.admin-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.admin-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

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

.stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Agencies Grid */
.agencies-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.agencies-list-section,
.recent-activity-section {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.agencies-list-section h3,
.recent-activity-section h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Agency Performance Cards */
.agency-performance-card {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #007bff;
}

.agency-header {
    margin-bottom: 0.75rem;
}

.agency-header h4 {
    margin: 0 0 0.25rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 300;
}

.agency-header .location {
    color: #6c757d;
    font-size: 0.9rem;
}

.agency-stats {
    display: flex;
    gap: 1.5rem;
}

.agency-stats .stat {
    text-align: center;
}

.agency-stats .number {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #007bff;
}

.agency-stats .label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

/* Today's Work Grid */
.todays-work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.work-section {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.work-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2c3e50;
    font-weight: 300;
}

.work-section.urgent h3 {
    color: #dc3545;
}

.work-section.pending h3 {
    color: #ffc107;
}

.work-section.scheduled h3 {
    color: #28a745;
}

.work-section.reports h3 {
    color: #007bff;
}

/* Tasks List */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 0.25rem;
    border-left: 3px solid #dee2e6;
}

.task-item.urgent {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.task-item i {
    color: #6c757d;
    width: 1rem;
}

.task-item span {
    flex: 1;
    color: #2c3e50;
}

.task-item time {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

/* Agencies Management */
.agencies-management-content {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.agencies-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.agencies-table th,
.agencies-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.agencies-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
}

.agencies-table tr:hover {
    background-color: #f8f9fa;
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* Buttons */
.btn-small {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 0.25rem;
    transition: background-color 0.2s ease;
}

.btn-small:hover {
    background: #0056b3;
}

/* System Overview */
.system-overview-content {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.overview-card {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #dee2e6;
}

.overview-card h3 {
    margin-top: 0;
    color: #2c3e50;
}

.overview-card p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Agency Filter Dropdown */
#adminAgencyFilter {
    z-index: 100;
}

#agencySelect {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#agencySelect:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Responsive Design for Admin Interface */
@media (max-width: 768px) {
    .admin-content {
        padding: 1rem;
    }
    
    .admin-stats-overview {
        grid-template-columns: 1fr;
    }
    
    .agencies-grid {
        grid-template-columns: 1fr;
    }
    
    .todays-work-grid {
        grid-template-columns: 1fr;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .agencies-table {
        font-size: 0.8rem;
    }
    
    .agencies-table th,
    .agencies-table td {
        padding: 0.5rem;
    }
}

.material-symbols-outlined {
    font-variation-settings:
      'FILL' 0,
      'wght' 300,
      'GRAD' 0,
      'opsz' 24;
}

.toggle-btn .material-symbols-outlined,
.logout-btn .material-symbols-outlined {
    font-variation-settings:
      'FILL' 0,
      'wght' 300,
      'GRAD' 0,
      'opsz' 20;
}

/* ... existing code ... */
/* Top header removed - agency info now in sidebar */

/* Ocultar contenedor anterior de título */
.content-header { display: none; }

/* Spacing general del contenido tras header */
.content-body { padding: 1rem 1.25rem; }
@media (min-width: 1024px) { .content-body { padding: 1.25rem 1.5rem; } }

/* Títulos embebidos dentro de cada tab */
.tab-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-color);
    margin: 0 0 0.75rem 0;
}
/* ... existing code ... */

/* ... existing code ... */
.toggle-btn .material-symbols-outlined {
    font-size: 1rem;
    transition: transform 0.3s ease;
}
/* Girar flecha cuando el sidebar está contraído */
.sidebar.collapsed .toggle-btn .material-symbols-outlined {
    transform: rotate(180deg);
}
/* ... existing code ... */

/* Calendar redesign */
.calendar-container { border: 1px solid #eef2f7; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.calendar-header { border-bottom: 1px solid #eef2f7; padding-bottom: 0.75rem; }
.nav-btn { background: var(--background-white); color: var(--primary-color); border: 1px solid #dbe3ee; }
.nav-btn:hover { background: rgba(4,78,163,0.06); transform: translateY(-1px); }
.calendar-nav h3 { font-weight: 300; color: #0f172a; }
.today-btn { background: #4DA6FC; border: 1px solid #3c96ee; }
.today-btn:hover { background: #3c96ee; }
.assessment-count { color: #64748b; }

.calendar-week-view { border: 1px solid #eef2f7; }
.time-column { background: #f8fafc; }
.time-slot { color: #94a3b8; }
.day-header { background: var(--background-white); }
.day-header.today { background: linear-gradient(135deg, #044EA3, #4DA6FC); }
.day-number { font-weight: 500; }
.hour-slot { background: var(--background-white); }
.hour-slot:hover { background: rgba(4,78,163,0.03); }

.assessment-event { background: linear-gradient(135deg, #4DA6FC, #044EA3); box-shadow: 0 2px 8px rgba(4,78,163,0.25); }
.assessment-event.confirmed { background: linear-gradient(135deg, #22c55e, #16a34a); }
.assessment-event.pending { background: linear-gradient(135deg, #f59e0b, #d97706); }

.calendar-legend { background: #f8fafc; border: 1px solid #eef2f7; }
.legend-item { color: #64748b; }
.legend-color.scheduled { background: linear-gradient(135deg, #044EA3, #4DA6FC); }

/* Home Layout - Dashboard + To-Do */
.home-layout {
    display: grid;
    grid-template-columns: 3fr 1fr; /* 3/4 izquierda, 1/4 derecha: alinea con 4 KPIs */
    gap: 1.25rem;
    margin-top: 0.5rem;
    align-items: stretch;
}

/* Lead Qualifier Dashboard - Full width (no To-Do) */
#lq-dashboard-subtab .home-layout {
    grid-template-columns: 1fr !important; /* Full width for dashboard */
}

#lq-dashboard-subtab .home-dashboard {
    width: 100%;
    max-width: 100%;
}

#lq-dashboard-subtab .chart-section-single {
    width: 100%;
}

#lq-dashboard-subtab .chart-card-large {
    width: 100%;
}

#lq-dashboard-subtab .activity-row {
    gap: 2rem; /* Más espacio entre las tarjetas de actividad */
}

#lq-dashboard-subtab .activity-card-small {
    padding: 2rem 1.5rem; /* Un poco más de padding vertical */
}

.home-dashboard { }
.home-todo { display: flex; }
.section-title { font-size: 1.5rem; font-weight: 300; color: var(--text-primary); margin-bottom: 1.5rem; letter-spacing: -0.02em; }

/* To-Do list styles */
.todo-container { background: var(--background-white); border: 1px solid #eef2f7; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03); height: 100%; display: flex; flex-direction: column; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-item { display: grid; grid-template-columns: 36px 36px 1fr 80px; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; border-bottom: 1px solid #eef2f7; }
.todo-item:hover { background: #f9fbff; }
.todo-cell { color: #0f172a; font-size: 0.85rem; }
.todo-cell.select { display: flex; justify-content: center; }
.todo-cell.star { display: flex; justify-content: center; color: #94a3b8; }
.todo-cell.title { font-weight: 500; margin-bottom: 0.25rem; }
.todo-cell.excerpt { color: #64748b; font-size: 0.75rem; line-height: 1.3; }
.todo-cell.time { color: #94a3b8; font-size: 0.75rem; text-align: right; font-weight: 400; }

.badge { display: inline-block; font-size: 0.65rem; padding: 0.15rem 0.4rem; border-radius: 6px; border: 1px solid transparent; margin-bottom: 0.25rem; }
.badge.primary { background: #e8f2ff; color: #044EA3; border-color: #cfe6ff; }
.badge.work { background: #fff4e6; color: #c97700; border-color: #ffe3bd; }
.badge.social { background: #eef2ff; color: #4b4ded; border-color: #dfe5ff; }
.todo-footer { padding: 0.75rem 1rem; color: #64748b; font-size: 0.8rem; background: #f8fafc; font-weight: 300; border-top: 1px solid #eef2f7; margin-top: auto; }

@media (max-width: 1200px) {
    .home-layout { grid-template-columns: 1fr; gap: 1rem; }
}

/* ... existing code ... */
.todo-header {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem 0.7rem;
    border-bottom: 1px solid #eef2f7;
    background: var(--background-white);
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.01em;
}
/* ... existing code ... */

/* =========================
   RECEPTIONIST AI - INBOX
   ========================= */
.inbox-wrapper {
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.inbox-list {
    display: flex;
    flex-direction: column;
}

.inbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

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

.inbox-row:hover {
    background-color: #f9fafb;
}

.inbox-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.inbox-icon.call {
    color: var(--primary-color);
}

.inbox-icon.email {
    color: #d97706;
}

.inbox-icon .material-symbols-outlined {
    font-size: 18px;
}

.inbox-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.inbox-header-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inbox-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.inbox-contact {
    font-size: 0.8rem;
    color: #9ca3af;
}

.inbox-separator {
    font-size: 0.75rem;
    color: #d1d5db;
}

.inbox-duration {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.inbox-summary {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.inbox-handler {
    display: inline-block;
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 500;
    margin-left: 0.5rem;
}

.inbox-handler.ai-managed {
    color: #0284c7;
}

.inbox-handler.transferred {
    color: #9ca3af;
}

.inbox-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
    min-width: 110px;
}

.inbox-status {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: capitalize;
}

.inbox-status.ongoing {
    background: #fef3c7;
    color: #d97706;
}

.inbox-status.routed {
    background: #e0f2fe;
    color: #0284c7;
}

.inbox-status.resolved {
    background: #d1fae5;
    color: #059669;
}

.inbox-time {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .inbox-row {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.65rem 1rem;
    }
    
    .inbox-meta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .inbox-header-row {
        flex-wrap: wrap;
        gap: 0.35rem;
    }
}

/* =========================
   RECEPTIONIST AI PROFILE
   ========================= */
.ai-profile-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.profile-avatar {
    width: 48px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    overflow: hidden;
}

.profile-avatar .material-symbols-outlined {
    font-size: 28px;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 12px;
}

.profile-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.profile-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.personality-summary {
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.personality-description {
    font-size: 0.8rem;
    line-height: 1.65;
    color: #475569;
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.profile-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.profile-item.full-width {
    grid-column: 1 / -1;
}

.profile-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-value {
    font-size: 0.9rem;
    color: #1e293b;
    line-height: 1.5;
}

.routing-rules-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.section-header-compact h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.btn-add-rule {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-rule:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3);
}

.btn-add-rule .material-symbols-outlined {
    font-size: 18px;
}

.routing-rules-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.routing-rule-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: #fafbfc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.routing-rule-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.rule-priority {
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.rule-priority.high {
    background: #fee2e2;
    color: #dc2626;
}

.rule-priority.medium {
    background: #fef3c7;
    color: #d97706;
}

.rule-priority.low {
    background: #e0f2fe;
    color: #0284c7;
}

.routing-rule-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rule-condition-row,
.rule-action-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.rule-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    min-width: 50px;
    padding-top: 0.1rem;
}

.rule-text {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

.rule-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

.btn-icon:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-icon.delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

.btn-icon .material-symbols-outlined {
    font-size: 18px;
}

/* Rule Side Panel */
.side-panel {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.side-panel.active {
    display: block;
}

.side-panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.side-panel-content {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 480px;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease;
}

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

.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.side-panel-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.panel-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.panel-close .material-symbols-outlined {
    font-size: 22px;
}

.side-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.form-group label::before {
    display: none !important;
}

.side-panel-body label::before {
    content: none !important;
    display: none !important;
}

.side-panel-body * {
    list-style: none !important;
}

.side-panel-body ul,
.side-panel-body ol,
.side-panel-body li {
    list-style: none !important;
    list-style-type: none !important;
}

/* Force remove any bullets or list styling in side panel */
.side-panel *::before,
.side-panel *::after {
    content: none !important;
}

.side-panel label,
.side-panel .form-group label {
    position: relative;
}

.side-panel label::marker {
    display: none !important;
}

.side-panel-content *::marker {
    display: none !important;
}

.form-input {
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #ffffff;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.form-help {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: -0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.action-type-toggle {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.info-box {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.info-box .material-symbols-outlined {
    color: #0284c7;
    font-size: 20px;
    flex-shrink: 0;
}

.info-box p {
    margin: 0;
    font-size: 0.875rem;
    color: #0c4a6e;
    line-height: 1.5;
}

.side-panel-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.side-panel-actions .btn-secondary {
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: #64748b;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.side-panel-actions .btn-secondary:hover {
    background: #f8fafc;
    color: #475569;
    border-color: #cbd5e1;
}

.side-panel-actions .btn-primary {
    padding: 0.625rem 1.25rem;
    background: #0284c7;
    color: #ffffff;
    border: 1px solid #0284c7;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.side-panel-actions .btn-primary:hover {
    background: #0369a1;
    border-color: #0369a1;
}

@media (max-width: 768px) {
    .profile-details {
        grid-template-columns: 1fr;
    }
    
    .routing-rule-card {
        flex-direction: column;
    }
    
    .rule-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .side-panel-content {
        width: 100%;
        max-width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* =========================
   STAFF SCHEDULER MODULE
   ========================= */
/* ===========================
   SCHEDULE CALENDAR
   =========================== */

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.schedule-header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.schedule-header h3 {
    font-size: 1.25rem;
    font-weight: 300;
    color: #0f172a;
    margin: 0;
}
.schedule-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.nav-arrow {
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.nav-arrow:hover {
    background: #f8fafc;
    border-color: #dde4ed;
}
.nav-arrow .material-symbols-outlined {
    font-size: 1.25rem;
    color: #64748b;
}
.current-week {
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f172a;
    min-width: 180px;
    text-align: center;
}

.schedule-header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.schedule-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #e8f2ff;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}
.schedule-counter .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Calendar Container */
.calendar-container {
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    overflow-x: auto;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 0;
    min-width: 1000px;
}
.calendar-grid.single-day {
    grid-template-columns: 80px 1fr;
}

/* Time Column */
.time-column {
    display: flex;
    flex-direction: column;
    border-right: 2px solid #eef2f7;
}
.time-header {
    height: 50px;
    border-bottom: 2px solid #eef2f7;
}
.time-slot {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    border-bottom: 1px solid #f1f5f9;
    padding-right: 0.5rem;
}

/* Day Columns */
.day-column {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eef2f7;
    position: relative;
}
.day-column:last-child {
    border-right: none;
}
.day-column.full-width {
    min-width: 600px;
}

.day-header {
    height: 50px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-bottom: 2px solid #eef2f7;
    background: #f8fafc;
    padding: 0 0.5rem;
}
.day-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.day-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

/* Day Slots Container */
.day-slots {
    position: relative;
    height: calc(24 * 40px); /* 24 hours * 40px each */
}
.day-slots::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 39px,
        #f1f5f9 39px,
        #f1f5f9 40px
    );
    pointer-events: none;
}

/* Shift Blocks */
.shift-block {
    position: absolute;
    /* left and width are set dynamically via JS for overlap handling */
    background: linear-gradient(135deg, #e8f2ff 0%, #f5f9ff 100%);
    border: 1.5px solid #3b82f6;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    z-index: 1;
    min-width: 0; /* Allow flexible sizing */
}
.shift-block:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    z-index: 2;
}
.shift-block.ai-managing {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-color: #a855f7;
}
.shift-block.ai-managing:hover {
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}
.shift-block.escalated {
    background: linear-gradient(135deg, #fef2f2 0%, #fef7f7 100%);
    border-color: #ef4444;
}
.shift-block.escalated:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* AI Searching for Caregiver (purple light) */
.shift-block.ai-searching {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: #8b5cf6;
    animation: pulseSearching 2s ease-in-out infinite;
}
.shift-block.ai-searching:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}
.shift-block.ai-searching .shift-caregiver {
    color: #8b5cf6;
    font-style: italic;
}

/* No Replacement Found (red light) */
.shift-block.no-replacement {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #dc2626;
}
.shift-block.no-replacement:hover {
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}
.shift-block.no-replacement .shift-caregiver {
    color: #dc2626;
    font-weight: 600;
}

@keyframes pulseSearching {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.shift-client {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.shift-caregiver {
    font-size: 0.75rem;
    color: #3b82f6;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.shift-block.ai-managing .shift-caregiver {
    color: #a855f7;
    font-style: italic;
}
.shift-block.escalated .shift-caregiver {
    color: #ef4444;
    font-weight: 600;
}
.shift-time-range {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Shift Detail Panel Styles */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eef2f7;
}
.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
}
.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 1rem;
}
.info-box {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}
.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.info-row:last-child {
    margin-bottom: 0;
}
.info-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}
.info-value {
    font-size: 0.85rem;
    color: #0f172a;
    font-weight: 500;
}
.services-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.service-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.service-checkbox:hover {
    background: #f8fafc;
    border-color: #dde4ed;
}
.service-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.service-checkbox span {
    font-size: 0.85rem;
    color: #0f172a;
    font-weight: 500;
}
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dde4ed;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #0f172a;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s;
}
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* AI Management Status Styles */
.ai-status-box {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1.5px solid #a855f7;
    border-radius: 12px;
    padding: 1.5rem;
}
.ai-status-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.ai-status-header .material-symbols-outlined {
    font-size: 1.5rem;
    color: #a855f7;
}
.ai-status-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}
.ai-status-details {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.ai-status-actions {
    display: flex;
    gap: 0.75rem;
}
.btn-ai-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--background-white);
    border: 1px solid #a855f7;
    border-radius: 8px;
    color: #a855f7;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-ai-action:hover {
    background: #a855f7;
    color: white;
}
.btn-ai-action .material-symbols-outlined {
    font-size: 1rem;
}

/* Escalated Status Styles */
.ai-status-box.escalated {
    background: linear-gradient(135deg, #fef2f2 0%, #fef7f7 100%);
    border-color: #ef4444;
}
.ai-status-box.escalated .ai-status-header .material-symbols-outlined {
    color: #ef4444;
}
.ai-status-box.escalated .btn-ai-action {
    border-color: #ef4444;
    color: #ef4444;
}
.ai-status-box.escalated .btn-ai-action:hover {
    background: #ef4444;
    color: white;
}

/* AI Searching Box Styles */
.ai-search-box {
    border-radius: 12px;
    padding: 1rem;
}
.ai-search-box.searching {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1.5px solid #8b5cf6;
}
.ai-search-box.failed {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1.5px solid #dc2626;
}
.ai-search-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.ai-search-box.searching .ai-search-header .material-symbols-outlined {
    font-size: 1.25rem;
    color: #8b5cf6;
    animation: searchPulse 1.5s ease-in-out infinite;
}
.ai-search-box.failed .ai-search-header .material-symbols-outlined {
    font-size: 1.25rem;
    color: #dc2626;
}
.ai-search-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}
.ai-search-countdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}
.countdown-label {
    font-size: 0.8rem;
    color: #64748b;
}
.countdown-timer {
    font-size: 1.1rem;
    font-weight: 700;
    color: #8b5cf6;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}
.ai-search-details {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}
@keyframes searchPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Compact Form Styles for Shift Detail Panel */
.form-section.compact {
    padding: 0.75rem 0;
    margin-bottom: 0;
}
.form-section.compact:first-of-type {
    padding-top: 0;
}
.form-section.compact .section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 0.5rem;
}
.section-title-sm {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 0.375rem;
    font-weight: 600;
}
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
}
.compact-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
    overflow: hidden;
}
.compact-card .form-input {
    margin-bottom: 0.5rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
    width: 100%;
    box-sizing: border-box;
}
.compact-info {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #64748b;
    padding: 0.25rem 0;
    min-width: 0;
}
.compact-info .material-symbols-outlined {
    font-size: 14px;
    color: #94a3b8;
    flex-shrink: 0;
}
.compact-info span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Prevent horizontal scroll in side panels */
#shiftDetailPanel .side-panel-body {
    overflow-x: hidden;
}

/* Smaller form elements in compact mode */
.form-section.compact .form-group {
    margin-bottom: 0;
}
.form-section.compact .form-group label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}
.form-section.compact .form-input,
.form-section.compact .form-textarea {
    padding: 0.5rem;
    font-size: 0.8125rem;
}
.form-section.compact .form-textarea {
    resize: none;
}

/* Schedule Filters */
.schedule-filters {
    display: flex;
    gap: 0.25rem;
    margin-right: 0;
}
.filter-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn:hover {
    color: #0f172a;
    background: #e2e8f0;
}
.filter-btn.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.filter-btn[data-filter="ai_searching"].active {
    background: #f5f3ff;
    color: #7c3aed;
}
.filter-btn[data-filter="no_replacement"].active {
    background: #fef2f2;
    color: #dc2626;
}

/* Filter Divider */
.filter-divider {
    color: #cbd5e1;
    font-size: 1.25rem;
    font-weight: 300;
    margin: 0 0.5rem;
    user-select: none;
    display: flex;
    align-items: center;
}

/* Option hint text */
.option-hint {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-left: 1.75rem;
    margin-top: 0.25rem;
}

/* Matching List */
.matching-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.matching-item {
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.matching-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.75rem;
}
.matching-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
    margin: 0.25rem 0;
}
.matching-info .material-symbols-outlined {
    font-size: 1rem;
    color: #94a3b8;
}
.btn-match {
    background: linear-gradient(135deg, var(--primary-color), #4DA6FC);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-match:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 78, 163, 0.3);
}

/* Status Pills & Skill Tags */
.status-pill {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}
.status-pill.active {
    background: #d1fae5;
    color: #065f46;
}
.status-pill.pto {
    background: #fef3c7;
    color: #92400e;
}
.skill-tag {
    display: inline-block;
    background: #e8f2ff;
    color: var(--primary-color);
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    margin-right: 0.25rem;
    font-weight: 500;
}

/* KPI Cards Compact (for Scheduler Dashboard) */
.kpi-grid-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.kpi-card-compact {
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.kpi-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.kpi-title-compact {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}
.kpi-icon-compact {
    color: var(--primary-color);
}
.kpi-icon-compact .material-symbols-outlined {
    font-size: 1.5rem;
}
.kpi-value-compact {
    font-size: 2rem;
    font-weight: 300;
    color: var(--primary-color);
}

/* Schedule View Toggle - Same style as schedule-filters */
.schedule-view-toggle {
    display: flex;
    gap: 0.25rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 8px;
}

.view-toggle-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-toggle-btn:hover {
    color: #0f172a;
    background: #e2e8f0;
}

.view-toggle-btn.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Clients & Caregivers Headers */
.clients-header,
.caregivers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.clients-header h3,
.caregivers-header h3 {
    font-size: 1.25rem;
    font-weight: 300;
    color: #0f172a;
    margin: 0;
}

.btn-add {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-add .material-symbols-outlined {
    font-size: 18px;
}

/* Data Tables (Generic Reusable) */
.clients-table-wrapper,
.caregivers-table-wrapper {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.data-table thead {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    text-align: left;
    padding: 0.875rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

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

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: #1e293b;
}

.data-table td strong {
    font-weight: 600;
    color: #0f172a;
}

.btn-icon-small {
    padding: 0.35rem;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-small:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--primary-color);
}

.btn-icon-small .material-symbols-outlined {
    font-size: 18px;
}

/* Badges */
.day-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #e8f2ff;
    color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 6px;
    margin-right: 0.25rem;
}

/* Hours display in tables */
.data-table td .hours-display {
    white-space: nowrap;
    font-size: 0.8125rem;
    color: #475569;
    font-weight: 500;
}

.lang-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 6px;
    margin-right: 0.25rem;
}

.avail-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: #dcfce7;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

.avail-badge.pto {
    background: #fff4e6;
    color: #f59e0b;
}

/* Coverage Chart */
.chart-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chart-header {
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
}

.chart-header p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.coverage-chart {
    width: 100%;
}

.chart-legend {
    font-size: 0.85rem;
    color: #64748b;
}

.legend-item {
    display: flex;
    align-items: center;
}

/* Days & Languages Selector */
.days-selector,
.languages-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.day-checkbox,
.lang-checkbox {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.day-checkbox:hover,
.lang-checkbox:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.day-checkbox input[type="checkbox"],
.lang-checkbox input[type="checkbox"] {
    margin: 0;
    margin-right: 0.5rem;
    cursor: pointer;
}

.day-checkbox input[type="checkbox"]:checked + span,
.lang-checkbox input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--primary-color);
}

.day-checkbox:has(input:checked),
.lang-checkbox:has(input:checked) {
    background: #e8f2ff;
    border-color: var(--primary-color);
}

.day-checkbox span,
.lang-checkbox span {
    font-size: 0.875rem;
    color: #1e293b;
}

/* Checkbox Group for Client/Caregiver preferences */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    background: #f8fafc;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

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

.checkbox-item input[type="checkbox"] {
    margin: 0;
    margin-right: 0.5rem;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.checkbox-item input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--primary-color);
}

.checkbox-item:has(input:checked) {
    background: #e8f2ff;
    border-color: var(--primary-color);
}

.checkbox-item span {
    font-size: 0.875rem;
    color: #1e293b;
}

/* Delete Button in Side Panel */
.btn-danger {
    padding: 0.625rem 1.25rem;
    background: #dc2626;
    color: #ffffff;
    border: 1px solid #dc2626;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Schedule Editor (for Clients & Caregivers) */
.schedule-editor {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.schedule-day-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.schedule-day-row:has(input[type="checkbox"]:checked) {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.schedule-day-checkbox {
    display: flex;
    align-items: center;
    min-width: 120px;
    cursor: pointer;
    user-select: none;
}

.schedule-day-checkbox input[type="checkbox"] {
    margin: 0;
    margin-right: 0.5rem;
    cursor: pointer;
}

.schedule-day-checkbox span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
}

.schedule-day-checkbox input[type="checkbox"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.schedule-times {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.schedule-times span {
    color: #64748b;
    font-size: 0.875rem;
}

.form-input-small {
    padding: 0.4rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
    min-width: 120px;
    width: auto;
}

/* Time inputs need more space */
.form-input-small[type="time"] {
    min-width: 130px;
}

.form-input-small:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

@media (max-width: 1200px) {
    .schedule-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .kpi-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .schedule-grid {
        grid-template-columns: 1fr;
    }
    .kpi-grid-compact {
        grid-template-columns: 1fr;
    }
    .matching-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .btn-match {
        width: 100%;
    }
}

/* =========================
   COPILOT WIDGET (FLOATING)
   ========================= */

/* Floating Button - With Caro's Image */
.copilot-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: none; /* Hidden by default, enabled by CopilotManager */
}

.copilot-floating-btn {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid white;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    padding: 0;
}

.copilot-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 50%;
}

.btn-glow {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #4DA6FC);
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.copilot-floating-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.15);
}

.copilot-floating-btn:hover .btn-glow {
    opacity: 0.4;
}

.copilot-floating-btn:active {
    transform: translateY(-2px) scale(1.02);
}

/* Floating Window - Narrower Design */
.copilot-floating-window {
    position: fixed;
    bottom: 0;
    right: 2rem;
    width: 420px;
    max-width: calc(100vw - 4rem);
    height: 650px;
    max-height: calc(100vh - 2rem);
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 
        0 -8px 32px rgba(0, 0, 0, 0.12),
        0 -4px 16px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.copilot-floating-window.active {
    display: flex;
    animation: slideUpFromBottom 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideUpFromBottom {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDownToBottom {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(100%);
    }
}

/* Header */
.copilot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.copilot-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.copilot-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border: 2px solid #e5e7eb;
}

.copilot-header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.copilot-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.copilot-header-text h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.2;
}

.copilot-role {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 400;
}

.copilot-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.7rem;
    color: #10b981;
    font-weight: 500;
}

.copilot-status::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}

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

.copilot-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.copilot-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #6b7280;
}

.copilot-close-btn .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Body - Single Column */
.copilot-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    background: #f9fafb;
}

.chat-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: white;
    min-height: 0;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    max-width: 90%;
    animation: messageSlide 0.3s ease;
}

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

.chat-message.assistant {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #e5e7eb;
}

.message-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.message-avatar .material-symbols-outlined {
    font-size: 1.25rem;
}

.message-content {
    background: #f3f4f6;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #1f2937;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, var(--primary-color), #4DA6FC);
    color: white;
}

/* Welcome Message with Action Options */
.welcome-content {
    background: #f9fafb;
    padding: 1rem;
    min-width: 320px;
}

.welcome-greeting {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
}

.action-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-option {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.action-option:hover {
    background: #f9fafb;
    border-color: var(--primary-color);
    transform: translateX(2px);
}

.action-option-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.action-option-text strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    display: block;
}

.action-meta {
    font-size: 0.75rem;
    color: #9ca3af;
    display: block;
}

.action-highlight {
    color: #f59e0b;
    font-weight: 500;
}

/* Quick Insights Section - Compact */
.copilot-quick-insights {
    padding: 0.75rem 1rem;
    background: #d1fae5;
    border-top: 1px solid #a7f3d0;
    border-bottom: 1px solid #a7f3d0;
    flex-shrink: 0;
}

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

.quick-insights-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #065f46;
}

.quick-insights-title .material-symbols-outlined {
    font-size: 0.9rem;
    color: #059669;
}

.quick-insights-close {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: #059669;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.quick-insights-close:hover {
    background: rgba(5, 150, 105, 0.1);
}

.quick-insights-close .material-symbols-outlined {
    font-size: 1rem;
}

.insight-suggestion {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.375rem;
    transition: all 0.2s ease;
}

.insight-suggestion:last-child {
    margin-bottom: 0;
}

.insight-suggestion:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.insight-suggestion > .material-symbols-outlined {
    font-size: 1.1rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.insight-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.0625rem;
    min-width: 0;
}

.insight-text strong {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.insight-text span {
    font-size: 0.7rem;
    color: #6b7280;
    line-height: 1.2;
}

.insight-add-btn {
    padding: 0.25rem 0.625rem;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.insight-add-btn:hover {
    background: #f3f4f6;
    border-color: var(--primary-color);
}

/* Chat Input */
.chat-input-container {
    padding: 1rem 1.25rem;
    display: flex;
    gap: 0.75rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: 0.625rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s ease;
    background: white;
}

.chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(4, 78, 163, 0.1);
}

.chat-send-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover {
    background: #03569a;
}

.chat-send-btn .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .copilot-floating-window {
        width: 100%;
        right: 0;
        bottom: 0;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .copilot-widget {
        bottom: 1rem;
        right: 1rem;
    }
    
    .copilot-floating-btn {
        width: 56px;
        height: 56px;
    }
    
    .copilot-avatar-img {
        width: 100%;
        height: 100%;
    }
}

/* =========================
   SUPPORT MODULE
   ========================= */
.support-contact-section,
.support-faq-section,
.support-resources-section {
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.support-section-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.support-section-subtitle {
    font-size: 0.9rem;
    font-weight: 300;
    color: #64748b;
    margin-bottom: 2rem;
}

/* Contact Cards */
.support-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.support-contact-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.support-contact-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(4, 78, 163, 0.1);
}

.support-contact-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.support-contact-icon.phone {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.support-contact-icon.chat {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4DA6FC 100%);
}

.support-contact-icon.email {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

.support-contact-icon .material-symbols-outlined {
    color: white;
    font-size: 1.75rem;
}

.support-contact-card h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.support-contact-info {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.support-contact-hours {
    font-size: 0.85rem;
    font-weight: 300;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.btn-support-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-support-contact:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 78, 163, 0.2);
}

.btn-support-contact .material-symbols-outlined {
    font-size: 1.25rem;
}

/* FAQ Section */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #cbd5e1;
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f1f5f9;
}

.faq-icon {
    color: var(--primary-color);
    transition: transform 0.3s ease;
    font-size: 1.5rem;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem;
}

.faq-answer p {
    font-size: 0.9rem;
    font-weight: 300;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* Resources Section */
.support-resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.support-resource-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.support-resource-card:hover {
    border-color: var(--primary-color);
    background: white;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(4, 78, 163, 0.1);
}

.support-resource-card .material-symbols-outlined {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.support-resource-card h4 {
    font-size: 1rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.support-resource-card p {
    font-size: 0.85rem;
    font-weight: 300;
    color: #64748b;
    margin: 0;
}

/* Legacy Support Styles (deprecated) */
.support-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.support-card {
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}
.support-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #e8f2ff, #f5f9ff);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}
.btn-support {
    background: linear-gradient(135deg, var(--primary-color), #4DA6FC);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

/* Integration Status */
.integrations-section {
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.integration-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #eef2f7;
}
.integration-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: #0f172a;
}
.integration-logo {
    font-size: 1.5rem;
}
.integration-status {
    font-size: 0.85rem;
    font-weight: 500;
}
.integration-status.connected {
    color: #16a34a;
}

@media (max-width: 1024px) {
    .support-grid,
    .support-contact-grid,
    .support-resources-grid {
        grid-template-columns: 1fr;
    }
    .integrations-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   SETTINGS MODULE
   ========================= */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.settings-card {
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.settings-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.settings-card-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #e8f2ff, #f5f9ff);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}
.settings-card-icon .material-symbols-outlined {
    font-size: 2rem;
}
.settings-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
}
.settings-card p {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.btn-settings {
    background: linear-gradient(135deg, var(--primary-color), #4DA6FC);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}
.btn-settings:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 78, 163, 0.3);
}

/* AI Employees & Permissions */
.ai-employees-section {
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.ai-employees-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.ai-employee-card {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 1.5rem;
}
.ai-employee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.ai-employee-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.ai-employee-info .material-symbols-outlined {
    font-size: 2rem;
    color: var(--primary-color);
}
.ai-employee-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
}
.ai-employee-info p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}
.ai-employee-mode {
    display: flex;
    gap: 1.5rem;
    padding-left: 3rem;
}
.ai-employee-mode label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #0f172a;
    cursor: pointer;
}
.ai-employee-mode input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.ai-employee-mode input[type="radio"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
.ai-employee-mode label:has(input[type="radio"]:disabled) {
    cursor: not-allowed;
    opacity: 0.5;
}

@media (max-width: 1024px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .ai-employee-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .ai-employee-mode {
        padding-left: 0;
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* =========================
   LEAD QUALIFIER - STAGES CONFIG
   ========================= */
/* Lead Qualifier - Stages Config (Simplified) */
.stages-config-list-simple {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
}

.stage-edit-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
}

.stage-edit-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stage-edit-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    min-width: 65px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stage-edit-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
}

.stage-edit-input:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.stage-edit-input::placeholder {
    color: #9ca3af;
}

@media (max-width: 768px) {
    .stage-config-body {
        flex-direction: column;
        gap: 0.75rem;
        padding-left: 0;
    }
}

/* ===========================
   NOTIFICATIONS TAB STYLES
   =========================== */

/* Notifications Header */
.notifications-header {
    margin-bottom: 1.5rem;
}
.header-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.notifications-header h3 {
    font-size: 1.25rem;
    font-weight: 300;
    color: #0f172a;
    margin: 0;
}
.header-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* Inbox Filters */
.inbox-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dde4ed;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #0f172a;
    background: var(--background-white);
    cursor: pointer;
    transition: all 0.2s;
}
.filter-select:hover {
    border-color: var(--primary-color);
}
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Notification Inbox */
.notification-inbox {
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.inbox-header {
    display: grid;
    grid-template-columns: 140px 180px 1fr 100px 120px 80px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.inbox-body {
    display: flex;
    flex-direction: column;
}

.inbox-row {
    display: grid;
    grid-template-columns: 140px 180px 1fr 100px 120px 80px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s;
    align-items: center;
}
.inbox-row:hover {
    background: #f8fafc;
}
.inbox-row:last-child {
    border-bottom: none;
}

.inbox-column {
    display: flex;
    align-items: center;
}

/* Notification Type */
.notification-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}
.notification-type .material-symbols-outlined {
    font-size: 1.125rem;
}
.notification-type.shift-assigned {
    color: #3b82f6;
}
.notification-type.shift-changed {
    color: #f59e0b;
}
.notification-type.shift-cancelled {
    color: #ef4444;
}
.notification-type.shift-reminder {
    color: #a855f7;
}
.notification-type.shift-emergency {
    color: #dc2626;
}
.notification-type.shift-confirmed {
    color: #10b981;
}

/* Recipient Info */
.recipient-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.recipient-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
}
.recipient-contact {
    font-size: 0.75rem;
    color: #64748b;
}

/* Message Preview */
.message-preview {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.message-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
}
.message-summary {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}

/* Channel Badge */
.channel-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}
.channel-badge .material-symbols-outlined {
    font-size: 0.875rem;
}
.channel-badge.sms {
    background: #e0f2fe;
    color: #0369a1;
}
.channel-badge.email {
    background: #f0fdf4;
    color: #166534;
}
.channel-badge.call {
    background: #fef3c7;
    color: #92400e;
}

/* Status Badge */
.status-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.status-badge.delivered {
    background: #d1fae5;
    color: #065f46;
}
.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}
.status-badge.failed {
    background: #fee2e2;
    color: #991b1b;
}

.retry-btn-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--background-white);
    border: 1px solid #dde4ed;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.retry-btn-small:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
}
.retry-btn-small .material-symbols-outlined {
    font-size: 0.875rem;
    color: var(--primary-color);
}

/* Time Stamp */
.time-stamp {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* Notification Settings Side Panel */
.notification-settings-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setting-item {
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    transition: all 0.2s;
}
.setting-item:hover {
    background: #f1f5f9;
}

.setting-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.setting-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.setting-icon .material-symbols-outlined {
    font-size: 1.25rem;
}

.setting-icon.shift-assigned {
    background: linear-gradient(135deg, #e8f2ff 0%, #f5f9ff 100%);
    color: #3b82f6;
}
.setting-icon.shift-changed {
    background: linear-gradient(135deg, #fff4e6 0%, #fffaf0 100%);
    color: #f59e0b;
}
.setting-icon.shift-cancelled {
    background: linear-gradient(135deg, #fef2f2 0%, #fef7f7 100%);
    color: #ef4444;
}
.setting-icon.shift-reminder {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    color: #a855f7;
}
.setting-icon.shift-emergency {
    background: linear-gradient(135deg, #fef2f2 0%, #fef7f7 100%);
    color: #dc2626;
}
.setting-icon.shift-confirmed {
    background: linear-gradient(135deg, #f0fdf4 0%, #f7fef9 100%);
    color: #10b981;
}

.setting-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
}
.setting-info p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Channel Toggles */
.setting-channels {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.channel-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.toggle-slider {
    position: relative;
    width: 18px;
    height: 18px;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 2px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.channel-toggle input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.channel-toggle input[type="checkbox"]:checked + .toggle-slider::before {
    opacity: 1;
    transform: scale(1);
}

.channel-toggle input[type="checkbox"]:checked + .toggle-slider::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.channel-toggle input[type="checkbox"] {
    display: none;
}

.channel-toggle .material-symbols-outlined {
    font-size: 1rem;
    color: #64748b;
}

.channel-text {
    font-size: 0.85rem;
    color: #0f172a;
    font-weight: 500;
}

.panel-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.panel-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eef2f7;
}

/* ===========================
   LEAD PROFILE SIDE PANEL
   =========================== */

.lead-profile-panel {
    width: 650px;
    max-width: 90vw;
}

.lead-profile-panel .side-panel-body {
    padding: 0;
}

.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-section {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.profile-section:last-child {
    border-bottom: none;
}

.profile-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Contact Grid */
.contact-grid,
.care-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-item,
.care-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-item label,
.care-item label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.contact-item span,
.care-item span {
    font-size: 0.875rem;
    color: #0f172a;
}

/* Stage Badge */
.stage-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

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

.timeline-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: none; /* remove blue left line */
}

.timeline-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
}

.timeline-content p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.timeline-date {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

/* Assessment Form */
.assessment-form {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

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

.form-row.full-width,
.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.form-input {
    padding: 0.625rem;
    border: 1px solid #dde4ed;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #0f172a;
    background: white;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.assessment-actions,
.notes-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* AI Notes */
/* ===== AI NOTES - PURPLE STYLE ===== */

.ai-notes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-note {
    padding: 1.5rem;
    background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
    border: 2px solid #a855f7;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 1px 3px rgba(168, 85, 247, 0.1);
}

.ai-note::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #a855f7, #9333ea, #7c3aed);
    border-radius: 16px 16px 0 0;
}

.ai-note:hover {
    background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
    border-color: #9333ea;
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.2);
    transform: translateY(-2px);
}

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

.ai-note-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-note-title::before {
    content: '🤖';
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(168, 85, 247, 0.2));
}

.ai-note-date {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.ai-note-content {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.7;
}

/* AI Note Items (new style for pipeline) */
.ai-note-item {
    padding: 1rem;
    background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
    border: 1px solid #e9d5ff;
    border-left: 3px solid #a855f7;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.ai-note-item .ai-note-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.ai-note-type {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #a855f7;
    color: white;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ai-note-priority {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ai-note-priority.priority-high {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.ai-note-priority.priority-medium {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.ai-note-priority.priority-low {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.ai-note-item .ai-note-date {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-left: auto;
}

.ai-note-item .ai-note-content {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
}

/* Manual Notes */
.saved-notes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.saved-note {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

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

.note-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.note-category {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
}

.note-badges {
    display: flex;
    gap: 0.375rem;
}

.note-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.note-badge.important {
    background: #fef3c7;
    color: #92400e;
}

.note-badge.follow-up {
    background: #f3e8ff;
    color: #7c3aed;
}

.note-content {
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #94a3b8;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #475569;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ===== RECEPTIONIST INBOX STYLES ===== */
.receptionist-inbox-wrapper {
    background: var(--background-white);
    border: 1px solid #eef2f7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.receptionist-inbox-list {
    display: flex;
    flex-direction: column;
}

.receptionist-inbox-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.15s ease;
    min-height: auto;
}

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

.receptionist-inbox-row:hover {
    background-color: #f9fafb;
}

.receptionist-inbox-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.receptionist-inbox-icon.call {
    color: var(--primary-color);
}

.receptionist-inbox-icon.email {
    color: #d97706;
}

.receptionist-inbox-icon .material-symbols-outlined {
    font-size: 20px;
}

.receptionist-inbox-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.receptionist-inbox-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.receptionist-inbox-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.receptionist-inbox-contact {
    font-size: 0.85rem;
    color: #9ca3af;
    white-space: nowrap;
}

.receptionist-inbox-separator {
    font-size: 0.8rem;
    color: #d1d5db;
}

.receptionist-inbox-duration {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.receptionist-inbox-handler {
    display: inline-block;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.receptionist-inbox-handler.ai-managed {
    color: #0284c7;
}

.receptionist-inbox-handler.transferred {
    color: #9ca3af;
}

.receptionist-inbox-summary {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #6b7280;
    /* NO text truncation - show full text */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.receptionist-inbox-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
    min-width: 120px;
}

.receptionist-inbox-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
    white-space: nowrap;
}

.receptionist-inbox-status.ongoing {
    background: #fef3c7;
    color: #d97706;
}

.receptionist-inbox-status.routed {
    background: #e0f2fe;
    color: #0284c7;
}

.receptionist-inbox-status.resolved {
    background: #d1fae5;
    color: #059669;
}

.receptionist-inbox-time {
    font-size: 0.8rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .receptionist-inbox-row {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .receptionist-inbox-header {
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    
    .receptionist-inbox-meta {
        align-items: flex-start;
        flex-direction: row;
        justify-content: space-between;
        min-width: auto;
        width: 100%;
    }
}

/* ===== HOME DASHBOARD STYLES ===== */

/* Home Header */
.home-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.home-header-content {
    flex: 1;
}

.home-header .tab-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.home-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

.home-header-meta {
    text-align: right;
}

.home-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.home-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

/* Home Sections */
.home-section {
    margin-bottom: 2rem;
}

.home-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* AI Status Cards */
.ai-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.ai-status-card {
    background: white;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ai-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #4DA6FC);
}

.ai-status-card.receptionist-card::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.ai-status-card.lead-qualifier-card::before {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.ai-status-card.scheduler-card::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.ai-status-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.ai-status-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.ai-status-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.ai-status-avatar.receptionist {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.ai-status-avatar.lead-qualifier {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.ai-status-avatar.scheduler {
    background: linear-gradient(135deg, #10b981, #059669);
}

.ai-status-info {
    flex: 1;
}

.ai-status-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.ai-status-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.ai-status-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ai-status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.ai-status-badge.active i {
    font-size: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

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

.ai-status-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.ai-stat {
    text-align: center;
}

.ai-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.ai-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Two Column Layout */
.home-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Priority Alerts */
.priority-alerts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    border-left: 3px solid;
    transition: all 0.2s ease;
}

.alert-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.alert-item.alert-high {
    border-left-color: #ef4444;
}

.alert-item.alert-medium {
    border-left-color: #f59e0b;
}

.alert-item.alert-low {
    border-left-color: #10b981;
}

.alert-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.alert-high .alert-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.alert-medium .alert-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.alert-low .alert-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.alert-content {
    flex: 1;
}

.alert-message {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

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

.alert-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.alert-action:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Quick Stats */
.quick-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quick-stat {
    background: white;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    padding: 1.25rem;
}

.quick-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.quick-stat-bar {
    width: 100%;
    height: 10px;
    background: #f1f5f9;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.quick-stat-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #4DA6FC);
    border-radius: 5px;
    transition: width 0.6s ease;
}

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

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.quick-action-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 78, 163, 0.2);
}

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

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

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: #f9fafb;
}

.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.activity-avatar.receptionist {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.activity-avatar.lead-qualifier {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.activity-avatar.scheduler {
    background: linear-gradient(135deg, #10b981, #059669);
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .ai-status-grid {
        grid-template-columns: 1fr;
    }
    
    .home-two-column {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .home-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .home-header-meta {
        text-align: left;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-status-stats {
        grid-template-columns: 1fr;
    }
}
/* ====================================
   HOME TAB - REDESIGNED (THIN & MODERN)
   ==================================== */

/* AI Employees Cards - Nuevo diseño */
.ai-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.ai-status-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.ai-status-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.ai-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ai-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-card-avatar .material-symbols-outlined {
    font-size: 24px;
    color: white;
}

.ai-card-info {
    flex: 1;
}

.ai-card-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 2px 0;
}

.ai-card-info p {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
    margin: 0;
}

.ai-card-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-card-status .material-symbols-outlined {
    font-size: 8px;
}

.ai-card-stats {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.ai-card-stat {
    text-align: center;
    flex: 1;
    min-width: 0; /* Evita overflow en flex items */
}

.ai-card-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 4px;
}

.ai-card-stat-label {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-card-disclaimer {
    text-align: center;
    font-size: 10px;
    color: #94a3b8;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #e2e8f0;
}

/* Recent Activities - Estilo tipo Inbox */
.recent-activities-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

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

.activity-item:hover {
    background: #f9fafb;
}

.activity-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-avatar .material-symbols-outlined {
    font-size: 18px;
    color: white;
}

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

.activity-main {
    font-size: 13px;
    color: #0f172a;
    margin-bottom: 4px;
}

.activity-agent {
    font-weight: 600;
}

.activity-action {
    font-weight: 400;
}

.activity-contact {
    font-weight: 500;
    color: #3b82f6;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 11px;
    color: #64748b;
}

.activity-time {
    font-weight: 400;
}

.activity-type {
    display: flex;
    align-items: center;
    gap: 4px;
}

.activity-status {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-status.status-resolved {
    background: #ecfdf5;
    color: #059669;
}

.activity-status.status-ongoing {
    background: #fef3c7;
    color: #d97706;
}

.activity-status.status-routed {
    background: #dbeafe;
    color: #2563eb;
}

.activity-status.status-qualified {
    background: #f3e8ff;
    color: #7c3aed;
}

.activity-status.status-scheduled {
    background: #e0e7ff;
    color: #4f46e5;
}

.activity-status.status-pending {
    background: #f1f5f9;
    color: #475569;
}

/* Empty state */
.empty-state {
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 400;
}

/* Home section title - usar material icons */
.home-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-section-title .material-symbols-outlined {
    font-size: 20px;
    color: #64748b;
}

/* ==========================================
   AUTO GENERATE SIDE PANEL STYLES
   ========================================== */

/* Panel title with icon */
.panel-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel-title-icon {
    font-size: 22px;
    color: var(--primary-color);
}

.panel-description {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

/* Auto Generate Panel specific */
.auto-generate-panel-content {
    width: 480px;
}

.auto-generate-step .form-section {
    margin-bottom: 1.5rem;
}

.auto-generate-step .section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Radio Options */
.week-selector {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: var(--primary-color);
    font-weight: 500;
}

.radio-label {
    font-size: 0.875rem;
    color: #374151;
    flex: 1;
}

.week-dates {
    font-size: 0.75rem;
    color: #64748b;
    background: #e5e7eb;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Form Inputs for Auto Generate */
#autoGeneratePanel .form-input,
#autoGeneratePanel .form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #374151;
    background: #ffffff;
    transition: all 0.2s ease;
}

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

#autoGeneratePanel .form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

/* Checkbox Options */
.checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.875rem;
    color: #374151;
}

/* Preview Stats Bar */
.preview-stats-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
}

.stat-pill .material-symbols-outlined {
    font-size: 16px;
    color: var(--primary-color);
}

/* Success Message */
.preview-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    color: #059669;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.preview-success .material-symbols-outlined {
    font-size: 18px;
}

/* Conflicts */
.preview-conflicts {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.conflict-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #dc2626;
    margin-bottom: 0.5rem;
}

.conflict-header .material-symbols-outlined {
    font-size: 18px;
}

.conflict-list {
    margin: 0;
    padding-left: 1.5rem;
    font-size: 0.8125rem;
    color: #7f1d1d;
}

.conflict-list li {
    margin-bottom: 0.25rem;
}

/* Assignments Section */
.assignments-section {
    margin-top: 0.5rem;
}

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

.assignment-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.assignment-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.assignment-client {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #0f172a;
}

.assignment-shifts-count {
    font-size: 0.75rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.assignment-caregiver {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #475569;
    margin-bottom: 0.5rem;
}

.assignment-caregiver .material-symbols-outlined {
    font-size: 16px;
    color: var(--primary-color);
}

.assignment-days {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.assignment-day-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 4px;
    font-weight: 500;
}

/* Assignment warnings */
.assignment-card.has-warnings {
    border-color: #fcd34d;
    background: #fffbeb;
}

.assignment-warnings {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.375rem;
    margin-top: 0.75rem;
    padding-top: 0.625rem;
    border-top: 1px dashed #fcd34d;
}

.assignment-warnings .warning-icon {
    font-size: 1rem;
    color: #d97706;
    flex-shrink: 0;
}

.assignment-warnings .warning-text {
    font-size: 0.75rem;
    color: #92400e;
    background: #fef3c7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

/* Auto Generate Panel Buttons */
#autoGeneratePanel .side-panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

#autoGeneratePanel .btn-secondary {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#autoGeneratePanel .btn-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

#autoGeneratePanel .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--primary-color);
    border: none;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#autoGeneratePanel .btn-primary:hover {
    background: #1d4ed8;
}

#autoGeneratePanel .btn-primary .material-symbols-outlined {
    font-size: 18px;
}

#autoGeneratePanel .btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Schedule header right with button */
.schedule-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Auto Generate Button - AI Magic Style */
#btnAutoGenerate {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(139, 92, 246, 0.35),
        0 2px 4px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

#btnAutoGenerate:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(139, 92, 246, 0.5),
        0 4px 10px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 50%, #7c3aed 100%);
}

#btnAutoGenerate:hover::before {
    left: 100%;
}

#btnAutoGenerate:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#btnAutoGenerate .material-symbols-outlined {
    font-size: 18px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1) rotate(10deg);
    }
}

/* ==========================================
   AI RECAP BUTTON & RESPONSE BUBBLE
   ========================================== */

.inbox-header-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.inbox-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.recap-button-container {
    position: relative;
}

/* AI Recap Button - Similar to Auto Generate */
.btn-ai-recap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(139, 92, 246, 0.35),
        0 2px 4px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn-ai-recap:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(139, 92, 246, 0.45),
        0 4px 10px rgba(139, 92, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 50%, #7c3aed 100%);
}

.btn-ai-recap:hover::before {
    left: 100%;
}

.btn-ai-recap .recap-icon {
    font-size: 18px;
    animation: sparkle 2s ease-in-out infinite;
}

/* Loading state */
.btn-ai-recap.loading {
    pointer-events: none;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

.btn-ai-recap.loading .recap-text,
.btn-ai-recap.loading .recap-icon {
    display: none;
}

.btn-ai-recap.loading .recap-loading {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
}

/* Loading dots animation */
.loading-dots {
    display: inline-flex;
    gap: 3px;
}

.loading-dots span {
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    animation: loadingBounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Response Card - Clean Design */
.recap-response-card {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 400px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    overflow: hidden;
    animation: cardSlideIn 0.3s ease-out;
}

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

.recap-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.recap-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.recap-title-badge .material-symbols-outlined {
    font-size: 14px;
}

.recap-card-close {
    background: none;
    border: none;
    padding: 0.375rem;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.recap-card-close:hover {
    background: #f1f5f9;
    color: #475569;
}

.recap-card-close .material-symbols-outlined {
    font-size: 20px;
}

.recap-card-content {
    padding: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #374151;
    max-height: 350px;
    overflow-y: auto;
}

.recap-card-content p {
    margin: 0 0 0.875rem 0;
}

.recap-card-content p:last-child {
    margin-bottom: 0;
}

.recap-card-content ul {
    margin: 0.625rem 0;
    padding-left: 1.25rem;
}

.recap-card-content li {
    margin-bottom: 0.5rem;
}

.recap-card-content strong {
    color: #7c3aed;
    font-weight: 600;
}

.recap-card-content .highlight {
    color: #7c3aed;
    font-weight: 600;
}

.recap-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

.recap-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.recap-action-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.recap-action-btn .material-symbols-outlined {
    font-size: 16px;
}

.recap-action-btn.copied {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #059669;
}

/* Error state */
.recap-card-content.error {
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recap-card-content.error .material-symbols-outlined {
    font-size: 20px;
}

/* ==========================================
   AI DAILY BRIEFING (Pipeline)
   ========================================== */

.pipeline-header-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0 0.75rem; /* Same padding as kanban-board */
}

.pipeline-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Add Lead Button */
.btn-add-lead {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 
        0 4px 15px rgba(59, 130, 246, 0.35),
        0 2px 5px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-add-lead:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(59, 130, 246, 0.45),
        0 4px 10px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
}

.btn-add-lead .material-symbols-outlined {
    font-size: 18px;
}

/* Create Lead Panel specific styles */
.create-lead-panel {
    width: 480px;
}

.create-lead-panel .form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.create-lead-panel .form-section:last-of-type {
    border-bottom: none;
}

.create-lead-panel .form-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.create-lead-panel .form-section h4 .material-symbols-outlined {
    font-size: 20px;
    color: #044EA3;
}

/* Create Lead Panel buttons - using brand blue */
.create-lead-panel .side-panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
}

.create-lead-panel .side-panel-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #044EA3;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.create-lead-panel .side-panel-actions .btn-primary:hover {
    background: #033a7a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(4, 78, 163, 0.25);
}

.create-lead-panel .side-panel-actions .btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.create-lead-panel .side-panel-actions .btn-primary .material-symbols-outlined {
    font-size: 18px;
}

.create-lead-panel .side-panel-actions .btn-secondary {
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: #64748b;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.create-lead-panel .side-panel-actions .btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* AI Contact Disclaimer in Create Lead form */
.ai-contact-disclaimer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
    border: 1px solid #c4b5fd;
    border-radius: 8px;
    color: #6d28d9;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 0.75rem;
}

.ai-contact-disclaimer .material-symbols-outlined {
    font-size: 18px;
    color: #7c3aed;
}

/* Budget input group */
.budget-input-group {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.budget-input-group .budget-currency {
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    color: #64748b;
    font-weight: 500;
    border-right: 1px solid #d1d5db;
}

.budget-input-group input {
    flex: 1;
    border: none;
    padding: 0.5rem;
    min-width: 60px;
}

.budget-input-group input:focus {
    outline: none;
}

.budget-input-group .budget-period-select {
    border: none;
    border-left: 1px solid #d1d5db;
    border-radius: 0;
    padding: 0.5rem;
    background: #f3f4f6;
    min-width: 80px;
}

.ai-briefing-container {
    position: relative;
}

/* AI Briefing Button - Same style as AI Recap */
.btn-ai-briefing {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(139, 92, 246, 0.35),
        0 2px 4px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn-ai-briefing:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(139, 92, 246, 0.45),
        0 4px 10px rgba(139, 92, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 50%, #7c3aed 100%);
}

.btn-ai-briefing:hover::before {
    left: 100%;
}

.btn-ai-briefing .briefing-icon {
    font-size: 18px;
    animation: sparkle 2s ease-in-out infinite;
}

/* Loading state */
.btn-ai-briefing.loading {
    pointer-events: none;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

.btn-ai-briefing.loading .briefing-text,
.btn-ai-briefing.loading .briefing-icon {
    display: none;
}

.btn-ai-briefing.loading .briefing-loading {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
}

/* Briefing Response Card - Same as Recap */
.briefing-response-card {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 420px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    overflow: hidden;
    animation: cardSlideIn 0.3s ease-out;
}

.briefing-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.briefing-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.briefing-title-badge .material-symbols-outlined {
    font-size: 14px;
}

.briefing-card-close {
    background: none;
    border: none;
    padding: 0.375rem;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.briefing-card-close:hover {
    background: #f1f5f9;
    color: #475569;
}

.briefing-card-close .material-symbols-outlined {
    font-size: 20px;
}

.briefing-card-content {
    padding: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #374151;
    max-height: 400px;
    overflow-y: auto;
}

.briefing-card-content p {
    margin: 0 0 0.875rem 0;
}

.briefing-card-content p:last-child {
    margin-bottom: 0;
}

.briefing-card-content ul {
    margin: 0.625rem 0;
    padding-left: 1.25rem;
}

.briefing-card-content li {
    margin-bottom: 0.5rem;
}

.briefing-card-content strong {
    color: #7c3aed;
    font-weight: 600;
}

.briefing-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

.briefing-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.briefing-action-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.briefing-action-btn .material-symbols-outlined {
    font-size: 16px;
}

.briefing-action-btn.copied {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #059669;
}

/* Error state */
.briefing-card-content.error {
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
