.crmkanbanboard {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    align-items: flex-start;
}

.crmkanbancolumn {
    background-color: #f1f5f9;
    border: 1px solid var(--bordercolor);
    border-radius: 14px;
    width: 310px;
    min-width: 310px;
    max-width: 310px;
    display: flex;
    flex-direction: column;
    max-height: 82vh;
}

.crmkanbanhead {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
}

.crmkanbantitle {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crmkanbancount {
    background-color: #e2e8f0;
    color: #475569;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.crmkanbansummary {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
}

.crmkanbanlist {
    padding: 0.85rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1;
    min-height: 150px;
}

.crmkanbancard {
    background-color: #ffffff;
    border: 1px solid var(--bordercolor);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadowsm);
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.crmkanbancard:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadowmd);
    border-color: #cbd5e1;
}

.crmkanbancard.dragging {
    opacity: 0.45;
}

.crmoppname {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.crmoppaccount {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 0.6rem;
}

.crmoppamounts {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #e2e8f0;
}

.crmoppusd {
    font-size: 0.95rem;
    font-weight: 800;
    color: #2563eb;
}

.crmoppves {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
}

.crmoppfooter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #64748b;
}

.crmquotesummary {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.crmquotebox {
    width: 320px;
    background-color: #f8fafc;
    border: 1px solid var(--bordercolor);
    border-radius: 12px;
    padding: 1.25rem;
}

.crmquoterow {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
    color: #475569;
}

.crmquoterow > *:first-child {
    text-align: left;
}

.crmquoterow > *:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.crmquoterowtotal {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    border-top: 2px solid #e2e8f0;
    padding-top: 0.6rem;
    margin-top: 0.6rem;
}

.crmquotelocalrow {
    font-size: 0.82rem;
    font-weight: 700;
    color: #2563eb;
}

/* ==========================================================================
   AMPLIFIED COMMERCIAL QUOTES GENERATOR & WORD-PROCESSOR MODAL
   ========================================================================== */
.crmquotemodalwide {
    max-width: 1200px !important;
    width: 95vw !important;
    height: 90vh !important;
    max-height: 90vh !important;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    overflow: hidden;
}

.crmquotemodalheader {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

.crmquotemodaltitledesc {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.crmquotemetabar {
    padding: 0.85rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crmquotemetarow {
    display: grid;
    gap: 0.85rem;
    align-items: flex-start;
}

.crmquotemetarow-1 {
    grid-template-columns: 1.2fr 1.6fr 150px;
}

.crmquotemetarow-2 {
    grid-template-columns: 1.5fr 1.3fr 1fr 100px 130px auto;
}

/* Estado Abatible / Colapsado del Encabezado para Maximizar Contenido */
.crmquotemetabar.iscollapsed,
#crmtplmetabar.iscollapsed {
    padding: 0.5rem 1.5rem;
    background: #f8fafc;
}

.crmquotemetabar.iscollapsed #crmquoteheader_row1,
.crmquotemetabar.iscollapsed .crmquote_collapsible_field,
#crmtplmetabar.iscollapsed .crmtpl_collapsible_field {
    display: none !important;
}

.crmquotemetabar.iscollapsed .crmquotemetarow-2,
#crmtplmetabar.iscollapsed #crmtplheader_row1 {
    grid-template-columns: 1fr auto !important;
    align-items: flex-end;
}

/* Maximización del área de redacción y partidas al colapsar encabezado */
.crmquotemetabar.iscollapsed ~ .crmquotetabcontent .crmricheditorpaper,
#crmquoteform:has(.crmquotemetabar.iscollapsed) .crmricheditorpaper,
#crmtplmetabar.iscollapsed ~ .crmquotetabcontent .crmricheditorpaper,
#crmquotetemplateform:has(#crmtplmetabar.iscollapsed) .crmricheditorpaper {
    max-height: 65vh;
    min-height: 460px;
}

