:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #162033;
    --muted: #667085;
    --line: #e2e8f0;
    --primary: #2457d6;
    --primary-dark: #173f9f;
    --primary-soft: #eaf0ff;
    --success: #087a55;
    --success-soft: #e7f8f1;
    --danger: #b42318;
    --danger-soft: #feefed;
    --warning: #a15c00;
    --warning-soft: #fff4dd;
    --info: #175cd3;
    --info-soft: #eaf2ff;
    --shadow: 0 12px 35px rgba(17, 24, 39, 0.07);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar-inner { max-width: 1480px; min-height: 72px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: max-content; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--primary), #6f8ff0); color: #fff; font-weight: 800; letter-spacing: -.03em; box-shadow: 0 8px 20px rgba(36,87,214,.22); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; line-height: 1.15; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.brand-large .brand-mark { width: 50px; height: 50px; border-radius: 15px; font-size: 18px; }
.brand-large strong { font-size: 20px; }
.brand-large small { font-size: 13px; }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav a { padding: 9px 12px; border-radius: 10px; color: #475467; font-weight: 650; font-size: 14px; }
.main-nav a:hover, .main-nav a.active { color: var(--primary-dark); background: var(--primary-soft); }
.user-menu { display: flex; align-items: center; gap: 12px; }
.user-copy { text-align: right; min-width: 0; }
.user-copy strong, .user-copy small { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: 13px; }
.user-copy small { color: var(--muted); font-size: 11px; }
.menu-toggle { display: none; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; color: var(--text); font-weight: 700; }

.page-shell { width: min(1480px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 56px; }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { margin: 4px 0 6px; font-size: clamp(28px, 4vw, 40px); line-height: 1.12; letter-spacing: -.035em; }
.page-heading p, .section-heading p, .card-header p { margin: 0; color: var(--muted); }
.heading-with-actions, .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-heading { margin: 32px 0 14px; align-items: center; }
.section-heading h2 { margin: 0 0 3px; font-size: 20px; }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.muted { color: var(--muted); }

.card, .filter-card, .kpi-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header, .card-footer { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-header { border-bottom: 1px solid var(--line); }
.card-footer { border-top: 1px solid var(--line); }
.card-header h2 { margin: 0 0 3px; font-size: 18px; }
.card-body { padding: 22px; }

.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-card { padding: 20px; min-width: 0; }
.kpi-label { display: block; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.kpi-card strong { display: block; margin: 8px 0 5px; font-size: clamp(22px, 2.7vw, 31px); line-height: 1.15; letter-spacing: -.035em; overflow-wrap: anywhere; }
.kpi-card small { color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, .8fr); gap: 18px; }
.dashboard-chart-card { min-width: 0; }

.progress { height: 8px; min-width: 100px; overflow: hidden; background: #e9eef6; border-radius: 99px; }
.progress span, .status-meter span { display: block; height: 100%; width: var(--progress, 0%); max-width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #6f8ff0); }
.progress-cell { min-width: 150px; }
.progress-cell small { display: block; margin-top: 5px; color: var(--muted); }

.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 3px; }
.legend-revenue::before { background: var(--primary); }
.legend-expense::before { background: #b8c3d9; }
.bar-chart { height: 270px; display: grid; grid-template-columns: repeat(6, minmax(42px, 1fr)); align-items: end; gap: 14px; padding: 20px 8px 0; border-bottom: 1px solid var(--line); }
.bar-group { height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 9px; min-width: 0; }
.bar-values { height: 100%; display: flex; justify-content: center; align-items: end; gap: 5px; }
.bar { display: block; width: min(28px, 35%); height: var(--bar-height, 2%); min-height: 4px; border-radius: 6px 6px 2px 2px; transition: height .2s ease; }
.bar-revenue { background: linear-gradient(180deg, #6f8ff0, var(--primary)); }
.bar-expense { background: #b8c3d9; }
.bar-group small { color: var(--muted); font-size: 11px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-list { display: grid; gap: 17px; }
.status-row { display: grid; grid-template-columns: 90px 1fr 28px; align-items: center; gap: 10px; }
.status-meter { height: 8px; overflow: hidden; background: #e9eef6; border-radius: 99px; }
.status-row strong { text-align: right; }

.badge { display: inline-flex; align-items: center; justify-content: center; width: max-content; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge-success { color: var(--success); background: var(--success-soft); }
.badge-danger { color: var(--danger); background: var(--danger-soft); }
.badge-warning { color: var(--warning); background: var(--warning-soft); }
.badge-info { color: var(--info); background: var(--info-soft); }
.badge-neutral { color: #475467; background: #f0f2f5; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 14px; border: 1px solid transparent; border-radius: 10px; font-weight: 750; font-size: 13px; line-height: 1; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: 0 8px 18px rgba(36,87,214,.18); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { color: #344054; background: var(--surface); border-color: #cfd7e4; }
.btn-secondary:hover { border-color: #9ca9bc; background: var(--surface-soft); }
.btn-ghost { color: #475467; background: transparent; border-color: transparent; }
.btn-ghost:hover { background: #eef2f7; }
.btn-danger-ghost { color: var(--danger); background: transparent; }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-small { min-height: 32px; padding: 7px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.button-row, .form-actions, .filter-actions, .actions-column { display: flex; align-items: center; gap: 8px; }
.form-actions { justify-content: flex-end; }
.actions-column { min-width: 145px; }
.actions-column form { display: inline-flex; }

.filter-card { margin-bottom: 18px; padding: 18px; }
.filter-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)) auto; align-items: end; gap: 13px; }
.filter-grid-wide { grid-template-columns: repeat(4, minmax(150px, 1fr)) auto; }
.filter-grid-simple { grid-template-columns: minmax(240px, 520px) auto; justify-content: start; }
.inline-filter { display: flex; align-items: center; gap: 8px; }
.inline-filter label { color: var(--muted); font-size: 12px; font-weight: 800; }
.entity-switcher select { min-width: 240px; }

.field { min-width: 0; }
.field label { display: block; margin-bottom: 6px; color: #344054; font-size: 12px; font-weight: 800; }
.field input, .field select, .field textarea, .inline-filter select { width: 100%; border: 1px solid #ccd5e2; border-radius: 10px; background: #fff; color: var(--text); padding: 10px 11px; outline: none; }
.field input, .field select, .inline-filter select { min-height: 42px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .inline-filter select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(36,87,214,.11); }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.readonly-value { min-height: 42px; display: flex; align-items: center; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: #475467; }
.form-card { max-width: 1100px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.field-span-2 { grid-column: span 2; }
.field-span-full { grid-column: 1 / -1; }
.stack-form { display: grid; gap: 16px; }
.check-row { display: flex; align-items: center; gap: 8px; color: #475467; font-size: 13px; }
.check-row input { width: 16px; height: 16px; }

.table-card { overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: var(--surface-soft); color: #667085; font-size: 11px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
td { font-size: 13px; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); }
tbody tr:hover { background: #fbfcff; }
tbody tr:last-child td { border-bottom: 0; }
.empty-cell, .empty-state { padding: 36px !important; color: var(--muted); text-align: center; }
.pagination { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.page-link { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-weight: 700; font-size: 12px; background: var(--surface); }
.page-link.disabled { color: #98a2b3; background: var(--surface-soft); }
.page-summary { color: var(--muted); font-size: 12px; }

.alert { margin-bottom: 18px; padding: 13px 16px; border: 1px solid; border-radius: 12px; }
.alert strong { font-weight: 850; }
.alert ul { margin: 7px 0 0 18px; padding: 0; }
.alert-success { color: var(--success); border-color: #a9e8d2; background: var(--success-soft); }
.alert-warning { color: var(--warning); border-color: #f4d79d; background: var(--warning-soft); }
.alert-danger { color: var(--danger); border-color: #f7c8c2; background: var(--danger-soft); }

.entity-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.entity-card .card-footer { justify-content: flex-end; }
.entity-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.entity-card-heading h2 { margin: 6px 0 2px; font-size: 21px; }
.entity-card-heading p { margin: 0; color: var(--muted); }
.country-code { display: inline-flex; padding: 3px 7px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 850; letter-spacing: .08em; }
.detail-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; margin: 20px 0; }
.detail-list div { min-width: 0; }
.detail-list dt { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.detail-list dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.entity-counts { display: flex; gap: 8px; flex-wrap: wrap; }
.entity-counts span { padding: 7px 9px; background: var(--surface-soft); border-radius: 8px; color: var(--muted); font-size: 12px; }
.entity-counts strong { color: var(--text); }

.guest-body { min-height: 100vh; background: radial-gradient(circle at 12% 20%, rgba(111,143,240,.24), transparent 36%), radial-gradient(circle at 90% 85%, rgba(36,87,214,.14), transparent 32%), #eef3fb; }
.guest-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.login-grid { width: min(1100px, 100%); display: grid; grid-template-columns: 1.15fr .75fr; align-items: center; gap: 70px; }
.login-intro { padding: 20px; }
.login-intro h1 { max-width: 680px; margin: 34px 0 18px; font-size: clamp(36px, 5.5vw, 62px); line-height: 1.03; letter-spacing: -.055em; }
.login-intro > p { max-width: 650px; color: #536176; font-size: 18px; }
.login-points { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.login-points span { padding: 8px 11px; border: 1px solid rgba(36,87,214,.18); border-radius: 999px; background: rgba(255,255,255,.62); color: var(--primary-dark); font-size: 12px; font-weight: 750; }
.login-card { width: 100%; max-width: 430px; justify-self: end; box-shadow: 0 28px 70px rgba(31,52,89,.17); }
.login-card .card-body { padding: 34px; }
.login-card h2 { margin: 6px 0; font-size: 30px; letter-spacing: -.03em; }
.error-page { max-width: 620px; margin: 80px auto; text-align: center; }
.error-page .card-body { padding: 52px 30px; }
.error-code { color: var(--primary); font-size: 52px; font-weight: 900; letter-spacing: -.06em; }
.error-page h1 { margin: 0 0 8px; }
.error-page p { margin: 0 auto 22px; max-width: 480px; color: var(--muted); }
.footer { width: min(1480px, calc(100% - 48px)); margin: 0 auto; padding: 18px 0 30px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }

@media (max-width: 1120px) {
    .topbar-inner { flex-wrap: wrap; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
    .menu-toggle { display: inline-flex; margin-left: auto; }
    .main-nav { display: none; order: 4; width: 100%; flex-basis: 100%; flex-wrap: wrap; padding-top: 4px; }
    .main-nav.open { display: flex; }
    .user-menu { margin-left: auto; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .filter-grid, .filter-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-actions { grid-column: 1 / -1; }
    .login-grid { gap: 30px; }
    .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .topbar-inner { padding-left: 16px; padding-right: 16px; }
    .user-copy { display: none; }
    .page-shell, .footer { width: min(100% - 28px, 1480px); }
    .page-shell { padding-top: 24px; }
    .heading-with-actions, .section-heading { align-items: stretch; flex-direction: column; }
    .button-row { flex-wrap: wrap; }
    .kpi-grid, .kpi-grid-3, .entity-card-grid, .form-grid, .filter-grid, .filter-grid-wide, .filter-grid-simple { grid-template-columns: 1fr; }
    .field-span-2, .field-span-full, .filter-actions { grid-column: auto; }
    .entity-switcher { width: 100%; align-items: stretch; flex-direction: column; }
    .entity-switcher select { min-width: 0; }
    .bar-chart { gap: 7px; padding-left: 0; padding-right: 0; }
    .bar-group small { font-size: 9px; transform: rotate(-25deg); transform-origin: center; overflow: visible; }
    .card-header, .card-body, .card-footer { padding-left: 16px; padding-right: 16px; }
    .form-actions { justify-content: stretch; }
    .form-actions .btn { flex: 1; }
    .login-grid { grid-template-columns: 1fr; }
    .login-intro { padding: 0; }
    .login-intro h1 { margin-top: 24px; font-size: 38px; }
    .login-card { justify-self: stretch; max-width: none; }
    .guest-shell { padding: 20px 14px; align-items: start; }
    .footer { flex-direction: column; gap: 4px; }
}

@media (max-width: 440px) {
    .brand small { display: none; }
    .main-nav a { flex: 1 1 40%; text-align: center; }
    .kpi-grid { grid-template-columns: 1fr; }
    .filter-actions, .button-row { flex-direction: column; align-items: stretch; }
    .btn { width: 100%; }
    .actions-column .btn { width: auto; }
    .pagination { justify-content: space-between; }
    .page-summary { display: none; }
}

.form-section { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-section h3 { margin: 0 0 4px; font-size: 17px; }
.form-section p { margin: 0; color: var(--muted); }


/* =========================================================
   CRM LEAD OVERVIEW DASHBOARD
   ========================================================= */

.crm-overview {
    margin-top: 3px;
}

.crm-overview-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.crm-overview-title h2 {
    margin: 4px 0 5px;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -.035em;
}

.crm-overview-title p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.crm-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}
/*  */

.crm-kpi-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.crm-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.10);
    border-color: #d2dbea;
}

.crm-kpi-card::after {
    content: "";
    position: absolute;
    right: -25px;
    top: -25px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--primary-soft);
    opacity: .7;
}

.crm-kpi-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.crm-kpi-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    font-size: 16px;
    font-weight: 850;
}

.crm-kpi-icon-primary {
    color: var(--primary);
    background: var(--primary-soft);
}

.crm-kpi-icon-success {
    color: var(--success);
    background: var(--success-soft);
}

.crm-kpi-icon-danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.crm-kpi-icon-warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.crm-kpi-icon-info {
    color: var(--info);
    background: var(--info-soft);
}

.crm-kpi-label {
    display: block;
    margin-top: 16px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.crm-kpi-value {
    display: block;
    margin-top: 6px;
    color: var(--text);
    font-size: clamp(24px, 2.4vw, 32px);
    line-height: 1.15;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}

.crm-kpi-description {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}
.crm-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, .85fr);
    gap: 18px;
    align-items: stretch;
}

.crm-card {
    min-width: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.crm-card-header {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid var(--line);
}

.crm-card-header h3 {
    margin: 0 0 4px;
    font-size: 17px;
    letter-spacing: -.02em;
}

.crm-card-header p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.crm-card-body {
    padding: 22px;
}
.crm-funnel {
    display: grid;
    gap: 19px;
}

.crm-funnel-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 48px;
    gap: 12px;
    align-items: center;
}

.crm-funnel-stage {
    color: #344054;
    font-size: 12px;
    font-weight: 750;
}

.crm-funnel-bar-wrapper {
    min-width: 0;
}

.crm-funnel-bar {
    height: 11px;
    overflow: hidden;
    background: #edf1f7;
    border-radius: 99px;
}

.crm-funnel-bar span {
    display: block;
    width: var(--progress, 0%);
    height: 100%;
    max-width: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--primary),
        #6f8ff0
    );
    transition: width .5s ease;
}

.crm-funnel-count {
    text-align: right;
    font-size: 13px;
    font-weight: 850;
}

.crm-funnel-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}


.crm-conversion-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 25px;
    padding: 15px 16px;
    border: 1px solid #dce5f5;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        var(--primary-soft),
        #f8faff
    );
}

.crm-conversion-label {
    color: #475467;
    font-size: 12px;
    font-weight: 750;
}

.crm-conversion-value {
    color: var(--primary-dark);
    font-size: 20px;
    font-weight: 900;
}

.crm-pipeline-list {
    display: grid;
    gap: 18px;
}

.crm-pipeline-item {
    display: grid;
    gap: 7px;
}

.crm-pipeline-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.crm-pipeline-stage {
    color: #344054;
    font-size: 12px;
    font-weight: 750;
}

.crm-pipeline-value {
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.crm-pipeline-bar {
    height: 8px;
    overflow: hidden;
    background: #edf1f7;
    border-radius: 99px;
}

.crm-pipeline-bar span {
    display: block;
    width: var(--progress, 0%);
    height: 100%;
    max-width: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #5c7de8,
        var(--primary)
    );
    transition: width .5s ease;
}


.crm-total-pipeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.crm-total-pipeline span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.crm-total-pipeline strong {
    color: var(--primary-dark);
    font-size: 19px;
    font-weight: 900;
}

.crm-empty {
    padding: 35px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 1250px) {
    .crm-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .crm-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .crm-overview-header {
        align-items: stretch;
        flex-direction: column;
    }

    .crm-actions {
        width: 100%;
    }

    .crm-actions .btn {
        flex: 1;
    }

    .crm-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-card-header,
    .crm-card-body {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 480px) {
    .crm-kpi-grid {
        grid-template-columns: 1fr;
    }

    .crm-funnel-row {
        grid-template-columns: 78px minmax(0, 1fr) 35px;
        gap: 8px;
    }

    .crm-funnel-stage {
        font-size: 11px;
    }

    .crm-pipeline-value {
        font-size: 11px;
    }

    .crm-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .crm-actions .btn {
        width: 100%;
    }

    
}



.crm-lead-filter-card {
    padding: 22px;
    margin-bottom: 20px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 1),
            rgba(248, 250, 252, 1)
        );
}


/* FILTER HEADER */

.crm-filter-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.crm-filter-header h3 {
    margin: 5px 0 4px;
    font-size: 19px;
    letter-spacing: -.025em;
}

.crm-filter-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}


/* FILTER FORM */

.crm-lead-filter-form {
    width: 100%;
}


/* FILTER GRID */

.crm-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(260px, 1.7fr)
        minmax(160px, 1fr)
        minmax(160px, 1fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        auto;

    align-items: end;
    gap: 14px;
}


/*   */

.crm-search-field {
    min-width: 0;
}

.crm-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.crm-input-wrapper input {
    width: 100%;
    padding-left: 40px;
}



.crm-input-icon {
    position: absolute;
    left: 13px;
    z-index: 2;
    color: var(--muted);
    font-size: 21px;
    line-height: 1;
    pointer-events: none;
}



.crm-currency-symbol {
    position: absolute;
    left: 12px;
    z-index: 2;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    pointer-events: none;
}

.crm-input-wrapper
.crm-currency-symbol
+ input {
    padding-left: 48px;
}


/* FILTER ACTIONS */

.crm-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.crm-filter-actions .btn {
    min-width: 105px;
}



.crm-lead-filter-card {
    transition:
        box-shadow .2s ease,
        transform .2s ease;
}

.crm-lead-filter-card:hover {
    box-shadow: 0 16px 42px rgba(17, 24, 39, 0.09);
}


.crm-lead-filter-card input:hover,
.crm-lead-filter-card select:hover {
    border-color: #aebbd0;
}

.crm-lead-filter-card input:focus,
.crm-lead-filter-card select:focus {
    border-color: var(--primary);
    box-shadow:
        0 0 0 3px rgba(36, 87, 214, .10);
}



@media (max-width: 1250px) {

    .crm-filter-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .crm-search-field {
        grid-column: span 3;
    }

    .crm-filter-actions {
        grid-column: span 3;
        justify-content: flex-end;
    }

}


@media (max-width: 760px) {

    .crm-lead-filter-card {
        padding: 16px;
    }

    .crm-filter-header {
        flex-direction: column;
        align-items: stretch;
    }

    .crm-filter-header .btn {
        width: 100%;
    }

    .crm-filter-grid {
        grid-template-columns: 1fr;
    }

    .crm-search-field,
    .crm-filter-actions {
        grid-column: auto;
    }

    .crm-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .crm-filter-actions .btn {
        min-width: 105px;
        height: 42px;
        padding: 0 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

}


.entity-finance-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.entity-finance-item {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 8px;
    background: var(--surface-soft);
}

.entity-finance-item .entity-metric-label {
    margin-bottom: 4px;
    font-size: 9px;
}

.entity-finance-item strong {
    display: block;
    overflow: hidden;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}




.entity-performance-card {
    display: flex;
    flex-direction: column;
    min-height: 270px;
}




.entity-revenue-share {
    margin-top: auto;
}




.entity-performance-profit-row {
    padding: 13px 0;
}

.entity-performance-profit-row strong {
    font-size: 16px;
}



@media (max-width: 600px) {

    .entity-performance-card {
        min-height: auto;
    }

    .entity-finance-item strong {
        font-size: 11px;
    }

}

.entity-performance-section {
    width: 100%;
    margin-top: 28px;
    margin-bottom: 32px;
}

.entity-performance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.entity-performance-header .eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #64748b;
}

.entity-performance-header h2 {
    margin: 4px 0 5px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
}

.entity-performance-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.entity-performance-currency {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 7px 12px;
    border-radius: 8px;
}





.entity-performance-card {
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.entity-performance-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}


.entity-performance-card-header {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.entity-country {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.entity-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    font-size: 22px;
    line-height: 1;
}

.entity-country h3 {
    margin: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.03em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.entity-country span {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.entity-performance-revenue {
    padding: 14px 0 12px;
}

.entity-metric-label {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.entity-performance-revenue strong {
    display: block;
    overflow: hidden;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-performance-profit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 13px;
}

.entity-performance-profit-row > div:first-child {
    min-width: 0;
}

.entity-performance-profit-row strong {
    display: block;
    overflow: hidden;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-margin {
    flex: 0 0 auto;
    min-width: 65px;
    text-align: right;
}

.entity-margin span {
    display: block;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.entity-margin small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1.3;
}


.entity-revenue-share {
    padding-top: 11px;
    border-top: 1px solid var(--border-color);
}

.entity-revenue-share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.entity-revenue-share-header span {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
}

.entity-revenue-share-header strong {
    font-size: 11px;
    font-weight: 800;
}

.entity-share-bar {
    width: 100%;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-soft);
}

.entity-share-bar span {
    display: block;
    width: var(--progress);
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 0.5s ease;
}


.entity-performance-chart-card {
    width: 100%;
    margin-top: 16px;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}


.entity-performance-chart-header {
    margin-bottom: 18px;
}

.entity-performance-chart-header h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}

.entity-performance-chart-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
}


.entity-chart {
    display: flex;
    flex-direction: column;
    gap: 17px;
    width: 100%;
}


.entity-chart-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    width: 100%;
}


.entity-chart-label {
    min-width: 0;
}

.entity-chart-label strong {
    display: block;
    overflow: hidden;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-chart-label small {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.entity-chart-bars {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}


.entity-chart-bar-row {
    display: grid;
    grid-template-columns: 65px minmax(0, 1fr) 75px;
    align-items: center;
    gap: 8px;
    min-width: 0;
}


.entity-chart-bar-name {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
}


.entity-chart-bar-wrapper {
    width: 100%;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-soft);
}


.entity-chart-bar {
    display: block;
    width: var(--bar-width);
    height: 100%;
    border-radius: inherit;
    transition: width 0.6s ease;
}


.entity-chart-revenue {
    background: var(--primary);
}


.entity-chart-profit {
    background: var(--success);
}

.entity-chart-bar-row strong {
    overflow: hidden;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.3;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.entity-chart-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.entity-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
}

.entity-chart-legend-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
}

.entity-chart-legend-revenue {
    background: var(--primary);
}

.entity-chart-legend-profit {
    background: var(--success);
}


.entity-performance-empty {
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}



.entity-performance-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
}

@media (min-width: 1101px) {

    .entity-performance-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

}
@media (max-width: 1100px) {

    .entity-performance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .entity-chart-row {
        grid-template-columns: 130px minmax(0, 1fr);
        gap: 14px;
    }

}

@media (max-width: 700px) {

    .entity-performance-grid {
        grid-template-columns: 1fr;
    }

    .entity-performance-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .entity-chart-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

}


@media (max-width: 600px) {

    .entity-performance-section {
        margin-top: 20px;
    }

    .entity-performance-header h2 {
        font-size: 18px;
    }

    .entity-performance-card {
        padding: 14px;
    }

    .entity-performance-revenue strong {
        font-size: 19px;
    }

    .entity-performance-profit-row strong {
        font-size: 14px;
    }

    .entity-margin span {
        font-size: 15px;
    }

    .entity-performance-chart-card {
        padding: 14px;
    }

    .entity-chart-bar-row {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 7px;
    }

    .entity-chart-bar-row strong {
        grid-column: 2;
        text-align: left;
        margin-top: -2px;
    }

    .entity-chart-legend {
        gap: 10px 16px;
    }

}


@media (max-width: 400px) {

    .entity-performance-card {
        padding: 12px;
    }

    .entity-performance-revenue strong {
        font-size: 17px;
    }

    .entity-performance-profit-row {
        gap: 8px;
    }

    .entity-performance-profit-row strong {
        font-size: 13px;
    }

    .entity-margin {
        min-width: 55px;
    }

    .entity-margin span {
        font-size: 14px;
    }

}
.finance-page,
.finance-form-page {
    padding: 30px;
}

.finance-header,
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.finance-header h1,
.form-header h1 {
    margin: 0;
    font-size: 28px;
}

.finance-header p,
.form-header p {
    margin-top: 6px;
    color: #777;
}

.finance-actions {
    display: flex;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-income {
    background: #198754;
    color: white;
}

.btn-expense {
    background: #dc3545;
    color: white;
}

.btn-filter {
    background: #212529;
    color: white;
}

.btn-clear {
    background: #f1f1f1;
    color: #333;
}

.finance-filter-card,
.finance-table-card,
.finance-form {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    padding: 20px;
}

.finance-filter-card {
    margin-bottom: 20px;
}

.finance-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.finance-filters input,
.finance-filters select {
    min-width: 150px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 7px;
}

.finance-filters input[name="search"] {
    min-width: 220px;
}

.table-header {
    margin-bottom: 20px;
}

.table-header h2 {
    margin: 0;
    font-size: 20px;
}

.table-header p {
    color: #777;
}

.table-responsive {
    overflow-x: auto;
}

.finance-table {
    width: 100%;
    border-collapse: collapse;
}

.finance-table th,
.finance-table td {
    padding: 14px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.finance-table th {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

.type-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.income-badge {
    background: #e8f7ee;
    color: #198754;
}

.expense-badge {
    background: #fdecec;
    color: #dc3545;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-buttons form {
    margin: 0;
}

.action-view,
.action-edit,
.action-delete {
    border: none;
    background: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
}

.action-view {
    color: #0d6efd;
}

.action-edit {
    color: #198754;
}

.action-delete {
    color: #dc3545;
}

.empty-state {
    text-align: center !important;
    padding: 50px !important;
    color: #777;
}

.pagination-wrapper {
    margin-top: 20px;
}

.alert-success {
    background: #e8f7ee;
    color: #198754;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.finance-form {
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ddd;
    border-radius: 7px;
    box-sizing: border-box;
}

.full-width,
.form-actions {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
}

.error {
    color: #dc3545;
}

@media (max-width: 768px) {

    .finance-header,
    .form-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .finance-form {
        grid-template-columns: 1fr;
    }

    .full-width,
    .form-actions {
        grid-column: auto;
    }

    .finance-actions {
        width: 100%;
    }

    .finance-actions .btn {
        flex: 1;
    }

}

/* Finance Detail Page */

.finance-detail-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 25px;
    max-width: 1000px;
}

.detail-header {
    padding-bottom: 20px;
    border-bottom: 1px solid #eeeeee;
}

.detail-header h2 {
    margin: 12px 0 0;
    font-size: 22px;
}

.finance-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 25px 0;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-label {
    font-size: 13px;
    color: #777777;
    font-weight: 500;
}

.detail-item strong {
    font-size: 15px;
    color: #222222;
}

.status-badge {
    display: inline-block;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 20px;
    background: #eef2ff;
    color: #4f46e5;
}

.detail-notes {
    padding: 20px 0;
    border-top: 1px solid #eeeeee;
}

.detail-notes p {
    margin-top: 8px;
    line-height: 1.6;
    color: #555555;
}

.detail-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #eeeeee;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #bb2d3b;
}

@media (max-width: 768px) {

    .finance-detail-grid {
        grid-template-columns: 1fr;
    }

    .form-header {
        align-items: flex-start;
        gap: 15px;
    }

}


.success-toast {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 360px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 16px 18px;

    background: #ffffff;
    border-radius: 12px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);

    border-left: 4px solid #22c55e;

    z-index: 99999;
    overflow: hidden;

    animation: toastSlideIn 0.4s ease forwards;
}


/* ICON */

.toast-icon {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #22c55e;
    color: #ffffff;

    border-radius: 50%;

    font-size: 18px;
    font-weight: bold;

    flex-shrink: 0;
}


/* CONTENT */

.toast-content {
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 3px;
}


.toast-content strong {
    font-size: 15px;
    color: #111827;
}


.toast-content span {
    font-size: 13px;
    color: #6b7280;
}


/* CLOSE BUTTON */

.toast-close {
    border: none;
    background: transparent;

    color: #9ca3af;

    font-size: 22px;

    cursor: pointer;

    padding: 0;
    line-height: 1;
}


.toast-close:hover {
    color: #111827;
}


/* PROGRESS BAR */

.toast-progress {
    position: absolute;

    bottom: 0;
    left: 0;

    height: 3px;
    width: 100%;

    background: #22c55e;

    animation: toastProgress 4s linear forwards;
}


/* SLIDE IN */

@keyframes toastSlideIn {

    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }

}


/* SLIDE OUT */

.success-toast.hide {
    animation: toastSlideOut 0.4s ease forwards;
}


@keyframes toastSlideOut {

    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }

}


/* PROGRESS ANIMATION */

@keyframes toastProgress {

    from {
        width: 100%;
    }

    to {
        width: 0%;
    }

}



.delete-modal {
    position: fixed;
    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    z-index: 100000;
}

.delete-modal.show {
    display: flex;
}


/* BACKDROP */

.delete-modal-overlay {
    position: absolute;
    inset: 0;

    background: rgba(15, 23, 42, 0.55);

    backdrop-filter: blur(4px);

    animation: deleteModalFadeIn 0.25s ease;
}


/* MODAL BOX */

.delete-modal-content {
    position: relative;

    width: 420px;
    max-width: calc(100% - 40px);

    padding: 32px;

    background: #ffffff;

    border-radius: 18px;

    text-align: center;

    box-shadow:
        0 25px 60px
        rgba(0, 0, 0, 0.25);

    animation:
        deleteModalScaleIn
        0.25s
        ease;
}


/* ICON */

.delete-modal-icon {

    width: 64px;
    height: 64px;

    margin: 0 auto 18px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #fee2e2;

    border-radius: 50%;

    font-size: 28px;
}


/* TITLE */

.delete-modal-content h3 {

    margin: 0 0 10px;

    font-size: 21px;

    font-weight: 700;

    color: #111827;
}


/* DESCRIPTION */

.delete-modal-content p {

    margin: 0;

    color: #6b7280;

    font-size: 14px;

    line-height: 1.6;
}


/* BUTTONS */

.delete-modal-actions {

    display: flex;

    justify-content: center;

    gap: 12px;

    margin-top: 26px;
}


/* CANCEL */

.delete-cancel-btn {

    padding: 10px 22px;

    border: 1px solid #d1d5db;

    background: #ffffff;

    color: #374151;

    border-radius: 8px;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}

.delete-cancel-btn:hover {

    background: #f3f4f6;

}


/* CONFIRM DELETE */

.delete-confirm-btn {

    padding: 10px 22px;

    border: none;

    background: #dc2626;

    color: #ffffff;

    border-radius: 8px;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}

.delete-confirm-btn:hover {

    background: #b91c1c;

    transform: translateY(-1px);

}


/* ANIMATIONS */

@keyframes deleteModalFadeIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


@keyframes deleteModalScaleIn {

    from {

        opacity: 0;

        transform:
            scale(0.9)
            translateY(10px);

    }

    to {

        opacity: 1;

        transform:
            scale(1)
            translateY(0);

    }

}
.financial-year-preview {
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.financial-year-preview-header h3 {
    margin: 0 0 6px;
}

.financial-year-preview-header p {
    margin: 0;
    color: #6b7280;
}

.financial-year-summary {
    display: flex;
    gap: 40px;
    margin-top: 24px;
    margin-bottom: 20px;
}

.fy-summary-main,
.fy-summary-date {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fy-summary-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
}

.quarter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quarter-card {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
}

.quarter-number {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.quarter-card strong {
    font-size: 14px;
}


@media (max-width: 768px) {

    .financial-year-summary {
        flex-direction: column;
        gap: 15px;
    }

    .quarter-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 480px) {

    .quarter-grid {
        grid-template-columns: 1fr;
    }

}


.financial-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.financial-chart-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-filter {
    min-width: 160px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}

.financial-chart-wrapper {
    position: relative;
    width: 100%;
    height: 420px;
}

#financialChartEmpty {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}



.task-create-section {
    margin-top: 24px;
    padding-top: 22px;

    border-top: 1px solid #eef2f7;
}



.task-create-header {
    display: flex;
    align-items: center;

    gap: 11px;

    margin-bottom: 20px;
}

.task-create-icon {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 10px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 14px;
}

.task-create-title {
    margin: 0;

    color: #0f172a;

    font-size: 13px;
    font-weight: 800;
}

.task-create-subtitle {
    margin: 3px 0 0;

    color: #94a3b8;

    font-size: 10px;
    font-weight: 500;
}

.task-create-form {
    display: flex;
    flex-direction: column;

    gap: 17px;
}



.task-form-group {
    width: 100%;
}

.task-form-label {
    display: flex;
    align-items: center;

    gap: 6px;

    margin-bottom: 7px;

    color: #475569;

    font-size: 10px;

    font-weight: 750;

    letter-spacing: .15px;
}

.task-form-label i {
    color: #64748b;

    font-size: 11px;
}

.required-star {
    color: #ef4444;

    font-size: 11px;
}

.optional-label {
    margin-left: auto;

    color: #a1acba;

    font-size: 9px;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: .3px;
}



.task-input-wrapper {
    position: relative;

    width: 100%;
}

.task-input-icon {
    position: absolute;

    left: 13px;
    top: 50%;

    transform: translateY(-50%);

    color: #94a3b8;

    font-size: 12px;

    pointer-events: none;

    transition: color .2s ease;
}




.task-input {
    width: 100%;

    height: 44px;

    padding: 10px 13px 10px 38px;

    border: 1px solid #dfe5ed;

    border-radius: 10px;

    background: #ffffff;

    color: #334155;

    font-size: 11px;

    font-weight: 500;

    outline: none;

    box-shadow:
        0 2px 5px rgba(15, 23, 42, .025);

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.task-input:hover {
    border-color: #cbd5e1;
}

.task-input:focus {
    border-color: #60a5fa;

    background: #ffffff;

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, .08),
        0 4px 12px rgba(15, 23, 42, .04);
}

.task-input-wrapper:focus-within
.task-input-icon {
    color: #2563eb;
}

.task-input::placeholder {
    color: #b0bac8;

    font-weight: 400;
}



.task-textarea-wrapper {
    width: 100%;
}

.task-textarea {
    width: 100%;

    min-height: 88px;

    padding: 11px 13px;

    border: 1px solid #dfe5ed;

    border-radius: 10px;

    background: #ffffff;

    color: #334155;

    font-size: 11px;

    font-weight: 500;

    line-height: 1.6;

    resize: vertical;

    outline: none;

    box-shadow:
        0 2px 5px rgba(15, 23, 42, .025);

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.task-textarea:hover {
    border-color: #cbd5e1;
}

.task-textarea:focus {
    border-color: #60a5fa;

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, .08),
        0 4px 12px rgba(15, 23, 42, .04);
}

.task-textarea::placeholder {
    color: #b0bac8;

    font-weight: 400;
}




.task-date-input {
    color: #475569;

    cursor: pointer;
}

.task-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;

    opacity: .55;

    transition: opacity .2s ease;
}

.task-date-input:hover::-webkit-calendar-picker-indicator {
    opacity: .9;
}



.task-add-button {
    width: 100%;

    min-height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    margin-top: 2px;

    padding: 9px 15px;

    border: 0;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    color: #ffffff;

    font-size: 11px;

    font-weight: 750;

    letter-spacing: .1px;

    cursor: pointer;

    box-shadow:
        0 7px 16px rgba(37, 99, 235, .18);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.task-add-button:hover {
    transform: translateY(-1px);

    background:
        linear-gradient(
            135deg,
            #1d4ed8,
            #1e40af
        );

    box-shadow:
        0 10px 22px rgba(37, 99, 235, .25);
}

.task-add-button:active {
    transform: translateY(0);

    box-shadow:
        0 5px 12px rgba(37, 99, 235, .18);
}

.task-add-button-icon {
    width: 21px;
    height: 21px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;

    background: rgba(255, 255, 255, .16);

    font-size: 10px;
}


.action-card-body {
    padding: 22px;
}

/* Form Groups */

.action-form-group {
    margin-bottom: 18px;
}

.action-form-group:last-child {
    margin-bottom: 0;
}


/* Labels */

.action-form-label {
    display: flex;

    align-items: center;

    gap: 6px;

    margin-bottom: 8px;

    color: #334155;

    font-size: 11px;

    font-weight: 750;

    letter-spacing: .1px;
}

.action-form-label > i {
    color: #64748b;

    font-size: 12px;
}

.action-required {
    color: #dc2626;

    font-size: 11px;

    font-weight: 800;
}

.action-optional {
    margin-left: auto;

    color: #a1acba;

    font-size: 9px;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: .35px;
}

.action-input-wrapper {
    position: relative;

    width: 100%;
}

.action-input-icon {
    position: absolute;

    top: 50%;

    left: 13px;

    transform: translateY(-50%);

    color: #94a3b8;

    font-size: 13px;

    pointer-events: none;

    z-index: 2;
}

.action-input {
    width: 100%;

    min-height: 44px;

    padding: 10px 13px 10px 39px;

    border: 1px solid #dce3ec;

    border-radius: 10px;

    outline: none;

    background: #ffffff;

    color: #334155;

    font-size: 12px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.action-input::placeholder {
    color: #b2bcc9;
}

.action-input:hover {
    border-color: #cbd5e1;
}

.action-input:focus {
    border-color: #60a5fa;

    background: #ffffff;

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, .08);
}

.action-input:focus + .action-input-icon {
    color: #2563eb;
}


/* =========================================================
   SELECT
========================================================= */

.action-select-wrapper {
    position: relative;
}

.action-select-icon {
    position: absolute;

    top: 50%;

    left: 13px;

    transform: translateY(-50%);

    color: #94a3b8;

    font-size: 13px;

    pointer-events: none;

    z-index: 2;
}

.action-select {
    width: 100%;

    min-height: 44px;

    padding: 10px 38px 10px 39px;

    border: 1px solid #dce3ec;

    border-radius: 10px;

    background-color: #ffffff;

    color: #334155;

    font-size: 12px;

    font-weight: 600;

    outline: none;

    cursor: pointer;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.action-select:hover {
    border-color: #cbd5e1;
}

.action-select:focus {
    border-color: #60a5fa;

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, .08);
}


/* =========================================================
   TEXTAREA
========================================================= */

.action-textarea-wrapper {
    position: relative;
}

.action-textarea {
    display: block;

    width: 100%;

    min-height: 100px;

    padding: 12px 13px;

    border: 1px solid #dce3ec;

    border-radius: 10px;

    background: #ffffff;

    color: #334155;

    font-size: 12px;

    line-height: 1.6;

    resize: vertical;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.action-textarea::placeholder {
    color: #b2bcc9;
}

.action-textarea:hover {
    border-color: #cbd5e1;
}

.action-textarea:focus {
    border-color: #60a5fa;

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, .08);
}


/* =========================================================
   TWO COLUMN FORM ROW
========================================================= */

.action-form-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 14px;
}


/* =========================================================
   DURATION INPUT
========================================================= */

.action-duration-wrapper {
    display: flex;

    align-items: stretch;

    border: 1px solid #dce3ec;

    border-radius: 10px;

    overflow: hidden;

    background: #ffffff;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.action-duration-wrapper:focus-within {
    border-color: #60a5fa;

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, .08);
}

.action-duration-input {
    width: 100%;

    min-width: 0;

    min-height: 44px;

    padding: 10px 13px;

    border: 0;

    outline: none;

    color: #334155;

    background: #ffffff;

    font-size: 12px;
}

.action-duration-unit {
    display: flex;

    align-items: center;

    padding: 0 13px;

    background: #f8fafc;

    border-left: 1px solid #e5eaf1;

    color: #64748b;

    font-size: 10px;

    font-weight: 750;

    white-space: nowrap;
}


/* =========================================================
   FORM HINT
========================================================= */

.action-form-hint {
    margin-top: 7px;

    color: #94a3b8;

    font-size: 10px;

    line-height: 1.5;
}


/* =========================================================
   FORM FOOTER
========================================================= */

.action-form-footer {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 20px;

    padding-top: 18px;

    border-top: 1px solid #eef2f7;
}


/* =========================================================
   PRIMARY ACTION BUTTON
========================================================= */

.action-submit-button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    width: 100%;

    min-height: 44px;

    padding: 10px 16px;

    border: 0;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    color: #ffffff;

    font-size: 12px;

    font-weight: 750;

    box-shadow:
        0 7px 15px rgba(37, 99, 235, .16);

    cursor: pointer;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.action-submit-button:hover {
    transform: translateY(-1px);

    background:
        linear-gradient(
            135deg,
            #1d4ed8,
            #1e40af
        );

    box-shadow:
        0 10px 20px rgba(37, 99, 235, .22);
}

.action-submit-button:active {
    transform: translateY(0);
}


/* Activity Button */

.action-submit-button.activity-submit {
    background:
        linear-gradient(
            135deg,
            #059669,
            #047857
        );

    box-shadow:
        0 7px 15px rgba(5, 150, 105, .16);
}

.action-submit-button.activity-submit:hover {
    background:
        linear-gradient(
            135deg,
            #047857,
            #065f46
        );

    box-shadow:
        0 10px 20px rgba(5, 150, 105, .22);
}


/* =========================================================
   TERMINAL NOTICE IMPROVEMENT
========================================================= */

.terminal-stage-notice {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    padding: 13px 14px;

    margin-bottom: 20px;

    border-radius: 10px;

    font-size: 11px;

    line-height: 1.6;
}

.terminal-stage-notice i {
    margin-top: 2px;

    flex-shrink: 0;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 576px) {

    .action-form-row {
        grid-template-columns: 1fr;
    }

    .action-card-body {
        padding: 17px;
    }

    .action-form-footer {
        margin-top: 17px;

        padding-top: 15px;
    }

}


.lead-crm-page {
    min-height: calc(100vh - 70px);
    background: #f6f8fc;
    padding: 28px 24px 80px;
}

.lead-crm-container {
    max-width: 1280px;
    margin: 0 auto;
}

/* =========================================================
   HEADER
========================================================= */

.crm-header {
    margin-bottom: 24px;
}

.crm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 12px;
    color: #98a2b3;
}

.crm-breadcrumb a {
    color: #667085;
    text-decoration: none;
    font-weight: 500;
}

.crm-breadcrumb a:hover {
    color: #4f46e5;
}

.crm-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.crm-title-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.crm-title-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    box-shadow: 0 5px 15px rgba(79, 70, 229, .10);
}

.crm-title-area h1 {
    margin: 0 0 5px;
    font-size: 25px;
    font-weight: 750;
    letter-spacing: -.5px;
    color: #101828;
}

.crm-title-area p {
    margin: 0;
    color: #667085;
    font-size: 13px;
}

/* =========================================================
   PIPELINE CARD
========================================================= */

.pipeline-card {
    background: #ffffff;
    border: 1px solid #eaecf0;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 22px;
    box-shadow: 0 4px 16px rgba(16, 24, 40, .04);
}

.pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.pipeline-header strong {
    color: #344054;
    font-size: 13px;
}

.pipeline-header span {
    color: #98a2b3;
    font-size: 11px;
}

.pipeline-stages {
    display: flex;
    align-items: flex-start;
    width: 100%;
    position: relative;
}

/* =========================================================
   PIPELINE STAGE
========================================================= */

.pipeline-stage {
    flex: 1;
    position: relative;
    text-align: center;
    min-width: 90px;
}

.pipeline-stage:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 15px;
    left: 55%;
    width: 90%;
    height: 2px;
    background: #eaecf0;
    z-index: 1;
}

.pipeline-stage.active:not(:last-child)::after {
    background: #c7d2fe;
}

/* =========================================================
   PIPELINE DOT
========================================================= */

.pipeline-dot {
    width: 30px;
    height: 30px;
    margin: 0 auto 7px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #d0d5dd;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
    z-index: 2;

    color: #98a2b3;
    font-size: 12px;
}

.pipeline-stage.active .pipeline-dot {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;

    box-shadow:
        0 0 0 5px #eef2ff;
}

.pipeline-stage.active .pipeline-stage-label {
    color: #4f46e5;
}

/* WON */

.pipeline-stage.won .pipeline-dot {
    border-color: #12b76a;
    color: #12b76a;
    background: #ecfdf3;
}

.pipeline-stage.won .pipeline-stage-label {
    color: #039855;
}

/* LOST */

.pipeline-stage.lost .pipeline-dot {
    border-color: #f04438;
    color: #f04438;
    background: #fff1f0;
}

.pipeline-stage.lost .pipeline-stage-label {
    color: #d92d20;
}

/* LABEL */

.pipeline-stage-label {
    font-size: 10px;
    color: #98a2b3;
    font-weight: 600;
}

.pipeline-stage-percent {
    margin-top: 3px;
    font-size: 9px;
    color: #b0b7c3;
    font-weight: 600;
}

.pipeline-stage.won .pipeline-stage-percent {
    color: #12b76a;
}

.pipeline-stage.lost .pipeline-stage-percent {
    color: #f04438;
}

/* =========================================================
   MAIN LAYOUT
========================================================= */

.crm-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    align-items: start;
}

/* =========================================================
   FORM CARD
========================================================= */

.crm-form-card {
    background: #ffffff;
    border: 1px solid #eaecf0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(16, 24, 40, .05);
}

/* =========================================================
   FORM SECTION
========================================================= */

.crm-section {
    padding: 28px 30px;
    border-bottom: 1px solid #f0f2f5;
}

.crm-section:last-of-type {
    border-bottom: none;
}

/* =========================================================
   SECTION HEADER
========================================================= */

.crm-section-header {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 25px;
}

.crm-section-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #f4f3ff;
    color: #635bdb;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
}

.crm-section-header h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #1d2939;
}

.crm-section-header p {
    margin: 0;
    font-size: 12px;
    color: #98a2b3;
}

/* =========================================================
   STANDARD FORM GRID
========================================================= */

.crm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 22px;
    width: 100%;
}

.crm-form-field {
    min-width: 0;
}

.crm-form-field.full-width {
    grid-column: 1 / -1;
}

/* =========================================================
   STANDARD LABEL
========================================================= */

.crm-label {
    display: flex;
    align-items: center;
    gap: 2px;

    min-height: 18px;

    margin-bottom: 8px;

    color: #344054;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

.required {
    color: #f04438;
    margin-left: 2px;
}

/* =========================================================
   STANDARD INPUT + SELECT
========================================================= */

.crm-input,
.crm-select {
    display: block;

    width: 100%;
    height: 44px;

    padding: 0 13px;

    border: 1px solid #d0d5dd;
    border-radius: 8px;

    background: #ffffff;
    color: #101828;

    font-family: inherit;
    font-size: 13px;
    font-weight: 400;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.crm-input:hover,
.crm-select:hover {
    border-color: #98a2b3;
}

.crm-input:focus,
.crm-select:focus {
    border-color: #6366f1;
    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(99, 102, 241, .10);
}

.crm-input::placeholder {
    color: #b0b7c3;
}

/* =========================================================
   TEXTAREA
========================================================= */

textarea.crm-input {
    width: 100%;
    min-height: 125px;
    height: 125px;

    padding: 12px 13px;

    line-height: 1.6;

    resize: vertical;
}

/* =========================================================
   HELP TEXT
========================================================= */

.crm-help {
    min-height: 16px;

    margin-top: 6px;

    color: #98a2b3;
    font-size: 10px;
    line-height: 1.5;
}

/* =========================================================
   ERROR
========================================================= */

.crm-error {
    min-height: 16px;

    margin-top: 6px;

    color: #d92d20;
    font-size: 11px;
    line-height: 1.5;
}

.crm-input.is-invalid,
.crm-select.is-invalid {
    border-color: #f04438;
}

.crm-input.is-invalid:focus,
.crm-select.is-invalid:focus {
    border-color: #f04438;

    box-shadow:
        0 0 0 3px rgba(240, 68, 56, .10);
}

/* =========================================================
   CONTACT INFORMATION BOX
========================================================= */

.contact-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-top: 20px;
    padding: 12px 14px;

    background: #f8f9ff;
    border: 1px solid #e0e7ff;
    border-radius: 9px;

    color: #667085;
    font-size: 11px;
    line-height: 1.5;
}

.contact-box i {
    color: #4f46e5;
    font-size: 15px;
    margin-top: 1px;
}

/* =========================================================
   EXPECTED VALUE GROUP
========================================================= */

.value-group {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 8px;
}

.value-group .crm-input {
    min-width: 0;
}

/* =========================================================
   VALIDATION ALERT
========================================================= */

.validation-alert {
    display: flex;
    gap: 12px;

    padding: 15px 17px;
    margin-bottom: 22px;

    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 10px;

    color: #7f1d1d;
}

.validation-icon {
    width: 32px;
    height: 32px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fee2e2;
    color: #dc2626;

    border-radius: 8px;
}

.validation-alert strong {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
}

.validation-alert ul {
    margin: 0;
    padding-left: 17px;

    font-size: 11px;
    line-height: 1.7;
}

/* =========================================================
   SIDEBAR
========================================================= */

.crm-sidebar {
    position: sticky;
    top: 90px;
}

.summary-card {
    background: #ffffff;
    border: 1px solid #eaecf0;
    border-radius: 15px;

    padding: 22px;

    box-shadow: 0 6px 22px rgba(16, 24, 40, .04);

    margin-bottom: 16px;
}

.summary-card h4 {
    margin: 0 0 18px;

    color: #1d2939;
    font-size: 14px;
    font-weight: 700;
}

.summary-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;

    padding: 12px 0;

    border-bottom: 1px solid #f2f4f7;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-icon {
    width: 32px;
    height: 32px;

    flex-shrink: 0;

    border-radius: 8px;

    background: #f8f9fc;
    color: #667085;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
}

.summary-item strong {
    display: block;

    font-size: 11px;
    color: #98a2b3;

    margin-bottom: 3px;
}

.summary-item span {
    display: block;

    font-size: 12px;
    color: #344054;

    line-height: 1.4;
}

/* =========================================================
   FORM FOOTER
========================================================= */

.crm-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;

    padding: 18px 30px;

    background: #fafbfc;
    border-top: 1px solid #eaecf0;
}

.footer-info {
    font-size: 11px;
    color: #98a2b3;
}

.crm-actions {
    display: flex;
    gap: 9px;
}

.crm-btn {
    height: 42px;

    padding: 0 18px;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 650;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    text-decoration: none;

    cursor: pointer;

    transition: .2s ease;
}

.crm-btn-cancel {
    background: #ffffff;
    color: #475467;

    border: 1px solid #d0d5dd;
}

.crm-btn-cancel:hover {
    background: #f9fafb;
    color: #1d2939;
}

.crm-btn-create {
    background: #4f46e5;
    color: #ffffff;

    border: 1px solid #4f46e5;

    box-shadow:
        0 4px 10px rgba(79, 70, 229, .18);
}

.crm-btn-create:hover {
    background: #4338ca;
    border-color: #4338ca;
    color: #ffffff;

    transform: translateY(-1px);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .pipeline-card {
        overflow-x: auto;
    }

    .pipeline-stages {
        min-width: 850px;
    }
}

@media (max-width: 1050px) {

    .crm-form-layout {
        grid-template-columns: 1fr;
    }

    .crm-sidebar {
        position: static;
    }

    .summary-card {
        display: none;
    }
}

@media (max-width: 768px) {

    .lead-crm-page {
        padding: 18px 12px 50px;
    }

    .crm-header-main {
        align-items: flex-start;
    }

    .crm-title-area h1 {
        font-size: 21px;
    }

    .crm-section {
        padding: 22px 18px;
    }

    /* Stack left/right fields on mobile */

    .crm-form-grid {
        grid-template-columns: 1fr;
        row-gap: 20px;
    }

    .crm-form-field.full-width {
        grid-column: auto;
    }

    .value-group {
        grid-template-columns: 80px minmax(0, 1fr);
    }

    .crm-form-footer {
        flex-direction: column;
        align-items: stretch;

        padding: 17px 18px;
    }

    .footer-info {
        text-align: center;
    }

    .crm-actions {
        width: 100%;
    }

    .crm-actions .crm-btn {
        flex: 1;
    }
}

/* =========================================================
   PAGE
========================================================= */

.lead-edit-page {

    min-height:
        calc(100vh - 70px);

    background:
        #f6f8fc;

    padding:
        28px 24px 70px;

}

.lead-edit-container {

    width:
        100%;

    max-width:
        1380px;

    margin:
        0 auto;

}


/* =========================================================
   BREADCRUMB
========================================================= */

.crm-breadcrumb {

    display:
        flex;

    align-items:
        center;

    flex-wrap:
        wrap;

    gap:
        8px;

    margin-bottom:
        18px;

    color:
        #98a2b3;

    font-size:
        12px;

}

.crm-breadcrumb a {

    color:
        #667085;

    text-decoration:
        none;

    font-weight:
        600;

}

.crm-breadcrumb a:hover {

    color:
        #4f46e5;

}

.crm-breadcrumb i {

    font-size:
        10px;

    color:
        #b0b7c3;

}


/* =========================================================
   PAGE HEADER
========================================================= */

.lead-edit-header {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        center;

    gap:
        24px;

    margin-bottom:
        24px;

}

.lead-edit-header-left {

    display:
        flex;

    align-items:
        center;

    gap:
        15px;

    min-width:
        0;

}

.lead-header-avatar {

    width:
        54px;

    height:
        54px;

    flex-shrink:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        14px;

    background:
        linear-gradient(
            135deg,
            #eef2ff,
            #e0e7ff
        );

    color:
        #4f46e5;

    font-size:
        17px;

    font-weight:
        800;

    box-shadow:
        0 5px 15px
        rgba(79,70,229,.08);

}

.lead-edit-header h1 {

    margin:
        0 0 4px;

    color:
        #101828;

    font-size:
        25px;

    font-weight:
        750;

    letter-spacing:
        -.4px;

}

.lead-edit-header p {

    margin:
        0;

    color:
        #667085;

    font-size:
        13px;

}

.lead-edit-header p strong {

    color:
        #344054;

}


/* =========================================================
   HEADER ACTION
========================================================= */

.header-actions {

    display:
        flex;

    gap:
        9px;

    flex-shrink:
        0;

}

.crm-btn {

    min-height:
        42px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        7px;

    padding:
        0 16px;

    border-radius:
        9px;

    font-size:
        12px;

    font-weight:
        650;

    text-decoration:
        none;

    transition:
        all .2s ease;

    cursor:
        pointer;

}

.crm-btn-back {

    background:
        #ffffff;

    color:
        #475467;

    border:
        1px solid #d0d5dd;

}

.crm-btn-back:hover {

    background:
        #f9fafb;

    border-color:
        #98a2b3;

    color:
        #1d2939;

}


/* =========================================================
   ALERTS
========================================================= */

.crm-alert {

    display:
        flex;

    align-items:
        flex-start;

    gap:
        12px;

    padding:
        14px 16px;

    margin-bottom:
        20px;

    border-radius:
        10px;

    font-size:
        12px;

}

.crm-alert-icon {

    width:
        32px;

    height:
        32px;

    flex-shrink:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        8px;

}

.crm-alert-content {

    flex:
        1;

}

.crm-alert strong {

    display:
        block;

    margin-bottom:
        4px;

    font-size:
        12px;

}

.crm-alert ul {

    margin:
        5px 0 0;

    padding-left:
        17px;

    line-height:
        1.7;

}

.crm-alert-danger {

    background:
        #fff5f5;

    border:
        1px solid #fecaca;

    color:
        #7f1d1d;

}

.crm-alert-danger .crm-alert-icon {

    background:
        #fee2e2;

    color:
        #dc2626;

}

.crm-alert-success {

    background:
        #ecfdf3;

    border:
        1px solid #abefc6;

    color:
        #067647;

}

.crm-alert-success .crm-alert-icon {

    background:
        #d1fadf;

    color:
        #039855;

}


/* =========================================================
   MAIN GRID
========================================================= */

.lead-edit-grid {

    display:
        grid;

    grid-template-columns:
        minmax(0, 1fr)
        340px;

    gap:
        22px;

    align-items:
        start;

}


/* =========================================================
   CARD
========================================================= */

.crm-card {

    background:
        #ffffff;

    border:
        1px solid #eaecf0;

    border-radius:
        15px;

    box-shadow:
        0 5px 20px
        rgba(16,24,40,.035);

    overflow:
        hidden;

    margin-bottom:
        20px;

}

.crm-card-header {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        15px;

    padding:
        18px 22px;

    border-bottom:
        1px solid #f0f2f5;

}

.crm-card-title {

    display:
        flex;

    align-items:
        center;

    gap:
        11px;

}

.crm-card-icon {

    width:
        37px;

    height:
        37px;

    flex-shrink:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        9px;

    background:
        #f4f3ff;

    color:
        #635bdb;

    font-size:
        16px;

}

.crm-card-header h3 {

    margin:
        0 0 3px;

    color:
        #1d2939;

    font-size:
        14px;

    font-weight:
        750;

}

.crm-card-header p {

    margin:
        0;

    color:
        #98a2b3;

    font-size:
        11px;

}

.crm-card-body {

    padding:
        24px;

}


/* =========================================================
   FORM SECTION
========================================================= */

.form-section {

    margin-bottom:
        30px;

}

.form-section:last-child {

    margin-bottom:
        0;

}

.form-section-heading {

    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    margin-bottom:
        20px;

    color:
        #344054;

    font-size:
        12px;

    font-weight:
        750;

    text-transform:
        uppercase;

    letter-spacing:
        .35px;

}

.form-section-heading i {

    color:
        #635bdb;

    font-size:
        14px;

}

.form-section-heading::after {

    content:
        "";

    height:
        1px;

    flex:
        1;

    background:
        #eaecf0;

}


/* =========================================================
   TWO COLUMN FORM GRID
========================================================= */

.crm-form-grid {

    display:
        grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap:
        22px 20px;

}

.crm-form-field {

    min-width:
        0;

}

.crm-form-field-full {

    grid-column:
        1 / -1;

}


/* =========================================================
   FORM LABEL
========================================================= */

.crm-label {

    display:
        flex;

    align-items:
        center;

    gap:
        3px;

    margin-bottom:
        7px;

    color:
        #344054;

    font-size:
        12px;

    font-weight:
        650;

}

.required {

    color:
        #f04438;

}


/* =========================================================
   INPUTS
========================================================= */

.crm-input,
.crm-select {

    width:
        100%;

    height:
        44px;

    padding:
        0 12px;

    border:
        1px solid #d0d5dd;

    border-radius:
        8px;

    background:
        #ffffff;

    color:
        #101828;

    font-family:
        inherit;

    font-size:
        13px;

    outline:
        none;

    box-shadow:
        none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;

}

.crm-input:hover,
.crm-select:hover {

    border-color:
        #98a2b3;

}

.crm-input:focus,
.crm-select:focus {

    border-color:
        #6366f1;

    box-shadow:
        0 0 0 3px
        rgba(99,102,241,.10);

}

.crm-input::placeholder {

    color:
        #b0b7c3;

}

textarea.crm-input {

    height:
        auto;

    min-height:
        125px;

    padding:
        12px;

    line-height:
        1.6;

    resize:
        vertical;

}


/* =========================================================
   DISABLED / READ ONLY FIELDS
========================================================= */

.crm-readonly-wrapper {

    position:
        relative;

}

.crm-input-disabled,
.crm-select-disabled {

    background:
        #f8fafc !important;

    color:
        #667085 !important;

    border-color:
        #e4e7ec !important;

    cursor:
        not-allowed !important;

    opacity:
        1 !important;

}

.crm-input-disabled:focus,
.crm-select-disabled:focus {

    border-color:
        #e4e7ec !important;

    box-shadow:
        none !important;

}

.crm-readonly-wrapper .crm-select-disabled {

    padding-right:
        38px;

}

.crm-readonly-wrapper textarea.crm-input-disabled {

    padding-right:
        40px;

}

.crm-readonly-icon {

    position:
        absolute;

    right:
        13px;

    top:
        50%;

    transform:
        translateY(-50%);

    color:
        #98a2b3;

    font-size:
        13px;

    pointer-events:
        none;

}

.crm-readonly-textarea-icon {

    position:
        absolute;

    right:
        13px;

    top:
        14px;

    color:
        #98a2b3;

    font-size:
        13px;

    pointer-events:
        none;

}

.crm-readonly-help {

    display:
        flex;

    align-items:
        center;

    gap:
        5px;

    margin-top:
        6px;

    color:
        #98a2b3;

    font-size:
        10px;

    line-height:
        1.5;

}

.crm-readonly-help i {

    color:
        #667085;

    font-size:
        11px;

}


/* =========================================================
   ERROR
========================================================= */

.crm-input.is-invalid,
.crm-select.is-invalid {

    border-color:
        #f04438;

}

.crm-input.is-invalid:focus,
.crm-select.is-invalid:focus {

    border-color:
        #f04438;

    box-shadow:
        0 0 0 3px
        rgba(240,68,56,.10);

}

.crm-error {

    margin-top:
        6px;

    color:
        #d92d20;

    font-size:
        11px;

    line-height:
        1.5;

}

.crm-help {

    margin-top:
        6px;

    color:
        #98a2b3;

    font-size:
        10px;

    line-height:
        1.5;

}


/* =========================================================
   VALUE GROUP
========================================================= */

.value-group {

    display:
        grid;

    grid-template-columns:
        85px
        minmax(0, 1fr);

    gap:
        8px;

}

.value-group .crm-input {

    min-width:
        0;

}


/* =========================================================
   CONTACT INFO BOX
========================================================= */

.contact-info-box {

    display:
        flex;

    align-items:
        flex-start;

    gap:
        10px;

    margin-top:
        18px;

    padding:
        12px 14px;

    background:
        #f8f9ff;

    border:
        1px solid #e0e7ff;

    border-radius:
        9px;

    color:
        #667085;

    font-size:
        11px;

    line-height:
        1.5;

}

.contact-info-box i {

    color:
        #4f46e5;

    font-size:
        15px;

    margin-top:
        1px;

}


/* =========================================================
   FORM FOOTER
========================================================= */

.crm-form-footer {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        15px;

    margin-top:
        26px;

    padding-top:
        20px;

    border-top:
        1px solid #eaecf0;

}

.form-footer-info {

    display:
        flex;

    align-items:
        center;

    gap:
        7px;

    color:
        #98a2b3;

    font-size:
        11px;

}

.form-footer-info i {

    color:
        #12b76a;

    font-size:
        14px;

}

.form-footer-actions {

    display:
        flex;

    gap:
        9px;

}

.form-footer-actions .crm-btn {

    min-width:
        110px;

}

.crm-btn-cancel {

    background:
        #ffffff;

    color:
        #475467;

    border:
        1px solid #d0d5dd;

}

.crm-btn-cancel:hover {

    background:
        #f9fafb;

    color:
        #1d2939;

}

.crm-btn-save {

    background:
        #4f46e5;

    color:
        #ffffff;

    border:
        1px solid #4f46e5;

    box-shadow:
        0 4px 10px
        rgba(79,70,229,.18);

}

.crm-btn-save:hover {

    background:
        #4338ca;

    border-color:
        #4338ca;

    color:
        #ffffff;

    transform:
        translateY(-1px);

}


/* =========================================================
   STAGE CARD
========================================================= */

.stage-card {

    position:
        sticky;

    top:
        90px;

}

.stage-summary {

    text-align:
        center;

    padding:
        5px 0 24px;

}

.stage-avatar {

    width:
        64px;

    height:
        64px;

    margin:
        0 auto 13px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        17px;

    background:
        linear-gradient(
            135deg,
            #eef2ff,
            #e0e7ff
        );

    color:
        #4f46e5;

    font-size:
        20px;

    font-weight:
        800;

}

.stage-summary h4 {

    margin:
        0 0 8px;

    color:
        #101828;

    font-size:
        19px;

    font-weight:
        750;

}

.stage-badge {

    display:
        inline-flex;

    align-items:
        center;

    gap:
        5px;

    padding:
        5px 10px;

    border-radius:
        20px;

    background:
        #eef2ff;

    color:
        #4f46e5;

    font-size:
        10px;

    font-weight:
        750;

}


/* =========================================================
   PROGRESS
========================================================= */

.progress-heading {

    display:
        flex;

    justify-content:
        space-between;

    margin-bottom:
        8px;

}

.progress-heading span:first-child {

    color:
        #667085;

    font-size:
        11px;

    font-weight:
        600;

}

.progress-heading span:last-child {

    color:
        #344054;

    font-size:
        11px;

    font-weight:
        750;

}

.stage-progress {

    width:
        100%;

    height:
        8px;

    margin-bottom:
        25px;

    background:
        #eef0f4;

    border-radius:
        20px;

    overflow:
        hidden;

}

.stage-progress-bar {

    height:
        100%;

    background:
        linear-gradient(
            90deg,
            #6366f1,
            #4f46e5
        );

    border-radius:
        20px;

    transition:
        width .3s ease;

}


/* =========================================================
   STAGE TIMELINE
========================================================= */

.stage-list {

    position:
        relative;

}

.stage-list::before {

    content:
        "";

    position:
        absolute;

    left:
        16px;

    top:
        18px;

    bottom:
        18px;

    width:
        2px;

    background:
        #eaecf0;

}

.stage-item {

    position:
        relative;

    display:
        flex;

    align-items:
        center;

    gap:
        12px;

    padding:
        7px 0;

}

.stage-item-dot {

    width:
        34px;

    height:
        34px;

    flex-shrink:
        0;

    position:
        relative;

    z-index:
        2;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        2px solid #e4e7ec;

    border-radius:
        50%;

    background:
        #ffffff;

    color:
        #98a2b3;

    font-size:
        10px;

    font-weight:
        750;

}

.stage-item.completed .stage-item-dot {

    background:
        #eef2ff;

    border-color:
        #c7d2fe;

    color:
        #4f46e5;

}

.stage-item.active .stage-item-dot {

    background:
        #4f46e5;

    border-color:
        #4f46e5;

    color:
        #ffffff;

    box-shadow:
        0 0 0 4px #eef2ff;

}

.stage-item-content {

    flex:
        1;

    min-width:
        0;

}

.stage-item-name {

    color:
        #667085;

    font-size:
        12px;

    font-weight:
        650;

}

.stage-item.active .stage-item-name {

    color:
        #4f46e5;

    font-weight:
        750;

}

.stage-item-probability {

    margin-top:
        2px;

    color:
        #98a2b3;

    font-size:
        10px;

}

.stage-current-label {

    display:
        inline-flex;

    margin-left:
        5px;

    color:
        #4f46e5;

    font-size:
        10px;

    font-weight:
        700;

}


/* =========================================================
   LOST STAGE
========================================================= */

.stage-item.lost-stage .stage-item-dot {

    color:
        #f04438;

    border-color:
        #fecdca;

    background:
        #fff5f5;

}

.stage-item.lost-stage.active .stage-item-dot {

    color:
        #ffffff;

    border-color:
        #f04438;

    background:
        #f04438;

    box-shadow:
        0 0 0 4px #fff1f0;

}

.stage-item.lost-stage.active .stage-item-name {

    color:
        #d92d20;

}


/* =========================================================
   STAGE INFO
========================================================= */

.stage-info-box {

    margin-top:
        22px;

    padding:
        13px;

    background:
        #f8fafc;

    border:
        1px solid #eaecf0;

    border-radius:
        10px;

}

.stage-info-title {

    display:
        flex;

    align-items:
        center;

    gap:
        6px;

    margin-bottom:
        5px;

    color:
        #344054;

    font-size:
        11px;

    font-weight:
        750;

}

.stage-info-title i {

    color:
        #667085;

}

.stage-info-text {

    margin:
        0;

    color:
        #98a2b3;

    font-size:
        10px;

    line-height:
        1.6;

}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .lead-edit-grid {

        grid-template-columns:
            1fr;

    }

    .stage-card {

        position:
            static;

    }

}

@media (max-width: 768px) {

    .lead-edit-page {

        padding:
            20px 12px 50px;

    }

    .lead-edit-header {

        flex-direction:
            column;

        align-items:
            flex-start;

    }

    .header-actions {

        width:
            100%;

    }

    .header-actions .crm-btn {

        width:
            100%;

    }

    .crm-card-body {

        padding:
            20px 16px;

    }

    .crm-card-header {

        padding:
            16px;

    }

    .crm-form-grid {

        grid-template-columns:
            1fr;

        gap:
            18px;

    }

    .crm-form-field-full {

        grid-column:
            auto;

    }

    .crm-form-footer {

        flex-direction:
            column;

        align-items:
            stretch;

    }

    .form-footer-info {

        justify-content:
            center;

    }

    .form-footer-actions {

        width:
            100%;

    }

    .form-footer-actions .crm-btn {

        flex:
            1;

    }

}

@media (max-width: 576px) {

    .lead-edit-header-left {

        align-items:
            flex-start;

    }

    .lead-header-avatar {

        width:
            46px;

        height:
            46px;

        border-radius:
            12px;

    }

    .lead-edit-header h1 {

        font-size:
            21px;

    }

    .value-group {

        grid-template-columns:
            75px
            minmax(0, 1fr);

    }

}

/* =========================================================
   ROOT / PAGE
========================================================= */

.lead-details-page {
    min-height: calc(100vh - 70px);

    background:
        linear-gradient(
            180deg,
            #f8fafc 0%,
            #f3f6fb 100%
        );

    padding: 28px 26px 70px;

    color: #172033;
}

.lead-details-container {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
}
/* =========================================================
   REQUIRED FIELD ASTERISK
========================================================= */

.required-star,
.action-required {
    color: #dc2626 !important;
    font-weight: 800;
    margin-left: 3px;
}

/* =========================================================
   ALERTS
========================================================= */

.crm-alert {
    border: 0;
    border-radius: 14px;

    padding: 14px 17px;

    font-size: 13px;

    box-shadow:
        0 5px 20px rgba(15, 23, 42, .05);
}


/* =========================================================
   HEADER
========================================================= */

.lead-header {
    position: relative;
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e5eaf1;
    border-radius: 22px;

    padding: 26px 28px;

    margin-bottom: 20px;

    box-shadow:
        0 10px 35px rgba(15, 23, 42, .045);
}

.lead-header::after {
    content: "";

    position: absolute;

    top: 0;
    right: 0;

    width: 260px;
    height: 100%;

    pointer-events: none;

    background:
        radial-gradient(
            circle at top right,
            rgba(37, 99, 235, .08),
            transparent 68%
        );
}

.lead-header-main {
    position: relative;

    z-index: 2;

    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 30px;
}

.lead-profile {
    display: flex;

    align-items: center;

    gap: 17px;
}

.lead-avatar {
    width: 68px;
    height: 68px;

    flex-shrink: 0;

    border-radius: 19px;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1e40af
        );

    color: #ffffff;

    font-size: 21px;
    font-weight: 800;

    box-shadow:
        0 10px 22px rgba(37, 99, 235, .22);
}

.lead-header.is-won .lead-avatar {
    background:
        linear-gradient(
            135deg,
            #16a34a,
            #15803d
        );

    box-shadow:
        0 10px 22px rgba(22, 163, 74, .22);
}

.lead-header.is-lost .lead-avatar {
    background:
        linear-gradient(
            135deg,
            #dc2626,
            #b91c1c
        );

    box-shadow:
        0 10px 22px rgba(220, 38, 38, .20);
}

.lead-title {
    margin: 0;

    color: #0f172a;

    font-size: 26px;
    font-weight: 800;

    letter-spacing: -.6px;
}

.lead-company {
    margin: 6px 0 0;

    color: #64748b;

    font-size: 13px;
    font-weight: 500;
}

.lead-contact-links {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 16px;
    margin-left: 85px;
}

.lead-contact-links a {
    display: inline-flex;

    align-items: center;

    gap: 6px;

    padding: 7px 11px;

    background: #f8fafc;

    border: 1px solid #edf1f6;

    border-radius: 8px;

    color: #64748b;

    text-decoration: none;

    font-size: 11px;
    font-weight: 600;

    transition: all .2s ease;
}

.lead-contact-links a:hover {
    color: #2563eb;

    border-color: #bfdbfe;

    background: #eff6ff;
}

.lead-header-actions {
    display: flex;

    gap: 9px;
}

.btn-soft {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    min-height: 40px;

    padding: 9px 15px;

    border: 1px solid #e2e8f0;

    border-radius: 10px;

    background: #ffffff;

    color: #334155;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;

    transition: all .2s ease;
}

.btn-soft:hover {
    color: #2563eb;

    border-color: #bfdbfe;

    background: #eff6ff;
}


/* =========================================================
   STATUS BANNER
========================================================= */

.lead-status-banner {
    position: relative;

    z-index: 2;

    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-top: 18px;
    margin-left: 85px;

    padding: 8px 13px;

    border-radius: 9px;

    font-size: 11px;
    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .35px;
}

.lead-status-banner.won {
    background: #ecfdf5;

    border: 1px solid #bbf7d0;

    color: #15803d;
}

.lead-status-banner.lost {
    background: #fef2f2;

    border: 1px solid #fecaca;

    color: #b91c1c;
}


/* =========================================================
   PIPELINE CARD
========================================================= */

.pipeline-card {
    background: #ffffff;

    border: 1px solid #e5eaf1;

    border-radius: 20px;

    padding: 25px 27px;

    margin-bottom: 20px;

    box-shadow:
        0 8px 28px rgba(15, 23, 42, .035);
}

.pipeline-top {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 28px;
}

.section-heading {
    display: flex;

    align-items: center;

    gap: 11px;
}

.section-heading-icon {
    width: 36px;
    height: 36px;

    border-radius: 10px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #eff6ff;

    color: #2563eb;

    font-size: 15px;
}

.section-title {
    margin: 0;

    color: #0f172a;

    font-size: 14px;
    font-weight: 800;
}

.section-subtitle {
    margin-top: 4px;

    color: #94a3b8;

    font-size: 11px;
}

/* =========================================================
   LEAD HEADER + PIPELINE — SINGLE ROW
========================================================= */

.lead-top-row {
    display: grid;

    grid-template-columns:
        minmax(420px, 0.85fr)
        minmax(650px, 1.5fr);

    gap: 20px;

    align-items: stretch;

    margin-bottom: 20px;
}


/* =========================================================
   LEAD HEADER
========================================================= */

.lead-top-row .lead-header {
    height: 100%;

    margin-bottom: 0;

    padding: 22px 24px;

    display: flex;

    align-items: center;
}

.lead-top-row .lead-header-main {
    width: 100%;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    gap: 18px;
}

.lead-header-content {
    min-width: 0;
}

.lead-profile {
    display: flex;

    align-items: center;

    gap: 14px;
}

.lead-profile-info {
    min-width: 0;
}

.lead-title {
    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.lead-company {
    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.lead-company-separator {
    margin: 0 5px;

    color: #cbd5e1;
}


/* =========================================================
   CONTACT LINKS
========================================================= */

.lead-top-row .lead-contact-links {
    margin: 16px 0 0;

    display: flex;

    flex-wrap: wrap;

    gap: 7px;
}

.lead-top-row .lead-contact-links a {
    max-width: 100%;

    min-width: 0;
}

.lead-top-row .lead-contact-links a span {
    max-width: 190px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================================
   STATUS
========================================================= */

.lead-top-row .lead-status-banner {
    margin: 14px 0 0;

    width: fit-content;
}


/* =========================================================
   BACK BUTTON
========================================================= */

.lead-top-row .lead-header-actions {
    width: 100%;
}

.lead-top-row .lead-header-actions .btn-soft {
    width: 100%;
}


/* =========================================================
   PIPELINE CARD
========================================================= */

.lead-top-row .pipeline-card {
    height: 100%;

    min-width: 0;

    margin-bottom: 0;

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding: 22px 24px;
}

.lead-top-row .pipeline-top {
    margin-bottom: 22px;
}

.lead-top-row .pipeline-wrapper {
    width: 100%;

    overflow-x: auto;
}

.lead-top-row .pipeline-track {
    min-width: 620px;
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 1250px) {

    .lead-top-row {
        grid-template-columns:
            minmax(350px, .8fr)
            minmax(550px, 1.2fr);

        gap: 16px;
    }

    .lead-top-row .lead-header,
    .lead-top-row .pipeline-card {
        padding: 20px;
    }

    .lead-title {
        font-size: 23px;
    }

}


/* =========================================================
   RESPONSIVE — STACK ONLY WHEN SCREEN IS TOO SMALL
========================================================= */

@media (max-width: 1050px) {

    .lead-top-row {
        grid-template-columns: 1fr;
    }

    .lead-top-row .lead-header,
    .lead-top-row .pipeline-card {
        height: auto;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 576px) {

    .lead-top-row {
        gap: 14px;
    }

    .lead-top-row .lead-header {
        padding: 18px;
    }

    .lead-top-row .pipeline-card {
        padding: 18px;
    }

    .lead-profile {
        align-items: flex-start;
    }

    .lead-title {
        font-size: 20px;
    }

    .lead-contact-links {
        flex-direction: column;
    }

    .lead-top-row .lead-contact-links a {
        width: 100%;
    }

    .lead-top-row .lead-contact-links a span {
        max-width: none;
    }

    .lead-top-row .pipeline-top {
        flex-direction: column;

        align-items: flex-start;

        gap: 14px;
    }

    .lead-top-row .current-stage-box {
        width: 100%;

        text-align: left;
    }

}
/* =========================================================
   CURRENT STAGE
========================================================= */

.current-stage-box {
    min-width: 170px;

    padding: 10px 14px;

    border-radius: 11px;

    background: #f8fafc;

    border: 1px solid #eef2f7;

    text-align: right;
}

.current-stage-label {
    color: #94a3b8;

    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .4px;
}

.current-stage-value {
    margin-top: 4px;

    color: #0f172a;

    font-size: 15px;
    font-weight: 800;
}

.current-stage-value span {
    color: #2563eb;

    margin-left: 5px;
}

.current-stage-box.won {
    background: #ecfdf5;

    border-color: #bbf7d0;
}

.current-stage-box.won .current-stage-value {
    color: #15803d;
}

.current-stage-box.won .current-stage-value span {
    color: #16a34a;
}

.current-stage-box.lost {
    background: #fef2f2;

    border-color: #fecaca;
}

.current-stage-box.lost .current-stage-value {
    color: #b91c1c;
}

.current-stage-box.lost .current-stage-value span {
    color: #dc2626;
}


/* =========================================================
   PIPELINE
========================================================= */

.pipeline-wrapper {
    position: relative;

    overflow-x: auto;

    padding: 5px 0 12px;

    scrollbar-width: thin;
}

.pipeline-track {
    position: relative;

    min-width: 800px;

    display: flex;

    align-items: flex-start;
}

.pipeline-line {
    position: absolute;

    top: 17px;

    left: 5%;
    right: 5%;

    height: 5px;

    background: #e9eef5;

    border-radius: 20px;
}

.pipeline-progress {
    position: absolute;

    top: 17px;

    left: 5%;

    height: 5px;

    background:
        linear-gradient(
            90deg,
            #2563eb,
            #60a5fa
        );

    border-radius: 20px;

    transition: width .4s ease;
}

.pipeline-progress.won-progress {
    background:
        linear-gradient(
            90deg,
            #16a34a,
            #4ade80
        );
}

.pipeline-progress.lost-progress {
    background:
        linear-gradient(
            90deg,
            #dc2626,
            #f87171
        );
}

.pipeline-stage {
    position: relative;

    z-index: 2;

    flex: 1;

    text-align: center;
}

.pipeline-dot {
    width: 36px;
    height: 36px;

    margin: 0 auto 10px;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #ffffff;

    border: 3px solid #dce3ec;

    color: #94a3b8;

    font-size: 9px;
    font-weight: 800;

    transition: all .25s ease;
}

.pipeline-stage.completed .pipeline-dot {
    background: #2563eb;

    border-color: #2563eb;

    color: #ffffff;

    box-shadow:
        0 5px 13px rgba(37, 99, 235, .2);
}

.pipeline-stage.active .pipeline-dot {
    width: 42px;
    height: 42px;

    margin-top: -3px;

    background: #ffffff;

    border: 4px solid #2563eb;

    color: #2563eb;

    box-shadow:
        0 0 0 6px rgba(37, 99, 235, .10),
        0 7px 18px rgba(37, 99, 235, .16);
}

.pipeline-stage.won-stage .pipeline-dot {
    background: #16a34a;

    border-color: #16a34a;

    color: #ffffff;
}

.pipeline-stage.won-stage.active .pipeline-dot {
    box-shadow:
        0 0 0 6px rgba(22, 163, 74, .12),
        0 7px 18px rgba(22, 163, 74, .20);
}

.pipeline-stage.lost-stage .pipeline-dot {
    background: #dc2626;

    border-color: #dc2626;

    color: #ffffff;
}

.pipeline-stage.lost-stage.active .pipeline-dot {
    box-shadow:
        0 0 0 6px rgba(220, 38, 38, .12),
        0 7px 18px rgba(220, 38, 38, .20);
}

.pipeline-stage-name {
    color: #64748b;

    font-size: 11px;
    font-weight: 750;
}

.pipeline-stage.active .pipeline-stage-name {
    color: #2563eb;
}

.pipeline-stage.won-stage.active .pipeline-stage-name {
    color: #15803d;
}

.pipeline-stage.lost-stage.active .pipeline-stage-name {
    color: #b91c1c;
}

.pipeline-stage.completed .pipeline-stage-name {
    color: #334155;
}

.pipeline-stage-percent {
    margin-top: 4px;

    color: #a1acba;

    font-size: 10px;
    font-weight: 600;
}



.kpi-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 22px;
}

.kpi-card {
    position: relative;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e5eaf1;

    border-radius: 16px;

    padding: 18px 19px;

    box-shadow:
        0 7px 22px rgba(15, 23, 42, .035);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 28px rgba(15, 23, 42, .07);
}

.kpi-top {
    display: flex;

    justify-content: space-between;
    align-items: center;
}

.kpi-icon {
    width: 34px;
    height: 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 14px;
}

.kpi-label {
    margin-top: 14px;

    color: #94a3b8;

    font-size: 10px;
    font-weight: 750;

    text-transform: uppercase;

    letter-spacing: .35px;
}

.kpi-value {
    margin-top: 6px;

    color: #0f172a;

    font-size: 18px;
    font-weight: 800;

    word-break: break-word;
}

.kpi-small {
    margin-top: 6px;

    color: #94a3b8;

    font-size: 10px;
}

.kpi-card.status-won {
    border-color: #bbf7d0;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f0fdf4
        );
}

.kpi-card.status-won .kpi-icon {
    background: #dcfce7;

    color: #16a34a;
}

.kpi-card.status-won .kpi-value {
    color: #15803d;
}

.kpi-card.status-lost {
    border-color: #fecaca;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #fef2f2
        );
}

.kpi-card.status-lost .kpi-icon {
    background: #fee2e2;

    color: #dc2626;
}

.kpi-card.status-lost .kpi-value {
    color: #b91c1c;
}


/* =========================================================
   MAIN LAYOUT
========================================================= */

.crm-main-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        360px;

    gap: 22px;

    align-items: start;
}

.crm-left-column,
.crm-right-column {
    min-width: 0;
}

.crm-right-column {
    position: sticky;

    top: 85px;
}


/* =========================================================
   CARDS
========================================================= */

.crm-card,
.action-card,
.task-create-section {
    background: #ffffff;

    border: 1px solid #e5eaf1;

    border-radius: 17px;

    overflow: hidden;

    box-shadow:
        0 7px 22px rgba(15, 23, 42, .03);

    margin-bottom: 20px;
}

.crm-card-header,
.action-card-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 17px 20px;

    background: #ffffff;

    border-bottom: 1px solid #eef2f7;
}

.crm-card-body,
.action-card-body {
    padding: 20px;
}


/* =========================================================
   ACTION AREA
========================================================= */

.action-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 20px;
}

.action-card {
    margin-bottom: 0;
}

.action-card-header {
    background: #fbfcfe;
}

.action-heading {
    display: flex;

    align-items: center;

    gap: 11px;
}

.action-header-icon {
    width: 37px;
    height: 37px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    font-size: 15px;
}

.action-header-icon.stage {
    background: #eff6ff;

    color: #2563eb;
}

.action-header-icon.activity {
    background: #ecfdf5;

    color: #059669;
}

.action-heading-text h3 {
    margin: 0;

    color: #0f172a;

    font-size: 14px;
    font-weight: 800;
}

.action-heading-text p {
    margin: 4px 0 0;

    color: #94a3b8;

    font-size: 10px;
}


/* =========================================================
   TERMINAL STAGE NOTICE
========================================================= */

.terminal-stage-notice {
    padding: 14px;

    margin-bottom: 15px;

    border-radius: 10px;

    font-size: 11px;

    line-height: 1.6;
}

.terminal-stage-notice.won {
    background: #ecfdf5;

    border: 1px solid #bbf7d0;

    color: #166534;
}

.terminal-stage-notice.lost {
    background: #fef2f2;

    border: 1px solid #fecaca;

    color: #991b1b;
}


/* =========================================================
   FORMS
========================================================= */

.form-label {
    display: block;

    margin-bottom: 7px;

    color: #475569;

    font-size: 11px;
    font-weight: 750;
}

.form-control,
.form-select {
    min-height: 42px;

    border: 1px solid #dce3ec;

    border-radius: 10px;

    color: #334155;

    background: #ffffff;

    font-size: 12px;

    padding: 9px 12px;

    box-shadow: none;

    transition: all .2s ease;
}

textarea.form-control {
    min-height: 96px;

    resize: vertical;
}

.form-control::placeholder {
    color: #b2bcc9;
}

.form-control:focus,
.form-select:focus {
    border-color: #60a5fa;

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, .08);
}

.input-group-text {
    border-color: #dce3ec;

    background: #f8fafc;

    color: #64748b;

    font-size: 11px;
}

.btn-primary {
    min-height: 42px;

    border: 0;

    border-radius: 10px;

    padding: 9px 17px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    color: #ffffff;

    font-size: 12px;

    font-weight: 750;

    box-shadow:
        0 7px 15px rgba(37, 99, 235, .18);

    transition: all .2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);

    background:
        linear-gradient(
            135deg,
            #1d4ed8,
            #1e40af
        );

    box-shadow:
        0 10px 20px rgba(37, 99, 235, .22);
}


/* =========================================================
   ACTION FORM COMPONENTS
========================================================= */

.action-form-group {
    margin-bottom: 17px;
}

.action-form-label {
    display: flex;

    align-items: center;

    gap: 6px;

    margin-bottom: 7px;

    color: #475569;

    font-size: 11px;
    font-weight: 750;
}

.action-form-label i {
    color: #64748b;
}

.action-required {
    color: #dc2626;

    font-weight: 800;
}

.action-optional {
    margin-left: auto;

    color: #a1acba;

    font-size: 9px;

    font-weight: 600;
}

.action-select-wrapper,
.action-input-wrapper,
.action-textarea-wrapper,
.action-duration-wrapper {
    position: relative;
}

.action-select,
.action-input,
.action-textarea,
.action-duration-input {
    width: 100%;

    border: 1px solid #dce3ec;

    border-radius: 10px;

    background: #ffffff;

    color: #334155;

    font-size: 12px;

    transition: all .2s ease;
}

.action-select {
    min-height: 43px;

    padding: 9px 38px 9px 38px;

    appearance: auto;
}

.action-input {
    min-height: 43px;

    padding: 9px 38px 9px 38px;
}

.action-textarea {
    min-height: 100px;

    padding: 11px 12px;

    resize: vertical;

    line-height: 1.6;
}

.action-select:focus,
.action-input:focus,
.action-textarea:focus,
.action-duration-input:focus {
    outline: none;

    border-color: #60a5fa;

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, .08);
}

