/* ==========================================================================
   VYALA CRM - PREMIUM DESIGN SYSTEM & STYLESHEET
   Inspired by Zoho CRM & Salesforce Lightning
   ========================================================================== */

:root {
    /* Color Palette */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;

    --bg-app: #f8fafc;
    --bg-card: #ffffff;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Call Status Colors */
    --status-interested-bg: #dcfce7;
    --status-interested-text: #15803d;
    --status-interested-border: #86efac;

    --status-callback-bg: #fef3c7;
    --status-callback-text: #b45309;
    --status-callback-border: #fde047;

    --status-busy-bg: #ffedd5;
    --status-busy-text: #c2410c;
    --status-busy-border: #fdba74;

    --status-switched-off-bg: #f1f5f9;
    --status-switched-off-text: #475569;
    --status-switched-off-border: #cbd5e1;

    --status-no-answer-bg: #e0f2fe;
    --status-no-answer-text: #0369a1;
    --status-no-answer-border: #7dd3fc;

    --status-not-interested-bg: #fee2e2;
    --status-not-interested-text: #b91c1c;
    --status-not-interested-border: #fca5a5;

    --status-wrong-number-bg: #ffe4e6;
    --status-wrong-number-text: #be123c;
    --status-wrong-number-border: #fda4af;

    --status-meeting-bg: #f3e8ff;
    --status-meeting-text: #6b21a8;
    --status-meeting-border: #d8b4fe;

    /* Status Priority */
    --priority-high: #ef4444;
    --priority-med: #f59e0b;
    --priority-low: #10b981;

    /* Shadows & Radii */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.15);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 0.925rem;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

.hidden {
    display: none !important;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary) !important; }