@media (max-width: 992px) {
    .crmquotemetarow-1, .crmquotemetarow-2 {
        grid-template-columns: 1fr;
    }
}

/* Recipient Search Autocomplete Dropdown */
.crmrecipsearchbox {
    position: relative;
}

.crmrecipsearchinput {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.crmrecipsearchinput:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.crmrecipsearchicon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: inline-flex;
}

.crmrecipresults {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: min(680px, 85vw);
    min-width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 12px 28px -5px rgba(0,0,0,0.18);
    max-height: 340px;
    overflow-y: auto;
    z-index: 60;
    display: none;
}

@media (max-width: 768px) {
    .crmrecipresults {
        width: 100%;
    }
}

.crmrecipitem {
    padding: 0.45rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: background-color 0.12s;
}

.crmrecipitem:hover {
    background-color: #f8fafc;
}

.crmrecipbadge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
}

.crmrecipbadge-customer {
    background: #e0f2fe;
    color: #0369a1;
}

.crmrecipbadge-lead {
    background: #f3e8ff;
    color: #7e22ce;
}

.crmrecipselectedcard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.84rem;
}

/* Tabs Bar */
.crmquotetabsbar {
    display: flex;
    background: #f1f5f9;
    padding: 0.35rem 1.5rem 0 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    gap: 0.5rem;
}

.crmquotetabbtn {
    padding: 0.65rem 1.25rem;
    border: 1px solid transparent;
    border-bottom: none;
    background: transparent;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 600;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s;
}

.crmquotetabbtn:hover {
    color: #0f172a;
    background: #e2e8f0;
}

.crmquotetabbtn.active {
    background: #ffffff;
    color: #2563eb;
    border-color: #e2e8f0;
    border-bottom: 2px solid #ffffff;
    margin-bottom: -1px;
    font-weight: 700;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.03);
}

/* Tabs Content Scrollable Area */
.crmquotetabcontent {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #ffffff;
}

/* Rich Text Toolbar & Document Paper */
.crmrichtoolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.crmrichbtn {
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-width: 28px;
    height: 28px;
    transition: background-color 0.1s, color 0.1s;
}

.crmrichbtn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.crmrichtoolseparator {
    width: 1px;
    height: 20px;
    background: #cbd5e1;
    margin: 0 0.35rem;
}

.crmricheditorpaper {
    min-height: 360px;
    max-height: 52vh;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #1e293b;
    outline: none;
}

.crmricheditorpaper:focus {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02), 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.crmricheditorpaper h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.75rem 0 0.35rem 0;
    color: #0f172a;
}

.crmricheditorpaper h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.65rem 0 0.25rem 0;
    color: #1e293b;
}

.crmricheditorpaper p {
    margin: 0 0 0.75rem 0;
}

.crmricheditorpaper ul, .crmricheditorpaper ol {
    margin: 0.25rem 0 0.75rem 1.5rem;
}

/* Product & Service Modal Rich Text Editor */
.crmproductricheditor {
    min-height: 120px;
    max-height: 220px;
    overflow-y: auto;
    padding: 0.65rem 0.85rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.crmproductricheditor:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.crmproductricheditor[data-placeholder]:empty:before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
    display: block;
}

.crmproductricheditor p {
    margin: 0 0 0.45rem 0;
}

.crmproductricheditor ul, .crmproductricheditor ol {
    margin: 0.2rem 0 0.45rem 1.25rem;
    padding-left: 0.25rem;
}

.crmproductricheditor h2, .crmproductricheditor h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0.45rem 0 0.2rem 0;
    color: #0f172a;
}

.crmproductricheditor table.crmrichtexttable {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.78rem;
}

.crmproductricheditor table.crmrichtexttable th,
.crmproductricheditor table.crmrichtexttable td {
    border: 1px solid #cbd5e1;
    padding: 0.3rem 0.45rem;
}

.crmproductricheditor table.crmrichtexttable th {
    background: #f1f5f9;
    font-weight: 600;
}

