.cadence-step.unavailable-channel {
    border-color: #e0c4bd;
    background: #fff3f0;
    color: #965548;
    opacity: .82;
}
.cadence-step.unavailable-channel i {
    background: #c96b5d;
    color: #fff;
}
.cadence-step.unavailable-channel em {
    color: #874a40;
    text-decoration: line-through;
}
.cadence-skip-channel,
.channel-unavailable-button {
    border: 1px solid #dfb7ae;
    border-radius: 9px;
    background: #fff5f2;
    color: #8f463b;
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 700;
}
.contact-column-content {
    display: flex;
    min-width: 185px;
    max-width: 230px;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}
.contact-column-content > form {
    margin: 0;
}
.manual-contact-button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 8px;
    border: 1px solid #cad7b8;
    border-radius: 10px;
    background: linear-gradient(135deg, #fbfdf7, #f3f8e9);
    padding: 7px 9px;
    color: #34442d;
    text-align: left;
    transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.manual-contact-button:hover {
    border-color: #8eae4a;
    background: #eff8dc;
    box-shadow: 0 5px 14px #698b2220;
    transform: translateY(-1px);
}
.manual-contact-button i {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    border-radius: 8px;
    background: #dfff86;
    color: #30420b;
    font-size: 18px;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
}
.manual-contact-button span,
.manual-contact-button strong,
.manual-contact-button small {
    display: block;
}
.manual-contact-button strong {
    font-size: 12px;
    line-height: 1.2;
}
.manual-contact-button small {
    margin-top: 2px;
    color: #74806f;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.2;
}
.private-contact-summary {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 3px;
    border-left: 3px solid #9bc72b;
    border-radius: 0 8px 8px 0;
    background: #f6faeb;
    padding: 8px 9px;
}
.private-contact-summary > span {
    color: #6f850f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}
.private-contact-summary > span b {
    float: right;
    border-radius: 99px;
    background: #dfff86;
    padding: 2px 5px;
    color: #385000;
    font-size: 8px;
    letter-spacing: .04em;
}
.private-contact-summary > strong {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.private-contact-summary > a {
    overflow-wrap: anywhere;
    color: #4f6d00;
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;
}
.private-contact-summary > a:hover { text-decoration: underline; }
.private-contact-summary > div {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}
.private-contact-summary > div a {
    border-radius: 99px;
    background: #e5efca;
    padding: 2px 6px;
    color: #4f6519;
    font-size: 9px;
    font-weight: 700;
    text-decoration: none;
}
.private-contact-dialog { width: min(820px, calc(100% - 28px)); }
.private-contact-manager {
    margin: 18px 0;
    padding: 12px;
    border: 1px solid #dfe6da;
    border-radius: 13px;
    background: #f8faf6;
}
.private-contact-manager-head,
.private-contact-card,
.private-contact-card-actions {
    display: flex;
    align-items: center;
}
.private-contact-manager-head {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}
.private-contact-manager-head > button,
.private-contact-card-actions button {
    border: 1px solid #cad5c6;
    border-radius: 8px;
    background: #fff;
    padding: 6px 9px;
    color: #4d5c52;
    font-size: 11px;
    font-weight: 700;
}
.private-contact-manager-head > button:hover,
.private-contact-card-actions button:hover { border-color: #8ead43; background: #f2f9df; }
.private-contact-card {
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid #e3e8e0;
    padding: 10px 2px;
}
.private-contact-card.is-default {
    margin: 0 -5px;
    border: 1px solid #bbd579;
    border-radius: 10px;
    background: #f3f9e4;
    padding: 10px 8px;
}
.private-contact-card > div:first-child { min-width: 0; }
.private-contact-card > div:first-child strong,
.private-contact-card > div:first-child small { display: block; }
.private-contact-card > div:first-child small {
    overflow: hidden;
    color: #7b877f;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.private-contact-card-actions { flex: 0 0 auto; gap: 6px; }
.set-default-contact { margin: 0; }
.default-contact-badge {
    border-radius: 99px;
    background: #dfff86;
    padding: 6px 9px;
    color: #385000;
    font-size: 10px;
    font-weight: 800;
}
.private-contact-dialog [data-private-contact-form] {
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid #e2e7df;
}
.private-contact-dialog [data-contact-form-title] { margin: 0 0 8px; }
.default-contact-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #dce6c4;
    border-radius: 10px;
    background: #f6faeb;
    font-size: 12px;
}
.default-contact-option input { width: auto; margin: 0; }
@media (max-width: 620px) {
    .private-contact-card { align-items: stretch; flex-direction: column; }
    .private-contact-card-actions { justify-content: space-between; }
}
.channel-unavailable-button {
    font-size: 13px;
}
.cadence-confirm-dialog {
    width: min(600px, calc(100% - 16px));
    padding: 30px 22px 24px;
    border-top: 4px solid #c7ff32;
    box-shadow: 0 28px 80px #0007;
}
.cadence-confirm-dialog h3 {
    margin: 3px 44px 12px 0;
    font-size: 24px;
    letter-spacing: -.025em;
}
.cadence-confirm-dialog p {
    max-width: 540px;
    margin: 0;
    line-height: 1.55;
}
.cadence-confirm-dialog form {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 7px;
    margin-top: 22px;
}
.cadence-confirm-dialog form > button {
    min-height: 45px;
    padding: 10px 12px;
    white-space: nowrap;
    font-size: 13px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.cadence-confirm-dialog form > button:hover {
    transform: translateY(-1px);
}
.cadence-confirm-dialog .btn {
    box-shadow: 0 5px 14px #a8d51f40;
}
.cadence-confirm-dialog .btn:hover {
    background: #baff00;
    box-shadow: 0 7px 18px #a8d51f55;
}
.cadence-confirm-dialog .channel-unavailable-button:hover {
    border-color: #c66f61;
    background: #ffebe6;
}
.cadence-confirm-dialog .ghost-button {
    color: #4f5a53;
}
.cadence-confirm-dialog .ghost-button:hover {
    border-color: #9eaaa1;
    background: #f4f6f3;
}
@media (max-width: 450px) {
    .cadence-confirm-dialog {
        width: calc(100% - 16px);
        padding: 26px 18px 20px;
    }
    .cadence-confirm-dialog form {
        align-items: stretch;
        flex-direction: column;
    }
    .cadence-confirm-dialog form > button {
        width: 100%;
    }
}
tr[id^="lead-"] {
    scroll-margin-block: 20vh;
}
tr.lead-return-target td {
    animation: lead-return-highlight 1.8s ease-out;
}
.cadence-step.waiting small {
    overflow: visible;
    white-space: normal;
}
@keyframes lead-return-highlight {
    0%, 35% { background: #f0fad7; }
    100% { background: transparent; }
}
.operations-summary {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    gap: 12px;
    margin: -7px 0 18px;
}
.campaign-gauge,
.operations-numbers,
.activity-summary {
    border: 1px solid #dfe5dd;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px #17201b0a;
}
.campaign-gauge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}
.campaign-gauge > div:last-child span,
.campaign-gauge > div:last-child small {
    display: block;
}
.campaign-gauge > div:last-child span {
    font-weight: 800;
}
.campaign-gauge > div:last-child small {
    color: #758079;
    font-size: 11px;
    line-height: 1.35;
}
.gauge-visual {
    position: relative;
    width: 105px;
    flex: 0 0 105px;
}
.gauge-visual svg {
    display: block;
    width: 100%;
}
.gauge-track,
.gauge-progress {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
}
.gauge-track { stroke: #e8ece7; }
.gauge-progress { stroke: #a8d91f; }
.gauge-needle {
    stroke: #26332b;
    stroke-width: 3;
    stroke-linecap: round;
}
.gauge-visual circle { fill: #26332b; }
.gauge-visual > strong {
    position: absolute;
    right: 0;
    bottom: 1px;
    color: #4e6811;
    font-size: 13px;
}
.operations-numbers {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    overflow: hidden;
}
.operations-numbers article {
    position: relative;
    padding: 15px 18px;
}
.operations-numbers article:not(:last-child) {
    border-right: 1px solid #e8ece7;
}
.operations-numbers span,
.operations-numbers small {
    display: block;
}
.operations-numbers span {
    color: #69766e;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .045em;
}
.operations-numbers strong {
    display: block;
    margin: 3px 0 1px;
    font-size: 27px;
    line-height: 1;
}
.operations-numbers small {
    color: #8a958e;
    font-size: 11px;
}
.operations-numbers .available {
    background: linear-gradient(135deg, #f8ffe7, #effbd1);
}
.operations-numbers .available strong { color: #527600; }
.activity-summary {
    grid-column: 1 / -1;
    padding: 14px;
}
.activity-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}
.activity-summary-head strong,
.activity-summary-head small {
    display: block;
}
.activity-summary-head small {
    color: #7e8982;
    font-size: 11px;
}
.activity-summary-head nav {
    display: flex;
    gap: 7px;
}
.activity-summary-head a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #d4dcd2;
    border-radius: 9px;
    background: #f8faf7;
    padding: 8px 11px;
    color: #536058;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}
.activity-summary-head a b {
    display: grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 99px;
    background: #e9ede7;
    padding: 0 6px;
    font-size: 10px;
}
.activity-summary-head a.active {
    border-color: #91ad45;
    background: #f1f8df;
    color: #415b09;
}
.activity-summary-head a.actionable.active,
.activity-summary-head a.actionable:hover {
    border-color: #8fb523;
    background: #dfff86;
    color: #26330b;
}
.activity-summary-head a.actionable.active b { background: #26330b; color: #c7ff32; }
.activity-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
}
.activity-chip {
    position: relative;
    min-width: 0;
    border: 1px solid #e1e6df;
    border-top: 3px solid #9aaa9f;
    border-radius: 10px;
    background: #fafbf9;
    padding: 9px 10px;
}
.activity-chip.channel-whatsapp { border-top-color: #25a968; }
.activity-chip.channel-call { border-top-color: #517798; }
.activity-chip.channel-email { border-top-color: #405e9a; }
.activity-chip.channel-linkedin { border-top-color: #0a66c2; }
.activity-chip.channel-instagram { border-top-color: #bd2a79; }
.activity-chip.channel-facebook { border-top-color: #1877f2; }
.activity-chip.channel-youtube { border-top-color: #e22; }
.activity-chip.channel-recycle { border-top-color: #b88727; }
.activity-chip span {
    display: block;
    overflow: hidden;
    color: #657169;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.activity-chip strong {
    display: inline-block;
    margin: 2px 7px 0 0;
    font-size: 20px;
}
.activity-chip small {
    display: inline;
    color: #859088;
    font-size: 10px;
}
@media (max-width: 1050px) {
    .operations-summary { grid-template-columns: 1fr; }
    .activity-summary { grid-column: auto; }
}
@media (max-width: 720px) {
    .operations-numbers { grid-template-columns: repeat(2, 1fr); }
    .operations-numbers article:nth-child(2) { border-right: 0; }
    .operations-numbers article:nth-child(-n+2) { border-bottom: 1px solid #e8ece7; }
    .activity-summary-head { align-items: stretch; flex-direction: column; }
    .activity-summary-head nav { display: grid; grid-template-columns: 1fr 1fr; }
    .activity-summary-head a { justify-content: center; }
}

/* Empresas: preserve the desktop table and stack its cells on phones. */
@media (max-width: 720px) {
    .companies-head > div,
    .companies-head .page-actions form { min-width: 0; max-width: 100%; }
    .companies-head .page-actions select { min-width: 0; max-width: 100%; }
    .companies-head h1 { overflow-wrap: anywhere; }
    .operations-summary > *,
    .operations-numbers article { min-width: 0; }
    .operations-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .operations-numbers article { padding: 13px 10px; overflow-wrap: anywhere; }
    .activity-summary-head nav { grid-template-columns: minmax(0, 1fr); }
    .activity-summary-head a { flex-wrap: wrap; text-align: center; }
    .activity-chips { grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr)); }

    #lead-list { padding: 0; border: 0; background: transparent; overflow: visible; }
    #lead-list > table,
    #lead-list > table > tbody { display: block; width: 100%; }
    #lead-list > table > thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    #lead-list > table > tbody > tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #e0e5df;
        border-radius: 16px;
        background: #fff;
        padding: 4px 14px;
    }
    #lead-list > table > tbody > tr > td {
        display: block;
        width: 100%;
        min-width: 0;
        padding: 13px 0;
        overflow-wrap: anywhere;
    }
    #lead-list td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 8px;
        color: #758079;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .07em;
    }
    #lead-list > table > tbody > tr > td:last-child { border-bottom: 0; }
    #lead-list .contact-column-content,
    #lead-list .receita-contact,
    #lead-list .decision-result,
    #lead-list .cadence-cell,
    #lead-list .cadence-state {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    #lead-list .receita-address,
    #lead-list .cadence-missing { max-width: 100%; }
    #lead-list .contact-empty,
    #lead-list .contact-unlock,
    #lead-list .cadence-step em,
    #lead-list .cadence-step small,
    #lead-list .private-contact-summary > strong { white-space: normal; overflow-wrap: anywhere; }
    #lead-list td > form,
    #lead-list .contact-column-content > form { max-width: 100%; }
    #lead-list .history-actions > * { max-width: 100%; }
    #lead-list .contact-unlock,
    #lead-list .manual-contact-button,
    #lead-list .history-actions > * { min-height: 44px; }
}
