/* ============================================================
   CRM Module — crm.css
   Paleta alinhada ao backoffice WEO:
     Fundo escuro nav : #262e31
     Botão / dark     : #465157
     Accent laranja   : #f7881f
     Texto escuro     : #2c3e50  (#333 alternativo)
     Texto médio      : #7d7d7d  (#888)
     Border           : #e1e1e1
     Fundo área       : #f2f2f2 / #fff
   ============================================================ */

/* ── 1. RESET CRÍTICO: corrige herança global (a=white, body=white) ── */

/* Wrapper isola todo o bloco CRM do tema admin envolvente */
.crm_wrapper {
    background: #ffffff;
    color: #333;
    font-family: 'Lato-Regular', Tahoma, Helvetica, Verdana, Arial, sans-serif;
    font-size: 13px;
    border-radius: 8px;
    overflow: hidden;
}

.crm_nav,
.crm_content {
    color: #333;
    font-family: 'Lato-Regular', Tahoma, Helvetica, Verdana, Arial, sans-serif;
    font-size: 13px;
}

.crm_content {
    background: #f2f2f2;
    padding: 20px;
    min-height: 300px;
}

/* Cabeçalho de página CRM — título + acções */
.crm_content .module_header,
.crm_page_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.crm_content .module_header h1,
.crm_page_header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}
.crm_content .module_header .module_header_actions,
.crm_page_header .module_header_actions {
    display: flex;
    gap: 8px;
}

.crm_content h1,
.crm_content h2,
.crm_content h3,
.crm_content h4,
.crm_content strong {
    color: #2c3e50;
    font-family: 'Lato-Bold', Tahoma, Helvetica, Verdana, Arial, sans-serif;
}

/* Links dentro do conteúdo — sobrepõe o global a { color:#fff } */
.crm_content a {
    color: #465157;
    text-decoration: none;
}
.crm_content a:hover {
    color: #f7881f;
    text-decoration: none;
}

/* Inputs — garante text dark no content */
.crm_content input,
.crm_content select,
.crm_content textarea {
    color: #333;
    font-family: 'Lato-Regular', Tahoma, Helvetica, Verdana, Arial, sans-serif;
}

/* ── 2. NAVBAR TOP ───────────────────────────────────────────────── */

.crm_nav {
    background: #262e31;
    border-radius: 8px 8px 0 0;
    padding: 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 3px solid #f7881f;
}
.crm_nav::-webkit-scrollbar { display: none; }

.crm_nav_inner {
    display: flex;
    align-items: stretch;
    gap: 2px;
    min-width: max-content;
}

.crm_nav_item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 14px;
    color: #95a0aa;
    text-decoration: none !important;
    font-size: 13px;
    font-family: 'Lato-Regular', Tahoma, Helvetica, Verdana, Arial, sans-serif;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s, background .15s;
    white-space: nowrap;
    border-radius: 6px 6px 0 0;
}
.crm_nav_item:hover {
    color: #fff !important;
    background: rgba(255,255,255,.07);
}

.crm_nav_active {
    color: #fff !important;
    border-bottom-color: #f7881f;
    background: rgba(247,136,31,.12);
}

.crm_nav_icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
    opacity: .8;
}
.crm_nav_active .crm_nav_icon { opacity: 1; }

