/* ==========================================================================
   RCSoft CRM - Modulo Marketing (Blazor)
   Base visual portada da demo (demo/marketing/demo.css).
   Removido o chrome da demo (sidebar/header/toasts).
   ========================================================================== */

/* ==========================================================================
   RCSoft CRM · Módulo Marketing — estilos da demonstração
   Assenta na identidade visual real do CRM (app.css / bootstrap.theme.css).
   ========================================================================== */

.min-w-0 { min-width: 0; }

:root {
   --demo-radius: 14px;
   --demo-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -18px rgba(15, 23, 42, .28);
   --demo-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
   --demo-line: var(--bs-border-color);
   --demo-muted: var(--bs-secondary-color);
   --demo-slate: var(--bs-body-color);
}


/* ---------- Cabeçalho de página ------------------------------------------ */

.page-head {
   display: flex;
   align-items: center;
   gap: 1rem;
   flex-wrap: wrap;
   margin-bottom: 1.25rem;
}


.page-head-icon {
   width: 46px;
   height: 46px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   background: var(--bs-primary-bg-subtle);
   color: var(--app-accent);
   font-size: 1.25rem;
   flex: none;
}


.page-head h4 {
   margin: 0;
   font-size: 1.3rem;
   font-weight: 600;
   letter-spacing: -.01em;
}


.page-head .breadcrumb {
   margin: .1rem 0 0;
   font-size: .74rem;
}


.page-head .breadcrumb a { text-decoration: none; }

.page-head .breadcrumb-item + .breadcrumb-item::before { color: var(--demo-muted); }


.page-head .page-actions {
   display: flex;
   align-items: center;
   gap: .5rem;
   flex-wrap: wrap;
}


/* ---------- Cartões ------------------------------------------------------ */

.crm-card {
   background: var(--bs-body-bg);
   border: 1px solid var(--demo-line);
   border-radius: var(--demo-radius);
   box-shadow: var(--demo-shadow-sm);
   height: 100%;
}


.crm-card-head {
   display: flex;
   align-items: flex-start;
   justify-content: space-between;
   gap: 1rem;
   padding: 1rem 1.15rem .65rem;
   flex-wrap: wrap;
}


.crm-card-head h6 {
   margin: 0;
   font-size: .95rem;
   font-weight: 600;
}


.crm-card-sub {
   margin-top: .15rem;
   color: var(--demo-muted);
   font-size: .76rem;
}


.crm-card-body { padding: .65rem 1.15rem 1.15rem; }

.crm-card-body.tight { padding: 0; }

.crm-card-body.pad { padding: 1.15rem; }


/* ---------- KPI ---------------------------------------------------------- */

.kpi-card {
   background: var(--bs-body-bg);
   border: 1px solid var(--demo-line);
   border-radius: var(--demo-radius);
   box-shadow: var(--demo-shadow-sm);
   padding: 1rem 1.05rem;
   height: 100%;
   position: relative;
   overflow: hidden;
}


.kpi-card::after {
   content: "";
   position: absolute;
   inset: auto -30px -40px auto;
   width: 110px;
   height: 110px;
   border-radius: 50%;
   background: var(--kpi-tint, rgba(76, 136, 201, .07));
}


.kpi-top {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: .5rem;
   margin-bottom: .65rem;
}


.kpi-icon {
   width: 38px;
   height: 38px;
   border-radius: 11px;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 1.05rem;
}