.action-select-icon,
.action-input-icon {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    color: #94a3b8;

    font-size: 13px;

    pointer-events: none;
}

.action-select-icon {
    left: 13px;
}

.action-input-icon {
    right: 13px;
}

.action-form-hint {
    margin-top: 6px;

    color: #a1acba;

    font-size: 9px;

    line-height: 1.5;
}

.action-form-row {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;
}

.action-duration-wrapper {
    display: flex;
}

.action-duration-input {
    min-height: 43px;

    padding: 9px 12px;

    border-radius: 10px 0 0 10px;
}

.action-duration-unit {
    display: flex;

    align-items: center;

    padding: 0 12px;

    border: 1px solid #dce3ec;

    border-left: 0;

    border-radius: 0 10px 10px 0;

    background: #f8fafc;

    color: #64748b;

    font-size: 10px;

    font-weight: 700;

    white-space: nowrap;
}

.action-form-footer {
    display: flex;

    justify-content: flex-end;

    padding-top: 3px;
}

.action-submit-button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    min-height: 42px;

    padding: 9px 17px;

    border: 0;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    color: #ffffff;

    font-size: 11px;

    font-weight: 750;

    box-shadow:
        0 7px 15px rgba(37, 99, 235, .18);

    transition: all .2s ease;
}

