/* ============================================================
   DSA CRM — ULTRA-PREMIUM FIGMA SAAS DESIGN SYSTEM
   Inspired by TaskOrbit • Tasklify / Lander Studio • Uxerflow
   Zero Fake Data • Full Responsive • Light Breathable Aesthetic
   ============================================================ */

/* ═══ 1. BASE RESET & TOKENS ═══ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    /* ── Brand Color Tokens (Sampan Emerald & Vibrant Lime) ── */
    --primary: #0A5C36;
    --primary-dark: #064024;
    --primary-light: #e8f3ed;
    --primary-rgb: 10, 92, 54;
    --primary-10: rgba(10, 92, 54, 0.10);
    --primary-20: rgba(10, 92, 54, 0.20);
    --primary-50: rgba(10, 92, 54, 0.08);

    --accent: #84CC16;
    --accent-rgb: 132, 204, 22;
    --accent-light: #f4fce3;
    --accent-dark: #4d7c0f;

    /* ── Luxury SaaS Dark Pill Colors ── */
    --dark-pill: #0F172A;
    --dark-pill-hover: #1E293B;
    --dark-pill-text: #FFFFFF;

    /* ── Neutral Canvas & Surface ── */
    --body-bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --header-bg: rgba(255, 255, 255, 0.92);
    --border-color: #E8EAED;
    --border-subtle: #F1F3F5;
    --border-focus: #0A5C36;

    /* ── Typography Scale ── */
    --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --text-main: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --text-light: #94A3B8;

    /* ── Status Soft Pastels ── */
    --success-bg: #ECFDF5;
    --success-text: #047857;
    --success-border: #A7F3D0;
    --success: #10B981;

    --info-bg: #EFF6FF;
    --info-text: #1D4ED8;
    --info-border: #BFDBFE;
    --info: #3B82F6;

    --warning-bg: #FFFBEB;
    --warning-text: #B45309;
    --warning-border: #FDE68A;
    --warning: #F59E0B;

    --danger-bg: #FEF2F2;
    --danger-text: #B91C1C;
    --danger-border: #FECACA;
    --danger: #EF4444;

    --purple-bg: #F5F3FF;
    --purple-text: #6D28D9;
    --purple-border: #DDD6FE;

    /* ── Sidebar Tokens (Light Figma SaaS Rail) ── */
    --sidebar-bg: #FFFFFF;
    --sidebar-border: #EAECEF;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --sidebar-text: #475569;
    --sidebar-text-hover: #0F172A;
    --sidebar-hover-bg: #F8FAFC;
    --sidebar-active-bg: #0F172A;
    --sidebar-active-text: #FFFFFF;

    /* ── Radii ── */
    --radius-pill: 9999px;
    --radius-card: 20px;
    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 8px;
    --radius-xs: 6px;

    /* ── Multi-Layer Diffused Shadows ── */
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.02), 0 10px 30px -4px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 20px 40px -6px rgba(0, 0, 0, 0.07);
    --shadow-pill: 0 4px 14px rgba(15, 23, 42, 0.14);
    --shadow-floating: 0 20px 50px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);

    /* ── Transitions ── */
    --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);

    /* ── Spacing ── */
    --space-1: 4px;   --space-2: 8px;   --space-3: 12px;  --space-4: 16px;
    --space-5: 20px;  --space-6: 24px;  --space-8: 32px;  --space-10: 40px;

    /* ── Z-Indices ── */
    --z-sidebar: 100;
    --z-header: 90;
    --z-modal: 1050;
    --z-floating-bar: 1100;
    --z-tooltip: 1200;
}

body {
    font-family: var(--font-family);
    font-size: 0.875rem;
    color: var(--text-main);
    background: var(--body-bg);
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--primary-dark);
}

img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; }


/* ═══ 2. APP LAYOUT WRAPPER (LUXURY FINTECH CANVAS) ═══ */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #F8FAFC;
    background-image: 
        radial-gradient(at 0% 0%, rgba(10, 92, 54, 0.035) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(132, 204, 22, 0.03) 0px, transparent 45%),
        radial-gradient(at 50% 100%, rgba(15, 23, 42, 0.02) 0px, transparent 50%);
    background-attachment: fixed;
}

.main-content {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-smooth);
    display: flex;
    flex-direction: column;
    background: transparent;
}

.page-content,
.content-container {
    padding: var(--space-6, 24px) var(--space-6, 24px) 68px var(--space-6, 24px);
    flex: 1;
    max-width: 100%;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* Dedicated Form Container - full width fluid */
.form-page-container,
#lead-form {
    max-width: 100%;
    margin: 0;
    width: 100%;
}



/* ═══ 3. ULTRA-PREMIUM LIGHT SAAS SIDEBAR (TASKLIFY & UXERFLOW TIER) ═══ */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: var(--z-sidebar);
    transition: width var(--transition-smooth), transform var(--transition-smooth);
    user-select: none;
}

.sidebar-header {
    height: 76px;
    padding: 0 var(--space-5);
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    position: relative;
}

.sidebar-logo-badge, .sidebar-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(10, 92, 54, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.sidebar-brand {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-brand-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sidebar-brand-sub {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-collapse-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--body-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.sidebar-collapse-btn:hover {
    background: #FFFFFF;
    color: var(--text-main);
    border-color: var(--text-main);
}

/* Sidebar Search Box */
.sidebar-search {
    padding: var(--space-4) var(--space-5) var(--space-2);
    flex-shrink: 0;
}
.sidebar-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--body-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.sidebar-search-box:hover {
    background: #FFFFFF;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-10);
}
.sidebar-search-key {
    margin-left: auto;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    color: var(--text-light);
}

/* Navigation Menu */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-2) 0;
    scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section {
    padding: 16px var(--space-5) 6px;
}
.nav-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
}

.sidebar {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.nav-item {
    position: relative;
    padding: 2px var(--space-3);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-icon-wrap {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-icon {
    font-size: 0.95rem;
    color: var(--text-light);
    transition: color var(--transition-fast);
}

.nav-link:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text-hover);
}
.nav-link:hover .nav-icon {
    color: var(--text-main);
}

/* Active Nav Capsule (Tasklify Style Dark Solid Capsule with subtle glow) */
.nav-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text) !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
}
.nav-link.active .nav-icon {
    color: var(--accent) !important;
}

.nav-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-badge {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    min-width: 20px;
    text-align: center;
}

.nav-arrow {
    font-size: 0.6rem;
    color: var(--text-light);
    transition: transform var(--transition-fast);
    margin-left: auto;
}
.nav-link.expanded .nav-arrow {
    transform: rotate(90deg);
}

/* Submenu Accordion */
.nav-submenu {
    display: none;
    margin: 4px 0 4px 28px;
    padding-left: 12px;
    border-left: 1.5px solid var(--border-color);
}
.nav-submenu.open { display: block; }
.nav-submenu .nav-item { padding: 1px 0; }
.nav-submenu .nav-link {
    padding: 7px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}
.nav-submenu .nav-link:hover {
    color: var(--text-main);
    background: var(--body-bg);
}
.nav-submenu .nav-link.active {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    box-shadow: none;
    font-weight: 700;
}
.nav-submenu .nav-link.active .nav-icon {
    color: var(--primary) !important;
}

