/* Lead Management System - Premium White & Blue Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Main Theme Variables */
    --bg-main: #ffffff;
    --bg-body: #f8fafc;
    --card-bg: #ffffff;
    --border-light: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-color: #e2e8f0;
    
    /* Font Color Tokens */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    /* Premium Royal/Electric Blue Brand Palette */
    --primary: #16166b;            /* Deep Corporate Navy */
    --primary-hover: #0d0d4b;      /* Darker Navy on hover */
    --primary-light: #eff2fe;      /* Light Blue/Lavender Accent background */
    --primary-glow: rgba(22, 22, 107, 0.12);
    --secondary-blue: #2563eb;     /* Action Electric Blue */
    --accent-blue: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #eff2fe;
    
    /* Pipeline & Priority Visual Tones */
    --hot-color: #ef4444;
    --hot-bg: #fef2f2;
    --hot-border: rgba(239, 68, 68, 0.2);
    
    --warm-color: #f59e0b;
    --warm-bg: #fffbeb;
    --warm-border: rgba(245, 158, 11, 0.2);
    
    --cold-color: #3b82f6;
    --cold-bg: #eff6ff;
    --cold-border: rgba(59, 130, 246, 0.2);
    
    --success-color: #10b981;
    --success-bg: #ecfdf5;
    --success-border: rgba(16, 185, 129, 0.2);

    /* Layout Dimensions */
    --sidebar-width: 270px;
    --header-height: 75px;
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
}

a {
    transition: all 0.2s ease;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Main App Wrapper Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ==========================================================================
   1. SIDEBAR NAVIGATION
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 1px 0 10px rgba(15, 23, 42, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(to right, rgba(37, 99, 235, 0.02), transparent);
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary-blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.brand-tag {
    font-size: 10px;
    color: var(--primary);
    font-weight: 700;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 1px;
}

.sidebar-menu {
    list-style: none;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.sidebar-item a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.2s;
}

.sidebar-item a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-item a:hover i {
    color: var(--primary);
}

.sidebar-item.active a {
    background: var(--primary-light);
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.1);
    font-weight: 600;
}

.sidebar-item.active a i {
    color: var(--primary);
}

.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 10px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.logout-btn {
    color: var(--text-muted);
    transition: all 0.2s;
    font-size: 16px;
    text-decoration: none;
    background: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
}

.logout-btn:hover {
    color: var(--hot-color);
    background: var(--hot-bg);
    border-color: var(--hot-border);
    transform: scale(1.05);
}

/* ==========================================================================
   2. MAIN CONTAINER & TOP HEADER
   ========================================================================== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-header {
    height: var(--header-height);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 90;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.header-title h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.content-body {
    padding: 40px;
    flex: 1;
}

/* ==========================================================================
   3. METRIC TILES & PANELS
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.01);
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.06);
}

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

.metric-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.metric-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary);
    transition: all 0.3s;
}

.metric-card:hover .metric-icon-wrap {
    background: var(--primary);
    color: #ffffff;
    transform: scale(1.05);
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.metric-sub {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Glass & Solid Panels */
.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(15, 23, 42, 0.01);
    transition: border-color 0.2s;
}

.glass-panel:hover {
    border-color: var(--border-hover);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 16px;
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.panel-title i {
    color: var(--primary);
}

/* ==========================================================================
   4. DATA TABLES
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
}

.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.custom-table th {
    padding: 16px 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 2px solid var(--border-light);
    background: #f8fafc;
}

.custom-table td {
    padding: 16px 20px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    background: #ffffff;
    transition: all 0.15s;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tr:hover td {
    background-color: var(--primary-light);
    color: var(--text-primary);
}

/* Custom Table Row Outlines */
.custom-table tr.active td {
    font-weight: 600;
}

/* ==========================================================================
   5. MODERN STATUS & TEMP BADGES
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
}

/* Standardized Color States */
.badge-success {
    background: var(--success-bg);
    color: var(--success-color);
    border-color: var(--success-border);
}

.badge-danger {
    background: var(--hot-bg);
    color: var(--hot-color);
    border-color: var(--hot-border);
}

.badge-warning {
    background: var(--warm-bg);
    color: var(--warm-color);
    border-color: var(--warm-border);
}

.badge-info {
    background: var(--cold-bg);
    color: var(--cold-color);
    border-color: var(--cold-border);
}

.badge-temp {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.badge-temp.hot {
    background: var(--hot-bg);
    color: var(--hot-color);
    border-color: var(--hot-border);
}

.badge-temp.warm {
    background: var(--warm-bg);
    color: var(--warm-color);
    border-color: var(--warm-border);
}

.badge-temp.cold {
    background: var(--cold-bg);
    color: var(--cold-color);
    border-color: var(--cold-border);
}

/* Avatar Initialization Dots */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary-blue));
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    margin-right: 8px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