.crmproductricheditor img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0.4rem 0;
}

/* Modern Status Switch Slider */
.crmswitchwrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.crmswitch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.crmswitch input {
    display: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
}

.crmswitchslider {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    background-color: #cbd5e1;
    border-radius: 20px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.crmswitchslider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    top: 2px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

input:checked + .crmswitchslider,
.crmswitch input:checked + .crmswitchslider {
    background-color: #10b981;
}

input:checked + .crmswitchslider::after,
.crmswitch input:checked + .crmswitchslider::after {
    transform: translateX(18px);
}

/* Word-Processor Line Items Table */
.crmquotelineitemsbox {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.crmquotelineitemstable {
    width: 100%;
    border-collapse: collapse;
}

.crmquotelineitemstable th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.crmquotelineitemrow {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.12s;
    position: relative;
}

.crmquotelineitemrow:focus-within {
    z-index: 25;
}

/* Product & Service Autocomplete Dropdown in Line Items */
.crmitemsearchdropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: max-content;
    min-width: 100%;
    max-width: 720px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.22), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.crmitemsearchoption {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: background-color 0.1s;
}

.crmitemsearchoption:hover,
.crmitemsearchoption.active {
    background-color: #eff6ff;
}

.crmitemsearchname {
    font-weight: 600;
    font-size: 0.84rem;
    color: #0f172a;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crmitemsearchcode {
    font-size: 0.62rem;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.05rem 0.28rem;
    border-radius: 4px;
    flex-shrink: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.02em;
}

.crmitemtypepill {
    font-size: 0.58rem;
    font-weight: 800;
    padding: 0.08rem 0.28rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.crmitemtypepill-svc {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

.crmitemtypepill-prd {
    background: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.crmitemsearchprice {
    font-weight: 700;
    color: #2563eb;
    font-size: 0.88rem;
    white-space: nowrap;
    margin-left: 0.85rem;
    flex-shrink: 0;
}

.crmquotelineitemrow:hover {
    background-color: #fafbfc;
}

.crmquotelineitemrow td {
    padding: 0.5rem 0.6rem;
    vertical-align: top;
}

.crmwordinput {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.88rem;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    transition: border-color 0.12s, box-shadow 0.12s;
}

.crmwordinput:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.crmcurrencyaffix {
    position: relative;
    display: flex;
    align-items: center;
}

.crmcurrencysymbol {
    position: absolute;
    left: 0.55rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    pointer-events: none;
}

.crmcurrencyinput {
    padding-left: 1.5rem !important;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.crmlinetotalcell {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.92rem;
    text-align: right;
    padding-top: 0.65rem !important;
    font-variant-numeric: tabular-nums;
}

/* Sub-item Rich Text Accordion / Panel */
.crmitemnotespanel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 0.4rem;
    padding: 0.5rem;
}

.crmitemnotestoggle {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

.crmitemnotestoggle:hover {
    background: #eff6ff;
    text-decoration: underline;
}

.crmitemnoteseditor {
    min-height: 60px;
    max-height: 160px;
    overflow-y: auto;
    padding: 0.6rem 0.75rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.83rem;
    line-height: 1.5;
    outline: none;
    color: #1e293b;
}

.crmitemnoteseditor:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.12);
}

/* Partidas Line Notes Rich Editor & Preview formatting (Bullet lists, numbered lists, tables, bold) */
.crmitemnoteseditor,
.crmquoteitemnotesview {
    font-size: 0.83rem;
    line-height: 1.55;
    color: #1e293b;
}

.crmitemnoteseditor p,
.crmquoteitemnotesview p {
    margin: 0 0 0.4rem 0;
}

.crmitemnoteseditor ul,
.crmquoteitemnotesview ul,
.crmquotedoccontent ul,
.crmquotedocumentpaper ul {
    margin: 0.3rem 0 0.5rem 1.45rem !important;
    padding-left: 0.25rem !important;
    list-style-type: disc !important;
    list-style-position: outside !important;
}

.crmitemnoteseditor ol,
.crmquoteitemnotesview ol,
.crmquotedoccontent ol,
.crmquotedocumentpaper ol {
    margin: 0.3rem 0 0.5rem 1.45rem !important;
    padding-left: 0.25rem !important;
    list-style-type: decimal !important;
    list-style-position: outside !important;
}

.crmitemnoteseditor li,
.crmquoteitemnotesview li,
.crmquotedoccontent li,
.crmquotedocumentpaper li {
    display: list-item !important;
    margin-bottom: 0.25rem !important;
    color: #334155;
}

.crmitemnoteseditor h3,
.crmitemnoteseditor h4,
.crmquoteitemnotesview h3,
.crmquoteitemnotesview h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.4rem 0 0.2rem 0;
}

.crmitemnoteseditor strong,
.crmitemnoteseditor b,
.crmquoteitemnotesview strong,
.crmquoteitemnotesview b {
    font-weight: 700;
    color: #0f172a;
}

/* Modal Executive Footer */
.crmquotemodalfooter {
    padding: 0.85rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Rich Text Tables & Uploaded Images */
.crmrichtexttable {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.88rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
}

.crmrichtexttable th,
.crmrichtexttable td {
    border: 1px solid #cbd5e1;
    padding: 0.55rem 0.75rem;
    vertical-align: top;
}

.crmrichtexttable th {
    background: #f1f5f9;
    font-weight: 700;
    color: #1e293b;
    text-align: left;
}

.crmrichtexttable tr:nth-child(even) td {
    background: #fafbfc;
}

.crmrichtexttable td:focus {
    outline: 2px solid #2563eb;
    background: #eff6ff !important;
}

.crmrichimgwrap {
    text-align: center;
    margin: 1.25rem 0;
}

.crmrichimgwrap img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

/* Print Media Styles for Professional Quotes (Eliminates cutoffs, centers from top y=0, prints full header) */
@media print {
    @page {
        size: letter portrait;
        margin: 0.8cm 1cm;
    }

    html, body {
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #0f172a !important;
        overflow: visible !important;
    }

    /* Hide entire SPA app, topbar, sidebar, toast containers and any element marked with crmnoprint */
    #crmpubliclanding,
    #crmprivateshell,
    .crmtopbar,
    .crmsidebar,
    .crmmaincontent,
    .crmmodalbackdrop:not(#crmquoteviewermodal):not(#crmagreementstatementmodal),
    #crmtoastcontainer,
    .crmnoprint,
    .crmmodalheader,
    .crmmodalfooter {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Reset Quote Viewer Modal Container from fixed/flex overlay to clean top-level printable block */
    #crmquoteviewermodal,
    #crmagreementstatementmodal {
        display: block !important;
        position: static !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        background: #ffffff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        visibility: visible !important;
        z-index: auto !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    #crmquoteviewermodal *,
    #crmagreementstatementmodal * {
        visibility: visible !important;
    }

    /* Modal Box: Convert from centered card with max-height to full printable flow */
    .crmquoteviewermodalbox {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        overflow: visible !important;
    }

    /* Document Paper: Starts directly at top margin, no scroll clipping */
    .crmquotedocumentpaper {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Force background colors, borders and logos to print accurately */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    table {
        page-break-inside: auto !important;
        border-collapse: collapse !important;
    }

    tr {
        page-break-inside: avoid !important;
        page-break-after: auto !important;
    }

    thead {
        display: table-header-group !important;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid !important;
    }
}

/* Mobile responsive adjustments for quote viewer */
@media (max-width: 680px) {
    .crmquoteviewermodalbox {
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }

    .crmquotedocumentpaper {
        padding: 1.25rem 0.85rem !important;
    }
}

/* Granular Lead Merge Modal Editable Input Fields */
.crmmergeinputfield:focus,
.crmmergeinputfield:hover {
    border-color: #cbd5e1 !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Compact Hover Popover for Support Log / Ticket Descriptions */
.crmlogdescwrapper {
    position: relative;
    display: inline-block;
    max-width: 290px;
    width: 100%;
}

.crmlogdescpreview {
    font-size: 0.77rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.crmlogdescwrapper:hover .crmlogdescpreview {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
}

.crmlogdescpopover {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 2250;
    width: 380px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 0.85rem 1rem;
    color: #1e293b;
    font-size: 0.78rem;
    line-height: 1.5;
    pointer-events: auto;
    text-align: left;
}

.crmlogdescwrapper:hover .crmlogdescpopover {
    display: block;
    animation: crmpopoverfade 0.15s ease-out;
}

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

@media print {
    .crmlogdescpreview {
        display: none !important;
    }
    .crmlogdescpopover {
        display: block !important;
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        background: transparent !important;
    }
    .crmlogdescpopover-header {
        display: none !important;
    }
}

/* External PDF Quote Mode Selector & Upload/AI UI */
.crmquotemodebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.crmquotemodepills {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #ffffff;
    padding: 0.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.crmquotemodebtn {
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.4rem 0.85rem;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s ease;
}

.crmquotemodebtn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.crmquotemodebtnactive {
    background: #2563eb;
    color: #ffffff !important;
    border-color: #1d4ed8;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.crmquotemodebtnactive:hover {
    background: #1d4ed8;
}

.crmquotemodebtnexternalactive {
    background: #2563eb;
    color: #ffffff !important;
    border-color: #1d4ed8;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.crmquotemodebtnexternalactive:hover {
    background: #1d4ed8;
}

.crmexternalpdfdropzone {
    border: 2px dashed #bfdbfe;
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.35rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.crmexternalpdfdropzone:hover,
.crmexternalpdfdropzoneover {
    border-color: #2563eb;
    background: #eff6ff;
}

.crmbtnaiextract {
    background: #faf5ff !important;
    color: #9333ea !important;
    border: 1px solid #d8b4fe !important;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.crmbtnaiextract:hover:not(:disabled) {
    background: #f3e8ff !important;
    border-color: #9333ea !important;
}

.crmbtnaiextractactive {
    background: linear-gradient(90deg, #faf5ff 0%, #f3e8ff 50%, #faf5ff 100%) !important;
    background-size: 200% 100% !important;
    animation: crmaishimmer 1.6s linear infinite !important;
    border-color: #c084fc !important;
    color: #7e22ce !important;
    opacity: 1 !important;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes crmaipulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.35);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(147, 51, 234, 0);
        transform: scale(1.06);
    }
}

@keyframes crmaishimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.crmaipulseorb {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9333ea, #7e22ce);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: crmaipulse 1.5s ease-in-out infinite;
}

.crmaishimmerbar {
    width: 100%;
    height: 5px;
    background: #f3e8ff;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.55rem;
}

.crmaishimmerfill {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #e9d5ff 0%, #9333ea 45%, #c084fc 60%, #e9d5ff 100%);
    background-size: 200% 100%;
    animation: crmaishimmer 1.4s linear infinite;
}

/* Kanban Zoom Out & Full Pipeline Fit Controls */
.crmkanbanzoomgroup {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.crmkanbanzoombtn {
    padding: 0.35rem 0.62rem;
    border-radius: 6px;
    border: none;
    background: transparent;
    font-size: 0.76rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.crmkanbanzoombtn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.6);
}

.crmkanbanzoombtnactive {
    background: #ffffff;
    color: #2563eb;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Zoom 80% (Medium) */
.crmkanbanboard.crmkanbanmedium {
    gap: 0.75rem;
}

.crmkanbanboard.crmkanbanmedium .crmkanbancolumn {
    width: 230px;
    min-width: 230px;
    max-width: 230px;
    border-radius: 12px;
}

.crmkanbanboard.crmkanbanmedium .crmkanbanhead {
    padding: 0.7rem 0.75rem;
}

.crmkanbanboard.crmkanbanmedium .crmkanbantitle {
    font-size: 0.82rem;
    gap: 0.35rem;
}

.crmkanbanboard.crmkanbanmedium .crmkanbansummary {
    font-size: 0.72rem;
}

.crmkanbanboard.crmkanbanmedium .crmkanbanlist {
    padding: 0.6rem;
    gap: 0.6rem;
}

.crmkanbanboard.crmkanbanmedium .crmkanbancard {
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
}

.crmkanbanboard.crmkanbanmedium .crmoppname {
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
}

.crmkanbanboard.crmkanbanmedium .crmoppusd {
    font-size: 0.86rem;
}

.crmkanbanboard.crmkanbanmedium .crmoppves {
    font-size: 0.68rem;
}

/* Zoom Completa (Fit all 7 stages on screen) */
#crmoppwrapper.crmoppfitmode #crmoppheader {
    margin-bottom: 0.65rem !important;
}

#crmoppwrapper.crmoppfitmode #crmoppkpistrip {
    gap: 0.6rem !important;
    margin-bottom: 0.65rem !important;
}

#crmoppwrapper.crmoppfitmode #crmoppkpistrip .crmcard {
    padding: 0.55rem 0.8rem !important;
}

#crmoppwrapper.crmoppfitmode #crmkpitotalpipeline,
#crmoppwrapper.crmoppfitmode #crmkpiforecast,
#crmoppwrapper.crmoppfitmode #crmkpitotalwon,
#crmoppwrapper.crmoppfitmode #crmkpitotalcount {
    font-size: 1.05rem !important;
    margin-top: 0.15rem !important;
}

#crmoppwrapper.crmoppfitmode #crmoppfiltersbar {
    padding: 0.5rem 0.75rem !important;
    margin-bottom: 0.75rem !important;
}

.crmkanbanboard.crmkanbanfit {
    display: flex;
    gap: 0.45rem;
    padding-bottom: 0.75rem;
    align-items: stretch;
    overflow-x: auto;
}

.crmkanbanboard.crmkanbanfit .crmkanbancolumn {
    flex: 1 1 0%;
    width: auto;
    min-width: 138px;
    max-width: none;
    border-radius: 10px;
    max-height: calc(100vh - 230px);
}

.crmkanbanboard.crmkanbanfit .crmkanbanhead {
    padding: 0.5rem 0.55rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.crmkanbanboard.crmkanbanfit .crmkanbantitle {
    font-size: 0.73rem;
    gap: 0.25rem;
    width: 100%;
    justify-content: space-between;
    line-height: 1.15;
}

.crmkanbanboard.crmkanbanfit .crmkanbancount {
    font-size: 0.64rem;
    padding: 0.05rem 0.35rem;
}

.crmkanbanboard.crmkanbanfit .crmkanbansummary {
    font-size: 0.68rem;
}

.crmkanbanboard.crmkanbanfit .crmkanbanlist {
    padding: 0.4rem;
    gap: 0.45rem;
    min-height: 130px;
}

.crmkanbanboard.crmkanbanfit .crmkanbancard {
    padding: 0.5rem 0.55rem;
    border-radius: 8px;
}

.crmkanbanboard.crmkanbanfit .crmoppname {
    font-size: 0.74rem;
    line-height: 1.2;
    margin-bottom: 0.15rem;
    word-break: break-word;
}

.crmkanbanboard.crmkanbanfit .crmoppprobbadge {
    font-size: 0.6rem !important;
    padding: 1px 4px !important;
}

.crmkanbanboard.crmkanbanfit .crmoppaccountrow {
    gap: 0.2rem !important;
    margin-bottom: 0.3rem !important;
}

.crmkanbanboard.crmkanbanfit .crmoppaccountrow .crmrecipbadge {
    font-size: 0.56rem !important;
    padding: 1px 4px !important;
}

.crmkanbanboard.crmkanbanfit .crmoppaccount {
    font-size: 0.68rem !important;
}

.crmkanbanboard.crmkanbanfit .crmoppamounts {
    margin-bottom: 0.3rem !important;
    padding-top: 0.3rem !important;
    flex-wrap: wrap;
    gap: 3px;
}

.crmkanbanboard.crmkanbanfit .crmoppusd {
    font-size: 0.78rem;
}

.crmkanbanboard.crmkanbanfit .crmoppves {
    font-size: 0.62rem;
}

.crmkanbanboard.crmkanbanfit .crmoppfooter {
    padding-top: 0.3rem !important;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.64rem;
}

.crmkanbanboard.crmkanbanfit .crmoppseller {
    font-size: 0.64rem !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crmkanbanboard.crmkanbanfit .crmoppcardactions {
    gap: 3px !important;
    width: 100%;
    justify-content: flex-end;
}

.crmkanbanboard.crmkanbanfit .crmoppcardactions .crmbtn {
    font-size: 0.62rem !important;
    padding: 1px 5px !important;
}

/* ========================================================================= */
/* WHATSAPP & RICH-TEXT EMAIL TEMPLATES STUDIO (#templates)                  */
/* Strict lowercase class names without separators                           */
/* ========================================================================= */
.crmtplfilterbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.crmtplbtngroup {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 8px;
}

.crmtplsplit {
    display: grid;
    grid-template-columns: 1.25fr 370px;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 980px) {
    .crmtplsplit {
        grid-template-columns: 1fr;
    }
}

.crmtpltoolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0.45rem 0.75rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.crmtpltoolgroup {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding-right: 0.45rem;
    margin-right: 0.25rem;
    border-right: 1px solid #cbd5e1;
}

.crmtpltoolgroup:last-child {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
}

.crmtpltoolbtn {
    border: 1px solid transparent;
    background: transparent;
    color: #334155;
    padding: 0.3rem 0.48rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    line-height: 1.1;
    transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}

.crmtpltoolbtn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.crmtpltoolselect {
    font-size: 0.75rem;
    padding: 0.22rem 0.4rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #1e293b;
    font-weight: 600;
    cursor: pointer;
    height: 28px;
}

.crmtplcolorbtn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0.2rem 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    font-size: 0.74rem;
    font-weight: 700;
    color: #334155;
    height: 28px;
}

.crmtplcolorbtn input[type="color"] {
    width: 16px;
    height: 16px;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.crmtpltagchip {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 9999px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: 0.71rem;
    font-weight: 600;
    font-family: monospace;
    cursor: pointer;
    transition: background-color 0.12s, border-color 0.12s;
}

.crmtpltagchip:hover {
    background: #dbeafe;
    border-color: #60a5fa;
}

.crmtplblockstrip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    padding: 0.4rem 0.75rem;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.crmtplblockbtn {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 6px;
    padding: 0.22rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.crmtplblockbtn:hover {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.crmtplimgtoolbar {
    display: none;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0.4rem 0.75rem;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    font-size: 0.74rem;
    color: #92400e;
}

.crmtplphoneframe {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 25px -8px rgba(15, 23, 42, 0.16);
}

.crmtplphoneheader {
    background: #075e54;
    color: #ffffff;
    padding: 0.7rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.crmtplphonecanvas {
    background: #efeae2;
    padding: 1rem 0.85rem 1.25rem 0.85rem;
    min-height: 360px;
    max-height: 58vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.crmtplwabubble {
    background: #ffffff;
    border-radius: 0 10px 10px 10px;
    padding: 0.65rem 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 92%;
    color: #111b21;
    font-size: 0.83rem;
    line-height: 1.45;
    word-break: break-word;
}

.crmtplwabtn {
    background: #ffffff;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    max-width: 92%;
    text-align: center;
    color: #0284c7;
    font-weight: 700;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.crmtplemailstudiobox {
    max-width: 1360px !important;
    width: 98vw !important;
    height: 96vh !important;
    max-height: 96vh !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.15s ease, height 0.15s ease, border-radius 0.15s ease;
}

.crmtplemailstudiobox.ismaximized {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
}

.crmtplemailstudiobox .crmtpltoolbar {
    padding: 0.3rem 0.75rem;
    gap: 0.25rem;
}

.crmtplemailstudiobox .crmmodalfooter {
    padding: 0.55rem 1rem;
}

.crmtplemailcanvaswrap {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: #f1f5f9;
    padding: 0.75rem 1rem;
}

.crmtplemailpaper {
    max-width: 740px;
    width: 100%;
    min-height: 100%;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 1.35rem 1.75rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.94rem;
    line-height: 1.6;
    color: #1e293b;
}

.crmtplemailpaper:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.crmtplemailpaper.dragover {
    border: 2px dashed #2563eb;
    background: #eff6ff;
}

.crmtplemailpaper img {
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

.crmtplemailpaper img.selectedimg {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

.crmtplpreviewframe {
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    line-height: 1.6;
    color: #1e293b;
    transition: width 0.2s ease;
    overflow-x: auto;
}

.crmtplpreviewframe.desktop {
    width: 100%;
    max-width: 740px;
}

.crmtplpreviewframe.mobile {
    width: 375px;
    max-width: 100%;
}

.crmcampstatsbtntext,
.crmstatsmobilelbl,
.crmstatsrecmobilemeta {
    display: none;
}

.crmcamptargetchips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.35rem;
    min-height: 22px;
    align-items: center;
}

.crmcamptargetchip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    max-width: 100%;
    line-height: 1.3;
}

.crmcamptargetchipname {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crmcamptargetchiprm {
    border: none;
    background: transparent;
    color: inherit;
    font-weight: 800;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
    opacity: 0.75;
}

.crmcamptargetchiprm:hover {
    opacity: 1;
}

.crmtplwafilterwrap .crmbtnprimary svg {
    color: #ffffff !important;
}

.crmtplwafiltermenu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 245px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    padding: 0.3rem;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.crmtplwafilteritem {
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.42rem 0.55rem;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.76rem;
    color: #1e293b;
}

.crmtplwafilteritem:hover {
    background: #f8fafc;
}

.crmtplwafilteritem.active {
    background: #eff6ff;
    color: #1d4ed8;
}

.crmtplwafiltermeta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.crmtplwafiltername {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crmtplwafilterphone {
    font-size: 0.68rem;
    color: #64748b;
    font-family: monospace;
}

.crmtplwafilteritem.active .crmtplwafilterphone {
    color: #2563eb;
}

.crmtplwafiltercnt {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 1px 7px;
    flex-shrink: 0;
}

.crmtplwafilteritem.active .crmtplwafiltercnt {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Quote Rich Text AI Writing & Proofreading Tools */
.crmrichaigroup {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.crmrichaibtn {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    color: #7e22ce;
    font-size: 0.74rem;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
}

.crmrichaibtn:hover {
    background: #f3e8ff;
    color: #6b21a8;
    border-color: #d8b4fe;
}

.crmrichaibtn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.crmrichaiundo {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
    font-size: 0.73rem;
    padding: 0.25rem 0.5rem;
}

.crmrichaiundo:hover {
    background: #fef3c7;
    color: #92400e;
}

.crmrichaidraftbar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
    background: #faf5ff;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e9d5ff;
}

.crmrichaidraftbar input {
    flex: 1 1 240px;
    min-width: 0;
    height: 32px;
    font-size: 0.79rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid #d8b4fe;
    border-radius: 7px;
    background: #ffffff;
    color: #0f172a;
}

.crmrichaidraftchip {
    border: 1px solid #e9d5ff;
    background: #ffffff;
    color: #6b21a8;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.28rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
    height: 30px;
}

.crmrichaidraftchip:hover {
    background: #f3e8ff;
}