/* Sidebar Footer User Capsule */
.sidebar-footer {
    padding: var(--space-4) var(--space-3);
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.sidebar-user-pill, .sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.sidebar-user-pill:hover, .sidebar-user:hover {
    background: #FFFFFF;
    border-color: var(--text-main);
    box-shadow: var(--shadow-sm);
}
.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.sidebar-user-info {
    flex: 1;
    overflow: hidden;
}
.sidebar-user-name {
    font-size: 0.825rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══ COLLAPSED SIDEBAR (ICON-ONLY RAIL) ═══ */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}
.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .sidebar-search,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-arrow,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-submenu:not(.flyout-active) {
    display: none !important;
}

.sidebar.collapsed .sidebar-header {
    padding: 0;
    justify-content: center;
}
.sidebar.collapsed .sidebar-collapse-btn {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    background: #0F172A;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
    box-shadow: var(--shadow-md);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    z-index: 1200;
}
.sidebar.collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

.sidebar.collapsed .nav-item {
    padding: 2px 8px;
}
.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 10px 0;
}
.sidebar.collapsed .sidebar-user-pill {
    justify-content: center;
    padding: 6px;
    border: none;
    background: transparent;
}

/* Collapsed Hover Flyout Card */
.sidebar.collapsed .nav-item:hover > .nav-submenu {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    left: calc(100% + 10px);
    top: 0;
    min-width: 220px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-floating);
    border-radius: var(--radius-lg);
    padding: 8px;
    z-index: 2200;
    margin: 0;
}
.sidebar.collapsed .nav-item:hover > .nav-submenu .nav-text {
    display: inline-block !important;
    color: var(--text-main) !important;
    font-size: 0.84rem;
}
.sidebar.collapsed .nav-item:hover > .nav-submenu .nav-link {
    justify-content: flex-start;
    padding: 8px 12px;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}