/* ==========================================================================
   6. KANBAN SALES PIPELINE
   ========================================================================== */
.kanban-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 20px;
    min-height: calc(100vh - 220px);
    align-items: flex-start;
}

.kanban-column {
    flex: 1 1 280px; /* Stretch to fill container, min 280px */
    max-width: 380px; /* Prevent over-stretching on extremely wide screens */
    background: rgba(22, 22, 107, 0.015); /* Light premium brand backdrop tint */
    border: 1px dashed rgba(22, 22, 107, 0.08); /* Soft dashed drop lane slots */
    border-radius: 16px;
    padding: 16px;
    max-height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.kanban-column:hover {
    background: rgba(22, 22, 107, 0.03); /* Soft interactive dropzone highlight */
    border-color: rgba(22, 22, 107, 0.16);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(22, 22, 107, 0.08);
}

.column-title {
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.column-glow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.column-count {
    background: #ffffff;
    border: 1px solid var(--border-light);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.kanban-cards {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 150px;
    padding: 2px;
}

.kanban-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    cursor: grab;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(22, 22, 107, 0.03); /* Floating premium soft shadow */
}

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

.kanban-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(22, 22, 107, 0.08); /* Lifted float on hover */
}

/* Kanban Glow Borders */
.kanban-card.hot-border { border-left: 4px solid var(--hot-color); }
.kanban-card.warm-border { border-left: 4px solid var(--warm-color); }
.kanban-card.cold-border { border-left: 4px solid var(--cold-color); }

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

.card-title a:hover {
    color: var(--primary);
}

.card-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.card-meta i {
    color: var(--primary);
}

.card-spec {
    background: var(--primary-light);
    border: 1px solid rgba(37, 99, 235, 0.08);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
}

/* ==========================================================================
   7. DETAIL & OBSERVATION LAYOUTS
   ========================================================================== */
.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 32px;
    align-items: start;
}

/* Address Observations layout */
.spec-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.spec-val {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Timeline components */
.timeline {
    position: relative;
    padding-left: 32px;
    margin-top: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-marker {
    position: absolute;
    left: -32px;
    top: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.timeline-marker.system {
    border-color: var(--warm-color);
}

.timeline-content {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.01);
    transition: all 0.2s;
}

.timeline-content:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.02);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
}

.timeline-author {
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-date {
    color: var(--text-muted);
    font-weight: 500;
}

.timeline-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* ==========================================================================
   8. INPUTS, BUTTONS & ACTIONS
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 110px;
}

/* Button UI Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-secondary);
    border-color: var(--border-light);
}

.btn-secondary:hover {
    background: var(--primary-light);
    border-color: rgba(37, 99, 235, 0.15);
    color: var(--primary);
}

.btn-danger {
    background: var(--hot-bg);
    color: var(--hot-color);
    border-color: var(--hot-border);
}

.btn-danger:hover {
    background: var(--hot-color);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.15);
}

/* ==========================================================================
   9. MODALS & DIALOGS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 24px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
    position: relative;
    animation: modalSlide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--hot-color);
}

/* ==========================================================================
   10. PREMIUM MODERN LOGIN
   ========================================================================== */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%);
}

.login-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 28px;
    width: 100%;
    max-width: 450px;
    padding: 48px 40px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
    transition: all 0.3s;
}

.login-card:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.06);
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary-blue));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 30px;
    margin: 0 auto 16px auto;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.login-title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.login-sub {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   11. ALERTS & TIMELINE MESSAGES
   ========================================================================== */
.alert-message {
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
}

.alert-error {
    background: var(--hot-bg);
    color: var(--hot-color);
    border-color: var(--hot-border);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-color);
    border-color: var(--success-border);
}

/* ==========================================================================
   12. FILTERS & CHART SYSTEM
   ========================================================================== */
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: #ffffff;
    padding: 16px 24px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.filters-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Pipeline Charts & Visual Metrics */