.action-submit-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 20px rgba(37, 99, 235, .22);
}

.action-submit-button.activity-submit {
    background:
        linear-gradient(
            135deg,
            #059669,
            #047857
        );

    box-shadow:
        0 7px 15px rgba(5, 150, 105, .18);
}


/* =========================================================
   TIMELINE
========================================================= */

.timeline {
    position: relative;
}

.timeline-item {
    position: relative;

    display: flex;

    gap: 14px;

    padding-bottom: 25px;
}

.timeline-item:not(:last-child)::before {
    content: "";

    position: absolute;

    left: 16px;

    top: 35px;

    bottom: 0;

    width: 2px;

    background:
        linear-gradient(
            180deg,
            #dbeafe,
            #eef2f7
        );
}

.timeline-icon {
    width: 33px;
    height: 33px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #eff6ff;

    border: 1px solid #dbeafe;

    color: #2563eb;

    font-size: 12px;

    position: relative;

    z-index: 2;
}

.timeline-content {
    flex: 1;

    min-width: 0;
}

.timeline-title {
    color: #0f172a;

    font-size: 13px;
    font-weight: 750;
}

.timeline-meta {
    margin-top: 4px;

    color: #94a3b8;

    font-size: 10px;
}

.timeline-description {
    margin-top: 9px;

    padding: 12px 14px;

    border-radius: 10px;

    background: #f8fafc;

    border: 1px solid #eef2f7;

    color: #475569;

    font-size: 12px;

    line-height: 1.65;

    white-space: pre-line;
}


