@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;800&display=swap');

:root {
    --deep-navy: #0D1A63;
    --royal-blue: #1A2CA3;
    --vibrant-blue: #2845D6;
    --accent-orange: #F68048;
    --bg-light: #f4f7fe;
    --card-white: #ffffff;
    --text-primary: #0B1B3A;
    --text-secondary: #4a5568;
    --border-light: #e0e7ff;
    --success: #10b981;
    --warning: #f59e0b;
    --shadow-sm: 0 4px 12px rgba(13, 26, 99, 0.05);
    --shadow-md: 0 10px 25px rgba(13, 26, 99, 0.08);
    --shadow-lg: 0 20px 40px rgba(13, 26, 99, 0.12);
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-light);
    color: var(--text-primary);
    overflow: hidden;
}

h1, h2, h3, .logo-text { font-family: 'Outfit', sans-serif; }

/* ========== ELITE TOP NAVIGATION ========== */
.top-nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0; z-index: 1000;
    padding: 0 2rem;
    height: 60px;
}

.nav-container {
    max-width: 1600px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    height: 100%;
}

.logo-area { display: flex; align-items: center; gap: 15px; }

.logo-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--vibrant-blue), var(--royal-blue));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 800; font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(40, 69, 214, 0.3);
}

.logo-text {
    font-weight: 800; font-size: 1.6rem;
    background: linear-gradient(to right, var(--deep-navy), var(--vibrant-blue));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.nav-right { display: flex; align-items: center; gap: 2rem; }

.avatar {
    width: 45px; height: 45px;
    background: linear-gradient(135deg, var(--accent-orange), #ff9a6e);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 12px rgba(246, 128, 72, 0.3);
    transition: transform 0.2s;
}
.avatar:hover { transform: scale(1.05); }

/* ========== APP LAYOUT ========== */
.app-layout { display: flex; height: calc(100vh - 60px); }

/* Lead Detail Styles */
.lead-profile-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(to right, #ffffff, #fcfdfe);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--deep-navy);
    margin-bottom: 0.5rem;
}

.profile-meta {
    display: flex;
    gap: 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.tabs {
    padding: 0 2rem;
    display: flex;
    gap: 1.5rem;
    background: #fcfdfe;
    border-bottom: 1px solid var(--border-light);
}

.tab {
    padding: 1rem 0;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.side-nav {
    width: 280px;
    background: var(--card-white);
    border-right: 1px solid var(--border-light);
    display: flex; flex-direction: column;
    padding: 2rem 1rem; gap: 0.8rem;
}

.nav-item {
    padding: 1rem 1.5rem;
    border-radius: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    display: flex; align-items: center; gap: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.nav-item i { font-size: 1.2rem; transition: transform 0.3s; }

.nav-item:hover {
    background: #f0f4ff;
    color: var(--vibrant-blue);
}
.nav-item:hover i { transform: translateX(3px); }

.nav-item.active {
    background: linear-gradient(to right, var(--vibrant-blue), var(--royal-blue));
    color: white;
    box-shadow: 0 8px 20px rgba(40, 69, 214, 0.2);
}

/* ========== WORKSPACE ========== */
.main-content-area {
    flex: 1; overflow-y: auto;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f4f7fe 0%, #ffffff 100%);
}

.module-view { 
    display: none; 
    animation: fadeIn 0.4s ease-out;
}
.module-view.active { display: block; }

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

/* ========== KPI CARDS ========== */
.kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem; margin-bottom: 1.5rem;
}

.kpi-card {
    background: var(--card-white);
    border-radius: 20px; padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
    position: relative; overflow: hidden;
}

.kpi-card::after {
    content: ''; position: absolute; top: 0; right: 0;
    width: 100px; height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(40, 69, 214, 0.03) 100%);
}

.kpi-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--vibrant-blue);
}

.kpi-title {
    font-size: 0.9rem; text-transform: uppercase;
    color: var(--text-secondary); font-weight: 700;
    letter-spacing: 1px; margin-bottom: 1rem;
}

.kpi-value {
    font-size: 2.2rem; font-weight: 800;
    color: var(--deep-navy); font-family: 'Outfit', sans-serif;
}

/* ========== TABLES & CARDS ========== */
.card {
    background: var(--card-white);
    border-radius: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

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

.card-header h3 { font-size: 1.1rem; font-weight: 800; color: var(--deep-navy); }

/* Kanban Task Card Padding Fix */
.task-container-card {
    padding: 1.5rem !important;
    position: relative;
}

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    background: #f8fafc; padding: 1.2rem 1.5rem;
    text-align: left; font-size: 0.85rem; font-weight: 700;
    color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: 0.5px; border-bottom: 2px solid var(--border-light);
}

.data-table td {
    padding: 1.2rem 1.5rem; border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem; vertical-align: middle;
}

.data-table tr:hover { background: #fbfcfe; }

/* ========== BUTTONS & INPUTS ========== */
.btn {
    padding: 0.8rem 1.8rem; border-radius: 14px;
    font-weight: 700; font-size: 0.95rem; cursor: pointer;
    border: none; transition: all 0.3s;
    display: inline-flex; align-items: center; gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--vibrant-blue), var(--royal-blue));
    color: white; box-shadow: 0 4px 15px rgba(40, 69, 214, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(40, 69, 214, 0.4); }

.btn-orange {
    background: linear-gradient(135deg, var(--accent-orange), #ff9a6e);
    color: white; box-shadow: 0 4px 15px rgba(246, 128, 72, 0.3);
}

.form-input {
    width: 100%; padding: 1rem 1.2rem;
    border-radius: 14px; border: 2px solid var(--border-light);
    background: #f8fafc; font-size: 1rem; transition: all 0.3s;
}
.form-input:focus {
    outline: none; border-color: var(--vibrant-blue);
    background: white; box-shadow: 0 0 0 4px rgba(40, 69, 214, 0.1);
}

.content-body {
    padding: 2.5rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Timeline Custom */
.timeline { 
    position: relative; 
    padding: 1rem 1rem 1rem 2.5rem; 
}
.timeline::before {
    content: ''; position: absolute; left: 10px; top: 0; bottom: 0;
    width: 2px; background: var(--border-light);
}

.timeline-item { margin-bottom: 2rem; padding-left: 40px; position: relative; }
.timeline-item::after {
    content: ''; position: absolute; left: 1px; top: 5px;
    width: 20px; height: 20px; background: white;
    border: 4px solid var(--vibrant-blue); border-radius: 50%;
}

.timeline-content {
    background: #f8faff; border: 1px solid var(--border-light);
    padding: 1.5rem; border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

/* Badge Elite */
.badge {
    padding: 6px 14px; border-radius: 30px;
    font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-blue { background: #e0f2fe; color: #0369a1; }
.badge-orange { background: #ffedd5; color: #9a3412; }