.pipeline-statistics {
    margin-top: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.chart-panel {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.01);
}

.bar-chart-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 24px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bar-label {
    width: 150px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    flex: 1;
    height: 10px;
    background: var(--bg-body);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease-out;
}

.bar-value {
    width: 45px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
}

/* ==========================================================================
   13. RESPONSIVE UTILITIES
   ========================================================================== */
@media (max-width: 991px) {
    .sidebar {
        left: -100%;
        box-shadow: 10px 0 30px rgba(15, 23, 42, 0.1);
    }
    .sidebar.active {
        left: 0;
    }
    .main-wrapper {
        margin-left: 0 !important;
    }
    #sidebar-toggle {
        display: block !important;
    }
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 576px) {
    .top-header {
        padding: 0 20px;
    }
    .content-body {
        padding: 24px 16px;
    }
    .filters-bar {
        padding: 12px;
    }
}

/* ==========================================================================
   14. MODERN HORIZONTAL FILTER SYSTEM
   ========================================================================== */
.filter-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    background: #ffffff;
    padding: 20px 24px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    margin-bottom: 28px;
    box-shadow: 0 4px 12px rgba(22, 22, 107, 0.02);
    width: 100%;
}

.search-input-wrap {
    position: relative;
    width: 100%;
}

.search-input-wrap .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.search-input-wrap .form-control {
    padding-left: 44px;
    height: 46px;
    border-color: var(--border-light);
    font-weight: 500;
    width: 100%;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.filter-group select.form-control {
    height: 46px;
    flex: 1 1 130px;
    min-width: 120px;
    font-weight: 500;
    border-color: var(--border-light);
}

.filter-group .btn {
    height: 46px;
    padding: 0 20px;
    flex: 0 0 auto;
}

/* --- Responsive Layout Controls --- */

/* Medium/Tablet Viewports (769px to 1349px) - Clean 2-Row Layout */
@media (min-width: 769px) and (max-width: 1349px) {
    .filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
    }
    .search-input-wrap {
        width: 100% !important;
        flex: none !important;
    }
    .filter-group {
        width: 100% !important;
        flex: none !important;
        flex-wrap: nowrap !important; /* Keep row 2 inline */
    }
    .filter-group select.form-control {
        flex: 1 1 0px !important; /* Divide row width equally */
        min-width: 100px !important;
    }
}

/* Large Widescreen Desktop Viewports (>= 1350px) - Compact left-aligned toolbar row */
@media (min-width: 1350px) {
    .filter-bar {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important; /* Group elements compactly on the left */
        flex-wrap: nowrap !important;
        gap: 16px !important;
    }
    .search-input-wrap {
        flex: 0 0 280px !important;
        width: 280px !important;
        min-width: 200px !important;
    }
    .filter-group {
        flex: 0 1 auto !important; /* Do not grow and push elements apart */
        width: auto !important;
        min-width: 0 !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
    }
    .filter-group select.form-control {
        flex: 0 0 150px !important; /* Clean, uniform width for dropdown elements */
        width: 150px !important;
        min-width: 130px !important;
    }
}

/* ==========================================================================
   15. DYNAMIC ANALYTICS GRID SYSTEM
   ========================================================================== */
.analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 28px;
    margin-top: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ==========================================================================
   16. ADVANCED DUAL-PANE SPLIT LOGIN
   ========================================================================== */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--bg-body);
}

.login-image-side {
    flex: 1.2;
    background-image: url('../images/elevator_login_banner.png');
    background-size: cover;
    background-position: center;
    position: relative;
}

.login-image-side::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(22, 22, 107, 0.5), rgba(37, 99, 235, 0.25));
}

.login-form-side {
    flex: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-body);
}

@media (max-width: 900px) {
    .login-image-side {
        display: none;
    }
    .login-form-side {
        flex: 1;
        padding: 24px;
    }
}

/* Responsive updates for Filters */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }
    .search-input-wrap,
    .filter-group {
        width: 100%;
        flex: none;
    }
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-group select.form-control,
    .filter-group .btn {
        width: 100%;
    }
}

/* Urgent Follow-Up Notification System Styles */
@keyframes pulse-notif {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

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

.notification-bell-btn:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(22, 22, 107, 0.08);
}

.notif-item {
    transition: all 0.2s ease-in-out;
}

