/* ============================================================
   LeadMyDesk - Design System & Modern CRM Theme
   Sidebar: Deep Obsidian Teal (#041D24)
   Brand Accent: Vibrant Emerald (#0A8849 / #22C55E)
   Background: Clean Slate (#F4F7FA)
   Typography: Inter
   ============================================================ */

/* -- CSS Variables ----------------------------------------- */
:root {
    /* Brand Colors - Exact CRM Mockup Palette */
    --lmd-sidebar-bg:        #041D24;
    --lmd-sidebar-surface:   #082630;
    --lmd-sidebar-text:      #8FA9B2;
    --lmd-sidebar-text-hover:#FFFFFF;
    --lmd-sidebar-group:     #4E6E78;
    --lmd-sidebar-border:    rgba(255, 255, 255, 0.07);

    /* Primary Accent (Emerald Green) */
    --lmd-green-dark:        #076B39;
    --lmd-green:             #0A8849;
    --lmd-green-mid:         #10B981;
    --lmd-green-light:       #34D399;
    --lmd-green-pale:        #DCFCE7;
    --lmd-green-glow:        rgba(10, 136, 73, 0.2);

    /* Neutral Palette */
    --lmd-slate-900:         #0F172A;
    --lmd-slate-800:         #1E293B;
    --lmd-slate-700:         #334155;
    --lmd-slate-600:         #475569;
    --lmd-slate-500:         #64748B;
    --lmd-slate-400:         #94A3B8;
    --lmd-slate-300:         #CBD5E1;
    --lmd-slate-200:         #E2E8F0;
    --lmd-slate-100:         #F1F5F9;
    --lmd-slate-50:          #F8FAFC;
    --lmd-bg:                #F4F7FA;
    --lmd-white:             #FFFFFF;

    /* Semantic */
    --lmd-success:           #0A8849;
    --lmd-warning:           #F59E0B;
    --lmd-error:             #EF4444;
    --lmd-info:              #2563EB;

    /* Shadows */
    --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md:  0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg:  0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);

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

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* -- Global Reset & Base ----------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    background-color: var(--lmd-bg);
    color: var(--lmd-slate-900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* -- Global Modern Slim Scrollbar --------------------------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}

/* -- Lightweight Splash / Loading Screen ------------------- */
.lmd-splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #041D24;
    gap: 20px;
}

.lmd-splash-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lmd-splash-title {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.02em;
}

.lmd-splash-title span {
    color: #22C55E;
}

.lmd-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(16, 185, 129, 0.18);
    border-top-color: #22C55E;
    border-radius: 50%;
    animation: lmd-spin 0.75s linear infinite;
}

.lmd-splash-text {
    color: #8FA9B2;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.2px;
    margin: 0;
}

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

/* ============================================================
   MudBlazor Overrides: Precision CRM Styling
   ============================================================ */

/* -- Top AppBar ---------------------------------------------- */
.mud-appbar {
    background: #FFFFFF !important;
    border-bottom: 1px solid #E5ECF2 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    color: var(--lmd-slate-800) !important;
}

/* -- Sidebar Drawer Container (Zero outer scrollbar) -------- */
.lmd-sidebar-drawer,
.lmd-sidebar-drawer.mud-drawer,
.lmd-sidebar-drawer .mud-drawer-content,
.lmd-sidebar-drawer .mud-drawer-content-fixed {
    background: #041D24 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.lmd-sidebar-drawer::-webkit-scrollbar,
.lmd-sidebar-drawer .mud-drawer-content::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* -- Theme-Matched Sleek Scrollbar ONLY for Sidebar Scrollable Nav -- */
.lmd-sidebar-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent !important;
    overflow-x: hidden !important;
}

.lmd-sidebar-scroll::-webkit-scrollbar {
    width: 4px !important;
    height: 4px !important;
}

.lmd-sidebar-scroll::-webkit-scrollbar-track {
    background: transparent !important;
}

