:root {
    --primary-blue: #2596be;
    --primary-blue-hover: #1e7ba0;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8fafc;
    color: var(--text-dark);
    line-height: 1.5;
    /* Soft white/blue animated background gradient */
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

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

/* Base Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
    flex-direction: row;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: transform 0.3s ease;
}

/* Hide sidebar on desktop by default */
@media (min-width: 769px) {
    .sidebar {
        display: none;
    }
}

.brand {
    padding: 0 24px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-blue);
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 4px 12px;
}

.nav-link:hover, .nav-link.active {
    background: rgba(37, 150, 190, 0.1);
    color: var(--primary-blue);
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 16px 24px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: rgba(37, 150, 190, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-weight: 600;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 24px;
    padding: 24px;
}

/* Typography elements */
.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-dark);
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 150, 190, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-blue);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.btn:hover {
    background: var(--primary-blue-hover);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(226, 232, 240, 0.8);
    color: var(--text-dark);
}

.btn-outline:hover {
    background: rgba(241, 245, 249, 0.8);
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-open { background: rgba(37, 150, 190, 0.1); color: var(--primary-blue); }
.badge-won { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.badge-lost { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

th {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    background: rgba(248, 250, 252, 0.4);
}

td {
    color: var(--text-dark);
    font-size: 14px;
}

/* Stepper for Lead Details */
.stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 20px;
}

.stepper::before {
    
    position: absolute;
    top: 16px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: rgba(226, 232, 240, 0.8);
    z-index: 1;
}

.step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid rgba(226, 232, 240, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
    transition: all 0.3s;
}

.step.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 150, 190, 0.2);
}

/* Grid Layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* Floating aesthetic orbs */
.glow-orb {
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(37, 150, 190, 0.15);
    filter: blur(80px);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

/* --- PREMIUM INTERACTIVE ANIMATIONS & UTILITIES --- */

/* Smooth Global Transitions for interactive controls */
.form-control, select, textarea, .btn, .btn-outline, .badge {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:hover {
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(37, 150, 190, 0.05);
}

.form-control:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px rgba(37, 150, 190, 0.15), 0 4px 12px rgba(37, 150, 190, 0.08);
}

.btn:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 8px 20px rgba(37, 150, 190, 0.25);
}

.btn:active {
    transform: translateY(0.5px);
}

.btn-outline:hover {
    border-color: var(--primary-blue);
    background: rgba(37, 150, 190, 0.05);
    color: var(--primary-blue);
    transform: translateY(-1px);
}

/* Glass panel interactive hover lift */
.glass-panel.hover-lift {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

.glass-panel.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(31, 38, 135, 0.08), var(--glass-shadow);
    border-color: rgba(37, 150, 190, 0.3);
}

/* Interactive Table Rows */
.interactive-row {
    transition: all 0.25s ease;
    cursor: pointer;
}

.interactive-row:hover {
    background-color: rgba(37, 150, 190, 0.04) !important;
}

.interactive-row:hover td {
    color: var(--text-dark) !important;
}

/* Staggered Load Entrance Animations */
.animate-fade-in {
    opacity: 0;
    animation: fadeInUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-stagger-1 { animation-delay: 0.05s; }
.animate-stagger-2 { animation-delay: 0.12s; }
.animate-stagger-3 { animation-delay: 0.2s; }
.animate-stagger-4 { animation-delay: 0.28s; }
.animate-stagger-5 { animation-delay: 0.36s; }

/* Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseActive {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 150, 190, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(37, 150, 190, 0.2);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 150, 190, 0);
        transform: scale(1);
    }
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(220, 38, 38, 0.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