.notif-item:hover {
    background: var(--bg-body) !important;
    border-color: rgba(22, 22, 107, 0.12) !important;
    transform: translateX(4px);
}

/* Custom scrollbar for notification dropdown items */
#notif-list-container::-webkit-scrollbar {
    width: 6px;
}
#notif-list-container::-webkit-scrollbar-track {
    background: transparent;
}
#notif-list-container::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}
#notif-list-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================================================
   ELEVATOR CRM ADVANCED FEATURES SYSTEM (LEAD AGING, DASHBOARDS, MODALS)
   ========================================================================== */

/* Lead Aging System Badges */
.aging-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
    width: fit-content;
    white-space: nowrap;
}
.aging-green {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
}
.aging-amber {
    background: rgba(245, 158, 11, 0.08) !important;
    color: #d97706 !important;
    border: 1px solid rgba(245, 158, 11, 0.15) !important;
}
.aging-red {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.15) !important;
    animation: gentle-pulse 2s infinite ease-in-out;
}

/* Kanban badge states */
.kanban-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}
.f-overdue {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.15) !important;
}
.f-today {
    background: rgba(245, 158, 11, 0.08) !important;
    color: #d97706 !important;
    border: 1px solid rgba(245, 158, 11, 0.15) !important;
}
.f-upcoming {
    background: rgba(37, 99, 235, 0.08) !important;
    color: #2563eb !important;
    border: 1px solid rgba(37, 99, 235, 0.15) !important;
}

/* Glassmorphism Warnings & Modals */
.warning-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}
.warning-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}
.warning-modal {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.warning-modal-backdrop.active .warning-modal {
    transform: translateY(0);
}

/* Leaderboard Rankings */
.leaderboard-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}
.rank-gold {
    background: linear-gradient(135deg, #fef08a, #ca8a04);
    color: #854d0e;
    box-shadow: 0 4px 10px rgba(202, 138, 4, 0.2);
}
.rank-silver {
    background: linear-gradient(135deg, #f1f5f9, #475569);
    color: #1e293b;
    box-shadow: 0 4px 10px rgba(71, 85, 105, 0.15);
}
.rank-bronze {
    background: linear-gradient(135deg, #ffedd5, #c2410c);
    color: #7c2d12;
    box-shadow: 0 4px 10px rgba(194, 65, 12, 0.15);
}
.rank-normal {
    background: #f1f5f9;
    color: var(--text-secondary);
}

/* Dashboard Filter Pills */
.filter-pills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.filter-pill {
    padding: 6px 14px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}
.filter-pill:hover, .filter-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px var(--primary-glow);
}


/* Pulse animation */
@keyframes gentle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Optimized Leads Directory & Modal Styles */
.circle-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 12px;
    text-decoration: none;
}
.circle-action-btn.whatsapp-btn {
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
}
.circle-action-btn.whatsapp-btn:hover {
    background: #10b981;
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}
.circle-action-btn.email-btn {
    color: #ea4335;
    background: rgba(234, 67, 53, 0.08);
    border: 1px solid rgba(234, 67, 53, 0.15);
}
.circle-action-btn.email-btn:hover {
    background: #ea4335;
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(234, 67, 53, 0.25);
}

.active-filter-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: gentle-pulse 2s infinite ease-in-out;
}

.source-tag-inline {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(22, 22, 107, 0.05);
    color: var(--primary);
    border: 1px solid rgba(22, 22, 107, 0.1);
}

.btn-circle-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    padding: 0 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.15) !important;
    transition: all 0.2s ease;
}
.btn-circle-delete:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);
}

/* ==========================================================================
   17. SITE ENGINEER CONSOLE REDESIGN & SPECS GRID
   ========================================================================== */
.tech-card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.tech-card-hover:hover {
    transform: translateY(-3px) scale(1.005);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.25) !important;
}
.tech-spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.tech-spec-pill {
    background: rgba(99, 102, 241, 0.04);
    border: 1px solid rgba(99, 102, 241, 0.08);
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: all 0.2s ease;
}
.tech-spec-pill:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
}
.tech-spec-label {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}
.tech-spec-value {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 600;
}
.tech-observation-box {
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    font-size: 12px;
    line-height: 1.4;
}
.tech-empty-state-card {
    text-align: center;
    padding: 40px 30px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(99, 102, 241, 0.01) 100%);
    border: 1px dashed rgba(16, 185, 129, 0.2);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.02);
}