.lmd-sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18) !important;
    border-radius: 9999px !important;
    transition: background 0.15s ease-in-out !important;
}

.lmd-sidebar-scroll:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28) !important;
}

.lmd-sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: #10B981 !important; /* Theme Emerald Accent */
}

.lmd-sidebar-scroll::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.lmd-sidebar-scroll::-webkit-scrollbar-corner {
    background: transparent !important;
}

/* Brand header at top of sidebar */
.lmd-sidebar-header {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.lmd-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    user-select: none;
}

.lmd-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.lmd-brand-info {
    display: flex;
    flex-direction: column;
}

.lmd-brand-title {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.lmd-brand-title span {
    color: #22C55E;
}

.lmd-brand-tagline {
    font-size: 10px;
    font-weight: 400;
    color: #6F8E98;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

/* -- Nav Links on Dark Sidebar ------------------------------- */
.mud-nav-menu {
    padding: 8px 10px !important;
}

.mud-nav-link {
    border-radius: 8px !important;
    margin: 2px 0 !important;
    font-weight: 500 !important;
    font-size: 13.5px !important;
    transition: all var(--transition-fast) !important;
    color: #8FA9B2 !important;
    padding: 8px 12px !important;
    letter-spacing: 0.01em !important;
    white-space: nowrap !important;
}

.mud-nav-link:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #FFFFFF !important;
}

/* Active Nav Item - Solid Emerald Pill */
.mud-nav-link.active {
    background: #0A8849 !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(10, 136, 73, 0.3) !important;
}

.mud-nav-link-icon-wrapper {
    color: inherit !important;
    opacity: 0.85;
}

.mud-nav-link.active .mud-nav-link-icon-wrapper {
    opacity: 1;
    color: #FFFFFF !important;
}

/* Nav Group Section Headers */
.lmd-nav-group {
    padding: 16px 12px 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #4E6E78;
    user-select: none;
}

.lmd-nav-group--top {
    padding-top: 6px;
}

/* -- MudNavGroup (Parent Settings Menu) ---------------------- */
.mud-nav-group .mud-nav-group-button {
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #8FA9B2 !important;
    border-radius: 8px !important;
    margin: 2px 0 !important;
    padding: 7px 12px !important;
    min-height: 36px !important;
    cursor: pointer !important;
    transition: background var(--transition-fast), color var(--transition-fast) !important;
}

.mud-nav-group .mud-nav-group-button:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #FFFFFF !important;
}

.mud-nav-group .mud-nav-group-button .mud-nav-link-expand-icon {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    color: #64748B !important;
    fill: #64748B !important;
    opacity: 0.8 !important;
    margin-left: auto !important;
    margin-inline-start: auto !important;
    transition: transform var(--transition-fast), color var(--transition-fast) !important;
}

.mud-nav-group .mud-nav-group-button:hover .mud-nav-link-expand-icon {
    color: #CBD5E1 !important;
    fill: #CBD5E1 !important;
}

/* -- MudNavGroup Submenu Container (Clean tree-line hierarchy) -- */
.mud-nav-group .mud-collapse-container {
    position: relative !important;
    margin: 2px 0 4px 18px !important;
    padding: 0 0 0 8px !important;
    padding-inline-start: 8px !important;
    border: none !important;
    border-left: 1.5px solid rgba(255, 255, 255, 0.12) !important;
}

/* -- Submenu Links Inside MudNavGroup (Single line, sleek 14px icon) -- */
.mud-nav-group .mud-collapse-container .mud-nav-link,
.lmd-nav-sublink {
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: #7E9CA6 !important;
    padding: 5px 8px !important;
    padding-inline-start: 8px !important;
    padding-inline-end: 8px !important;
    margin: 2px 0 !important;
    border-radius: 6px !important;
    min-height: 28px !important;
    height: 28px !important;
    white-space: nowrap !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    text-decoration: none !important;
    transition: all var(--transition-fast) !important;
}