/* =========================================================
   INFO LIST
========================================================= */

.info-list {
    display: flex;

    flex-direction: column;
}

.info-item {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;

    padding: 12px 0;

    border-bottom: 1px solid #f0f2f5;
}

.info-item:first-child {
    padding-top: 0;
}

.info-item:last-child {
    padding-bottom: 0;

    border-bottom: 0;
}

.info-label {
    color: #94a3b8;

    font-size: 11px;
    font-weight: 600;
}

.info-value {
    color: #334155;

    font-size: 12px;
    font-weight: 700;

    text-align: right;

    word-break: break-word;
}

.info-value a {
    color: #2563eb;
}


/* =========================================================
   DESCRIPTION
========================================================= */

.description-text {
    color: #475569;

    font-size: 12px;

    line-height: 1.8;

    white-space: pre-line;
}


/* =========================================================
   NEXT ACTION
========================================================= */

.next-action-box {
    position: relative;

    padding: 16px;

    background:
        linear-gradient(
            135deg,
            #eff6ff,
            #f8fbff
        );

    border: 1px solid #dbeafe;

    border-radius: 12px;
}

.next-action-title {
    color: #1d4ed8;

    font-size: 12px;
    font-weight: 800;
}

.next-action-text {
    margin-top: 8px;

    color: #334155;

    font-size: 12px;

    line-height: 1.65;
}