/* ═══ 4. TOP HEADER BAR (MINIMALIST & AIRY SAAS TIER) ═══ */
.top-header {
    height: 70px;
    padding: 0 var(--space-6, 24px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--header-bg, #FFFFFF);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color, #E2E8F0);
    position: sticky;
    top: 0;
    z-index: var(--z-header, 100);
    flex-wrap: nowrap;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md, 12px);
    background: #FFFFFF;
    border: 1px solid var(--border-color, #E2E8F0);
    color: var(--text-main, #0F172A);
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s ease);
    flex-shrink: 0;
}
.sidebar-toggle:hover {
    background: #F8FAFC;
    border-color: #94A3B8;
    color: var(--primary, #0A5C36);
}

.page-title-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}
.page-title-section h1 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main, #0F172A);
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94A3B8;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.breadcrumb a {
    color: #94A3B8;
    text-decoration: none;
    transition: color var(--transition-fast, 0.15s ease);
}
.breadcrumb a:hover {
    color: var(--text-main, #0F172A);
}
.breadcrumb .separator {
    color: #CBD5E1;
    font-size: 0.68rem;
}
.breadcrumb .current {
    color: #475569;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Header Utilities (Live Clock, Branch Switcher) */
.header-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 38px;
    background: #FFFFFF;
    border: 1px solid var(--border-color, #E2E8F0);
    border-radius: var(--radius-pill, 9999px);
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    transition: all 0.15s ease;
}
.header-pill:hover {
    border-color: #CBD5E1;
}

.header-branch-pill {
    max-width: 230px;
    cursor: pointer;
}
.header-branch-pill .branch-icon {
    color: var(--primary, #0A5C36);
    font-size: 0.82rem;
    flex-shrink: 0;
}
.header-branch-select {
    border: none;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main, #0F172A);
    outline: none;
    cursor: pointer;
    font-family: inherit;
    max-width: 175px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.header-branch-pill .branch-name-text {
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main, #0F172A);
}

.header-clock-pill {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #334155;
    font-size: 0.78rem;
    letter-spacing: -0.01em;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent, #84CC16);
    box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.25);
    animation: pulseGlow 2s infinite;
    flex-shrink: 0;
}
@keyframes pulseGlow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(132, 204, 22, 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(132, 204, 22, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(132, 204, 22, 0); }
}

/* Header Search Button */
.header-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid var(--border-color, #E2E8F0);
    border-radius: var(--radius-pill, 9999px);
    padding: 0 14px;
    height: 38px;
    cursor: pointer;
    color: #64748B;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
    width: 175px;
    box-sizing: border-box;
}
.header-search-btn:hover {
    border-color: #94A3B8;
    color: #0F172A;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.header-search-icon {
    font-size: 0.76rem;
    color: #94A3B8;
    flex-shrink: 0;
}
.header-search-placeholder {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-search-kbd {
    display: inline-flex;
    align-items: center;
    background: #F1F5F9;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #475569;
    border: 1px solid #E2E8F0;
    line-height: 1;
    flex-shrink: 0;
}

.header-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid var(--border-color, #E2E8F0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast, 0.15s ease);
    flex-shrink: 0;
}
.header-icon-btn:hover {
    color: var(--text-main, #0F172A);
    border-color: #94A3B8;
    transform: translateY(-1px);
}
.header-icon-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger, #EF4444);
    border: 1.5px solid #FFFFFF;
}

/* User Profile Header Pill */
.header-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 3px 12px 3px 3px;
    border-radius: var(--radius-pill, 9999px);
    border: 1px solid var(--border-color, #E2E8F0);
    background: #FFFFFF;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
    height: 38px;
    box-sizing: border-box;
    user-select: none;
}
.header-user-btn:hover {
    border-color: #94A3B8;
    background: #F8FAFC;
}
.header-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.header-user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main, #0F172A);
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-user-chevron {
    font-size: 0.6rem;
    color: #94A3B8;
    transition: transform 0.15s ease;
}
.dropdown.show .header-user-chevron {
    transform: rotate(180deg);
}

.dropdown-user-info {
    padding: 10px 18px;
    border-bottom: 1px solid #F1F5F9;
    margin-bottom: 4px;
}
.dropdown-user-name {
    font-size: 0.84rem;
    font-weight: 800;
    color: #0F172A;
}
.dropdown-user-role {
    font-size: 0.72rem;
    color: #64748B;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

/* Primary Dark Solid Action Button (Figma SaaS Pill) */
.btn-pill-dark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--dark-pill, #0F172A);
    color: var(--dark-pill-text, #FFFFFF) !important;
    padding: 0 20px;
    height: 38px;
    border-radius: var(--radius-pill, 9999px);
    font-size: 0.82rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-pill);
    transition: all var(--transition-fast, 0.15s ease);
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
}
.btn-pill-dark:hover {
    background: var(--dark-pill-hover, #1E293B);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);
}
.btn-pill-dark:active {
    transform: translateY(0);
}

/* ═══ DROPDOWN MENUS (LUXURY FLOATING SAAS CARDS) ═══ */
.dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #FFFFFF;
    border: 1px solid var(--border-color, #E2E8F0);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10), 0 4px 8px rgba(0, 0, 0, 0.04);
    padding: 8px 0;
    z-index: 1050;
    display: none;
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.dropdown-menu.show,
.dropdown.show > .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.dropdown-menu-left {
    right: auto;
    left: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

.dropdown-item:hover {
    background: #F1F5F9;
    color: #0F172A;
}

.dropdown-item i {
    font-size: 0.85rem;
    color: #94A3B8;
    width: 16px;
    text-align: center;
    transition: color 0.12s ease;
}

.dropdown-item:hover i {
    color: var(--primary, #0A5C36);
}

.dropdown-item.danger {
    color: #EF4444;
}

.dropdown-item.danger:hover {
    background: #FEF2F2;
    color: #DC2626;
}

.dropdown-item.danger i,
.dropdown-item.danger:hover i {
    color: #EF4444;
}

.dropdown-divider {
    height: 1px;
    background: #F1F5F9;
    margin: 6px 0;
}

.sidebar-footer .dropdown-menu {
    bottom: calc(100% + 8px);
    top: auto;
    left: 12px;
    right: 12px;
    min-width: auto;
}

/* ═══ TABS SYSTEM (LUXURY SAAS SEGMENTED / UNDERLINE TABS) ═══ */
.tabs-container {
    width: 100%;
}

.tabs,
.tab-nav,
.nav-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid var(--border-color, #E2E8F0);
    padding: 0 16px;
    background: #FFFFFF;
    border-top-left-radius: var(--radius-card, 16px);
    border-top-right-radius: var(--radius-card, 16px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-item,
.tab-nav-item,
.tab-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #64748B;
    background: transparent;
    border: none;
    border-bottom: 2.5px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    font-family: inherit;
    position: relative;
    outline: none;
}

.tab-item:hover,
.tab-nav-item:hover,
.tab-link:hover {
    color: var(--text-main, #0F172A);
    background: rgba(0, 0, 0, 0.02);
}

.tab-item.active,
.tab-nav-item.active,
.tab-link.active {
    color: var(--primary, #0A5C36);
    font-weight: 700;
    border-bottom-color: var(--primary, #0A5C36);
    background: transparent;
}

.tab-content {
    display: none;
    animation: tabFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-content.active,
.tab-pane.active {
    display: block !important;
}

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

.calc-tab-content {
    animation: tabFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}


/* ═══ 5. LUXURY GLASS CARDS & CONTAINERS (FIGMA SAAS TIER) ═══ */
.saas-card, .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 20px;
    box-shadow: 0 4px 24px -2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-5, 20px);
}
.saas-card:hover, .card:hover {
    box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(0, 0, 0, 0.03);
    border-color: rgba(203, 213, 225, 0.9);
}

.saas-card-header, .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 26px;
    border-bottom: 1px solid #F1F5F9;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.9) 100%);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}
.saas-card-title, .card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}
.saas-card-title i, .card-title i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(10, 92, 54, 0.08);
    color: var(--primary, #0A5C36);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(10, 92, 54, 0.06);
    margin-right: 0 !important;
}
.saas-card-subtitle, .card-subtitle {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}
.card-body {
    padding: 26px 28px;
}
.card-footer {
    padding: 16px 26px;
    border-top: 1px solid #F1F5F9;
    background: #FAFAFC;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

/* ═══ FORMS & INPUT GROUPS (FIGMA UXERFLOW TIER) ═══ */
.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 1024px) {
    .form-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 6px;
}
.form-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}
.form-label .required {
    color: var(--danger, #EF4444);
    font-weight: 800;
}
.form-control, .form-select {
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    border: 1.5px solid #CBD5E1;
    border-radius: 12px;
    background: #FFFFFF;
    font-size: 0.88rem;
    font-weight: 500;
    color: #0F172A;
    font-family: inherit;
    outline: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
}
.form-control:hover, .form-select:hover {
    border-color: #94A3B8;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary, #0A5C36);
    box-shadow: 0 0 0 4px rgba(10, 92, 54, 0.12);
    background: #FFFFFF;
}
.form-control::placeholder {
    color: #94A3B8;
    font-size: 0.84rem;
}

/* Input Groups (+91 Prefix, etc.) */
.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    border-radius: 12px;
}
.input-group .input-group-text {
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: #F8FAFC;
    border: 1.5px solid #CBD5E1;
    border-right: none;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    box-sizing: border-box;
}
.input-group .form-control {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}
.input-group .form-control:focus {
    z-index: 2;
}

/* Custom Checkboxes and Radios */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}
.form-check-input {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--border-color);
    cursor: pointer;
    accent-color: var(--primary);
}

/* ═══ 4-COLUMN KPI STAT GRID (LUXURY GLASS TIER) ═══ */
.kpi-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5, 20px);
    margin-bottom: var(--space-6, 24px);
}

.kpi-card {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.kpi-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    background: linear-gradient(90deg, var(--primary, #0A5C36) 0%, var(--accent, #84CC16) 100%);
    opacity: 0.85;
}
.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px -4px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(10, 92, 54, 0.15);
    border-color: rgba(203, 213, 225, 0.9);
}

.kpi-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kpi-icon-squircle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(10, 92, 54, 0.08);
    border: 1px solid rgba(10, 92, 54, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #0A5C36);
    font-size: 1.15rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(10, 92, 54, 0.08);
}
.kpi-card:hover .kpi-icon-squircle {
    background: var(--primary, #0A5C36);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(10, 92, 54, 0.25);
    transform: scale(1.05);
}

.kpi-delta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-pill, 9999px);
    font-size: 0.72rem;
    font-weight: 700;
}
.kpi-delta-pill.positive {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}
.kpi-delta-pill.neutral {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
}

.kpi-value {
    font-size: 2.1rem;
    font-weight: 900;
    color: #0F172A;
    letter-spacing: -0.035em;
    margin: 12px 0 4px;
    line-height: 1.1;
}

.kpi-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Hide Mobile Card List on Desktop to prevent duplicate raw text dump */
.mobile-list,
#mobile-leads-list {
    display: none !important;
}


/* ═══ 6. SEGMENTED CONTROL CAPSULES & FILTER PILLS ═══ */
.segmented-control {
    background: #F1F5F9;
    border-radius: var(--radius-pill);
    padding: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border-color);
}
.segmented-item {
    padding: 7px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    background: transparent;
}
.segmented-item:hover {
    color: var(--text-main);
}
.segmented-item.active {
    background: #FFFFFF;
    color: var(--text-main) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-weight: 800;
}

/* Filter Pill Chips */
.filter-pill-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-pill {
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}
.filter-pill:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}
.filter-pill.active {
    background: var(--dark-pill);
    color: #FFFFFF !important;
    border-color: var(--dark-pill);
    box-shadow: var(--shadow-pill);
}


/* ═══ 7. TASKORBIT STYLE SCHEDULE BAR (FLOATING MEETING CAPSULE) ═══ */
.schedule-pill-bar {
    background: var(--dark-pill);
    color: #FFFFFF;
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: var(--space-6);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
    overflow-x: auto;
    scrollbar-width: none;
}
.schedule-pill-bar::-webkit-scrollbar { display: none; }

.schedule-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.schedule-badge-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.schedule-timeline-track {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
}
.schedule-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #E2E8F0;
}
.schedule-slot-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    object-fit: cover;
}
.schedule-timeline-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #E2E8F0;
}
.schedule-time-badge {
    padding: 2px 9px;
    border-radius: var(--radius-pill, 9999px);
    background: rgba(132, 204, 22, 0.2);
    color: #A3E635;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}
.schedule-client-name {
    font-weight: 700;
    color: #FFFFFF;
}

/* ═══ 7.1 LUXURY EMERALD SLATE WELCOME BANNER (EXECUTIVE FINTECH TIER) ═══ */
.welcome-saas-banner {
    background: linear-gradient(135deg, #052314 0%, #0A3D24 50%, #03170D 100%);
    border-radius: 20px;
    padding: 26px 32px;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: var(--space-6, 24px);
    box-shadow: 0 14px 36px -4px rgba(5, 35, 20, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}
.welcome-saas-banner::before {
    content: '';
    position: absolute;
    top: -60px;
    right: 18%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.22) 0%, transparent 70%);
    pointer-events: none;
}
.welcome-saas-banner::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 22%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(132, 204, 22, 0.16) 0%, transparent 70%);
    pointer-events: none;
}
.welcome-banner-left {
    position: relative;
    z-index: 1;
}
.welcome-banner-left h2 {
    color: #FFFFFF !important;
    font-size: 1.65rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.03em;
    margin: 0 0 6px 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.welcome-banner-left p {
    color: rgba(226, 232, 240, 0.85) !important;
    font-size: 0.88rem !important;
    font-weight: 500;
    margin: 0 0 16px 0 !important;
}
.welcome-chip-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.welcome-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-pill, 9999px);
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    transition: all 0.2s ease;
}
.welcome-stat-chip:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35);
    animation: livePulseDot 2s infinite;
}
@keyframes livePulseDot {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.welcome-banner-right {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.welcome-banner-right .btn-pill-dark {
    padding: 9px 20px;
    font-size: 0.84rem;
    font-weight: 700;
    border-radius: var(--radius-pill, 9999px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.welcome-banner-right .btn-pill-dark:hover {
    transform: translateY(-2px);
}


/* ═══ 8. UXERFLOW ENTERPRISE DATA TABLE (STATE-OF-THE-ART) ═══ */
.saas-table-wrapper {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: var(--space-6);
}

.saas-table-toolbar {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

.saas-search-input-wrap {
    position: relative;
    min-width: 260px;
}
.saas-search-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.85rem;
}
.saas-search-input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    background: var(--body-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 0.84rem;
    color: var(--text-main);
    outline: none;
    transition: all var(--transition-fast);
}
.saas-search-input:focus {
    background: #FFFFFF;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-10);
}

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

.saas-table thead th {
    background: #FAFAFB;
    padding: 14px 20px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.saas-table tbody tr {
    transition: background var(--transition-fast);
}
.saas-table tbody tr:hover {
    background: #F8FAFC;
}

.saas-table tbody td {
    padding: 16px 20px;
    font-size: 0.85rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

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

/* Custom Squircle Checkboxes */
.saas-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1.5px solid var(--border-color);
    cursor: pointer;
    accent-color: var(--primary);
    transition: all var(--transition-fast);
}

/* Soft Pastel Status Pills (Uxerflow Style) */
.pill-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}
.pill-status.success {
    background: var(--success-bg);
    color: var(--success-text);
}
.pill-status.info {
    background: var(--info-bg);
    color: var(--info-text);
}
.pill-status.warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}
.pill-status.danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}
.pill-status.purple {
    background: var(--purple-bg);
    color: var(--purple-text);
}
.pill-status.neutral {
    background: #F1F5F9;
    color: var(--text-secondary);
}

/* Floating Bulk Action Bar */
.bulk-action-floating-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark-pill);
    color: #FFFFFF;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.4);
    z-index: var(--z-floating-bar);
    transition: transform var(--transition-base);
    opacity: 0;
    pointer-events: none;
}
.bulk-action-floating-bar.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.bulk-count-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
}
.bulk-btn {
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity var(--transition-fast);
}
.bulk-btn:hover { opacity: 0.8; }