.mud-nav-group .mud-collapse-container .mud-nav-link .mud-nav-link-text,
.lmd-nav-sublink .mud-nav-link-text {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block !important;
    line-height: 1.2 !important;
}

.mud-nav-group .mud-collapse-container .mud-nav-link:hover,
.lmd-nav-sublink:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #FFFFFF !important;
}

/* Submenu Icons (delicate 14px, neatly aligned) */
.mud-nav-group .mud-collapse-container .mud-nav-link .mud-nav-link-icon-wrapper,
.lmd-nav-sublink .mud-nav-link-icon-wrapper {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    margin-right: 8px !important;
    margin-inline-end: 8px !important;
    margin-inline-start: 0 !important;
    opacity: 0.65 !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mud-nav-group .mud-collapse-container .mud-nav-link .mud-nav-link-icon-wrapper svg,
.lmd-nav-sublink .mud-nav-link-icon-wrapper svg {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
}

/* Submenu Active State */
.mud-nav-group .mud-collapse-container .mud-nav-link.active,
.lmd-nav-sublink.active {
    background: rgba(10, 136, 73, 0.18) !important;
    color: #34D399 !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.mud-nav-group .mud-collapse-container .mud-nav-link.active .mud-nav-link-icon-wrapper,
.lmd-nav-sublink.active .mud-nav-link-icon-wrapper {
    color: #34D399 !important;
    opacity: 1 !important;
}

/* -- Sidebar Bottom Badge / Widget --------------------------- */
.lmd-sidebar-badge-wrap {
    position: relative !important;
    flex-shrink: 0 !important;
    padding: 10px 14px 14px;
    background: #03171D;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.lmd-sidebar-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.lmd-sidebar-badge--admin {
    background: rgba(10, 136, 73, 0.2);
    border-color: rgba(34, 197, 94, 0.25);
}

.lmd-sidebar-badge__icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22C55E;
    flex-shrink: 0;
}

.lmd-sidebar-badge__crown {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.lmd-sidebar-badge__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.lmd-sidebar-badge__title {
    color: #FFFFFF;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
}

.lmd-sidebar-badge__sub {
    color: #6F8E98;
    font-size: 10.5px;
    line-height: 1.3;
}

.lmd-sidebar-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 4px;
}

.lmd-sidebar-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, #10B981, #22C55E);
    border-radius: 99px;
}

.lmd-sidebar-progress__label {
    color: #6F8E98;
    font-size: 10px;
    text-align: right;
    font-weight: 500;
}

/* -- Search Box & Shortcut Key ------------------------------- */
.lmd-search-field {
    background: #F4F7FA !important;
    border-radius: 8px !important;
}

.lmd-search-field .mud-input-outlined-border {
    border-color: #E2E8F0 !important;
}

.lmd-search-field:focus-within .mud-input-outlined-border {
    border-color: #0A8849 !important;
}

.lmd-shortcut-key {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #64748B;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    user-select: none;
}

/* -- Buttons ------------------------------------------------- */
.mud-button-root {
    border-radius: 8px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
    transition: all var(--transition-fast) !important;
}

.mud-button-filled.mud-button-filled-primary {
    background: #0A8849 !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 6px rgba(10, 136, 73, 0.25) !important;
}

.mud-button-filled.mud-button-filled-primary:hover {
    background: #07733E !important;
    box-shadow: 0 4px 12px rgba(10, 136, 73, 0.35) !important;
}

.mud-button-outlined {
    border-color: #E2E8F0 !important;
    color: #334155 !important;
    background: #FFFFFF !important;
}

.mud-button-outlined:hover {
    background: #F8FAFC !important;
    border-color: #CBD5E1 !important;
}

/* -- KPI Stat Cards ------------------------------------------ */
.lmd-kpi-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-radius: 12px !important;
    border: 1px solid #E5ECF2 !important;
    background: #FFFFFF !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all var(--transition-base);
}

