  
:root {
    --crm-primary: #4F46E5;
    --crm-dark: #1E1B4B;
    --crm-accent: #6366F1;
    --crm-light: #EEF2FF;
    --module-primary: #4F46E5;
    --module-primary-hover: #4338CA;
    --med-primary: #4F46E5;
    --med-dark: #1E1B4B;
    --med-accent: #6366F1;
    --med-light: #EEF2FF;
    --med-card: #FFFFFF;
    --med-line: #E2E8F0;
    --med-text-muted: #64748B;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --cream: #F8FAFC;
    --card: #FFFFFF;
    --line: #E2E8F0;
    --ink: #0F172A;
    --ink-soft: #64748B;
    --nav-h: 64px;
    --header-h: 64px;
}

/* Standalone entity detail pages */
.detail-page { overflow-y: auto; flex: 1; padding: 2rem; }
.detail-actions { display:flex; gap:.5rem; flex-wrap:wrap; margin:1rem 0; }
.workspace-tab-panels { background:var(--card); border-radius:0 0 1rem 1rem; }
.workspace-tab-panel { display:none; padding:1.25rem; }
.workspace-tab-panel.active { display:block; }
.detail-related-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:1.25rem; }
.detail-related-grid h3, .workspace-tab-panel h3 { font-size:1rem; margin-bottom:.75rem; }
.related-row { display:flex; justify-content:space-between; gap:1rem; padding:.7rem 0; border-bottom:1px solid var(--line); }
.pipeline-steps { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem; margin-bottom:1rem; }
.pipeline-steps span { background:#eef2f7; border-radius:999px; padding:.45rem .7rem; color:var(--ink-soft); }
.pipeline-steps span.current { background:var(--crm-primary); color:#fff; }
@media (max-width: 640px) { .detail-page { padding:1rem; } .detail-hero { padding:1.25rem; } .workspace-metrics { grid-template-columns:repeat(2,1fr); } }
.detail-back { text-decoration: none; color: var(--ink); gap: 10px; display: inline-flex; align-items: center; }
.detail-back:hover { color: var(--crm-primary); }
.detail-hero { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 2rem; box-shadow: 0 4px 14px rgba(15, 23, 42, .06); }
.detail-kicker { color: var(--crm-primary); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.detail-hero h1 { margin-top: .4rem; font-size: clamp(1.6rem, 4vw, 2.5rem); }
.detail-subtitle { color: var(--ink-soft); margin: .5rem 0 0; }
.detail-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem 2rem; margin-top: 1.25rem; }
.detail-card h2 { font-size: 1.1rem; margin-bottom: 1.25rem; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 0; }
.detail-field { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px; padding: .85rem 1rem; min-width: 0; }
.detail-field dt { color: var(--ink-soft); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.detail-field dd { margin: .3rem 0 0; overflow-wrap: anywhere; font-weight: 600; }
.workspace-shell { max-width: 1280px; margin: 0 auto; }
.workspace-topbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.workspace-breadcrumb { color:var(--ink-soft); font-size:.78rem; font-weight:600; }
.workspace-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.workspace-summary { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:1rem; align-items:stretch; }
.workspace-hero { min-height:190px; display:flex; flex-direction:column; justify-content:space-between; }
.workspace-rail { background:var(--card); border:1px solid var(--line); border-radius:18px; padding:1.1rem; box-shadow:0 4px 14px rgba(15,23,42,.05); }
.workspace-rail-label { color:var(--ink-soft); font-size:.68rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.workspace-health { display:flex; align-items:center; gap:.5rem; margin-top:.65rem; font-size:.82rem; font-weight:700; }
.workspace-health-dot { width:9px; height:9px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 4px #dcfce7; }
.workspace-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; margin-top:1rem; }
.workspace-metric { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:.9rem 1rem; }
.workspace-metric-label { color:var(--ink-soft); font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.workspace-metric-value { margin-top:.3rem; font-size:1.15rem; font-weight:800; color:var(--ink); overflow-wrap:anywhere; }
.workspace-tabs { display:flex; gap:.35rem; border-bottom:1px solid var(--line); margin:1.25rem 0 0; overflow:auto; }
.workspace-tab { border:0; background:transparent; color:var(--ink-soft); padding:.7rem .9rem; font-size:.78rem; font-weight:700; white-space:nowrap; border-bottom:2px solid transparent; }
.workspace-tab.active { color:var(--crm-primary); border-bottom-color:var(--crm-primary); }
.workspace-section-title { display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-bottom:1rem; }
.workspace-section-title h2 { margin:0; font-size:1.05rem; }
.workspace-section-title span { color:var(--ink-soft); font-size:.75rem; }
@media (max-width: 850px) { .workspace-summary { grid-template-columns:1fr; } .workspace-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 480px) { .workspace-topbar { align-items:flex-start; flex-direction:column; } .workspace-metrics { gap:.5rem; } .workspace-metric { padding:.75rem; } }
.detail-state { text-align: center; padding: 5rem 1rem; color: var(--ink-soft); }
.detail-state i { display: block; color: var(--crm-primary); font-size: 2.5rem; margin-bottom: 1rem; }
.detail-state h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.detail-state.error i, .detail-state.access-denied i { color: var(--danger); }
.detail-state .spinner-border { color: var(--crm-primary); margin-bottom: 1rem; }
@media (max-width: 767px) { .detail-page { padding: 1rem; } .detail-hero, .detail-card { padding: 1.25rem; } }

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #CBD5E1;
    color: var(--ink);
    margin: 0;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--ink);
    margin: 0;
}

/* Master App Shell */
#appShell {
    width: 100%;
    height: 100vh;
    background: var(--cream);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 768px) {
    body {
        padding: 10px;
    }

    #appShell {
        max-width: 1440px;
        height: calc(100vh - 20px);
        margin: 0 auto;
        border-radius: 18px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }

    .mobile-only {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .desktop-sidebar {
        display: none !important;
    }
}

/* Fixed Header */
.app-header {
    height: var(--header-h);
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--card);
    z-index: 50;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--crm-primary, #4F46E5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.2px;
    color: var(--ink);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--cream);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--crm-primary);
    font-size: 1rem;
    cursor: pointer;
}