.next-action-date {
    margin-top: 10px;

    color: #64748b;

    font-size: 10px;
    font-weight: 600;
}


/* =========================================================
   TASK CREATE CARD
========================================================= */

.task-create-section {
    overflow: hidden;

    margin-bottom: 20px;
}

.task-create-header {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 17px 19px;

    background:
        linear-gradient(
            135deg,
            #f8fbff,
            #ffffff
        );

    border-bottom: 1px solid #eef2f7;
}

.task-create-icon {
    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 10px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 15px;
}

.task-create-title {
    margin: 0;

    color: #0f172a;

    font-size: 14px;

    font-weight: 800;
}

.task-create-subtitle {
    margin: 4px 0 0;

    color: #94a3b8;

    font-size: 10px;
}

.task-create-form {
    padding: 19px;
}

.task-form-group {
    margin-bottom: 16px;
}

.task-form-label {
    display: flex;

    align-items: center;

    gap: 6px;

    margin-bottom: 7px;

    color: #475569;

    font-size: 11px;

    font-weight: 750;
}

.task-form-label i {
    color: #64748b;
}

.required-star {
    color: #dc2626;
}

.optional-label {
    margin-left: auto;

    color: #a1acba;

    font-size: 9px;

    font-weight: 600;
}

.task-input-wrapper,
.task-textarea-wrapper {
    position: relative;
}