.lmd-kpi-card:hover {
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-2px);
    border-color: #D1E5DE !important;
}

.lmd-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lmd-kpi-icon--emerald {
    background: #DCFCE7;
    color: #0A8849;
}

.lmd-kpi-icon--blue {
    background: #E0F2FE;
    color: #0284C7;
}

.lmd-kpi-icon--amber {
    background: #FEF3C7;
    color: #D97706;
}

.lmd-kpi-icon--red {
    background: #FEE2E2;
    color: #DC2626;
}

.lmd-kpi-body {
    flex: 1;
    min-width: 0;
}

.lmd-kpi-value {
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.03em;
    color: #0F172A;
}

.lmd-kpi-label {
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: #64748B !important;
    margin-top: 3px;
    display: block;
}

.lmd-kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    margin-top: 6px;
    padding: 2px 7px;
    border-radius: 6px;
}

.lmd-trend-up {
    background: #DCFCE7;
    color: #0A8849;
}

.lmd-trend-down {
    background: #FEE2E2;
    color: #DC2626;
}

/* -- Compact Lead Cards (Redesigned) ----------------------- */
.lmd-lead-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}

.lmd-lead-card:hover {
    box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
    border-color: #CBD5E1;
}

.lmd-lead-card__header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px 8px 14px;
}

.lmd-lead-card__avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #FFFFFF;
    flex-shrink: 0;
}

.lmd-lead-card__name-block {
    flex: 1;
    min-width: 0;
}

.lmd-lead-card__name {
    font-size: 13.5px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.25;
    display: block;
}

.lmd-lead-card__sub-block {
    font-size: 11px;
    line-height: 1.3;
    margin-top: 1px;
}

.lmd-lead-card__val {
    font-size: 13px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1;
}

.lmd-priority-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 4px;
    line-height: 1.2;
    flex-shrink: 0;
}

.lmd-priority-badge--urgent {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.lmd-priority-badge--high {
    background: #FFFBEB;
    color: #D97706;
    border: 1px solid #FDE68A;
}

.lmd-lead-card__body {
    padding: 0 14px 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.lmd-interest-tag {
    display: inline-flex;
    align-items: center;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 500;
    color: #334155;
    max-width: calc(100% - 30px);
}

.lmd-interest-more {
    font-size: 10.5px;
    font-weight: 600;
    color: #64748B;
    background: #F1F5F9;
    padding: 2px 5px;
    border-radius: 4px;
}

.lmd-lead-card__contact-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #475569;
    min-height: 18px;
}

.lmd-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #475569;
    text-decoration: none;
    font-size: 12px;
}

.lmd-contact-link:hover {
    color: #2563EB;
}

.lmd-lead-card__meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #64748B;
    margin-top: 2px;
}

.lmd-lead-card__fu-banner {
    padding: 0 14px 8px 14px;
}

.lmd-fu-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 500;
    min-height: 30px;
    transition: all 0.15s ease;
}

.lmd-fu-strip--won {
    background: #F0FDF4 !important;
    border: 1px solid #BBF7D0 !important;
    border-left: 3px solid #16A34A !important;
    color: #166534 !important;
    font-weight: 600;
}

.lmd-fu-strip--lost {
    background: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
    border-left: 3px solid #94A3B8 !important;
    color: #64748B !important;
}

.lmd-fu-strip--overdue {
    background: #FEF2F2 !important;
    border: 1px solid #FECACA !important;
    border-left: 3px solid #DC2626 !important;
    color: #991B1B !important;
    font-weight: 700;
}

.lmd-fu-strip--today {
    background: #FFFBEB !important;
    border: 1px solid #FDE68A !important;
    border-left: 3px solid #D97706 !important;
    color: #92400E !important;
    font-weight: 700;
}

.lmd-fu-strip--upcoming {
    background: #EFF6FF !important;
    border: 1px solid #BFDBFE !important;
    border-left: 3px solid #2563EB !important;
    color: #1E40AF !important;
    font-weight: 600;
}