.kpi-blue { background: #eaf2fb; color: #2f6fae; }

.kpi-green { background: #e7f8f0; color: #1a9d63; }

.kpi-orange { background: #fff3e6; color: #c96a12; }

.kpi-violet { background: #f0ecfc; color: #6d4bc4; }

.kpi-pink { background: #ffedf3; color: #cb3f6d; }


.kpi-trend {
   display: inline-flex;
   align-items: center;
   gap: .15rem;
   font-size: .7rem;
   font-weight: 700;
   padding: .2rem .45rem;
   border-radius: 999px;
   background: var(--bs-success-bg-subtle);
   color: var(--bs-success-text-emphasis);
}


.kpi-trend.down {
   background: var(--bs-danger-bg-subtle);
   color: var(--bs-danger-text-emphasis);
}


.kpi-trend.flat {
   background: var(--bs-tertiary-bg);
   color: var(--demo-muted);
}


.kpi-value {
   font-size: 1.6rem;
   font-weight: 700;
   letter-spacing: -.02em;
   line-height: 1.1;
}


.kpi-label {
   margin-top: .15rem;
   color: var(--demo-muted);
   font-size: .78rem;
}


.kpi-foot {
   margin-top: .45rem;
   font-size: .68rem;
   color: var(--bs-secondary-color);
}


/* ---------- Chips / pílulas --------------------------------------------- */

.chip-row {
   display: flex;
   gap: .4rem;
   flex-wrap: wrap;
}


.chip {
   display: inline-flex;
   align-items: center;
   gap: .35rem;
   padding: .38rem .7rem;
   border: 1px solid var(--demo-line);
   border-radius: 999px;
   background: var(--bs-body-bg);
   color: var(--bs-secondary-color);
   font-size: .77rem;
   font-weight: 500;
   line-height: 1;
   transition: all .15s ease;
   white-space: nowrap;
}


.chip:hover { border-color: var(--bs-border-color); background: var(--bs-tertiary-bg); }


.chip.active {
   background: var(--app-primary);
   border-color: var(--app-primary);
   color: #fff;
}


.chip .chip-count {
   font-size: .66rem;
   opacity: .7;
}


.filter-bar {
   display: flex;
   align-items: center;
   gap: .5rem;
   flex-wrap: wrap;
   margin-bottom: 1rem;
}


.filter-bar .input-group { max-width: 300px; }


.pill {
   display: inline-flex;
   align-items: center;
   gap: .3rem;
   padding: .28rem .55rem;
   border-radius: 999px;
   font-size: .7rem;
   font-weight: 600;
   line-height: 1;
   white-space: nowrap;
}


.pill i { font-size: .7rem; }

.pill-green { background: #e7f8f0; color: #127a4c; }

.pill-blue { background: #eaf2fb; color: #2b6399; }

.pill-orange { background: #fff3e6; color: #a85a0c; }

.pill-gray { background: #eef1f5; color: var(--bs-secondary-color); }

.pill-red { background: #ffedf1; color: #b62d55; }

.pill-violet { background: #f1edfc; color: #5b3fb0; }


/* ---------- Tabelas ------------------------------------------------------ */

.table-crm {
   font-size: .84rem;
   margin: 0;
}


.table-crm thead th {
   padding: .55rem 1rem;
   border-bottom: 1px solid var(--demo-line);
   background: var(--bs-tertiary-bg);
   color: var(--bs-secondary-color);
   font-size: .66rem;
   font-weight: 700;
   letter-spacing: .05em;
   text-transform: uppercase;
   white-space: nowrap;
}


.table-crm tbody td {
   padding: .7rem 1rem;
   border-bottom: 1px solid var(--bs-border-color);
   vertical-align: middle;
}


.table-crm tbody tr:last-child td { border-bottom: 0; }

.table-crm tbody tr { cursor: default; }

.table-crm tbody tr.clickable { cursor: pointer; }

.table-crm tbody tr.clickable:hover { background: var(--bs-tertiary-bg); }


.cell-title {
   font-weight: 600;
   color: var(--bs-emphasis-color);
   line-height: 1.25;
}


.cell-sub {
   color: var(--demo-muted);
   font-size: .72rem;
   margin-top: .1rem;
}


.cell-strong { font-weight: 600; font-variant-numeric: tabular-nums; }

.cell-muted { color: var(--demo-muted); }

.num { font-variant-numeric: tabular-nums; }


.table-avatar {
   width: 32px;
   height: 32px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   background: var(--bs-tertiary-bg);
   color: var(--bs-body-color);
   font-size: .68rem;
   font-weight: 700;
   flex: none;
}


.mini-bar {
   width: 88px;
   height: 6px;
   border-radius: 999px;
   background: var(--bs-tertiary-bg);
   overflow: hidden;
}


.mini-bar > span {
   display: block;
   height: 100%;
   border-radius: 999px;
   background: var(--app-accent);
}


/* ---------- Gráficos ----------------------------------------------------- */

.chart-wrap {
   position: relative;
   width: 100%;
}


.chart-wrap svg { width: 100%; height: auto; display: block; }


.chart-legend {
   display: flex;
   gap: 1rem;
   flex-wrap: wrap;
   font-size: .74rem;
   color: var(--demo-muted);
}


.chart-legend .lg-item { display: inline-flex; align-items: center; gap: .35rem; }

.chart-legend .lg-dot { width: 8px; height: 8px; border-radius: 50%; }


.donut-wrap {
   display: flex;
   align-items: center;
   gap: 1.1rem;
   flex-wrap: wrap;
   justify-content: center;
}


.donut {
   position: relative;
   width: 148px;
   height: 148px;
   border-radius: 50%;
   flex: none;
}


.donut-hole {
   position: absolute;
   inset: 20px;
   border-radius: 50%;
   background: var(--bs-body-bg);
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   text-align: center;
}


.donut-hole strong { font-size: 1.15rem; line-height: 1; }

.donut-hole span { font-size: .64rem; color: var(--demo-muted); margin-top: .2rem; }


.donut-legend {
   display: flex;
   flex-direction: column;
   gap: .45rem;
   font-size: .76rem;
   min-width: 130px;
}


.donut-legend .dl-item {
   display: flex;
   align-items: center;
   gap: .45rem;
   justify-content: space-between;
}


.donut-legend .dl-name { display: inline-flex; align-items: center; gap: .4rem; color: var(--bs-secondary-color); }

.donut-legend .dl-dot { width: 8px; height: 8px; border-radius: 50%; }

.donut-legend strong { font-variant-numeric: tabular-nums; }


/* ---------- Funil -------------------------------------------------------- */

.funnel { display: flex; flex-direction: column; gap: .75rem; }


.funnel-step .funnel-meta {
   display: flex;
   justify-content: space-between;
   align-items: baseline;
   font-size: .76rem;
   margin-bottom: .25rem;
}


.funnel-step .funnel-meta span { color: var(--demo-muted); }

.funnel-step .funnel-meta strong { font-variant-numeric: tabular-nums; }

.funnel-step .funnel-meta em {
   font-style: normal;
   color: var(--bs-secondary-color);
   font-size: .68rem;
   margin-left: .35rem;
}


.funnel-track {
   height: 10px;
   background: var(--bs-tertiary-bg);
   border-radius: 999px;
   overflow: hidden;
}


.funnel-bar {
   height: 100%;
   border-radius: 999px;
   background: linear-gradient(90deg, #4c88c9, #6fa7dd);
}


.funnel-step:nth-child(2) .funnel-bar { background: linear-gradient(90deg, #3d7dc1, #5f9bd6); }

.funnel-step:nth-child(3) .funnel-bar { background: linear-gradient(90deg, #2f9e7a, #45bf95); }

.funnel-step:nth-child(4) .funnel-bar { background: linear-gradient(90deg, #c9821a, #e8a745); }

.funnel-step:nth-child(5) .funnel-bar { background: linear-gradient(90deg, #7a5bbf, #9a7fd8); }


/* ---------- Stepper do wizard ------------------------------------------- */

.stepper {
   display: flex;
   align-items: center;
   gap: .35rem;
   padding: 1rem 1.15rem;
   background: var(--bs-body-bg);
   border: 1px solid var(--demo-line);
   border-radius: var(--demo-radius);
   box-shadow: var(--demo-shadow-sm);
   margin-bottom: 1.25rem;
   overflow-x: auto;
}


.step {
   display: flex;
   align-items: center;
   gap: .55rem;
   border: 0;
   background: transparent;
   padding: .2rem .3rem;
   border-radius: 10px;
   text-align: left;
   flex: none;
   min-width: 0;
}


.step:not(.disabled):hover { background: var(--bs-tertiary-bg); }


.step-dot {
   width: 30px;
   height: 30px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   background: var(--bs-tertiary-bg);
   color: var(--bs-secondary-color);
   font-size: .78rem;
   font-weight: 700;
   flex: none;
}


.step.active .step-dot { background: var(--app-primary); color: #fff; box-shadow: 0 0 0 4px rgba(51, 65, 85, .12); }

.step.done .step-dot { background: var(--bs-success); color: #fff; }


.step-label { font-size: .8rem; font-weight: 600; color: var(--bs-body-color); line-height: 1.15; white-space: nowrap; }

.step-sub { font-size: .66rem; color: var(--demo-muted); white-space: nowrap; }

.step.disabled { opacity: .55; }


.step-line {
   flex: 1 1 24px;
   height: 2px;
   min-width: 18px;
   border-radius: 999px;
   background: var(--bs-tertiary-bg);
}


.step-line.done { background: color-mix(in srgb, var(--bs-success) 45%, var(--bs-body-bg)); }


/* ---------- Wizard: opções ---------------------------------------------- */

.option-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
   gap: .7rem;
}


.option-card {
   position: relative;
   display: block;
   width: 100%;
   text-align: left;
   border: 1px solid var(--demo-line);
   border-radius: 12px;
   background: var(--bs-body-bg);
   padding: .85rem .95rem;
   cursor: pointer;
   transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}


.option-card:hover { border-color: var(--bs-border-color); background: var(--bs-tertiary-bg); }


.option-card:disabled, .option-card.disabled {
   opacity: .55;
   cursor: not-allowed;
}


.option-card.selected {
   border-color: var(--app-accent);
   background: color-mix(in srgb, var(--app-accent) 7%, var(--bs-body-bg));
   box-shadow: 0 0 0 3px rgba(76, 136, 201, .14);
}


.option-card .oc-check {
   position: absolute;
   top: .7rem;
   right: .7rem;
   width: 19px;
   height: 19px;
   border-radius: 50%;
   border: 1.5px solid var(--bs-border-color);
   background: var(--bs-body-bg);
   display: flex;
   align-items: center;
   justify-content: center;
   color: transparent;
   font-size: .62rem;
}


.option-card.selected .oc-check {
   background: var(--app-accent);
   border-color: var(--app-accent);
   color: #fff;
}


.option-card h6 {
   margin: 0 0 .2rem;
   font-size: .86rem;
   font-weight: 600;
   padding-right: 1.5rem;
}


.option-card p {
   margin: 0;
   font-size: .73rem;
   color: var(--demo-muted);
   line-height: 1.4;
}


.option-card .oc-meta {
   display: flex;
   align-items: center;
   gap: .5rem;
   margin-top: .55rem;
   font-size: .71rem;
   color: var(--bs-secondary-color);
   flex-wrap: wrap;
}


.mk-page .form-label {
   font-size: .76rem;
   font-weight: 600;
   color: var(--bs-body-color);
   margin-bottom: .3rem;
}


.mk-page .form-text { font-size: .71rem; }


.mk-page .form-control, .mk-page .form-select { font-size: .84rem; }

.mk-page .form-control::placeholder { color: var(--bs-tertiary-color); }


.input-hint {
   display: flex;
   align-items: flex-start;
   gap: .45rem;
   padding: .6rem .75rem;
   border-radius: 10px;
   background: var(--bs-primary-bg-subtle);
   border: 1px solid var(--bs-primary-border-subtle);
   color: var(--bs-primary);
   font-size: .75rem;
}


.metric-inline {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: .6rem .75rem;
   border: 1px dashed var(--bs-border-color);
   border-radius: 10px;
   background: var(--bs-tertiary-bg);
   font-size: .76rem;
}


.metric-inline strong { font-size: .95rem; }


/* ---------- Pré-visualização de email ----------------------------------- */

.mail-frame {
   border: 1px solid var(--demo-line);
   border-radius: 12px;
   overflow: hidden;
   background: var(--bs-body-bg);
   box-shadow: var(--demo-shadow-sm);
}


.mail-toolbar {
   display: flex;
   align-items: center;
   gap: .3rem;
   padding: .45rem .7rem;
   background: var(--bs-tertiary-bg);
   border-bottom: 1px solid var(--demo-line);
   color: var(--bs-secondary-color);
   font-size: .68rem;
}


.mail-toolbar .dot { width: 8px; height: 8px; border-radius: 50%; background: #d7dee8; }

.mail-toolbar .dot.red { background: #f3a5a5; }

.mail-toolbar .dot.yellow { background: #f4d38a; }

.mail-toolbar .dot.green { background: #a3d9bd; }

.mail-toolbar .mt-label { margin-left: auto; display: inline-flex; align-items: center; gap: .3rem; }


.mail-head {
   display: flex;
   align-items: center;
   gap: .55rem;
   padding: .7rem .85rem;
   border-bottom: 1px solid var(--bs-border-color);
}


.mail-avatar {
   width: 30px;
   height: 30px;
   border-radius: 50%;
   background: var(--app-primary);
   color: #fff;
   font-size: .7rem;
   font-weight: 700;
   display: flex;
   align-items: center;
   justify-content: center;
   flex: none;
}


.mail-head strong { font-size: .78rem; display: block; line-height: 1.2; }

.mail-head span { font-size: .68rem; color: var(--demo-muted); }


.mail-subject {
   padding: .6rem .85rem;
   font-size: .8rem;
   font-weight: 600;
   background: var(--bs-tertiary-bg);
   border-bottom: 1px solid var(--bs-border-color);
}


.mail-body {
   padding: 1rem .95rem;
   font-size: .78rem;
   line-height: 1.55;
   color: var(--bs-body-color);
   min-height: 210px;
}


.mail-body .mail-hero {
   height: 74px;
   border-radius: 8px;
   margin-bottom: .7rem;
   background: linear-gradient(120deg, #334155, #4c88c9 65%, #7fb2e5);
   position: relative;
   overflow: hidden;
   color: #fff;
   display: flex;
   align-items: center;
   padding: 0 .85rem;
   font-weight: 700;
   letter-spacing: .06em;
   font-size: .72rem;
   text-transform: uppercase;
}


.mail-body .mail-hero::after {
   content: "";
   position: absolute;
   right: -20px;
   top: -30px;
   width: 120px;
   height: 120px;
   border-radius: 50%;
   background: rgba(255, 255, 255, .12);
}


.mail-body p { margin: 0 0 .55rem; }

.mail-body .mail-btn {
   display: inline-block;
   padding: .45rem .9rem;
   border-radius: 6px;
   background: var(--app-accent);
   color: #fff;
   font-size: .73rem;
   font-weight: 600;
   text-decoration: none;
}


.mail-footer {
   padding: .65rem .85rem;
   border-top: 1px solid var(--bs-border-color);
   background: var(--bs-tertiary-bg);
   font-size: .62rem;
   color: var(--bs-secondary-color);
   text-align: center;
   line-height: 1.5;
}


/* ---------- Timeline ----------------------------------------------------- */

.timeline {
   list-style: none;
   margin: 0;
   padding: .25rem 0 .25rem .25rem;
   position: relative;
}


.timeline::before {
   content: "";
   position: absolute;
   left: 9px;
   top: .9rem;
   bottom: .9rem;
   width: 2px;
   background: var(--bs-tertiary-bg);
   border-radius: 999px;
}


.timeline-item {
   position: relative;
   padding: 0 0 1rem 2rem;
}


.timeline-item:last-child { padding-bottom: 0; }


.timeline-dot {
   position: absolute;
   left: 0;
   top: .15rem;
   width: 20px;
   height: 20px;
   border-radius: 50%;
   background: var(--bs-body-bg);
   border: 2px solid var(--bs-border-color);
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: .56rem;
   color: var(--bs-secondary-color);
   z-index: 1;
}


.timeline-dot.dot-blue { border-color: #9dc2e4; background: #eef6fd; color: #2f6fae; }

.timeline-dot.dot-green { border-color: #a6e0c6; background: #f0fbf6; color: #168a58; }

.timeline-dot.dot-orange { border-color: #f0cf9c; background: #fff8ee; color: #b06a13; }

.timeline-dot.dot-violet { border-color: #cabcf0; background: #f6f2ff; color: #6545b8; }


.timeline-title { font-size: .8rem; font-weight: 600; line-height: 1.25; }

.timeline-meta { font-size: .69rem; color: var(--demo-muted); margin-top: .1rem; }

.timeline-text { font-size: .74rem; color: var(--bs-secondary-color); margin-top: .2rem; }


/* ---------- Segmentos / modelos ----------------------------------------- */

.segment-card {
   height: 100%;
   display: flex;
   flex-direction: column;
   padding: 1.05rem;
   border: 1px solid var(--demo-line);
   border-radius: var(--demo-radius);
   background: var(--bs-body-bg);
   box-shadow: var(--demo-shadow-sm);
   transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}


.segment-card:hover {
   border-color: var(--bs-border-color);
   box-shadow: var(--demo-shadow);
   transform: translateY(-1px);
}


.segment-icon {
   width: 40px;
   height: 40px;
   border-radius: 11px;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 1.05rem;
   flex: none;
}


.segment-card h6 { margin: .7rem 0 .15rem; font-size: .92rem; font-weight: 600; }

.segment-card p { margin: 0; font-size: .75rem; color: var(--demo-muted); line-height: 1.45; }


.segment-meta {
   display: flex;
   gap: 1rem;
   margin-top: .8rem;
   padding-top: .7rem;
   border-top: 1px dashed var(--bs-border-color);
   font-size: .7rem;
   color: var(--demo-muted);
}


.segment-meta strong { display: block; font-size: .95rem; color: var(--bs-emphasis-color); }


.template-card {
   height: 100%;
   border: 1px solid var(--demo-line);
   border-radius: var(--demo-radius);
   background: var(--bs-body-bg);
   box-shadow: var(--demo-shadow-sm);
   overflow: hidden;
   display: flex;
   flex-direction: column;
   transition: box-shadow .15s ease, transform .15s ease;
}


.template-card:hover { box-shadow: var(--demo-shadow); transform: translateY(-1px); }


.template-thumb {
   height: 108px;
   padding: .65rem .75rem;
   background: var(--bs-tertiary-bg);
   border-bottom: 1px solid var(--demo-line);
   overflow: hidden;
   position: relative;
}


.template-thumb .tt-bar {
   height: 9px;
   border-radius: 3px;
   background: var(--bs-secondary-bg);
   margin-bottom: 5px;
}


.template-thumb .tt-bar.w60 { width: 60%; }

.template-thumb .tt-bar.w80 { width: 80%; }

.template-thumb .tt-bar.w40 { width: 40%; }

.template-thumb .tt-hero {
   height: 34px;
   border-radius: 5px;
   margin-bottom: 6px;
   background: linear-gradient(120deg, #334155, #4c88c9);
}


.template-card .tc-body { padding: .8rem .9rem 1rem; display: flex; flex-direction: column; flex: 1 1 auto; }

.template-card h6 { margin: 0 0 .2rem; font-size: .86rem; font-weight: 600; }

.template-card p { margin: 0; font-size: .72rem; color: var(--demo-muted); line-height: 1.4; }


.tc-foot {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: .5rem;
   margin-top: .75rem;
   padding-top: .6rem;
   border-top: 1px solid var(--bs-border-color);
   font-size: .68rem;
   color: var(--demo-muted);
}


/* ---------- Modal -------------------------------------------------------- */

.crm-modal .modal-content {
   border: 0;
   border-radius: 16px;
   overflow: hidden;
   box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .4);
}


.crm-modal .modal-header {
   padding: 1rem 1.25rem;
   border-bottom: 1px solid var(--demo-line);
   align-items: flex-start;
}


.crm-modal .modal-title { font-size: 1rem; font-weight: 600; }

.crm-modal .modal-sub { font-size: .74rem; color: var(--demo-muted); margin-top: .1rem; }

.crm-modal .modal-body { padding: 1.15rem 1.25rem; }

.crm-modal .modal-footer { padding: .8rem 1.25rem; border-top: 1px solid var(--demo-line); gap: .4rem; }


.audit-line {
   display: flex;
   gap: .6rem;
   padding: .55rem 0;
   border-bottom: 1px dashed var(--bs-border-color);
   font-size: .74rem;
}


.audit-line:last-child { border-bottom: 0; }

.audit-line .audit-when { color: var(--bs-secondary-color); white-space: nowrap; min-width: 92px; font-size: .69rem; }

.audit-line .audit-who { font-weight: 600; color: var(--bs-body-color); }

.audit-line .audit-what { color: var(--bs-secondary-color); }


/* ---------- Diversos ----------------------------------------------------- */

.empty-state {
   text-align: center;
   padding: 2.5rem 1rem;
   color: var(--demo-muted);
}


.empty-state .es-icon {
   width: 54px;
   height: 54px;
   border-radius: 50%;
   background: var(--bs-tertiary-bg);
   color: var(--bs-secondary-color);
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 1.35rem;
   margin: 0 auto .75rem;
}


.divider-soft {
   height: 1px;
   background: linear-gradient(90deg, transparent, var(--bs-border-color), transparent);
   margin: 1rem 0;
}


.note-soft {
   padding: .65rem .8rem;
   border-radius: 10px;
   background: var(--bs-tertiary-bg);
   border: 1px solid var(--bs-border-color);
   color: var(--bs-secondary-color);
   font-size: .74rem;
   line-height: 1.45;
}


.avatar-stack { display: flex; align-items: center; }

.avatar-stack .table-avatar { margin-left: -8px; border: 2px solid var(--bs-body-bg); }

.avatar-stack .table-avatar:first-child { margin-left: 0; }


.progress-thin {
   height: 6px;
   border-radius: 999px;
   background: var(--bs-tertiary-bg);
}


.progress-thin .progress-bar { border-radius: 999px; }


.link-quiet {
   color: var(--bs-secondary-color);
   text-decoration: none;
   font-size: .76rem;
   font-weight: 500;
}


.link-quiet:hover { color: var(--app-accent); text-decoration: underline; }


.btn-soft {
   background: var(--bs-tertiary-bg);
   border: 1px solid var(--bs-border-color);
   color: var(--bs-body-color);
}


.btn-soft:hover { background: var(--bs-secondary-bg); color: var(--bs-emphasis-color); }


.icon-btn {
   width: 31px;
   height: 31px;
   padding: 0;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   border-radius: 4px;
   border: 1px solid var(--bs-border-color);
   background: var(--bs-body-bg);
   color: var(--bs-body-color);
   font-size: .875rem;
   line-height: 1;
   transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.icon-btn:hover:not(:disabled) { background: var(--bs-tertiary-bg); color: var(--bs-emphasis-color); border-color: var(--bs-border-color); }

.icon-btn:focus-visible { outline: 2px solid var(--app-accent); outline-offset: 2px; }

.icon-btn:disabled { opacity: .5; cursor: not-allowed; }

.icon-btn.text-danger { color: var(--bs-danger-text-emphasis); }

.icon-btn.text-danger:hover:not(:disabled) { background: #ffedf1; border-color: #f4c3d2; color: #8f1f42; }


.tab-strip {
   display: flex;
   gap: .25rem;
   border-bottom: 1px solid var(--demo-line);
   margin-bottom: 1.1rem;
   overflow-x: auto;
}


.tab-strip .tab-item {
   border: 0;
   background: transparent;
   padding: .55rem .8rem;
   font-size: .8rem;
   font-weight: 500;
   color: var(--bs-secondary-color);
   border-bottom: 2px solid transparent;
   white-space: nowrap;
}


.tab-strip .tab-item:hover { color: var(--app-primary); }


.tab-strip .tab-item.active {
   color: var(--app-primary);
   border-bottom-color: var(--app-accent);
   font-weight: 600;
}


.tab-strip .tab-item .badge { font-size: .6rem; }


/* ---------- Tipografia: alinhamento com o resto do CRM ------------------- */
/* O módulo nasceu da demo visual, com uma escala 15-25% abaixo do CRM.
   Aqui os textos de apoio passam a usar a mesma escala do resto da aplicação
   (corpo a 1rem, subtítulos a .875rem, metadados a .75-.8rem). */

.page-head .breadcrumb { font-size: .875rem; }

/* Título de página: igual ao H5 do resto do CRM (20px / 500). */
.page-head h4 { font-size: 1.25rem; font-weight: 500; }

/* Título de cartão: igual ao .card-title do resto do CRM (16px). */
.crm-card-head h6 { font-size: 1rem; }

.crm-card-sub { font-size: .875rem; }

.kpi-value { font-size: 1.8rem; }

.kpi-label { font-size: .9rem; }

.kpi-foot { font-size: .8rem; }

.kpi-trend { font-size: .8rem; }

.pill,
.pill i { font-size: .75rem; }

.chip { font-size: .875rem; }

.chip .chip-count { font-size: .75rem; }

.table-crm { font-size: 1rem; }

.table-crm thead th { font-size: .75rem; }

.table-crm tbody td { padding: .75rem 1rem; }

.cell-sub { font-size: .875rem; }

.table-avatar { font-size: .75rem; }

.chart-legend { font-size: .875rem; }

.donut-hole span { font-size: .75rem; }

.donut-legend { font-size: .875rem; }

.funnel-step .funnel-meta { font-size: .875rem; }

.funnel-step .funnel-meta em { font-size: .8rem; }

.step-dot { font-size: .875rem; }

.step-label { font-size: .875rem; }

.step-sub { font-size: .75rem; }

.option-card h6 { font-size: 1rem; }

.option-card p { font-size: .875rem; }

.option-card .oc-meta { font-size: .8rem; }

.mk-page .form-label { font-size: .875rem; }

.mk-page .form-text { font-size: .8125rem; }

.mk-page .form-control,
.mk-page .form-select { font-size: .95rem; font-weight: 500; }

.input-hint { font-size: .875rem; }

.metric-inline { font-size: .875rem; }

.metric-inline strong { font-size: 1.05rem; }

.mail-toolbar { font-size: .75rem; }

.mail-avatar { font-size: .8rem; }

.mail-head strong { font-size: .875rem; }

.mail-head span { font-size: .75rem; }

.mail-subject { font-size: .9rem; }

.mail-body { font-size: .875rem; }

.mail-body .mail-hero { font-size: .8rem; }

.mail-body .mail-btn { font-size: .8rem; }

.mail-footer { font-size: .7rem; }

.timeline-dot { font-size: .65rem; }

.timeline-title { font-size: .9rem; }

.timeline-meta { font-size: .8rem; }

.timeline-text { font-size: .875rem; }

.segment-card h6 { font-size: 1.05rem; }

.segment-card p { font-size: .875rem; }

.segment-meta { font-size: .8rem; }

.segment-meta strong { font-size: 1.05rem; }

.template-card h6 { font-size: 1rem; }

.template-card p { font-size: .875rem; }

.tc-foot { font-size: .8rem; }

.crm-modal .modal-sub { font-size: .875rem; }

.audit-line { font-size: .875rem; }

.audit-line .audit-when { font-size: .8rem; }

.note-soft { font-size: .875rem; }

.tab-strip .tab-item { font-size: .875rem; }

.tab-strip .tab-item .badge { font-size: .7rem; }

.link-quiet { font-size: .875rem; }


/* ---------- Responsivo --------------------------------------------------- */

@media (max-width: 1199.98px) {
   .kpi-value { font-size: 1.42rem; }
}



@media (max-width: 767.98px) {
   .page-head h4 { font-size: 1.15rem; }
   .page-head-icon { width: 40px; height: 40px; font-size: 1.05rem; }
   .step-sub { display: none; }
   .stepper { padding: .8rem .7rem; }
   .donut-wrap { justify-content: flex-start; }
}


@media (max-width: 575.98px) {
   .filter-bar > * { flex: 1 1 auto; }
   .filter-bar .input-group { max-width: none; width: 100%; }
   .crm-card-head { padding: .9rem .95rem .55rem; }
   .crm-card-body { padding: .55rem .95rem .95rem; }
   .crm-card-body.tight { padding: 0; }
   .table-crm thead th, .table-crm tbody td { padding-left: .75rem; padding-right: .75rem; }
}

/* ==========================================================================
   Modo escuro — superfícies pastel (KPI, pills, timeline, ações)
   Mantêm a identidade da cor, mas sobre a superfície escura.
   ========================================================================== */

[data-bs-theme="dark"] .kpi-blue,
[data-bs-theme="dark"] .pill-blue {
   background: color-mix(in srgb, #2f6fae 22%, var(--bs-body-bg));
   color: color-mix(in srgb, #2f6fae 45%, white);
}

[data-bs-theme="dark"] .kpi-green,
[data-bs-theme="dark"] .pill-green {
   background: color-mix(in srgb, #1a9d63 22%, var(--bs-body-bg));
   color: color-mix(in srgb, #1a9d63 45%, white);
}

[data-bs-theme="dark"] .kpi-orange,
[data-bs-theme="dark"] .pill-orange {
   background: color-mix(in srgb, #c96a12 22%, var(--bs-body-bg));
   color: color-mix(in srgb, #c96a12 45%, white);
}

[data-bs-theme="dark"] .kpi-violet,
[data-bs-theme="dark"] .pill-violet {
   background: color-mix(in srgb, #6d4bc4 22%, var(--bs-body-bg));
   color: color-mix(in srgb, #6d4bc4 45%, white);
}

[data-bs-theme="dark"] .kpi-pink,
[data-bs-theme="dark"] .pill-red {
   background: color-mix(in srgb, #cb3f6d 22%, var(--bs-body-bg));
   color: color-mix(in srgb, #cb3f6d 45%, white);
}

[data-bs-theme="dark"] .pill-gray {
   background: var(--bs-secondary-bg);
   color: var(--bs-secondary-color);
}

[data-bs-theme="dark"] .timeline-dot.dot-blue {
   background: color-mix(in srgb, #2f6fae 22%, var(--bs-body-bg));
   border-color: color-mix(in srgb, #2f6fae 45%, var(--bs-body-bg));
   color: color-mix(in srgb, #2f6fae 45%, white);
}

[data-bs-theme="dark"] .timeline-dot.dot-green {
   background: color-mix(in srgb, #168a58 22%, var(--bs-body-bg));
   border-color: color-mix(in srgb, #168a58 45%, var(--bs-body-bg));
   color: color-mix(in srgb, #168a58 45%, white);
}

[data-bs-theme="dark"] .timeline-dot.dot-orange {
   background: color-mix(in srgb, #b06a13 22%, var(--bs-body-bg));
   border-color: color-mix(in srgb, #b06a13 45%, var(--bs-body-bg));
   color: color-mix(in srgb, #b06a13 45%, white);
}

[data-bs-theme="dark"] .timeline-dot.dot-violet {
   background: color-mix(in srgb, #6545b8 22%, var(--bs-body-bg));
   border-color: color-mix(in srgb, #6545b8 45%, var(--bs-body-bg));
   color: color-mix(in srgb, #6545b8 45%, white);
}

[data-bs-theme="dark"] .icon-btn.text-danger:hover:not(:disabled) {
   background: var(--bs-danger-bg-subtle);
   border-color: var(--bs-danger-border-subtle);
   color: var(--bs-danger-text-emphasis);
}