.task-input,
.task-textarea {
    width: 100%;

    border: 1px solid #dce3ec;

    border-radius: 10px;

    background: #ffffff;

    color: #334155;

    font-size: 12px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.task-input {
    min-height: 43px;

    padding: 9px 38px 9px 38px;
}

.task-textarea {
    min-height: 86px;

    padding: 11px 12px;

    resize: vertical;

    line-height: 1.6;
}

.task-input::placeholder,
.task-textarea::placeholder {
    color: #b2bcc9;
}

.task-input:focus,
.task-textarea:focus {
    outline: none;

    border-color: #60a5fa;

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, .08);
}

.task-input-icon {
    position: absolute;

    top: 50%;
    left: 13px;

    transform: translateY(-50%);

    color: #94a3b8;

    font-size: 13px;

    pointer-events: none;
}

.task-date-input {
    padding-left: 38px;
}

.task-add-button {
    width: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 43px;

    margin-top: 4px;

    padding: 9px 15px;

    border: 0;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    color: #ffffff;

    font-size: 11px;

    font-weight: 750;

    box-shadow:
        0 7px 15px rgba(37, 99, 235, .18);

    cursor: pointer;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.task-add-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 20px rgba(37, 99, 235, .22);
}

.task-add-button-icon {
    width: 22px;
    height: 22px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 6px;

    background: rgba(255,255,255,.15);
}