.avatar-chip {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--crm-primary);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    cursor: pointer;
    border: none;
}

/* Profile Dropdown Menu */
.profile-dropdown-menu {
    position: absolute;
    right: 0;
    top: 48px;
    width: 260px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 14px;
    z-index: 100;
    display: none;
}

.profile-dropdown-menu.open {
    display: block;
}

/* Lead workspace presentation */
.lead-detail-content {
    background:
        radial-gradient(circle at 100% 0, rgba(79, 70, 229, 0.08), transparent 30rem),
        var(--cream);
}

.lead-detail-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
}

.lead-detail-hero::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--crm-primary);
}

.lead-detail-hero h1 {
    letter-spacing: -0.04em;
}

.lead-control-panel {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.lead-detail-tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    scrollbar-width: none;
}

.lead-detail-tabs::-webkit-scrollbar {
    display: none;
}

.lead-detail-tabs button {
    min-height: 52px;
    border-bottom: 3px solid transparent;
}

.lead-detail-tab-panel,
.lead-info-card {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

.lead-info-card h3 {
    color: var(--med-primary);
}

.lead-info-card .space-y-3 > div {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.65rem;
}

.lead-info-card .space-y-3 > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.lead-activity-overlay {
    z-index: 1055;
}

.lead-activity-modal {
    max-width: 560px;
    max-height: min(680px, calc(100vh - 2rem));
    overflow-y: auto;
}

.lead-modal-label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lead-activity-modal .form-control,
.lead-activity-modal .form-select {
    min-height: 44px;
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
}

.lead-activity-modal textarea.form-control {
    min-height: 108px;
    resize: vertical;
}

.lead-modal-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink-soft);
    font-size: 1.4rem;
    line-height: 1;
}