/* ═══ 9. TASKLIFY KANBAN PIPELINE BOARD ═══ */
.kanban-board-saas {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 24px;
    scrollbar-width: thin;
}

.kanban-column-saas {
    width: 310px;
    min-width: 310px;
    background: var(--body-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.kanban-column-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--text-main);
}
.kanban-count-pill {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}

.kanban-card-saas {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    cursor: grab;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.kanban-card-saas:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-focus);
}

.kanban-priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 700;
    width: fit-content;
}


/* ═══ 10. SETTINGS SUB-NAVIGATION TABS (FIGMA SAAS STYLE) ═══ */
.settings-nav-tabs {
    display: flex;
    gap: 8px;
    background: #FFFFFF;
    padding: 6px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
    overflow-x: auto;
    scrollbar-width: none;
}
.settings-nav-tabs::-webkit-scrollbar { display: none; }

.settings-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.settings-nav-tab i {
    font-size: 0.95rem;
    color: var(--text-light);
    transition: color var(--transition-fast);
}
.settings-nav-tab:hover {
    color: var(--text-main);
    background: var(--body-bg);
}
.settings-nav-tab.active {
    background: var(--dark-pill);
    color: #FFFFFF !important;
    box-shadow: var(--shadow-pill);
}
.settings-nav-tab.active i {
    color: var(--accent) !important;
}


/* ═══ 11. FORM CONTROLS & UTILITIES ═══ */
.form-control, .form-select {
    width: 100%;
    padding: 11px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-main);
    outline: none;
    transition: all var(--transition-fast);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-10);
    background: #FFFFFF;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, #0A5C36 0%, #064025 100%);
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(10, 92, 54, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #0D6E41 0%, #084D2C 100%);
    transform: translateY(-1.5px);
    box-shadow: 0 8px 22px rgba(10, 92, 54, 0.38);
}
.btn-primary:active {
    transform: translateY(0);
}
.btn-secondary {
    background: #FFFFFF;
    color: #334155 !important;
    border: 1.5px solid #CBD5E1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.btn-secondary:hover {
    background: #F8FAFC;
    border-color: #94A3B8;
    color: #0F172A !important;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.btn-sm {
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 8px;
}
.btn-lg {
    padding: 12px 28px;
    font-size: 0.92rem;
    font-weight: 800;
    border-radius: 14px;
    letter-spacing: -0.01em;
}
.btn-pill {
    border-radius: var(--radius-pill);
}

/* ═══ 10. ENTERPRISE ZERO-POPUP POLICY: IN-PAGE PARENT CARDS ═══ */
.modal-overlay,
.modal-backdrop,
.crm-modal-backdrop,
.leave-modal-backdrop,
div[style*="position:fixed"],
div[style*="position: fixed"] {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 10 !important;
    display: none;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    margin: 0 0 24px 0 !important;
    box-sizing: border-box !important;
}

.modal-overlay.active,
.modal-overlay.show,
.modal-overlay.open,
.modal-backdrop.active,
.modal-backdrop.show,
.crm-modal-backdrop.active,
.crm-modal-backdrop.show,
.crm-modal-backdrop.open,
.leave-modal-backdrop.active,
.leave-modal-backdrop.show,
.leave-modal-backdrop.open,
div[style*="position:fixed"].show,
div[style*="position: fixed"].show {
    display: block !important;
}

.modal,
.crm-modal-card,
.modal-overlay > div,
.modal-backdrop > div,
.crm-modal-backdrop > div,
.leave-modal-backdrop > div,
div[style*="position:fixed"] > div,
div[style*="position: fixed"] > div {
    background: #FFFFFF !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 24px rgba(10, 92, 54, 0.08), 0 0 0 1px rgba(10, 92, 54, 0.12) !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    border: 1.5px solid var(--primary, #0A5C36) !important;
    animation: parentCardFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    margin: 0 0 24px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Reset nested modal elements so they fit inside parent card seamlessly */
.modal .modal-dialog,
.modal .modal-content,
.modal-dialog .modal-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    flex: 1 1 auto !important;
    animation: none !important;
    margin: 0 !important;
}

.modal-sm { max-width: 100% !important; }
.modal-md { max-width: 100% !important; }
.modal-lg { max-width: 100% !important; }
.modal-xl { max-width: 100% !important; }

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