/* =========================================================
   TASK LIST CARD
========================================================= */

.tasks-card {
    background: #ffffff;

    border: 1px solid #e5eaf1;

    border-radius: 17px;

    overflow: hidden;

    box-shadow:
        0 7px 22px rgba(15, 23, 42, .03);

    margin-bottom: 20px;
}

.tasks-card-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 17px 19px;

    border-bottom: 1px solid #eef2f7;
}

.tasks-card-heading {
    display: flex;

    align-items: center;

    gap: 11px;
}

.tasks-card-icon {
    width: 37px;
    height: 37px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #fefce8;

    color: #ca8a04;

    font-size: 15px;
}

.tasks-card-title {
    margin: 0;

    color: #0f172a;

    font-size: 14px;

    font-weight: 800;
}

.tasks-card-subtitle {
    margin: 4px 0 0;

    color: #94a3b8;

    font-size: 10px;
}

.tasks-count-badge {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 30px;

    height: 27px;

    padding: 0 9px;

    border-radius: 8px;

    background: #f8fafc;

    border: 1px solid #e5eaf1;

    color: #64748b;

    font-size: 10px;

    font-weight: 800;
}

.tasks-summary {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 8px;

    padding: 14px 19px;

    background: #fbfcfe;

    border-bottom: 1px solid #eef2f7;
}

.task-summary-item {
    padding: 10px;

    border-radius: 9px;

    background: #ffffff;

    border: 1px solid #eef2f7;
}

.task-summary-label {
    color: #94a3b8;

    font-size: 8px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .3px;
}

.task-summary-value {
    margin-top: 4px;

    color: #334155;

    font-size: 15px;

    font-weight: 800;
}

.task-summary-item.pending .task-summary-value {
    color: #2563eb;
}

.task-summary-item.completed .task-summary-value {
    color: #16a34a;
}

.task-summary-item.overdue .task-summary-value {
    color: #dc2626;
}


/* =========================================================
   TASK LIST
========================================================= */

.task-list {
    padding: 0 19px;
}

.task-item {
    position: relative;

    padding: 17px 0;

    border-bottom: 1px solid #eef2f7;
}

.task-item:last-child {
    border-bottom: 0;
}

.task-item-main {
    display: flex;

    align-items: flex-start;

    gap: 11px;
}

.task-status-check {
    width: 25px;
    height: 25px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: #f8fafc;

    border: 1px solid #dce3ec;

    color: #94a3b8;

    font-size: 11px;
}

.task-item.completed .task-status-check {
    background: #dcfce7;

    border-color: #bbf7d0;

    color: #15803d;
}

.task-item-content {
    min-width: 0;

    flex: 1;
}

.task-item-top {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 10px;
}

.task-item-title {
    color: #334155;

    font-size: 12px;

    font-weight: 800;

    line-height: 1.5;
}

.task-item.completed .task-item-title {
    color: #94a3b8;

    text-decoration: line-through;
}

.task-status-badge {
    flex-shrink: 0;

    display: inline-flex;

    align-items: center;

    padding: 4px 7px;

    border-radius: 6px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 8px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .3px;
}

.task-status-badge.completed {
    background: #dcfce7;

    color: #15803d;
}

.task-status-badge.overdue {
    background: #fee2e2;

    color: #b91c1c;
}

.task-item-description {
    margin-top: 6px;

    color: #64748b;

    font-size: 10px;

    line-height: 1.6;
}

.task-item-meta {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 7px;

    margin-top: 9px;

    color: #94a3b8;

    font-size: 9px;
}

.task-item-meta span {
    display: inline-flex;

    align-items: center;

    gap: 4px;
}

.task-item-meta .overdue-text {
    color: #dc2626;

    font-weight: 750;
}

.task-item-meta .completed-text {
    color: #16a34a;

    font-weight: 750;
}

.task-item-actions {
    display: flex;

    align-items: center;

    gap: 6px;

    margin-top: 11px;

    margin-left: 36px;
}

.task-action-button {
    display: inline-flex;

    align-items: center;

    gap: 5px;

    min-height: 28px;

    padding: 5px 9px;

    border-radius: 7px;

    border: 1px solid #e2e8f0;

    background: #ffffff;

    color: #64748b;

    font-size: 9px;

    font-weight: 750;

    cursor: pointer;

    transition: all .2s ease;
}

.task-action-button:hover {
    color: #2563eb;

    border-color: #bfdbfe;

    background: #eff6ff;
}

.task-action-button.complete:hover {
    color: #15803d;

    border-color: #bbf7d0;

    background: #ecfdf5;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.empty-state {
    padding: 38px 15px;

    text-align: center;
}

.empty-state-icon {
    color: #cbd5e1;

    font-size: 30px;
}

.empty-state-text {
    margin: 10px 0 0;

    color: #94a3b8;

    font-size: 12px;
}


/* =========================================================
   HISTORY
========================================================= */

.history-item {
    position: relative;

    padding-left: 24px;

    padding-bottom: 23px;

    border-left: 2px solid #e2e8f0;
}

.history-item:last-child {
    border-left-color: transparent;

    padding-bottom: 0;
}

.history-item::before {
    content: "";

    position: absolute;

    left: -6px;

    top: 0;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: #2563eb;

    box-shadow:
        0 0 0 4px #eff6ff;
}

.history-stage {
    color: #334155;

    font-size: 12px;

    font-weight: 750;
}

.history-date {
    margin-top: 4px;

    color: #94a3b8;

    font-size: 10px;
}

.history-reason {
    margin-top: 8px;

    padding: 9px 11px;

    background: #f8fafc;

    border-radius: 8px;

    color: #64748b;

    font-size: 11px;

    line-height: 1.6;
}


/* =========================================================
   BADGES
========================================================= */

.badge.bg-light {
    padding: 6px 9px;

    border: 1px solid #e5eaf1;

    border-radius: 7px;

    color: #64748b !important;

    font-size: 10px;

    font-weight: 750;
}


/* =========================================================
   DIVIDER
========================================================= */