.lmd-fu-strip--completed {
    background: #F0FDF4 !important;
    border: 1px solid #BBF7D0 !important;
    border-left: 3px solid #16A34A !important;
    color: #166534 !important;
    font-weight: 500;
}

.lmd-fu-strip--none {
    background: #F8FAFC !important;
    border: 1px dashed #CBD5E1 !important;
    color: #94A3B8 !important;
}

.lmd-fu-link-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    color: #2563EB;
    cursor: pointer;
    text-decoration: underline;
}

.lmd-lead-card__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 12px;
    background: #F8FAFC;
    border-top: 1px solid #F1F5F9;
    min-height: 38px;
}

.lmd-action-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #FFFFFF;
    color: #475569;
    padding: 0;
    transition: all 0.15s ease;
}

.lmd-action-btn:hover {
    border-color: #CBD5E1;
    background: #F1F5F9;
    color: #0F172A;
}

.lmd-action-btn--call:hover {
    border-color: #BFDBFE;
    background: #EFF6FF;
    color: #2563EB;
}

.lmd-action-btn--whatsapp:hover {
    border-color: #BBF7D0;
    background: #F0FDF4;
    color: #16A34A;
}

.lmd-action-btn--email:hover {
    border-color: #DDD6FE;
    background: #F5F3FF;
    color: #7C3AED;
}

.lmd-action-btn--schedule:hover {
    border-color: #FDE68A;
    background: #FFFBEB;
    color: #D97706;
}

.lmd-action-btn--more:hover {
    border-color: #CBD5E1;
    background: #E2E8F0;
    color: #0F172A;
}

/* -- Status Pills -------------------------------------------- */
.lmd-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 600;
}

.lmd-pill--new {
    background: #EFF6FF;
    color: #2563EB;
}

.lmd-pill--contacted,
.lmd-pill--qualified,
.lmd-pill--won {
    background: #ECFDF5;
    color: #059669;
}

.lmd-pill--lost {
    background: #FEF2F2;
    color: #DC2626;
}

/* -- Blazor Error UI ----------------------------------------- */
#blazor-error-ui {
    background: #0A8849;
    bottom: 0;
    left: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    display: none;
    padding: 12px 20px;
    position: fixed;
    width: 100%;
    z-index: 2000;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

#blazor-error-ui .reload {
    color: #FFFFFF;
    font-weight: 700;
    text-decoration: underline;
    margin-left: 8px;
}