.crm_nav_badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    margin-left: 4px;
    line-height: 1;
}
.crm_nav_badge_notif { background: #f7881f; }

/* Pesquisa no navbar */
.crm_nav_search {
    margin-left: auto;
    display: flex;
    align-items: center;
    padding: 6px 4px;
}
.crm_nav_search_wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.crm_nav_search_icon {
    position: absolute;
    left: 8px;
    width: 15px;
    height: 15px;
    fill: #8aa;
    pointer-events: none;
}
.crm_nav_search input[type=text] {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 20px;
    color: #e0e8f0;
    font-size: 12px;
    padding: 5px 12px 5px 30px;
    width: 150px;
    transition: width .2s, background .2s;
    outline: none;
    height: auto;
}
.crm_nav_search input[type=text]::placeholder { color: #7a9ab0; }
.crm_nav_search input[type=text]:focus,
.crm_nav_search input[type=text].crm_nav_search_open {
    width: 220px;
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.3);
    color: #fff;
}

/* ── 3. CONTENT WRAPPER ─────────────────────────────────────────── */

.crm_content {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 28px 28px 32px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

/* ── 4. PAGE HEADER ─────────────────────────────────────────────── */

.crm_page_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid #f0f0f0;
}
.crm_page_header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #262e31;
    font-family: 'Lato-Bold', Tahoma, Helvetica, Verdana, Arial, sans-serif;
    padding-left: 14px;
    border-left: 4px solid #f7881f;
}
.crm_header_actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── 5. BOTÕES ──────────────────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Lato-Regular', Tahoma, Helvetica, Verdana, Arial, sans-serif;
    cursor: pointer;
    text-decoration: none !important;
    border: 0;
    background: #465157;
    color: #fff !important;
    transition: background .15s;
    line-height: 1.4;
    white-space: nowrap;
}
.btn:hover { background: #f7881f; color: #fff !important; }

.btn_primary            { background: #f7881f; color: #fff !important; }
.btn_primary:hover      { background: #e06810; }

.btn_secondary          { background: #95a0aa; color: #fff !important; border: 0; }
.btn_secondary:hover    { background: #7d8990; }

.btn_ghost {
    background: transparent;
    color: #465157 !important;
    border: 1px solid #c5cdd2;
}
.btn_ghost:hover { background: #f0f0f0; color: #262e31 !important; }

.btn_ok              { background: #198754; color: #fff !important; }
.btn_ok:hover        { background: #146c43; }

.btn_danger          { background: #dc3545; color: #fff !important; }
.btn_danger:hover    { background: #bb2d3b; }

.btn_warn            { background: #fd7e14; color: #fff !important; }
.btn_warn:hover      { background: #e06810; }

.btn_small           { padding: 4px 10px; font-size: 12px; }
.btn_sm              { padding: 4px 10px; font-size: 12px; }

/* Botão ícone */
.crm_btn_icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    text-decoration: none !important;
    background: #f5f5f5;
    color: #555 !important;
    font-size: 14px;
    border: 1px solid #e1e1e1;
    transition: background .15s, color .15s;
}
.crm_btn_icon:hover { background: #465157; color: #fff !important; }
.crm_btn_icon.crm_btn_danger:hover { background: #dc3545; color: #fff !important; }

/* ── 6. BADGES / PILLS ──────────────────────────────────────────── */

.crm_badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.crm_badge_ok     { background: #d1e7dd; color: #0a3622; }
.crm_badge_err    { background: #f8d7da; color: #58151c; }
.crm_badge_info   { background: #cfe2ff; color: #052c65; }
.crm_badge_warn   { background: #fff3cd; color: #664d03; }
.crm_badge_purple { background: #e2d9f3; color: #3d0a91; }
.crm_badge_grey   { background: #e9ecef; color: #495057; }
.crm_badge_new    { background: #d1e7dd; color: #0a3622; }
.crm_badge_off    { background: #e9ecef; color: #6c757d; }

/* ── 7. TABELAS ─────────────────────────────────────────────────── */

.crm_table_wrap { overflow-x: auto; margin-bottom: 16px; }

.crm_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.crm_table th {
    padding: 9px 12px;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    text-align: left;
    color: #495057;
    font-family: 'Lato-Bold', Tahoma, Helvetica, Verdana, Arial, sans-serif;
    font-weight: 700;
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.crm_table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    vertical-align: middle;
}
.crm_table tr:hover td { background: #fafafa; }
.crm_table tbody tr:last-child td { border-bottom: none; }
.crm_table td a { color: #465157; text-decoration: none; }
.crm_table td a:hover { color: #f7881f; }
.crm_table .crm_actions { white-space: nowrap; text-align: right; }
.crm_table .crm_num { text-align: right; font-variant-numeric: tabular-nums; font-family: 'Lato-Regular', monospace; }
.crm_row_overdue td { background: #fff8f8 !important; }
.crm_row_done td { opacity: .55; }

/* Tabela de detalhe */
.crm_detail_table { width: 100%; font-size: 13px; border-collapse: collapse; }
.crm_detail_table th {
    width: 160px;
    padding: 8px 12px;
    text-align: left;
    color: #7d7d7d;
    font-family: 'Lato-Bold', Tahoma, Helvetica, Verdana, Arial, sans-serif;
    font-weight: 700;
    font-size: 12px;
    vertical-align: top;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.crm_detail_table td {
    padding: 8px 12px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
}

/* ── 8. FILTROS ─────────────────────────────────────────────────── */

.crm_filters,
.crm_filter_form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    padding: 12px 14px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e1e1;
}
.crm_filters input[type=text],
.crm_filter_form input[type=text] {
    height: 34px;
    padding: 0 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    min-width: 180px;
    box-sizing: border-box;
    color: #333;
    background: #fff;
}
.crm_filters select,
.crm_filter_form select {
    height: 34px;
    padding: 0 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    min-width: 140px;
    box-sizing: border-box;
    color: #333;
    background: #fff;
}
.crm_count { font-size: 12px; color: #888; margin-bottom: 12px; }

/* ── 9. FORMULÁRIOS ─────────────────────────────────────────────── */

.crm_form_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0 20px;
    max-width: 860px;
}
.crm_span2 { grid-column: span 2; }
@media (max-width: 640px) { .crm_span2 { grid-column: span 1; } }

.crm_form_group,
.crm_form_row {
    margin-bottom: 16px;
}
.crm_form_group label,
.crm_form_row label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Lato-Bold', Tahoma, Helvetica, Verdana, Arial, sans-serif;
    color: #262e31;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.crm_form_group input[type=text],
.crm_form_group input[type=email],
.crm_form_group input[type=url],
.crm_form_group input[type=number],
.crm_form_group input[type=date],
.crm_form_group input[type=datetime-local],
.crm_form_group textarea,
.crm_form_row input[type=text],
.crm_form_row input[type=email],
.crm_form_row input[type=url],
.crm_form_row input[type=number],
.crm_form_row input[type=date],
.crm_form_row input[type=datetime-local],
.crm_form_row textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    color: #333;
    background: #fff;
    font-family: 'Lato-Regular', Tahoma, Helvetica, Verdana, Arial, sans-serif;
    transition: border-color .15s, box-shadow .15s;
    height: auto;
}
.crm_form_group select,
.crm_form_row select {
    width: 100%;
    padding: 0 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    color: #333;
    background: #fff;
    height: 36px;
    font-family: 'Lato-Regular', Tahoma, Helvetica, Verdana, Arial, sans-serif;
    transition: border-color .15s, box-shadow .15s;
}
.crm_form_group input:focus,
.crm_form_group select:focus,
.crm_form_group textarea:focus,
.crm_form_row input:focus,
.crm_form_row select:focus,
.crm_form_row textarea:focus {
    outline: none;
    border-color: #f7881f;
    box-shadow: 0 0 0 3px rgba(247,136,31,.14);
}
.crm_form_group textarea,
.crm_form_row textarea { resize: vertical; min-height: 80px; }

.crm_form_hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #7d7d7d;
    line-height: 1.4;
}
.crm_form_actions {
    display: flex;
    gap: 10px;
    padding-top: 16px;
    margin-top: 4px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

/* ── 10. CARDS / PANELS ─────────────────────────────────────────── */

.crm_card,
.crm_panel {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.crm_card_header,
.crm_panel_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.crm_card_header h2,
.crm_card_header h3,
.crm_panel_header h2,
.crm_panel_header h3 {
    margin: 0;
    font-size: 14px;
    color: #262e31;
    font-family: 'Lato-Bold', Tahoma, Helvetica, Verdana, Arial, sans-serif;
}
.crm_panel_header a:not(.btn) { color: #f7881f !important; font-size: 12px; }
.crm_panel_alert { border-left: 4px solid #dc3545; }

/* ── 11. STATS GRID (dashboard) ─────────────────────────────────── */

.crm_stats_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.crm_stat_card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 18px 16px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    position: relative;
    overflow: hidden;
}
.crm_stat_card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: #f7881f;
    border-radius: 8px 8px 0 0;
}
.crm_stat_value {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Lato-Bold', Tahoma, Helvetica, Verdana, Arial, sans-serif;
    color: #262e31;
    line-height: 1;
}
.crm_stat_label {
    font-size: 11px;
    color: #7d7d7d;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-family: 'Lato-Regular', Tahoma, Helvetica, Verdana, Arial, sans-serif;
}
.crm_stat_link {
    display: block;
    font-size: 11px;
    color: #f7881f !important;
    margin-top: 8px;
    text-decoration: none !important;
}
.crm_stat_won  .crm_stat_value  { color: #198754; }
.crm_stat_won::before            { background: #198754; }
.crm_stat_lost .crm_stat_value  { color: #dc3545; }
.crm_stat_lost::before           { background: #dc3545; }

/* Mini stats (view pages) */
.crm_mini_stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.crm_mini_stat {
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 10px 14px;
    text-align: center;
    min-width: 90px;
}
.crm_mini_stat strong { display: block; font-size: 20px; font-weight: 700; color: #262e31; }
.crm_mini_stat span   { font-size: 11px; color: #7d7d7d; text-transform: uppercase; }

/* Contact stats */
.crm_contact_stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.crm_cstat {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 12px 18px;
    text-align: center;
    min-width: 90px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.crm_cstat_val   { display: block; font-size: 22px; font-weight: 700; color: #262e31; line-height: 1; }
.crm_cstat_label { display: block; font-size: 11px; color: #7d7d7d; margin-top: 4px; text-transform: uppercase; letter-spacing: .4px; }
.crm_cstat_blue   { border-color: #bfd7f5; background: #f0f7ff; }
.crm_cstat_blue   .crm_cstat_val { color: #0d6efd; }
.crm_cstat_orange { border-color: #fcd3a5; background: #fff4eb; }
.crm_cstat_orange .crm_cstat_val { color: #f7881f; }
.crm_cstat_red    { border-color: #f1948a; background: #fdedec; }
.crm_cstat_red    .crm_cstat_val { color: #dc3545; }
.crm_cstat_green  { border-color: #82e0aa; background: #eafaf1; }
.crm_cstat_green  .crm_cstat_val { color: #198754; }

/* ── 12. DASHBOARD LAYOUT ───────────────────────────────────────── */

.crm_dashboard_cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 900px) { .crm_dashboard_cols { grid-template-columns: 1fr; } }
.crm_dashboard_col { display: flex; flex-direction: column; gap: 0; }

/* Pipeline mini */
.crm_pipeline_mini { display: flex; flex-direction: column; gap: 6px; }
.crm_pipeline_stage_mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    color: #333;
}
.crm_stage_dot   { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.crm_stage_name  { flex: 1; color: #495057; }
.crm_stage_count { color: #7d7d7d; font-size: 12px; }
.crm_stage_value { font-weight: 600; font-family: 'Lato-Bold', Tahoma, Helvetica, Verdana, Arial, sans-serif; color: #262e31; }

/* ── 13. ATIVIDADES ─────────────────────────────────────────────── */

.crm_activity_list,
.crm_simple_list { list-style: none; margin: 0; padding: 0; }

.crm_activity_item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    color: #333;
}
.crm_activity_item:last-child { border-bottom: none; }
.crm_activity_icon { font-size: 15px; flex-shrink: 0; margin-top: 2px; }
.crm_activity_info { flex: 1; }
.crm_activity_info strong { display: block; color: #2c3e50; font-family: 'Lato-Bold', Tahoma, sans-serif; }
.crm_activity_info p { margin: 3px 0; color: #555; font-size: 12px; }
.crm_activity_meta { font-size: 11px; color: #888; display: block; margin-top: 3px; }
.crm_activity_full .crm_activity_item { padding: 14px 0; }

/* Tipo de atividade */
.crm_act_type    { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 8px; font-weight: 600; margin-right: 4px; }
.crm_act_chamada   { background: #cfe2ff; color: #052c65; }
.crm_act_reuniao   { background: #d1e7dd; color: #0a3622; }
.crm_act_visita    { background: #fff3cd; color: #664d03; }
.crm_act_email     { background: #e2d9f3; color: #3d0a91; }
.crm_act_whatsapp  { background: #d1e7dd; color: #0a3622; }
.crm_act_nota      { background: #e9ecef; color: #495057; }
.crm_act_body      { font-size: 13px; color: #555; }

/* Formulário de atividade */
.crm_activity_form { background: #f8f9fa; border: 1px solid #e1e1e1; border-radius: 6px; padding: 14px; margin-bottom: 14px; }
.crm_activity_form_row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.crm_activity_form_row select,
.crm_activity_form_row input[type=text],
.crm_activity_form_row input[type=datetime-local] {
    padding: 0 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    height: 34px;
    box-sizing: border-box;
    color: #333;
    background: #fff;
}
.crm_activity_form_row select { min-width: 140px; }
.crm_activity_form_row input[type=text] { flex: 1; min-width: 200px; }
.crm_activity_form textarea { width: 100%; padding: 7px 10px; border: 1px solid #ced4da; border-radius: 4px; font-size: 13px; box-sizing: border-box; resize: vertical; color: #333; }

/* ── 14. TAREFAS ────────────────────────────────────────────────── */

.crm_task_list { list-style: none; margin: 0; padding: 0; }
.crm_task_item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    color: #333;
}
.crm_task_item:last-child { border-bottom: none; }
.crm_task_info         { flex: 1; }
.crm_task_info strong  { display: block; color: #2c3e50; font-family: 'Lato-Bold', Tahoma, sans-serif; }
.crm_task_info span,
.crm_task_info small   { font-size: 12px; color: #7d7d7d; }
.crm_task_due          { font-size: 12px; color: #dc3545; font-weight: 700; min-width: 60px; }
.crm_task_overdue      { background: #fff5f5; border-radius: 4px; padding: 8px 10px; }
.crm_task_done .crm_task_info strong { text-decoration: line-through; color: #aaa; }
.crm_task_status_badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }

.crm_task_quick_form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 14px;
}
.crm_task_quick_form input[type=text] {
    flex: 1;
    min-width: 180px;
    padding: 0 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    height: 34px;
    box-sizing: border-box;
    color: #333;
}
.crm_task_quick_form input[type=date],
.crm_task_quick_form select {
    padding: 0 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    height: 34px;
    box-sizing: border-box;
    color: #333;
    background: #fff;
}
.crm_task_quick_form select { min-width: 150px; }

/* ── 15. PIPELINE (Kanban) ──────────────────────────────────────── */

.crm_pipeline,
.crm_pipeline_board {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 16px;
    align-items: flex-start;
}
.crm_pipeline_col {
    flex: 0 0 240px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0 0 12px;
    border: 1px solid #e1e1e1;
}
.crm_pipeline_col_header {
    padding: 12px 14px 10px;
    border-radius: 7px 7px 0 0;
    background: #fff;
    border-bottom: 1px solid #e1e1e1;
    margin-bottom: 10px;
}
.crm_stage_title { font-weight: 700; font-size: 13px; color: #262e31; display: block; font-family: 'Lato-Bold', Tahoma, sans-serif; }
.crm_stage_meta  { font-size: 12px; color: #7d7d7d; display: block; margin-top: 2px; }
.crm_pipeline_count { background: #e9ecef; border-radius: 10px; padding: 1px 8px; font-size: 11px; color: #495057; }
.crm_pipeline_total { margin-left: auto; font-size: 11px; color: #7d7d7d; }
.crm_pipeline_empty { color: #adb5bd; font-size: 12px; text-align: center; padding: 16px 0; }
.crm_pipeline_cards { min-height: 60px; padding: 0 10px; }
.crm_pipeline_add_btn {
    display: block;
    text-align: center;
    margin: 8px 10px 0;
    padding: 6px;
    font-size: 12px;
    color: #f7881f !important;
    text-decoration: none !important;
    border: 1px dashed #f7881f;
    border-radius: 4px;
}
.crm_pipeline_add_btn:hover { background: #fff4eb; }

/* Pipeline cards */
.crm_pipeline_card,
.crm_deal_card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: box-shadow .15s;
}
.crm_pipeline_card:hover,
.crm_deal_card:hover { box-shadow: 0 3px 8px rgba(0,0,0,.12); }

.crm_pipeline_card_title,
.crm_deal_card_title a {
    font-weight: 700;
    font-size: 13px;
    font-family: 'Lato-Bold', Tahoma, sans-serif;
    color: #262e31;
    text-decoration: none !important;
    display: block;
    margin-bottom: 4px;
}
.crm_pipeline_card_title:hover,
.crm_deal_card_title a:hover { color: #f7881f !important; }

.crm_pipeline_card_sub,
.crm_deal_card_contact { font-size: 12px; color: #7d7d7d; margin-bottom: 6px; }
.crm_pipeline_card_footer,
.crm_deal_card_footer { display: flex; align-items: center; justify-content: space-between; }
.crm_pipeline_card_value,
.crm_deal_card_value { font-weight: 700; font-size: 13px; color: #198754; }
.crm_pipeline_card_resp,
.crm_pipeline_card_date { font-size: 11px; color: #7d7d7d; }
.crm_pipeline_card_date.crm_overdue { color: #dc3545; font-weight: 700; }

/* ── 16. DETALHE / VIEW ─────────────────────────────────────────── */

.crm_view_grid  { display: grid; grid-template-columns: 1fr; gap: 20px; }
.crm_view_cols  { display: grid; grid-template-columns: 1fr; gap: 20px; }
.crm_view_main  { display: flex; flex-direction: column; gap: 0; }
@media (min-width: 860px) {
    .crm_view_grid { grid-template-columns: 360px 1fr; align-items: start; }
}

.crm_detail_card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0;
}
.crm_detail_card > table { width: 100%; }

.crm_detail_row {
    display: flex;
    align-items: baseline;
    padding: 9px 16px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    gap: 14px;
}
.crm_detail_row:last-child { border-bottom: none; }
.crm_detail_row > span:first-child {
    min-width: 110px;
    max-width: 130px;
    color: #9a9a9a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    flex-shrink: 0;
    padding-top: 1px;
    line-height: 1.4;
}
.crm_detail_row > span:last-child {
    color: #262e31;
    flex: 1;
    word-break: break-word;
    line-height: 1.4;
}

.crm_detail_notes {
    padding: 12px 16px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}
.crm_detail_notes strong { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #9a9a9a; margin-bottom: 6px; }
.crm_detail_notes p { margin: 0; white-space: pre-line; }

.crm_quick_card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}
.crm_quick_card h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9a9a9a;
    margin: 0 0 12px;
}
.crm_quick_card .btn { display: block; width: 100%; margin-bottom: 6px; text-align: center; box-sizing: border-box; }

.crm_section_title {
    font-size: 12px;
    font-weight: 700;
    font-family: 'Lato-Bold', Tahoma, sans-serif;
    color: #262e31;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f7881f;
}

.crm_meta  { font-size: 12px; color: #7d7d7d; }
.crm_notes { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f0; font-size: 13px; color: #555; }
.crm_notes p { margin: 6px 0 0; }
.crm_value     { font-weight: 600; font-family: 'Lato-Bold', Tahoma, sans-serif; color: #2c3e50; }
.crm_value_big { font-size: 22px; font-weight: 700; color: #198754; }
.crm_num       { text-align: right; font-variant-numeric: tabular-nums; }

/* ── 17. STAGE PROGRESS BAR ─────────────────────────────────────── */

.crm_stage_progress { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.crm_stage_step {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    border-radius: 4px;
    font-size: 12px;
    background: #f5f5f5;
    color: #888;
    border: 2px solid transparent;
    min-width: 80px;
    white-space: nowrap;
}
.crm_stage_step.past   { background: #d1e7dd; color: #0a3622; }
.crm_stage_step.active { font-weight: 700; background: #fff4eb; color: #f7881f; border-color: #f7881f; }

/* ── 18. TABS ───────────────────────────────────────────────────── */

.crm_tabs { border-bottom: 2px solid #e1e1e1; margin-bottom: 20px; display: flex; gap: 0; flex-wrap: wrap; }
.crm_tab {
    padding: 9px 18px;
    font-size: 13px;
    color: #7d7d7d;
    text-decoration: none !important;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
    font-family: 'Lato-Regular', Tahoma, sans-serif;
    white-space: nowrap;
}
.crm_tab:hover { color: #262e31 !important; }
.crm_tab_active { color: #f7881f !important; border-bottom-color: #f7881f; font-family: 'Lato-Bold', Tahoma, sans-serif; font-weight: 700; }
.crm_tab_content { display: none; }
.crm_tab_content.active { display: block; }

.crm_tab_nav { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 2px solid #e1e1e1; padding-bottom: 0; flex-wrap: wrap; }
.crm_tab_nav a {
    padding: 8px 16px;
    font-size: 13px;
    color: #7d7d7d;
    text-decoration: none !important;
    border-radius: 4px 4px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    transition: color .15s;
}
.crm_tab_nav a:hover { background: #f8f9fa; color: #333 !important; }
.crm_tab_nav a.active {
    background: #fff;
    border-color: #e1e1e1;
    color: #f7881f !important;
    font-family: 'Lato-Bold', Tahoma, sans-serif;
    font-weight: 700;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px;
}

/* Config subnav */
.crm_config_subnav { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.crm_config_tab {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 4px 4px 0 0;
    border: 1px solid #ddd;
    border-bottom: none;
    background: #f5f5f5;
    color: #465157 !important;
    text-decoration: none !important;
    transition: background .15s;
}
.crm_config_tab:hover { background: #e1e1e1; color: #262e31 !important; }
.crm_config_tab_active { background: #fff; color: #262e31 !important; font-weight: 700; border-bottom: 1px solid #fff; margin-bottom: -1px; }

/* ── 19. PAGINAÇÃO ──────────────────────────────────────────────── */

.crm_pagination,
.pagination {
    display: flex;
    gap: 4px;
    margin-top: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.crm_page_btn,
.pagination a {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 13px;
    color: #465157 !important;
    text-decoration: none !important;
    transition: background .15s;
}
.crm_page_btn:hover,
.pagination a:hover { background: #fff4eb; border-color: #f7881f; color: #f7881f !important; }
.crm_page_active,
.pagination a.active { background: #465157; border-color: #465157; color: #fff !important; }

/* ── 20. MODAIS ─────────────────────────────────────────────────── */

.crm_modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.crm_modal.active { display: flex; }
.crm_modal_box {
    background: #fff;
    border-radius: 8px;
    padding: 24px 28px;
    min-width: 360px;
    max-width: 560px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    color: #333;
}
.crm_modal_box h3 {
    margin: 0 0 18px;
    font-size: 16px;
    color: #262e31;
    font-family: 'Lato-Bold', Tahoma, sans-serif;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.crm_modal_close {
    float: right;
    cursor: pointer;
    font-size: 18px;
    color: #888;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}
.crm_modal_close:hover { color: #dc3545; }

/* ── 21. FORMULÁRIOS DENTRO DE MODAL/CARD ───────────────────────── */

.crm_form_section {
    background: #fafafa;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 18px 20px;
    margin-bottom: 18px;
}
.crm_form_section h3 {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Lato-Bold', Tahoma, sans-serif;
    color: #262e31;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e1e1;
}

/* ── 22. ITENS DE PROPOSTA ──────────────────────────────────────── */

.crm_items_table { width: 100%; border-collapse: collapse; font-size: 13px; }
.crm_items_table th {
    padding: 7px 10px;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Lato-Bold', Tahoma, sans-serif;
    color: #495057;
}
.crm_items_table td { padding: 6px 8px; border-bottom: 1px solid #f0f0f0; color: #333; }
.crm_item_qty,
.crm_item_price  { width: 90px; }
.crm_item_total_cell { font-weight: 700; color: #198754; }

/* ── 23. PESQUISA ───────────────────────────────────────────────── */

.crm_search_cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.crm_search_count {
    display: inline-block;
    background: #e9ecef;
    color: #555;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 6px;
}
.crm_search_list { list-style: none; margin: 0; padding: 0; }
.crm_search_list li { border-bottom: 1px solid #f5f5f5; }
.crm_search_list li:last-child { border-bottom: none; }
.crm_search_result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    text-decoration: none !important;
    border-radius: 4px;
    transition: background .1s;
    color: #333;
}
.crm_search_result:hover { background: #f8f9fa; }
.crm_search_result_main { flex: 1; min-width: 0; }
.crm_search_result_main strong { display: block; font-size: 13px; color: #2c3e50; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm_search_sub { font-size: 12px; color: #7d7d7d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.crm_search_result_meta { display: flex; gap: 6px; align-items: center; flex-shrink: 0; font-size: 12px; color: #888; }

/* ── 24. RELATÓRIOS ─────────────────────────────────────────────── */

.crm_report_row { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.crm_report_card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
}
.crm_report_full  { flex: 1 1 100%; }
.crm_report_half  { flex: 1 1 calc(50% - 10px); min-width: 280px; }
.crm_report_title {
    font-size: 13px;
    font-weight: 700;
    font-family: 'Lato-Bold', Tahoma, sans-serif;
    color: #262e31;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.crm_report_label { font-size: 13px; color: #7d7d7d; margin: 0 0 10px; }
.crm_report_kpi { text-align: center; background: #f8f9fa; border-radius: 8px; padding: 14px 18px; min-width: 90px; }
.crm_report_kpi_val { font-size: 28px; font-weight: 700; color: #262e31; line-height: 1; }
.crm_report_kpi_label { font-size: 11px; color: #6c757d; margin-top: 6px; }
.crm_report_table th { font-size: 12px; color: #495057; }
.crm_report_table .crm_num { text-align: right; }
.crm_report_chart_wrap { overflow-x: auto; }

.crm_funnel       { display: flex; flex-direction: column; gap: 10px; }
.crm_funnel_row   { display: flex; align-items: center; gap: 10px; }
.crm_funnel_label { width: 110px; font-size: 12px; color: #495057; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.crm_funnel_bar_wrap { flex: 1; height: 16px; background: #f0f0f0; border-radius: 8px; overflow: hidden; }
.crm_funnel_bar   { height: 100%; border-radius: 8px; min-width: 2px; transition: width .3s; }
.crm_funnel_val   { width: 70px; text-align: right; font-size: 12px; color: #333; font-weight: 600; flex-shrink: 0; }
.crm_funnel_pct   { font-weight: 400; color: #adb5bd; }

.crm_bar_chart    { display: flex; align-items: flex-end; gap: 6px; padding: 10px 0; min-height: 160px; border-bottom: 1px solid #e1e1e1; }
.crm_bar_group    { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 40px; }
.crm_bar_bars     { display: flex; align-items: flex-end; gap: 3px; height: 130px; }
.crm_bar          { width: 14px; border-radius: 3px 3px 0 0; min-height: 2px; }
.crm_bar_won      { background: #198754; }
.crm_bar_lost     { background: #dc3545; }
.crm_bar_label    { font-size: 10px; color: #7d7d7d; text-align: center; transform: rotate(-40deg); transform-origin: top left; white-space: nowrap; margin-top: 8px; }
.crm_chart_legend { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: #555; }
.crm_legend_item::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
.crm_legend_won::before  { background: #198754; }
.crm_legend_lost::before { background: #dc3545; }

/* ── 25. CALENDÁRIO ─────────────────────────────────────────────── */

.crm_cal_nav { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.crm_cal_nav_title { font-size: 16px; font-weight: 700; color: #262e31; min-width: 160px; text-align: center; }

.crm_cal_wrap { overflow-x: auto; margin-bottom: 16px; }
.crm_cal_grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #dee2e6;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    min-width: 700px;
}
.crm_cal_header {
    background: #f8f9fa;
    padding: 8px 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #495057;
    text-transform: uppercase;
}
.crm_cal_cell {
    background: #fff;
    min-height: 100px;
    padding: 6px;
    vertical-align: top;
    position: relative;
}
.crm_cal_empty { background: #f8f9fa; }
.crm_cal_today { background: #fff8e1; }
.crm_cal_today .crm_cal_day_num { background: #f59e0b; color: #fff; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.crm_cal_day_num { font-size: 12px; font-weight: 600; color: #495057; margin-bottom: 4px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.crm_cal_events { display: flex; flex-direction: column; gap: 2px; }
.crm_cal_loading { font-size: 10px; color: #ccc; }

.crm_cal_chip {
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    line-height: 1.5;
    max-width: 100%;
    border-left: 3px solid transparent;
    display: block;
}
.crm_cal_chip_task_pendente   { background: #f0f0f0; color: #495057; border-left-color: #adb5bd; }
.crm_cal_chip_task_em_curso   { background: #ddeeff; color: #084298; border-left-color: #4d9de0; }
.crm_cal_chip_task_concluida  { background: #d6f0e0; color: #0a5c2a; border-left-color: #28a745; }
.crm_cal_chip_task_overdue    { background: #fde8ea; color: #842029; border-left-color: #dc3545; }
/* Atividades — tipos PT */
.crm_cal_chip_activity_chamada  { background: #f0e6ff; color: #6f42c1; border-left-color: #9b59b6; }
.crm_cal_chip_activity_reuniao  { background: #dbeeff; color: #0c63e4; border-left-color: #4dabf7; }
.crm_cal_chip_activity_email    { background: #fff3e0; color: #b25700; border-left-color: #fd7e14; }
.crm_cal_chip_activity_visita   { background: #e6f9ed; color: #1a6130; border-left-color: #28a745; }
.crm_cal_chip_activity_whatsapp { background: #e6f9f0; color: #1a7343; border-left-color: #25d366; }
.crm_cal_chip_activity_nota     { background: #f8f9fa; color: #555;    border-left-color: #ced4da; }
.crm_cal_chip_activity_outro    { background: #f8f9fa; color: #555;    border-left-color: #ced4da; }
.crm_cal_more { font-size: 11px; color: #6c757d; cursor: pointer; padding: 2px 4px; }
.crm_cal_more:hover { color: #0d6efd; text-decoration: underline; }

.crm_cal_tooltip {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 6px 24px rgba(0,0,0,.18);
    font-size: 13px;
    min-width: 200px;
    max-width: 300px;
    pointer-events: auto;
}
.crm_cal_tip_type  { margin-bottom: 6px; display: inline-flex; }
.crm_cal_tip_title { font-weight: 600; color: #262e31; margin-bottom: 4px; white-space: normal; line-height: 1.4; }
.crm_cal_tip_user  { font-size: 12px; color: #6c757d; }
.crm_cal_legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

/* ── 26. NOTIFICAÇÕES ───────────────────────────────────────────── */

.crm_notif_list     { display: flex; flex-direction: column; gap: 8px; max-width: 720px; }
.crm_notif_item     { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; background: #fff; border-radius: 8px; border: 1px solid #e1e1e1; transition: background .15s; }
.crm_notif_unread   { background: #fff4eb; border-color: #fcd3a5; }
.crm_notif_icon     { font-size: 22px; flex-shrink: 0; padding-top: 2px; }
.crm_notif_body     { flex: 1; min-width: 0; }
.crm_notif_msg      { margin: 0 0 4px; font-size: 14px; color: #333; }
.crm_notif_unread .crm_notif_msg { font-weight: 700; color: #262e31; font-family: 'Lato-Bold', Tahoma, sans-serif; }
.crm_notif_time     { font-size: 12px; color: #888; }
.crm_notif_actions  { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* ── 26. PERMISSÕES ─────────────────────────────────────────────── */

.crm_permissions_layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
@media (max-width: 700px) { .crm_permissions_layout { grid-template-columns: 1fr; } }
.crm_user_list { list-style: none; margin: 0; padding: 0; }
.crm_user_list li { margin-bottom: 4px; }
.crm_user_list a {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none !important;
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    color: #333 !important;
    transition: background .15s, border-color .15s;
}
.crm_user_list a:hover { background: #fff4eb; border-color: #f7881f; }
.crm_user_list a.active { background: #465157; border-color: #465157; }
.crm_user_list a.active .crm_user_name,
.crm_user_list a.active .crm_user_type { color: #fff; }
.crm_user_name { font-size: 13px; font-weight: 700; color: #2c3e50; }
.crm_user_type { font-size: 11px; color: #7d7d7d; margin-top: 2px; }
.crm_perm_table td:last-child { text-align: center; }

/* ── 27. CONFIG LAYOUT ──────────────────────────────────────────── */

.crm_config_cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; }

/* ── 28. MENSAGENS / ESTADOS VAZIOS ─────────────────────────────── */

.crm_empty { color: #adb5bd; font-style: italic; padding: 16px 0; font-size: 13px; text-align: center; }

.msg, .crm_msg { padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; font-size: 13px; }
.msg.ok,    .crm_msg.ok    { background: #d1e7dd; border: 1px solid #c3e6cb; color: #0a3622; }
.msg.error, .crm_msg.error { background: #f8d7da; border: 1px solid #f5c6cb; color: #58151c; }

/* ── 29. UTILITÁRIOS / MISCELÂNEA ───────────────────────────────── */

.crm_multiselect    { display: flex; flex-wrap: wrap; gap: 8px; }
.crm_checkbox_label { display: flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; color: #333; }
.crm_checkbox_label input[type=checkbox] { width: auto; height: auto; }

.crm_add_form {
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 14px;
}
.crm_inline_form .form_row_inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }

.crm_overdue { color: #dc3545 !important; font-weight: 700; }
.crm_sortable_row { cursor: ns-resize; }
.crm_drag_handle  { color: #ccc; font-size: 16px; cursor: grab; }

/* ── 30. SIMPLE LIST (dashboard recent leads etc) ───────────────── */

.crm_simple_list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    color: #333;
}
.crm_simple_list li:last-child { border-bottom: none; }
.crm_simple_list a { color: #465157 !important; font-weight: 600; }
.crm_simple_list a:hover { color: #f7881f !important; }
.crm_simple_list small { font-size: 11px; color: #888; }

/* ── 31. LARGURA SUBCONTAINER (override inline style.css) ───────── */

/* já injectado por crm_render() via inline style */

/* ── 32. RGPD ────────────────────────────────────────────────────── */

.crm_rgpd_section { padding: 20px; }
.crm_rgpd_actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e1e1e1;
    margin-bottom: 4px;
}

/* ── 27. PICKER DE PRODUTOS (proposals + projects) ──────────────────── */
.pp_mode_btn       { padding:10px 18px; font-size:13px; background:none; border:none; border-bottom:3px solid transparent; margin-bottom:-1px; color:#666; cursor:pointer; }
.pp_mode_active    { color:#3498db; border-bottom-color:#3498db; font-weight:600; }
.pp_col_panel      { overflow-y:auto; }
.pp_col_panel:first-child { width:230px; min-width:200px; border-right:1px solid #e8e8e8; max-height:480px; }
.pp_col_main       { flex:1; max-height:480px; overflow-y:auto; }
.pp_col_item       { display:flex; align-items:center; gap:8px; padding:9px 14px; cursor:pointer; font-size:13px; color:#333; border-left:3px solid transparent; transition:background .1s; }
.pp_col_item:hover { background:#f5f8ff; }
.pp_col_active     { background:#ebf3fb; border-left-color:#3498db; color:#2980b9; font-weight:600; }
.pp_col_sub        { padding-left:26px; font-size:12px; color:#555; }
.pp_col_img        { width:32px; height:32px; object-fit:cover; border-radius:4px; flex-shrink:0; }
.pp_col_img_ph     { display:flex; align-items:center; justify-content:center; background:#f0f0f0; font-size:16px; }
.pp_grid           { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:12px; }
.pp_card           { border:1px solid #e0e0e0; border-radius:8px; overflow:hidden; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.06); transition:box-shadow .15s; cursor:default; }
.pp_card:hover     { box-shadow:0 3px 10px rgba(0,0,0,.12); }
.pp_card_body      { padding:9px 11px 11px; }
.pp_card_title     { font-size:12px; font-weight:600; color:#333; line-height:1.3; margin-bottom:3px; max-height:32px; overflow:hidden; }
.pp_card_price     { font-size:13px; color:#e67e22; font-weight:700; margin-bottom:5px; }
.pp_card_add_row   { display:flex; gap:5px; align-items:center; margin-top:6px; }