.lead-modal-close:hover {
    background: var(--cream);
    color: var(--ink);
}

[x-cloak] {
    display: none !important;
}

/* Main App Body Wrapper */
.app-body-wrapper {
    display: flex;
    flex: 1 1 auto;
    height: calc(100vh - var(--header-h));
    overflow: hidden;
    position: relative;
}

/* Desktop Sidebar */
.desktop-sidebar {
    width: 270px;
    background: var(--card);
    border-right: 1px solid var(--line);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 0 0 auto;
    height: 100%;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

.sidebar-link i {
    font-size: 1.1rem;
    color: var(--med-primary);
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--med-light);
    color: var(--med-dark);
}

/* Content Area */
.app-content {
    flex: 1 1 auto;
    height: 100%;
    overflow-y: auto;
    padding: 24px;
    background: var(--cream);
}

@media (max-width: 767px) {
    .app-content {
        padding-bottom: calc(var(--nav-h) + 30px);
    }
}

/* Fix mobile bottom navigation and card wrapping */
@media (max-width: 991px) {
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: var(--card, #FFFFFF);
        border-top: 1px solid var(--line, #E2E8F0);
        display: flex;
        align-items: center;
        justify-content: space-around;
        z-index: 40;
        padding: 0 4px;
    }

    .nav-item {
        background: none;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--ink-soft, #64748B);
        font-size: 0.95rem;
        padding: 4px 6px;
        cursor: pointer;
        flex: 1;
        white-space: nowrap;
    }

    .nav-item span {
        font-size: 0.58rem;
        font-weight: 600;
    }

    .nav-item.active {
        color: var(--crm-primary, #4F46E5);
    }

    .nav-item.active i {
        background: var(--crm-light, #EEF2FF);
        border-radius: 8px;
        padding: 2px 8px;
    }

    /* Ensure content doesn't get hidden behind fixed nav */
    .app-content {
        padding-bottom: 84px !important;
    }

    /* Reposition FAB so it floats above the bottom nav nicely */
    .fab {
        bottom: 78px !important;
        right: 18px !important;
    }
}

/* Hero Banner & KPIs */
.hero-banner {
    background: linear-gradient(135deg, var(--crm-primary) 0%, var(--crm-dark) 100%);
    border-radius: 20px;
    padding: 24px;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.2);
}

.hero-banner::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.25);
}

.hero-banner h3 {
    color: #fff;
    font-size: 1.25rem;
}

.hero-banner p {
    color: #E0E7FF;
    font-size: 0.85rem;
    margin-top: 4px;
}

.crm-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    color: #EEF2FF;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 12px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.kpi-card .kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.kpi-label {
    font-size: 0.72rem;
    color: var(--ink-soft);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.7rem;
    margin-top: 2px;
    color: var(--ink);
}

/* Quick Actions Horizontal Row */
.qa-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 24px;
    white-space: nowrap;
}

.qa-item {
    flex: 0 0 84px !important;
    width: 84px;
    text-align: center;
    cursor: pointer;
}

.qa-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--crm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin: 0 auto 6px auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.15s;
}

.qa-icon:hover {
    border-color: var(--crm-accent);
    background: var(--crm-light);
}

.qa-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ink-soft);
}

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title h2 {
    font-size: 1.1rem;
}

.section-sub {
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: 2px;
}

/* Record Cards */
.rec-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.rec-card:hover {
    border-color: var(--crm-accent);
    transform: translateY(-1px);
}

.rec-avatar {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--crm-light);
    color: var(--crm-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex: 0 0 auto;
}

.rec-body {
    flex: 1 1 auto;
    min-width: 0;
}

.rec-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.rec-title {
    font-weight: 700;
    font-size: 0.98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-subtitle {
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-top: 2px;
}

.rec-badge {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--success);
    white-space: nowrap;
}

.rec-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
}