.modal-header {
    padding: 18px 24px !important;
    border-bottom: 1px solid var(--border-color, #E2E8F0) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #F8FAFC !important;
    border-top-left-radius: 18px !important;
    border-top-right-radius: 18px !important;
    flex-shrink: 0 !important;
}

.modal-title {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: var(--text-main, #0F172A) !important;
    letter-spacing: -0.02em !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
}

.modal-close {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    border: 1px solid var(--border-color, #E2E8F0) !important;
    background: #FFFFFF !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748B !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-size: 1.1rem !important;
    line-height: 1 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

.modal-close:hover {
    background: #F1F5F9 !important;
    color: #DC2626 !important;
    border-color: #CBD5E1 !important;
}

.modal-body {
    padding: 24px !important;
    flex: 1 1 auto !important;
    overflow: visible !important;
    max-height: none !important;
    box-sizing: border-box !important;
}

.modal-footer {
    padding: 16px 24px !important;
    border-top: 1px solid var(--border-color, #E2E8F0) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    background: #F8FAFC !important;
    border-bottom-left-radius: 18px !important;
    border-bottom-right-radius: 18px !important;
    flex-shrink: 0 !important;
}

/* ═══ 11. STATUS BADGES & PASTEL PILLS ═══ */
.status-badge, .priority-badge, .source-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
    background: rgba(148, 163, 184, 0.12);
    background: color-mix(in srgb, var(--badge-color, #94A3B8) 12%, transparent);
    color: var(--badge-color, #334155);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-color: color-mix(in srgb, var(--badge-color, #94A3B8) 25%, transparent);
    white-space: nowrap;
}
.status-badge i, .priority-badge i, .source-badge i {
    font-size: 0.58rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}
.badge-primary { background: var(--primary-10); color: var(--primary); }
.badge-secondary { background: #F1F5F9; color: var(--text-secondary); }
.badge-success { background: var(--success-bg); color: var(--success-text); }
.badge-warning { background: var(--warning-bg); color: var(--warning-text); }
.badge-danger { background: var(--danger-bg); color: var(--danger-text); }
.badge-info { background: var(--info-bg); color: var(--info-text); }

/* Buttons Enhancement */
.btn-xs {
    padding: 4px 10px;
    font-size: 0.72rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-ghost:hover {
    background: #F1F5F9;
    color: var(--text-main);
}
.btn-ghost.danger {
    color: var(--danger, #EF4444);
}
.btn-ghost.danger:hover {
    background: #FEF2F2;
    color: #DC2626;
}
.btn-ghost.primary {
    color: var(--primary, #0A5C36);
}
.btn-ghost.primary:hover {
    background: var(--primary-10);
    color: var(--primary-dark);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-outline:hover {
    background: #F8FAFC;
    border-color: var(--text-main);
}
.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}
.btn-whatsapp {
    background: #25D366;
    color: #FFFFFF !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-whatsapp:hover {
    background: #1EBE5D;
}
.btn-whatsapp i,
.btn-whatsapp .fa-whatsapp {
    font-size: 1rem;
    line-height: 1;
    display: inline-block;
}

/* ═══ WORLD-CLASS FROSTED PASTEL TABLE ACTION BUTTONS (STRIPE / LINEAR TIER) ═══ */
table .btn-icon,
.saas-table .btn-icon,
.dataTables_wrapper .btn-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.86rem !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border: 1px solid transparent !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

/* WhatsApp: Elegant Frosted Mint Squircle */
table .btn-whatsapp,
.saas-table .btn-whatsapp,
.dataTables_wrapper .btn-whatsapp {
    background: rgba(37, 211, 102, 0.14) !important;
    color: #15803D !important;
    border: 1px solid rgba(37, 211, 102, 0.32) !important;
}
table .btn-whatsapp i,
.saas-table .btn-whatsapp i,
.dataTables_wrapper .btn-whatsapp i {
    color: #15803D !important;
    font-size: 1.05rem !important;
    line-height: 1 !important;
    display: inline-block !important;
}
table .btn-whatsapp:hover,
.saas-table .btn-whatsapp:hover,
.dataTables_wrapper .btn-whatsapp:hover {
    background: #25D366 !important;
    color: #FFFFFF !important;
    border-color: #25D366 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.38) !important;
}
table .btn-whatsapp:hover i,
.saas-table .btn-whatsapp:hover i,
.dataTables_wrapper .btn-whatsapp:hover i {
    color: #FFFFFF !important;
}

/* View Profile: Frosted Emerald/Brand Squircle */
table .btn-primary.btn-icon,
.saas-table .btn-primary.btn-icon,
.dataTables_wrapper .btn-primary.btn-icon {
    background: rgba(10, 92, 54, 0.1) !important;
    color: var(--primary, #0A5C36) !important;
    border: 1px solid rgba(10, 92, 54, 0.22) !important;
}
table .btn-primary.btn-icon:hover,
.saas-table .btn-primary.btn-icon:hover,
.dataTables_wrapper .btn-primary.btn-icon:hover {
    background: var(--primary, #0A5C36) !important;
    color: #FFFFFF !important;
    border-color: var(--primary, #0A5C36) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 92, 54, 0.35) !important;
}

/* More Actions Dropdown: Frosted Slate Squircle */
table .btn-ghost.btn-icon,
.saas-table .btn-ghost.btn-icon,
.dataTables_wrapper .btn-ghost.btn-icon {
    background: rgba(148, 163, 184, 0.14) !important;
    color: #475569 !important;
    border: 1px solid rgba(203, 213, 225, 0.6) !important;
}
table .btn-ghost.btn-icon:hover,
.saas-table .btn-ghost.btn-icon:hover,
.dataTables_wrapper .btn-ghost.btn-icon:hover {
    background: #334155 !important;
    color: #FFFFFF !important;
    border-color: #334155 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 65, 85, 0.25) !important;
}

.btn-success {
    background: var(--success);
    color: #FFFFFF !important;
}
.btn-success:hover {
    background: #15803D;
}
.btn-danger {
    background: var(--danger);
    color: #FFFFFF !important;
}
.btn-danger:hover {
    background: #B91C1C;
}
.btn-warning {
    background: var(--warning);
    color: #FFFFFF !important;
}
.btn-warning:hover {
    background: #D97706;
}
.btn-info {
    background: var(--info);
    color: #FFFFFF !important;
}

/* Action Bar & Search */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: var(--space-5, 20px);
    flex-wrap: wrap;
}
.action-bar-left, .action-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.search-box .search-icon {
    position: absolute;
    left: 16px;
    color: #94A3B8;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 2;
}
.search-box .form-control {
    padding-left: 42px;
    min-width: 280px;
    height: 42px;
    border-radius: var(--radius-pill, 9999px);
    background: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    font-size: 0.84rem;
    transition: all 0.2s ease;
}
.search-box .form-control:focus {
    border-color: var(--primary, #0A5C36);
    box-shadow: 0 0 0 4px rgba(10, 92, 54, 0.12);
    min-width: 320px;
}

.view-toggle {
    display: inline-flex;
    background: #F1F5F9;
    padding: 3px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
}
.view-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.view-toggle-btn.active {
    background: #FFFFFF;
    color: var(--text-main);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.filter-chip .chip-x {
    cursor: pointer;
    color: var(--text-light);
    font-size: 0.65rem;
}
.filter-chip .chip-x:hover {
    color: var(--danger);
}

/* ═══ ULTIMATE UXERFLOW DATATABLES OVERRIDE ═══ */
/* ═══ ULTIMATE LUXURY TABLE SYSTEM (DATA-TABLE & BOOTSTRAP ADAPTER) ═══ */
div.dataTables_wrapper {
    width: 100% !important;
    position: relative !important;
    clear: both !important;
    border: none !important;
    background: #FFFFFF !important;
}

table,
.table,
table.dataTable,
table.saas-table,
.data-table,
.sal-table,
.inv-table,
.voucher-table,
.totals-table,
.summary-table,
.stmt-table,
.checklist-table,
.terms-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: #FFFFFF !important;
    font-family: inherit;
}

table.dataTable.no-footer,
table.saas-table.no-footer,
.table.no-footer {
    border-bottom: 1px solid var(--border-color, #E2E8F0) !important;
}

table thead th,
table thead td,
.table thead th,
.table thead td,
table.dataTable thead th,
table.dataTable thead td,
table.saas-table thead th,
.data-table th {
    background: #F8FAFC !important;
    padding: 14px 18px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    color: #64748B !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    border: none !important;
    border-bottom: 1.5px solid #E2E8F0 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none !important;
    position: relative;
    cursor: pointer;
}
table.dataTable thead .sorting:after {
    content: " ↕";
    font-size: 0.75rem;
    color: #94A3B8;
    opacity: 0.5;
}
table.dataTable thead .sorting_asc:after {
    content: " ↑";
    font-size: 0.75rem;
    color: var(--primary);
    opacity: 1;
}
table.dataTable thead .sorting_desc:after {
    content: " ↓";
    font-size: 0.75rem;
    color: var(--primary);
    opacity: 1;
}

table tbody tr,
.table tbody tr,
table.dataTable tbody tr,
table.saas-table tbody tr,
.data-table tbody tr {
    background-color: #FFFFFF !important;
    transition: background 0.15s ease !important;
}

table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd,
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #FBFDFB !important;
}

table tbody tr:hover,
.table tbody tr:hover,
table.dataTable tbody tr:hover,
table.saas-table tbody tr:hover,
.table-hover tbody tr:hover,
.data-table tbody tr:hover {
    background-color: #F8FAFC !important;
}

table tbody td,
.table tbody td,
table.dataTable tbody td,
table.saas-table tbody td,
.data-table td,
.sal-table td,
.inv-table td,
.voucher-table td {
    padding: 14px 18px !important;
    font-size: 0.85rem !important;
    color: #0F172A !important;
    border: none !important;
    border-bottom: 1px solid #F1F5F9 !important;
    vertical-align: middle !important;
    line-height: 1.4 !important;
}

.table-sm th,
.table-sm td {
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
}

table tbody tr:last-child td,
.table tbody tr:last-child td,
table.dataTable tbody tr:last-child td,
table.saas-table tbody tr:last-child td {
    border-bottom: none !important;
}

table td[colspan] {
    padding: 36px 20px !important;
    font-size: 0.88rem !important;
    color: #64748B !important;
    text-align: center !important;
    background: #FAFAFC !important;
}

table td .btn-xs,
table td .btn-icon,
table td .btn-ghost {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

/* Card Header Action & Sub-bar Navigation Buttons (HRM / Module Pills) */
.card-header .btn-sm {
    border-radius: var(--radius-pill, 9999px) !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    padding: 6px 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.15s ease !important;
}

.card-header a.btn-outline.btn-sm,
.card-header button.btn-outline.btn-sm {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    color: #475569 !important;
}
.card-header a.btn-outline.btn-sm:hover,
.card-header button.btn-outline.btn-sm:hover {
    background: #F8FAFC !important;
    color: #0F172A !important;
    border-color: #94A3B8 !important;
}
.card-header a.btn-primary.btn-sm,
.card-header button.btn-primary.btn-sm {
    background: var(--primary, #0A5C36) !important;
    color: #FFFFFF !important;
    border: 1px solid var(--primary, #0A5C36) !important;
    box-shadow: 0 2px 8px rgba(10, 92, 54, 0.25) !important;
}

/* Tab badges inverted contrast */
.tab-item.active .badge-primary {
    background: var(--primary, #0A5C36) !important;
    color: #FFFFFF !important;
}
.tab-item.active .badge-secondary {
    background: #E2E8F0 !important;
    color: #0F172A !important;
}
.tab-item.active .badge-warning {
    background: #F59E0B !important;
    color: #FFFFFF !important;
}

/* Table Responsive & Containers */
.table-responsive,
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}
.table-responsive::-webkit-scrollbar,
.table-container::-webkit-scrollbar {
    height: 6px;
}
.table-responsive::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 6px;
}

/* Pagination Pills */
div.dataTables_wrapper .dataTables_info {
    padding: 18px 24px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #64748B !important;
}

div.dataTables_wrapper .dataTables_paginate {
    padding: 16px 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
}

div.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 12px !important;
    border-radius: 9999px !important;
    border: 1px solid #E2E8F0 !important;
    background: #FFFFFF !important;
    color: #334155 !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
    transition: all 0.15s ease !important;
}

div.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #F8FAFC !important;
    border-color: #0F172A !important;
    color: #0F172A !important;
}

div.dataTables_wrapper .dataTables_paginate .paginate_button.current,
div.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #0F172A !important;
    border-color: #0F172A !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22) !important;
}

div.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
div.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    border-color: #E2E8F0 !important;
    background: #FFFFFF !important;
    color: #94A3B8 !important;
}

/* Kanban Board Aliases */
.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 24px;
    min-height: calc(100vh - 220px);
}
.kanban-column {
    flex: 0 0 320px;
    background: #F8FAFC;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}
.kanban-column-header {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid transparent;
}
.kanban-column-title {
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}
.kanban-count {
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    background: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}
.kanban-column-body {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.kanban-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: all var(--transition-fast);
}
.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
    border-color: var(--border-focus);
}
.kanban-card-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-main);
}
.kanban-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Card View Grid */
.leads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}
.lead-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.lead-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
    border-color: var(--border-focus);
}
.lead-card-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}
.lead-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.lead-card-amount {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.lead-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

/* Lead age pills */
.lead-age-badge {
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    font-size: 0.65rem;
    font-weight: 700;
}
.lead-age-fresh { background: #DCFCE7; color: #15803D; }
.lead-age-normal { background: #E0F2FE; color: #0369A1; }
.lead-age-aging { background: #FEF3C7; color: #B45309; }
.lead-age-stale { background: #FEE2E2; color: #B91C1C; }

/* ═══ 13. STAT CARDS & KPI SYSTEM ═══ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color, #E2E8F0);
    border-radius: 16px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #CBD5E1;
}

.stat-icon,
.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #FFFFFF;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary, #0A5C36), var(--primary-dark, #064024));
}

.stat-content,
.stat-card-content {
    flex: 1;
    min-width: 0;
}

.stat-label,
.stat-card-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-value,
.stat-card-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat-sub {
    font-size: 0.73rem;
    color: #94A3B8;
    margin-top: 4px;
    font-weight: 500;
}

/* ═══ 14. AVATAR SYSTEM ═══ */
.avatar,
.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
    user-select: none;
    flex-shrink: 0;
    background: #0A5C36;
    letter-spacing: 0.02em;
}
.avatar-xs { width: 24px; height: 24px; font-size: 0.65rem; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-md { width: 40px; height: 40px; font-size: 0.88rem; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.15rem; }
.avatar-xl { width: 68px; height: 68px; font-size: 1.4rem; }

/* ═══ 15. CSS GRID & ROW/COL UTILITIES ═══ */
.grid { display: grid; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}
.col, [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
}
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }

/* ═══ 16. FLEXBOX UTILITIES ═══ */
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-block { display: block !important; }
.d-none { display: none !important; }
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.items-center, .align-center, .align-items-center { align-items: center !important; }
.items-start { align-items: flex-start !important; }
.items-end { align-items: flex-end !important; }
.justify-between, .justify-content-between { justify-content: space-between !important; }
.justify-center, .justify-content-center { justify-content: center !important; }
.justify-end, .justify-content-end { justify-content: flex-end !important; }
.justify-start { justify-content: flex-start !important; }
.gap-1 { gap: 6px !important; }
.gap-2 { gap: 10px !important; }
.gap-3 { gap: 16px !important; }
.gap-4 { gap: 24px !important; }
.gap-5 { gap: 32px !important; }
.flex-1 { flex: 1 1 0% !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

/* ═══ 17. SPACING UTILITIES ═══ */
.mr-1 { margin-right: 4px !important; }
.mr-2 { margin-right: 8px !important; }
.mr-3 { margin-right: 14px !important; }
.mr-4 { margin-right: 20px !important; }
.ml-1 { margin-left: 4px !important; }
.ml-2 { margin-left: 8px !important; }
.ml-3 { margin-left: 14px !important; }
.ml-4 { margin-left: 20px !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 14px !important; }
.mt-4 { margin-top: 20px !important; }
.mt-5 { margin-top: 28px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 14px !important; }
.mb-4 { margin-bottom: 20px !important; }
.mb-5 { margin-bottom: 28px !important; }
.mb-6 { margin-bottom: 36px !important; }
.p-0 { padding: 0 !important; }
.p-1 { padding: 4px !important; }
.p-2 { padding: 8px !important; }
.p-3 { padding: 14px !important; }
.p-4 { padding: 20px !important; }
.p-5 { padding: 28px !important; }
.px-1 { padding-left: 4px !important; padding-right: 4px !important; }
.px-2 { padding-left: 8px !important; padding-right: 8px !important; }
.px-3 { padding-left: 14px !important; padding-right: 14px !important; }
.px-4 { padding-left: 20px !important; padding-right: 20px !important; }
.px-5 { padding-left: 28px !important; padding-right: 28px !important; }
.py-1 { padding-top: 4px !important; padding-bottom: 4px !important; }
.py-2 { padding-top: 8px !important; padding-bottom: 8px !important; }
.py-3 { padding-top: 14px !important; padding-bottom: 14px !important; }
.py-4 { padding-top: 20px !important; padding-bottom: 20px !important; }
.py-5 { padding-top: 28px !important; padding-bottom: 28px !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

/* ═══ 18. TYPOGRAPHY & TEXT HELPERS ═══ */
.font-mono { font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace !important; }
.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.font-medium { font-weight: 500 !important; }
.font-extrabold { font-weight: 800 !important; }

.text-xs { font-size: 0.72rem !important; }
.text-sm { font-size: 0.82rem !important; }
.text-md { font-size: 0.95rem !important; }
.text-lg { font-size: 1.1rem !important; }
.text-xl { font-size: 1.3rem !important; }
.text-2xl { font-size: 1.6rem !important; }

.text-muted { color: #64748B !important; }
.text-dark { color: #0F172A !important; }
.text-primary { color: var(--primary, #0A5C36) !important; }
.text-success { color: #10B981 !important; }
.text-danger { color: #EF4444 !important; }
.text-warning { color: #F59E0B !important; }
.text-info { color: #3B82F6 !important; }
.text-secondary { color: #64748B !important; }

.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }

.uppercase { text-transform: uppercase !important; }
.tracking-wider { letter-spacing: 0.05em !important; }
.nowrap { white-space: nowrap !important; }
.cursor-pointer { cursor: pointer !important; }

/* ═══ 19. INFO CELLS & DETAIL BLOCKS ═══ */
.info-cell, .info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.lbl {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.val {
    font-size: 0.88rem;
    font-weight: 600;
    color: #0F172A;
}

/* ═══ 20. ALERTS & EMPTY STATES ═══ */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}
.alert-success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.alert-danger { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.alert-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.alert-info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }

.empty-state {
    padding: 48px 24px;
    text-align: center;
}
.empty-state-icon {
    font-size: 3rem;
    color: #CBD5E1;
    margin-bottom: 16px;
}
.empty-state-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}
.empty-state-text {
    font-size: 0.85rem;
    color: #64748B;
    max-width: 420px;
    margin: 0 auto;
}

/* ═══ 21. SETTINGS & THEMING COMPONENTS ═══ */
.color-picker-row { display: flex; gap: 12px; flex-wrap: wrap; }
.color-picker-item { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 130px; }
.color-picker-item label { font-size: 0.75rem; font-weight: 700; color: #64748B; text-transform: uppercase; letter-spacing: 0.05em; }
.color-swatch-input { width: 100%; height: 44px; border-radius: 10px; border: 2px solid #E2E8F0; cursor: pointer; padding: 3px; background: none; transition: border-color 0.2s; }
.color-swatch-input:hover { border-color: var(--primary); }
.font-preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 8px; }
.font-preset-btn { padding: 8px 12px; border-radius: 10px; border: 2px solid #E2E8F0; background: white; cursor: pointer; font-size: 0.8rem; transition: all 0.15s; text-align: center; font-weight: 600; }
.font-preset-btn:hover, .font-preset-btn.active { border-color: var(--primary); background: var(--primary-10); color: var(--primary); }
.radius-preview-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.radius-preview-btn { padding: 8px 16px; border: 2px solid #E2E8F0; background: white; cursor: pointer; font-size: 0.8rem; transition: all 0.15s; font-weight: 600; }
.radius-preview-btn:hover, .radius-preview-btn.active { border-color: var(--primary); background: var(--primary-10); color: var(--primary); }
.theme-live-preview { border-radius: 14px; overflow: hidden; border: 2px solid #E2E8F0; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.tlp-sidebar { padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.tlp-nav-item { padding: 7px 10px; border-radius: 8px; font-size: 0.75rem; color: rgba(255,255,255,0.6); display: flex; align-items: center; gap: 8px; cursor: default; }
.tlp-nav-item.active-item { color: white; font-weight: 600; }
.tlp-header { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.tlp-content { padding: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.tlp-card { flex: 1; min-width: 80px; height: 54px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 600; }

/* ═══ 22. LUXURY FLOATING QUICK TASK FAB (DESKTOP & MOBILE) ═══ */
.quick-actions-fab {
    position: fixed;
    right: 28px;
    bottom: 58px;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.quick-actions-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0A5C36 0%, #063A22 100%);
    color: #FFFFFF;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(10, 92, 54, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    outline: none;
}
.quick-actions-btn::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(132, 204, 22, 0.4) 0%, transparent 70%);
    animation: fabAura 2.5s infinite;
    pointer-events: none;
}
@keyframes fabAura {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 0.15; }
    100% { transform: scale(0.95); opacity: 0.8; }
}
.quick-actions-btn:hover {
    transform: scale(1.08) rotate(15deg);
    background: linear-gradient(135deg, #0D6E41 0%, #084D2C 100%);
    box-shadow: 0 12px 32px rgba(10, 92, 54, 0.55);
}

.quick-actions-menu {
    position: absolute;
    bottom: 68px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    min-width: 190px;
}
.quick-actions-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.quick-actions-menu .quick-action-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.quick-actions-menu .quick-action-label {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #FFFFFF;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-pill, 9999px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
    transition: all 0.2s ease;
}
.quick-actions-menu .quick-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #FFFFFF;
    color: var(--primary, #0A5C36);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}
.quick-actions-menu .quick-action-item:hover .quick-action-label {
    background: var(--primary, #0A5C36);
    transform: translateX(-3px);
    box-shadow: 0 6px 16px rgba(10, 92, 54, 0.35);
}
.quick-actions-menu .quick-action-item:hover .quick-action-icon {
    background: var(--primary, #0A5C36);
    color: #FFFFFF;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(10, 92, 54, 0.4);
}


/* ═══ 23. LIVE REAL-TIME ALERT DECK & OPERATIONS TICKER ═══ */
.realtime-alert-deck {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: var(--space-6, 24px);
}
@media (max-width: 1024px) {
    .realtime-alert-deck { grid-template-columns: 1fr; }
}

.alert-metric-card {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 18px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.85);
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.alert-metric-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}
.alert-metric-card.urgent {
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.8) 0%, rgba(255, 255, 255, 0.96) 100%);
}
.alert-metric-card.urgent::before {
    background: #EF4444;
}
.alert-metric-card.warning {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.8) 0%, rgba(255, 255, 255, 0.96) 100%);
}
.alert-metric-card.warning::before {
    background: #F59E0B;
}
.alert-metric-card.info {
    border-color: rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.8) 0%, rgba(255, 255, 255, 0.96) 100%);
}
.alert-metric-card.info::before {
    background: #3B82F6;
}
.alert-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -2px rgba(15, 23, 42, 0.08);
}

.alert-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.alert-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.alert-metric-card.urgent .alert-card-icon { background: rgba(239, 68, 68, 0.12); color: #DC2626; }
.alert-metric-card.warning .alert-card-icon { background: rgba(245, 158, 11, 0.12); color: #D97706; }
.alert-metric-card.info .alert-card-icon { background: rgba(59, 130, 246, 0.12); color: #2563EB; }

.alert-card-title {
    font-size: 0.86rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 2px 0;
}
.alert-card-sub {
    font-size: 0.74rem;
    color: #64748B;
    font-weight: 500;
    margin: 0;
}

.alert-card-btn {
    padding: 6px 14px;
    border-radius: var(--radius-pill, 9999px);
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.alert-metric-card.urgent .alert-card-btn { background: #DC2626; color: #FFFFFF; }
.alert-metric-card.urgent .alert-card-btn:hover { background: #B91C1C; }
.alert-metric-card.warning .alert-card-btn { background: #D97706; color: #FFFFFF; }
.alert-metric-card.warning .alert-card-btn:hover { background: #B45309; }
.alert-metric-card.info .alert-card-btn { background: #2563EB; color: #FFFFFF; }
.alert-metric-card.info .alert-card-btn:hover { background: #1D4ED8; }

/* Real-Time Live Operations Ticker */
.live-operations-ticker {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-pill, 9999px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 7px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--space-5, 20px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}
.ticker-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0F172A;
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: var(--radius-pill, 9999px);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}
.ticker-content {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 16px;
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ticker-item i {
    color: var(--primary);
    font-size: 0.75rem;
}

/* ═══ 24. TARGET VELOCITY & PERFORMANCE METER ═══ */
.target-velocity-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    padding: 22px 24px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
    margin-bottom: var(--space-5, 20px);
}
.target-velocity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.target-velocity-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0F172A;
    display: flex;
    align-items: center;
    gap: 8px;
}
.target-velocity-metric {
    font-size: 1.45rem;
    font-weight: 900;
    color: #0A5C36;
    letter-spacing: -0.02em;
}
.target-velocity-bar {
    height: 10px;
    background: #E2E8F0;
    border-radius: 9999px;
    overflow: hidden;
    margin: 8px 0 10px;
    position: relative;
}
.target-velocity-fill {
    height: 100%;
    background: linear-gradient(90deg, #0A5C36 0%, #84CC16 100%);
    border-radius: 9999px;
    transition: width 1s ease-in-out;
}
.target-velocity-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    color: #64748B;
    font-weight: 600;
}

/* ═══ 25. DASHBOARD 8/4 SPLIT ARCHITECTURE ═══ */
.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 22px;
    align-items: start;
}
@media (max-width: 1280px) {
    .dashboard-main-grid { grid-template-columns: 1fr; }
}

/* ═══ 26. CREATE LEAD 2-COLUMN ERGONOMIC SPLIT LAYOUT ═══ */
.create-lead-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
    width: 100%;
}
@media (max-width: 1200px) {
    .create-lead-layout { grid-template-columns: 1fr; }
}

.sticky-intelligence-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.live-dossier-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 4px 24px -2px rgba(15, 23, 42, 0.04);
}
.live-dossier-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F1F5F9;
    margin-bottom: 16px;
}
.live-dossier-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0A5C36 0%, #064025 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(10, 92, 54, 0.25);
}
.live-dossier-name {
    font-size: 1rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0;
}
.live-dossier-phone {
    font-size: 0.78rem;
    color: #64748B;
    font-weight: 600;
    margin-top: 2px;
}
.dossier-checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    background: #F8FAFC;
    margin-bottom: 8px;
    border: 1px solid #F1F5F9;
}
.dossier-checklist-item i {
    color: var(--primary);
    font-size: 0.85rem;
}

/* Mobile Elements & Utilities (Hidden by default on Desktop) */
.show-mobile,
.show-mobile-flex {
    display: none !important;
}

.bottom-nav {
    display: none !important;
}

.mobile-search-overlay {
    display: none !important;
}

/* ═══ 27. RESPONSIVE BREAKPOINTS ═══ */
@media (max-width: 1200px) {
    .kpi-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .header-clock-pill { display: none !important; }
    .header-search-btn { width: 140px; }
    .header-branch-pill { max-width: 170px; }
}

@media (max-width: 992px) {
    .header-search-placeholder,
    .header-search-kbd { display: none; }
    .header-search-btn { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%; }
    .header-user-name { display: none; }
    .header-user-btn { padding: 3px; }
    .page-content, .content-container { padding: 20px 24px; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
    }
    .kpi-grid-4 { grid-template-columns: 1fr; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
    .stats-grid { grid-template-columns: 1fr !important; }
    .col-md-6, .col-md-4, .col-md-3, .col-md-8 { flex: 0 0 100% !important; max-width: 100% !important; }
    .content-container, .page-content { padding: 16px !important; }
    .top-header { padding: 0 16px !important; height: 62px !important; }
    .hide-mobile { display: none !important; }
    .show-mobile { display: flex !important; }
    .show-mobile-flex { display: flex !important; }
    .modal { border-radius: 16px !important; }
    .modal-header { padding: 16px 18px !important; }
    .modal-body { padding: 18px 16px !important; }
    .modal-footer { padding: 14px 16px !important; }

    .bottom-nav {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #FFFFFF;
        border-top: 1px solid var(--border-color, #E2E8F0);
        z-index: 1000;
        padding: 0;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
    }
    .bottom-nav-inner {
        display: flex;
        align-items: stretch;
        height: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: var(--text-muted, #64748B);
        font-size: 0.65rem;
        font-weight: 600;
        padding: 4px 0;
        position: relative;
    }
    .bottom-nav-item i {
        font-size: 1.15rem;
    }
    .bottom-nav-item.active {
        color: var(--primary, #0A5C36);
        font-weight: 700;
    }
    .bottom-nav-item .nav-badge {
        position: absolute;
        top: 6px;
        right: 50%;
        margin-right: -18px;
        background: var(--danger, #EF4444);
        color: #FFFFFF;
        font-size: 0.6rem;
        font-weight: 700;
        padding: 1px 5px;
        border-radius: 9999px;
        min-width: 16px;
        text-align: center;
    }
}

/* ═══ 27. APP FIXED BOTTOM FOOTER (LUXURY SAAS TIER) ═══ */
.app-footer {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    height: 44px;
    padding: 0 var(--space-6, 24px);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-color, #E2E8F0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted, #64748B);
    z-index: 95;
    transition: left var(--transition-smooth);
    box-sizing: border-box;
}

.sidebar.collapsed ~ .main-content .app-footer {
    left: var(--sidebar-collapsed-width);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary, #475569);
    font-size: 0.875rem;
}

.footer-left strong {
    color: var(--text-main, #0F172A);
    font-weight: 700;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary, #475569);
    font-size: 0.875rem;
}

.footer-dev-link {
    color: var(--primary, #0A5C36);
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-dev-link:hover {
    color: var(--primary-dark, #064024);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .app-footer {
        position: relative;
        left: 0 !important;
        bottom: auto;
        height: auto;
        padding: 12px 16px;
        margin-bottom: 64px;
        flex-direction: column;
        gap: 4px;
        text-align: center;
        background: #FFFFFF;
    }
}