.crm-divider {
    border: 0;

    border-top: 1px solid #eef2f7;

    margin: 24px 0;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1250px) {

    .crm-main-grid {
        grid-template-columns:
            minmax(0, 1fr)
            320px;
    }

}

@media (max-width: 1050px) {

    .crm-main-grid {
        grid-template-columns: 1fr;
    }

    .crm-right-column {
        position: static;
    }

    .kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 800px) {

    .lead-details-page {
        padding: 18px 14px 50px;
    }

    .lead-header-main {
        flex-direction: column;
    }

    .lead-header-actions {
        width: 100%;
    }

    .lead-header-actions .btn-soft {
        width: 100%;
    }

    .lead-contact-links,
    .lead-status-banner {
        margin-left: 0;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .action-form-row {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 576px) {

    .lead-details-page {
        padding: 12px 9px 40px;
    }

    .lead-header {
        padding: 20px 17px;

        border-radius: 17px;
    }

    .lead-profile {
        align-items: flex-start;
    }

    .lead-avatar {
        width: 55px;
        height: 55px;

        border-radius: 15px;
    }

    .lead-title {
        font-size: 20px;
    }

    .lead-contact-links {
        flex-direction: column;

        gap: 7px;
    }

    .lead-contact-links a {
        width: 100%;
    }

    .pipeline-card {
        padding: 19px 17px;

        border-radius: 17px;
    }

    .pipeline-top {
        flex-direction: column;

        align-items: flex-start;
    }

    .current-stage-box {
        width: 100%;

        text-align: left;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .crm-card-header,
    .action-card-header,
    .tasks-card-header {
        padding: 15px 16px;
    }

    .crm-card-body,
    .action-card-body {
        padding: 16px;
    }

    .task-create-form,
    .task-list {
        padding-left: 16px;
        padding-right: 16px;
    }

    .tasks-summary {
        padding: 12px 16px;
    }

    .info-item {
        flex-direction: column;

        gap: 4px;
    }

    .info-value {
        text-align: left;
    }

    .task-item-top {
        flex-direction: column;
    }

    .task-status-badge {
        align-self: flex-start;
    }

    .task-item-actions {
        margin-left: 36px;
    }

}



  
    .crm-page {
        background: #f5f7fb;
        min-height: calc(100vh - 70px);
        padding: 30px;
    }

    .crm-container {
        max-width: 1600px;
        margin: 0 auto;
    }


    /* =========================================================
       HEADER
    ========================================================= */

    .crm-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 28px;
    }

    .crm-header-content h2 {
        font-size: 28px;
        font-weight: 750;
        color: #111827;
        margin: 0 0 6px;
        letter-spacing: -0.5px;
    }

    .crm-header-content p {
        margin: 0;
        color: #6b7280;
        font-size: 14px;
    }

    .btn-new-lead {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 11px 18px;
        border-radius: 9px;
        font-size: 14px;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(13, 110, 253, .20);
    }


    /* =========================================================
       KPI CARDS
    ========================================================= */

    .crm-kpi-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
        margin-bottom: 26px;
    }

    .crm-kpi-card {
        background: #ffffff;
        border: 1px solid #e8ebf1;
        border-radius: 14px;
        padding: 20px;
        position: relative;
        overflow: hidden;
        transition: all .2s ease;
    }

    .crm-kpi-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(15, 23, 42, .07);
    }

    .crm-kpi-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 14px;
    }

    .crm-kpi-label {
        color: #6b7280;
        font-size: 13px;
        font-weight: 600;
    }

    .crm-kpi-icon {
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: #eef2ff;
        color: #4f46e5;
        font-size: 17px;
    }

    .crm-kpi-value {
        color: #111827;
        font-size: 25px;
        font-weight: 750;
        letter-spacing: -0.5px;
    }

    .crm-kpi-subtitle {
        color: #9ca3af;
        font-size: 12px;
        margin-top: 4px;
    }


    /* =========================================================
       TABS
    ========================================================= */

    .crm-tabs-wrapper {
        background: #ffffff;
        border: 1px solid #e8ebf1;
        border-radius: 12px;
        padding: 5px;
        display: inline-flex;
        gap: 4px;
        margin-bottom: 20px;
    }

    .crm-tabs {
        display: flex;
        gap: 4px;
    }

    .crm-tabs a {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 9px 17px;
        border-radius: 8px;
        text-decoration: none;
        color: #6b7280;
        font-size: 13px;
        font-weight: 600;
        transition: all .2s ease;
    }

    .crm-tabs a:hover {
        color: #111827;
        background: #f3f4f6;
    }

    .crm-tabs a.active {
        background: #111827;
        color: #ffffff;
        box-shadow: 0 3px 8px rgba(17, 24, 39, .15);
    }


    /* =========================================================
       FILTER BAR
    ========================================================= */

    .crm-filter-card {
        background: #ffffff;
        border: 1px solid #e8ebf1;
        border-radius: 14px;
        padding: 16px;
        margin-bottom: 22px;
    }

    .crm-filter {
        display: grid;
        grid-template-columns: 2fr repeat(3, 1fr) auto auto;
        gap: 10px;
        align-items: center;
    }

    .crm-filter .form-control,
    .crm-filter .form-select {
        height: 42px;
        border-radius: 8px;
        border: 1px solid #e1e5eb;
        font-size: 13px;
        color: #374151;
        box-shadow: none;
    }

    .crm-filter .form-control:focus,
    .crm-filter .form-select:focus {
        border-color: #6366f1;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, .10);
    }

    .btn-filter {
        height: 42px;
        padding: 0 18px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 600;
    }

    .btn-clear {
        height: 42px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 600;
    }


    /* =========================================================
       TABLE
    ========================================================= */

    .crm-table-card {
        background: #ffffff;
        border: 1px solid #e8ebf1;
        border-radius: 14px;
        overflow: hidden;
    }

    .crm-table-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 20px;
        border-bottom: 1px solid #eef0f4;
    }

    .crm-table-header h5 {
        margin: 0;
        font-size: 15px;
        font-weight: 700;
        color: #111827;
    }

    .crm-table-header span {
        color: #9ca3af;
        font-size: 12px;
    }

    .crm-table {
        margin: 0;
        min-width: 1200px;
    }

    .crm-table thead th {
        background: #fafbfc;
        color: #6b7280;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .5px;
        font-weight: 700;
        padding: 13px 16px;
        border-bottom: 1px solid #eef0f4;
        white-space: nowrap;
    }

    .crm-table tbody td {
        padding: 16px;
        vertical-align: middle;
        border-bottom: 1px solid #f0f2f5;
        color: #374151;
        font-size: 13px;
    }

    .crm-table tbody tr {
        transition: background .15s ease;
    }

    .crm-table tbody tr:hover {
        background: #fafbff;
    }

    .crm-table tbody tr:last-child td {
        border-bottom: none;
    }


    /* =========================================================
       LEAD INFO
    ========================================================= */

    .lead-info {
        display: flex;
        align-items: center;
        gap: 11px;
        min-width: 180px;
    }

    .lead-avatar {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #eef2ff;
        color: #4f46e5;
        font-size: 13px;
        font-weight: 750;
        flex-shrink: 0;
    }

    .lead-name {
        color: #111827;
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
    }

    .lead-name:hover {
        color: #4f46e5;
    }

    .lead-company {
        color: #9ca3af;
        font-size: 11px;
        margin-top: 2px;
    }


    /* =========================================================
       STAGE BADGES
    ========================================================= */

    .stage-badge {
        display: inline-flex;
        align-items: center;
        padding: 5px 10px;
        border-radius: 20px;
        background: #eef2ff;
        color: #4f46e5;
        font-size: 11px;
        font-weight: 700;
        white-space: nowrap;
    }

    .probability-value {
        font-size: 13px;
        font-weight: 700;
        color: #111827;
    }

    .probability-bar {
        width: 65px;
        height: 5px;
        background: #eef0f4;
        border-radius: 20px;
        overflow: hidden;
        margin-top: 5px;
    }

    .probability-progress {
        height: 100%;
        background: #4f46e5;
        border-radius: 20px;
    }

    .money-value {
        font-weight: 650;
        color: #111827;
        white-space: nowrap;
    }

    .weighted-value {
        font-weight: 650;
        color: #4f46e5;
        white-space: nowrap;
    }

    .contact-info {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .date-text {
        font-size: 12px;
        color: #6b7280;
    }

    .next-action {
        font-size: 12px;
        color: #374151;
        max-width: 150px;
    }


    /* =========================================================
       ACTION BUTTONS
    ========================================================= */

    .lead-actions {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        white-space: nowrap;
    }

    .action-btn {
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        background: #ffffff;
        text-decoration: none;
        cursor: pointer;
        transition: all .2s ease;
        font-size: 14px;
        padding: 0;
    }

    .action-btn:hover {
        transform: translateY(-1px);
    }

    /* VIEW */

    .action-view {
        color: #2563eb;
    }

    .action-view:hover {
        background: #eff6ff;
        border-color: #bfdbfe;
        color: #1d4ed8;
    }

    /* EDIT */

    .action-edit {
        color: #7c3aed;
    }

    .action-edit:hover {
        background: #f5f3ff;
        border-color: #ddd6fe;
        color: #6d28d9;
    }

    /* DELETE */

    .action-delete {
        color: #dc2626;
    }

    .action-delete:hover {
        background: #fef2f2;
        border-color: #fecaca;
        color: #b91c1c;
    }

    .delete-form {
        display: inline-flex;
        margin: 0;
    }


    /* =========================================================
       KANBAN
    ========================================================= */

    .kanban-wrapper {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        padding-bottom: 12px;
    }

    .kanban-wrapper::-webkit-scrollbar {
        height: 7px;
    }

    .kanban-wrapper::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 10px;
    }

    .kanban-column {
        min-width: 280px;
        width: 280px;
        background: #eef1f5;
        border: 1px solid #e2e5ea;
        border-radius: 14px;
        padding: 12px;
    }

    .kanban-column-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 5px 13px;
    }

    .kanban-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        font-weight: 750;
        color: #1f2937;
    }

    .kanban-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #6366f1;
    }

    .kanban-percentage {
        font-size: 11px;
        font-weight: 700;
        color: #6b7280;
        background: #ffffff;
        padding: 4px 7px;
        border-radius: 6px;
    }

    .lead-card {
        background: #ffffff;
        border: 1px solid #e8ebf1;
        border-radius: 11px;
        padding: 14px;
        margin-bottom: 10px;
        box-shadow: 0 2px 5px rgba(15, 23, 42, .04);
        transition: all .2s ease;
    }

    .lead-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 7px 18px rgba(15, 23, 42, .08);
    }

    .kanban-lead-name {
        color: #111827;
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
    }

    .kanban-lead-name:hover {
        color: #4f46e5;
    }

    .kanban-company {
        color: #9ca3af;
        font-size: 11px;
        margin-top: 3px;
    }

    .kanban-divider {
        border: 0;
        border-top: 1px solid #f0f2f5;
        margin: 12px 0;
    }

    .kanban-value-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .kanban-value-label {
        color: #9ca3af;
        font-size: 10px;
    }

    .kanban-value {
        color: #111827;
        font-size: 12px;
        font-weight: 700;
    }

    .kanban-weighted {
        color: #4f46e5;
        font-size: 12px;
        font-weight: 700;
    }


    /* =========================================================
       FORECAST
    ========================================================= */

    .forecast-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    .forecast-card {
        background: #ffffff;
        border: 1px solid #e8ebf1;
        border-radius: 14px;
        padding: 20px;
        transition: all .2s ease;
    }

    .forecast-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(15, 23, 42, .07);
    }

    .forecast-card-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 18px;
    }

    .forecast-card h5 {
        margin: 0;
        color: #111827;
        font-size: 15px;
        font-weight: 750;
    }

    .forecast-probability {
        font-size: 11px;
        font-weight: 700;
        color: #4f46e5;
        background: #eef2ff;
        padding: 5px 8px;
        border-radius: 6px;
    }

    .forecast-count {
        font-size: 30px;
        line-height: 1;
        font-weight: 750;
        color: #111827;
    }

    .forecast-count-label {
        color: #9ca3af;
        font-size: 12px;
        margin-left: 4px;
    }

    .forecast-metrics {
        border-top: 1px solid #f0f2f5;
        margin-top: 18px;
        padding-top: 15px;
    }

    .forecast-metric {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 9px;
        font-size: 12px;
    }

    .forecast-metric:last-child {
        margin-bottom: 0;
    }

    .forecast-metric-label {
        color: #9ca3af;
    }

    .forecast-metric-value {
        color: #111827;
        font-weight: 700;
    }

    .forecast-metric-value.weighted {
        color: #4f46e5;
    }


    /* =========================================================
       EMPTY STATE
    ========================================================= */

    .crm-empty-state {
        text-align: center;
        padding: 60px 20px !important;
    }

    .empty-icon {
        width: 55px;
        height: 55px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 15px;
        background: #f3f4f6;
        color: #9ca3af;
        border-radius: 14px;
        font-size: 22px;
    }

    .crm-empty-state h5 {
        font-size: 15px;
        font-weight: 700;
        color: #374151;
        margin-bottom: 5px;
    }

    .crm-empty-state p {
        color: #9ca3af;
        font-size: 13px;
        margin: 0;
    }


    /* =========================================================
       RESPONSIVE
    ========================================================= */

    @media (max-width: 1200px) {

        .crm-kpi-grid,
        .forecast-grid {
            grid-template-columns: repeat(2, 1fr);
        }

        .crm-filter {
            grid-template-columns: repeat(2, 1fr);
        }

    }


    @media (max-width: 768px) {

        .crm-page {
            padding: 20px 15px;
        }

        .crm-header {
            flex-direction: column;
        }

        .btn-new-lead {
            width: 100%;
            justify-content: center;
        }

        .crm-kpi-grid,
        .forecast-grid {
            grid-template-columns: 1fr;
        }

        .crm-tabs-wrapper {
            width: 100%;
            overflow-x: auto;
        }

        .crm-tabs {
            width: max-content;
        }

        .crm-filter {
            grid-template-columns: 1fr;
        }

        .crm-filter .btn {
            width: 100%;
        }

        .kanban-column {
            min-width: 270px;
        }

    }

/* =========================================================
   FORCE LEAD OVERVIEW KPI CARDS INTO ONE ROW
   ========================================================= */

.crm-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
}

.crm-kpi-card {
    min-width: 0 !important;
    width: 100% !important;
}

/* Keep 5 cards in one row */
@media (max-width: 1250px) {
    .crm-kpi-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    .crm-kpi-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 480px) {
    .crm-kpi-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