.rec-meta span {
    font-size: 0.78rem;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 6px;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Status Badges */
.status-pill {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
}

.status-NEW, .status-OPEN {
    background: #EEF2FF;
    color: #4F46E5;
}

.status-QUALIFIED, .status-IN_PROGRESS, .status-CONTACTED {
    background: #FEF3C7;
    color: #D97706;
}

.status-WON, .status-COMPLETED, .status-PAID {
    background: #D1FAE5;
    color: #059669;
}

.status-LOST, .status-CANCELLED, .status-OVERDUE {
    background: #FEE2E2;
    color: #DC2626;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 16px;
    color: var(--ink-soft);
}

.empty-state i {
    font-size: 2.8rem;
    opacity: 0.5;
    display: block;
    margin-bottom: 12px;
}

/* Bottom Sheets & Record 360 Detail Drawer */
.sheet-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 90;
}

.sheet-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.bottom-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card);
    border-radius: 24px 24px 0 0;
    max-height: 85%;
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 95;
    padding: 20px 24px 60px 24px;
    overflow-y: auto;
    box-shadow: 0 -15px 35px rgba(0, 0, 0, 0.15);
}

.bottom-sheet.open {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--line);
    border-radius: 99px;
    margin: 0 auto 16px auto;
}

/* Sheet Title */
.sheet-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    text-align: center;
    margin-bottom: 16px;
}

/* Group Labels */
.more-group-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin: 16px 0 8px 4px;
}

/* Navigation Links */
.more-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #374151;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.more-link:hover {
    background-color: #f3f4f6;
    color: var(--crm-primary);
}

/* Icon Styling inside Links */
.more-link i {
    font-size: 1.15rem;
    margin-right: 12px;
    color: #4b5563;
    transition: color 0.2s ease;
}

.more-link:hover i {
    color: var(--crm-primary);
}

/* Detail Property Cards */
.detail-prop-card {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.detail-prop-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.detail-prop-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    margin-top: 2px;
    word-break: break-all;
}

/* Status Update Box inside Drawer */
.crm-update-box {
    background: var(--crm-light);
    border: 1.5px solid var(--crm-accent);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

/* Modal Styling Overrides */
.modal-dialog {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 auto;
    max-width: 480px;
    width: 100%;
    transform: translateY(100%) !important;
}

.modal.show .modal-dialog {
    transform: translateY(0) !important;
}

.modal-content {
    border-radius: 24px 24px 0 0;
    border: none;
    padding: 8px 6px;
    background: var(--cream);
}

/* Keep dashboard quick actions visually consistent across all CRM workflows. */
.crm-workflow-dialog {
    max-width: 720px;
    width: calc(100% - 2rem);
}

.crm-workflow-modal {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    background: var(--card);
}

.crm-workflow-header {
    background: var(--crm-primary);
    border-radius: 24px 24px 0 0;
    padding: 18px 24px !important;
}

.crm-workflow-header .modal-title {
    color: #fff;
}

.crm-workflow-body {
    overflow-y: auto;
    max-height: calc(90vh - 142px);
}

.crm-workflow-footer {
    border-top: 1px solid var(--line);
    padding: 14px 24px !important;
}

.crm-workflow-footer .btn {
    min-height: 40px;
    border-radius: 10px;
}

@media (max-width: 576px) {
    .crm-workflow-dialog {
        width: 100%;
    }

    .crm-workflow-header {
        padding: 16px !important;
    }

    .crm-workflow-footer {
        padding: 12px 16px !important;
    }
}

.modal-header {
    border: none;
}

.modal-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 10px 14px;
    font-size: 0.9rem;
    background: var(--card);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--crm-accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.btn-primary {
    background: var(--crm-primary);
    border-color: var(--crm-primary);
    border-radius: 12px;
    font-weight: 700;
    padding: 10px;
}

.btn-primary:hover {
    background: var(--crm-dark);
    border-color: var(--crm-dark);
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

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