/* -- Follow-up Filter Pills & Quick Buttons -------------------- */
.lmd-fu-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    background: #FFFFFF;
    color: #475569;
    border: 1px solid #E2E8F0;
    transition: all 0.15s ease-in-out;
    line-height: 1.4;
}
.lmd-fu-pill:hover {
    background: #F1F5F9;
    color: #0F172A;
    border-color: #CBD5E1;
}
.lmd-fu-pill--active {
    background: #0F172A !important;
    color: #FFFFFF !important;
    border-color: #0F172A !important;
}
.lmd-fu-pill--overdue {
    color: #DC2626;
    background: #FEF2F2;
    border-color: #FECACA;
}
.lmd-fu-pill--overdue:hover {
    background: #FEE2E2;
    border-color: #F87171;
}
.lmd-fu-pill--overdue-active {
    background: #DC2626 !important;
    color: #FFFFFF !important;
    border-color: #DC2626 !important;
}
.lmd-fu-pill--today {
    color: #D97706;
    background: #FFFBEB;
    border-color: #FDE68A;
}
.lmd-fu-pill--today:hover {
    background: #FEF3C7;
    border-color: #FBBF24;
}
.lmd-fu-pill--today-active {
    background: #D97706 !important;
    color: #FFFFFF !important;
    border-color: #D97706 !important;
}
.lmd-fu-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.lmd-fu-dot--red { background: #DC2626; }
.lmd-fu-dot--amber { background: #D97706; }

.lmd-card-quick-fu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}
.lmd-card-quick-fu-btn:hover {
    transform: scale(1.08);
}
.lmd-card-quick-fu-btn--done {
    background: #DCFCE7 !important;
    border-color: #86EFAC !important;
    color: #15803D !important;
}
.lmd-card-quick-fu-btn--done:hover {
    background: #BBF7D0 !important;
    color: #166534 !important;
}
.lmd-card-quick-fu-btn--reschedule {
    background: #FEF3C7 !important;
    border-color: #FCD34D !important;
    color: #B45309 !important;
}
.lmd-card-quick-fu-btn--reschedule:hover {
    background: #FDE68A !important;
    color: #92400E !important;
}

/* -- Responsive Rules ---------------------------------------- */
@media (max-width: 768px) {
    .lmd-kpi-card { padding: 14px; gap: 12px; }
    .lmd-kpi-value { font-size: 1.55rem !important; }
}

/* -- Enterprise Lead Quick View Drawer Styles ---------------- */
.lmd-drawer-header {
    padding: 12px 16px;
    background: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.lmd-stage-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #F8FAFC;
    font-size: 12px;
    font-weight: 500;
    color: #1E293B;
    cursor: pointer;
    transition: all 0.15s ease;
}
.lmd-stage-pill:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

.lmd-action-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 8px 16px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    flex-shrink: 0;
}

.lmd-drawer-act-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 30px;
    padding: 0 6px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #FFFFFF;
    color: #334155;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lmd-drawer-act-btn:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: #0F172A;
}
.lmd-drawer-act-btn--disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Custom Tabs Strip */
.lmd-tab-strip {
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
    flex-shrink: 0;
    gap: 8px;
}

.lmd-tab-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: #64748B;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.lmd-tab-item:hover {
    color: #0F172A;
}
.lmd-tab-item.active {
    color: #0A8849;
    font-weight: 600;
    border-bottom-color: #0A8849;
}

.lmd-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    background: #F1F5F9;
    color: #64748B;
}
.lmd-tab-item.active .lmd-tab-badge {
    background: #DCFCE7;
    color: #0A8849;
}

/* Drawer Container Override */
.lmd-quickview-drawer,
.lmd-quickview-drawer.mud-drawer,
.lmd-quickview-drawer .mud-drawer-content,
.lmd-quickview-drawer .mud-drawer-content-fixed {
    background: #FFFFFF !important;
    border-left: 1px solid #E2E8F0 !important;
    border-right: none !important;
    color: #0F172A !important;
}

/* Scroll Container */
.lmd-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #F8FAFC !important;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}
.lmd-drawer-body::-webkit-scrollbar {
    width: 5px;
}
.lmd-drawer-body::-webkit-scrollbar-track {
    background: transparent;
}
.lmd-drawer-body::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
.lmd-drawer-body::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Highlights Banner */
.lmd-highlights-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    gap: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.lmd-highlights-col {
    display: flex;
    flex-direction: column;
}
.lmd-highlights-col:first-child {
    border-right: 1px solid #E2E8F0;
    padding-right: 12px;
}
.lmd-highlights-label {
    font-size: 10.5px;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sections & Property Table */
.lmd-section-header {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.lmd-property-box {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.lmd-property-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #F1F5F9;
    font-size: 12px;
    transition: background 0.1s ease;
}
.lmd-property-row:last-child {
    border-bottom: none;
}
.lmd-property-row:hover {
    background: #F8FAFC;
}
.lmd-prop-label {
    color: #64748B;
    font-weight: 500;
}
.lmd-prop-val {
    color: #0F172A;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Requirement Quote Block */
.lmd-quote-box {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0;
    border-left: 3px solid #0A8849 !important;
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    font-size: 12.5px;
    color: #1E293B;
    line-height: 1.5;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Product & Services Item */
.lmd-prod-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