.text-success { color: #16a34a !important; }
.text-danger { color: #dc2626 !important; }
.text-warning { color: #d97706 !important; }
.text-purple { color: #9333ea !important; }
.text-indigo { color: #4f46e5 !important; }

.bold { font-weight: 700; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }
.p-0 { padding: 0 !important; }
.flex-1 { flex: 1; }

/* APP LAYOUT */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* SIDEBAR */
.app-sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition);
    z-index: 40;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.brand-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

.brand-tagline {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
}

.sidebar-nav {
    padding: 1.25rem 0.75rem;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #475569;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
    display: block;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0.85rem;
    color: var(--sidebar-text);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    background-color: var(--sidebar-hover);
    color: #ffffff;
}

.nav-item.active {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-icon {
    font-size: 1.1rem;
    width: 24px;
    margin-right: 0.75rem;
}

.nav-badge {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.nav-badge.alert-badge {
    background: #ef4444;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.agent-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
}

.agent-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3b82f6;
}

.agent-name {
    display: block;
    font-weight: 600;
    color: white;
    font-size: 0.85rem;
}

.agent-role {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
}

.agent-role i { font-size: 0.5rem; margin-right: 4px; }

/* MAIN CONTENT CONTAINER */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100vh;
}

/* TOP HEADER */
.app-header {
    height: 70px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    z-index: 30;
}

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

.sidebar-toggle {
    display: none;
    font-size: 1.2rem;
}

.view-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.view-subtitle {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.header-center {
    flex: 1;
    max-width: 480px;
    margin: 0 1.5rem;
}

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

.global-search-bar .search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.global-search-bar input {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.4rem;
    background-color: var(--bg-app);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    outline: none;
    transition: var(--transition);
    font-size: 0.85rem;
}

.global-search-bar input:focus {
    background-color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-shortcut {
    position: absolute;
    right: 10px;
    font-size: 0.68rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 5px;
    color: var(--text-muted);
}

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

.notification-wrapper {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background-color: white;
    border-color: var(--border);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: var(--bg-app);
    border-color: var(--text-light);
}

.btn-success {
    background-color: #16a34a;
    color: white;
}
.btn-success:hover {
    background-color: #15803d;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.3);
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: none;
}
.btn-whatsapp:hover {
    background-color: #128C7E;
    color: white;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--primary);
}
.btn-ghost:hover {
    background: var(--primary-light);
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid #fca5a5;
    color: #dc2626;
}
.btn-danger-outline:hover {
    background: #fee2e2;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: white;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.btn-icon:hover {
    background: var(--bg-app);
    color: var(--text-main);
}

/* APP CONTENT VIEW PANELS */
.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.75rem;
    position: relative;
}

.view-panel {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.25s ease-in-out;
}

.view-panel.active {
    display: flex;
}

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

/* KPI GRID */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.bg-blue { background: #dbeafe; color: #2563eb; }
.bg-warning { background: #fef3c7; color: #d97706; }
.bg-success { background: #dcfce7; color: #16a34a; }
.bg-purple { background: #f3e8ff; color: #9333ea; }
.bg-emerald { background: #ccfbf1; color: #0d9488; }

.kpi-data {
    flex: 1;
    overflow: hidden;
}

.kpi-label {
    display: block;
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kpi-value-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.2rem;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.kpi-trend {
    font-size: 0.75rem;
    font-weight: 700;
}

.trend-up { color: #16a34a; }
.trend-down { color: #dc2626; }

.kpi-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.kpi-badge.alert { background: #fee2e2; color: #dc2626; }

.kpi-subtext {
    font-size: 0.72rem;
    color: var(--text-light);
}

/* CARDS & GRID LAYOUTS */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.card-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.card-body {
    padding: 1.5rem;
}

.dashboard-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.dashboard-grid-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

/* TODAY'S FOLLOWUP PANEL */
.followup-list {
    display: flex;
    flex-direction: column;
    divide-y: 1px solid var(--border-light);
    max-height: 380px;
    overflow-y: auto;
}

.followup-item {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-light);
}

.followup-item:hover {
    background-color: #f8fafc;
}

.followup-lead-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.lead-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--text-main);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.lead-name-text {
    font-weight: 700;
    color: var(--text-main);
    display: block;
}

.lead-company-text {
    font-size: 0.78rem;
    color: var(--text-muted);
}

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

.followup-time {
    font-size: 0.8rem;
    font-weight: 600;
    color: #d97706;
    display: flex;
    align-items: center;
    gap: 4px;
}

.followup-time.overdue {
    color: #dc2626;
}

/* ACTIVITY TIMELINE FEED */
.activity-timeline {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-height: 380px;
    overflow-y: auto;
}

.timeline-feed-item {
    display: flex;
    gap: 0.85rem;
    position: relative;
}

.timeline-feed-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.timeline-feed-content {
    flex: 1;
    background: var(--bg-app);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.timeline-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.timeline-feed-title {
    font-size: 0.85rem;
    font-weight: 700;
}

.timeline-feed-time {
    font-size: 0.72rem;
    color: var(--text-light);
}

.timeline-feed-remarks {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* LEADS TOOLBAR & FILTERS */
.view-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: var(--bg-card);
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    flex: 1;
}

.search-box {
    position: relative;
    min-width: 240px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 0.5rem 0.85rem 0.5rem 2.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    font-size: 0.85rem;
}
.search-box input:focus {
    border-color: var(--primary);
}

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

.form-select {
    padding: 0.5rem 2rem 0.5rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: white;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 1rem;
}
.form-select:focus {
    border-color: var(--primary);
}
.form-select-sm {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    font-size: 0.78rem;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.view-switcher-toggle {
    display: flex;
    background: var(--bg-app);
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.btn-toggle {
    border: none;
    background: transparent;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-toggle.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-xs);
}

/* DATA TABLE */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

.data-table th {
    background: #f8fafc;
    padding: 0.85rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
}

/* CALL STATUS BADGES */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
}

.status-interested {
    background-color: var(--status-interested-bg);
    color: var(--status-interested-text);
    border-color: var(--status-interested-border);
}

.status-callback {
    background-color: var(--status-callback-bg);
    color: var(--status-callback-text);
    border-color: var(--status-callback-border);
}

.status-busy {
    background-color: var(--status-busy-bg);
    color: var(--status-busy-text);
    border-color: var(--status-busy-border);
}

.status-switched-off {
    background-color: var(--status-switched-off-bg);
    color: var(--status-switched-off-text);
    border-color: var(--status-switched-off-border);
}

.status-no-answer {
    background-color: var(--status-no-answer-bg);
    color: var(--status-no-answer-text);
    border-color: var(--status-no-answer-border);
}

.status-not-interested {
    background-color: var(--status-not-interested-bg);
    color: var(--status-not-interested-text);
    border-color: var(--status-not-interested-border);
}

.status-wrong-number {
    background-color: var(--status-wrong-number-bg);
    color: var(--status-wrong-number-text);
    border-color: var(--status-wrong-number-border);
}

.status-meeting {
    background-color: var(--status-meeting-bg);
    color: var(--status-meeting-text);
    border-color: var(--status-meeting-border);
}

/* LEAD STAGE BADGE */
.stage-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    background: #e2e8f0;
    color: #334155;
}
.stage-new { background: #e0f2fe; color: #0284c7; }
.stage-contacted { background: #fef3c7; color: #b45309; }
.stage-qualified { background: #dcfce7; color: #15803d; }
.stage-proposal { background: #f3e8ff; color: #7e22ce; }
.stage-won { background: #bbf7d0; color: #166534; font-weight: 700; }
.stage-lost { background: #fee2e2; color: #991b1b; }

/* KANBAN BOARD */
.kanban-board-wrapper {
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-columns-grid {
    display: flex;
    gap: 1.25rem;
    min-width: 1200px;
}

.kanban-column {
    flex: 1;
    background: #f1f5f9;
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #cbd5e1;
}

.kanban-column-title {
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kanban-count {
    background: white;
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 10px;
}

.kanban-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    overflow-y: auto;
    flex: 1;
    padding-right: 2px;
}

.kanban-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    transition: var(--transition);
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kanban-card-title {
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 0.25rem;
}

.kanban-card-company {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    border-top: 1px dashed var(--border-light);
    padding-top: 0.6rem;
    margin-top: 0.6rem;
}

/* FOLLOW-UPS SCHEDULE TABS */
.followup-header-bar {
    background: white;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.tabs-navigation {
    display: flex;
    gap: 0.75rem;
}

.tab-btn {
    padding: 0.55rem 1.1rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--primary-light);
    color: var(--primary);
}

.tab-count-badge {
    background: rgba(0, 0, 0, 0.08);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.72rem;
}
.tab-count-badge.danger {
    background: #fee2e2;
    color: #dc2626;
}

.followup-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.followup-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.followup-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* MODALS */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.modal-body {
    padding: 1.5rem;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* FORMS */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
}
.form-label.required::after {
    content: " *";
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    font-size: 0.85rem;
    transition: var(--transition);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.lead-call-summary-box {
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* SLIDE-OVER DRAWER */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    z-index: 90;
    display: flex;
    justify-content: flex-end;
}

.drawer-panel {
    width: 100%;
    max-width: 520px;
    height: 100%;
    background: white;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    animation: slideLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.drawer-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-title {
    font-size: 1.2rem;
    font-weight: 800;
}

.drawer-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.lead-profile-card {
    background: var(--bg-app);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.profile-header-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-chips {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.35rem;
    flex-wrap: wrap;
}

.chip {
    font-size: 0.75rem;
    background: white;
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-muted);
}

.profile-quick-actions {
    display: flex;
    gap: 0.75rem;
}

.call-summary-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f1f5f9;
    border-radius: var(--radius-md);
    padding: 0.75rem;
    gap: 0.5rem;
}

.strip-item {
    display: flex;
    flex-direction: column;
}

.strip-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
}

.strip-val {
    font-size: 0.8rem;
    margin-top: 2px;
}

.drawer-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
}

.drawer-tab-btn {
    padding: 0.65rem 1rem;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.drawer-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

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

/* TIMELINE STYLES */
.timeline-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    padding-left: 1.25rem;
}

.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    padding-left: 1.25rem;
}

.timeline-dot {
    position: absolute;
    left: -25px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
}

.timeline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

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

.timeline-remarks {
    font-size: 0.825rem;
    color: var(--text-main);
    margin-top: 0.35rem;
    line-height: 1.4;
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--sidebar-bg);
    color: white;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 280px;
}

.toast-success { border-left: 4px solid #16a34a; }
.toast-info { border-left: 4px solid #2563eb; }
.toast-warning { border-left: 4px solid #f59e0b; }

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

/* MEDIA QUERIES FOR RESPONSIVENESS */
@media (max-width: 1024px) {
    .dashboard-grid-2col, .dashboard-grid-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
    }
    .app-sidebar.active {
        left: 0;
    }
    .sidebar-toggle {
        display: flex;
    }
    .header-center {
        display: none;
    }
}
