:root {
    --kolek-sidebar-width: 280px;
    --kolek-sidebar-collapsed-width: 64px;
    --kolek-topbar-height: 48px;
    --kolek-bg: #f4f4f4;
    --kolek-surface: #ffffff;
    --kolek-text: #111827;
    --kolek-muted: #8b929c;
    --kolek-line: #e6e6e6;
    --kolek-soft-line: #eeeeee;
    --kolek-dark: #171719;
    --kolek-active: #dcdcdc;
    --kolek-blue: #303f92;
    --kolek-green: #b8d49c;
    --kolek-danger: #ef3f35;
    --kolek-shadow: 0 1px 4px rgba(15, 23, 42, .08);
    --kolek-radius: 4px;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body.kolek-body {
    background: var(--kolek-bg);
    color: var(--kolek-text);
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.45;
}

a {
    color: inherit;
}

.kolek-topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    height: var(--kolek-topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--kolek-surface);
    border-bottom: 1px solid var(--kolek-soft-line);
}

.kolek-topbar-left {
    width: var(--kolek-sidebar-width);
    display: grid;
    grid-template-columns: 1fr 48px;
    align-items: center;
    height: 100%;
}

.kolek-brand {
    padding-left: 20px;
    color: #202124;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.kolek-brand:hover {
    color: #202124;
}

.kolek-menu-toggle {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 20px;
}

.kolek-menu-toggle:hover {
    background: #f1f1f1;
}

.kolek-topbar-right {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-right: 32px;
    color: #050505;
    font-size: 12px;
}

.kolek-company-selector,
.kolek-user-menu {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.kolek-flag {
    position: relative;
    width: 16px;
    height: 11px;
    display: inline-block;
    overflow: hidden;
    border: 1px solid #9ab985;
    background: #1f9b45;
    font-size: 0;
}

.kolek-flag::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    background: #f5d547;
    transform: translate(-50%, -50%) rotate(45deg);
}

.kolek-flag::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #24449c;
    transform: translate(-50%, -50%);
}

.kolek-wrapper {
    min-height: 100vh;
    padding-top: var(--kolek-topbar-height);
}

.kolek-sidebar {
    position: fixed;
    inset: var(--kolek-topbar-height) auto 0 0;
    z-index: 900;
    width: var(--kolek-sidebar-width);
    display: flex;
    flex-direction: column;
    background: #f1f1f1;
    border-right: 1px solid var(--kolek-soft-line);
    overflow: hidden;
    transition: width .2s ease;
}

.kolek-sidenav {
    flex: 1;
    padding: 18px 20px;
    overflow-y: auto;
}

.kolek-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kolek-nav-item {
    margin-bottom: 2px;
}

.kolek-nav-link {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 18px;
    color: #050505;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}

.kolek-nav-link i {
    width: 18px;
    min-width: 18px;
    color: #050505;
    font-size: 15px;
    text-align: center;
}

.kolek-nav-link:hover,
.kolek-nav-item.active .kolek-nav-link {
    background: var(--kolek-active);
    color: #050505;
}

.kolek-beta {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--kolek-dark);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.kolek-sidebar-footer {
    padding: 12px 18px 66px;
}

.kolek-referral-btn {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 11px;
    background: #313f9a;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 5px 12px rgba(49, 63, 154, .35);
}

.kolek-referral-btn:hover {
    color: #fff;
    background: #293686;
}

.kolek-main {
    min-height: calc(100vh - var(--kolek-topbar-height));
    margin-left: var(--kolek-sidebar-width);
    display: flex;
    flex-direction: column;
    transition: margin-left .2s ease;
}

.kolek-page-header,
.kolek-page {
    margin: 16px 20px 0;
}

.kolek-page-header {
    min-height: 100px;
    padding: 22px;
    background: var(--kolek-surface);
    border: 1px solid var(--kolek-soft-line);
    border-radius: var(--kolek-radius);
    box-shadow: var(--kolek-shadow);
}

.kolek-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.kolek-title-row h1,
.kolek-page-header h1 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #111;
    font-size: 21px;
    font-weight: 500;
}

.kolek-page-header h1 i {
    font-size: 15px;
}

.kolek-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    color: var(--kolek-muted);
    font-size: 12px;
}

.kolek-breadcrumb a {
    color: #1d1d1d;
    text-decoration: none;
}

.kolek-breadcrumb i {
    font-size: 11px;
}

.kolek-page {
    flex: 1;
}

.kolek-card,
.kolek-table-wrapper,
.kolek-filters {
    min-width: 0;
    background: var(--kolek-surface);
    border: 1px solid var(--kolek-soft-line);
    border-radius: var(--kolek-radius);
    box-shadow: var(--kolek-shadow);
}

.kolek-card {
    padding: 22px;
}

.kolek-card-title {
    margin: 0 0 18px;
    color: #111;
    font-size: 20px;
    font-weight: 400;
}

.kolek-card-text {
    color: var(--kolek-text);
    font-size: 12px;
}

.kolek-muted {
    color: var(--kolek-muted);
}

.kolek-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 388px);
    gap: 18px;
}

.kolek-dashboard-side {
    min-width: 0;
    display: grid;
    gap: 18px;
    align-content: start;
}

.kolek-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.kolek-stat-card {
    min-height: 108px;
    padding: 22px;
    background: var(--kolek-surface);
    border: 1px solid var(--kolek-soft-line);
    border-radius: var(--kolek-radius);
    box-shadow: var(--kolek-shadow);
}

.kolek-stat-value {
    margin-bottom: 4px;
    color: #161616;
    font-size: 19px;
    font-weight: 400;
}

.kolek-stat-label,
.kolek-stat-period {
    color: var(--kolek-muted);
    font-size: 12px;
}

.kolek-form-row,
.kolek-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.kolek-filter-grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Filtro compacto: o rótulo fica À ESQUERDA do campo e tudo cabe numa linha só (filtros curtos de período). */
.kolek-filtro-inline {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

    .kolek-filtro-inline .kolek-form-group,
    .kolek-filtro-inline .kolek-filter-group {
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .kolek-filtro-inline .kolek-form-group label,
        .kolek-filtro-inline .kolek-filter-group label {
            margin-bottom: 0;
            white-space: nowrap;
        }

        .kolek-filtro-inline .kolek-form-group input,
        .kolek-filtro-inline .kolek-form-group select,
        .kolek-filtro-inline .kolek-filter-group input,
        .kolek-filtro-inline .kolek-filter-group select {
            width: auto;
        }

.kolek-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #222;
    font-size: 12px;
    font-weight: 400;
}

.kolek-filter-group label {
    display: block;
    margin-bottom: 8px;
    color: #222;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.kolek-form-group input,
.kolek-form-group select,
.kolek-filter-group input,
.kolek-filter-group select,
.kolek-search-box input,
.kolek-show-select select {
    height: 36px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
    color: #111;
    font-size: 12px;
}

.kolek-form-group input,
.kolek-form-group select,
.kolek-filter-group input,
.kolek-filter-group select {
    width: 100%;
    padding: 6px 12px;
}

.kolek-form-group textarea,
.kolek-filter-group textarea {
    width: 100%;
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
    color: #111;
    font-size: 12px;
    font-family: inherit;
    resize: vertical;
}

.kolek-chart-container {
    height: 360px;
    margin-top: 34px;
}

.btn-kolek-primary,
.btn-kolek-outline {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.btn-kolek-primary {
    border: 1px solid var(--kolek-dark);
    background: var(--kolek-dark);
    color: #fff;
}

.btn-kolek-primary:hover {
    color: #fff;
    background: #000;
}

.btn-kolek-outline {
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #222;
    font-weight: 400;
}

.btn-kolek-outline:hover {
    background: #f6f6f6;
    color: #222;
}

.kolek-filters {
    margin-bottom: 18px;
}

.kolek-filters-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 22px 12px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 20px;
    font-weight: 400;
    text-align: left;
}

.kolek-filters-body {
    margin: 0 12px 18px;
    padding: 14px 10px 20px;
    border: 2px dashed #e4e4e4;
}

.kolek-table-toolbar,
.kolek-table-header,
.kolek-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
}

.kolek-table-header {
    border-bottom: 1px solid var(--kolek-soft-line);
}

.kolek-table-title {
    color: #111;
    font-size: 18px;
    font-weight: 400;
}

.kolek-search-box {
    width: 202px;
    display: flex;
    align-items: center;
    background: #fff;
}

.kolek-search-box input {
    width: 100%;
    padding: 6px 10px;
    border-right: 0;
    border-radius: 4px 0 0 4px;
    outline: 0;
}

.kolek-search-box button {
    width: 36px;
    height: 36px;
    border: 1px solid #dedede;
    border-left: 0;
    border-radius: 0 4px 4px 0;
    background: #fff;
    color: #9aa0a6;
}

.kolek-show-select {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.kolek-show-select select {
    min-width: 70px;
    padding: 6px 10px;
}

.kolek-table-scroll {
    overflow-x: auto;
}

.table-kolek {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.table-kolek th,
.table-kolek td {
    padding: 7px 10px;
    border-top: 1px solid var(--kolek-soft-line);
    color: #1f2937;
    font-size: 12px;
    text-align: left;
    vertical-align: middle;
}

.table-kolek th {
    color: #333;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.3;
    white-space: normal;
    vertical-align: bottom;
}

.table-kolek th.num,
.table-kolek td.num {
    text-align: right;
}

.table-kolek td {
    background: #fff;
}

.table-kolek tbody tr:hover td {
    background: #fafafa;
}

.table-kolek .empty-row td {
    height: 58px;
    color: #444;
    text-align: center;
}

.table-kolek .sortable {
    position: relative;
}

.table-kolek .sortable::after {
    content: "↕";
    float: right;
    color: #9aa0a6;
    font-size: 12px;
}

.kolek-table-footer {
    min-height: 48px;
    color: #333;
    border-top: 1px solid var(--kolek-soft-line);
}

.kolek-pagination {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kolek-pagination button {
    min-width: 36px;
    min-height: 34px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #333;
}

.kolek-pagination button.active {
    background: var(--kolek-dark);
    color: #fff;
}

.kolek-pagination button:disabled {
    color: #b7b7b7;
}

.badge-kolek-dark,
.badge-kolek-green,
.badge-kolek-red,
.badge-kolek-gray,
.badge-kolek-yellow,
.badge-kolek-blue,
.badge-kolek-neutral,
.badge-kolek-paga {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 3px 6px;
    border-radius: 2px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

.badge-kolek-dark {
    background: var(--kolek-dark);
}

.badge-kolek-green {
    background: #caeab7;
    color: #168421;
}

.badge-kolek-red {
    background: var(--kolek-danger);
}

.badge-kolek-gray {
    background: #9b9b9b;
}

/* Cores adicionais dos badges do Kolek. Herdam o formato quadrado padrão do seletor acima; aqui só a cor.
   Os status de cobrança usam sempre este formato quadrado, variando apenas a cor:
   Em espera=amarelo, Aberta=azul, Paga=verde, Cancelada=cinza (badge-kolek-gray). */
.badge-kolek-yellow {
    background: #f5d442;
    color: #6b5200;
}

.badge-kolek-blue {
    background: #5b8fc9;
}

.badge-kolek-neutral {
    background: #e2e8f0;
    color: #334155;
}

.badge-kolek-paga {
    background: #168421;
}

/* Badge grande de "qual WhatsApp está em uso", ao lado do título da tela de Conexão WhatsApp. Maior que os badges de
   tabela de propósito: é a informação principal da tela. Verde = ativo; amarelo = provedor por QR code desconectado;
   cinza = nenhum provedor escolhido. */
.badge-kolek-conexao {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    background: #168421;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

.badge-kolek-conexao-atencao {
    background: #f5d442;
    color: #6b5200;
}

.badge-kolek-conexao-inativa {
    background: #9b9b9b;
}

.kolek-toggle {
    position: relative;
    width: 38px;
    height: 20px;
    display: inline-block;
}

.kolek-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.kolek-toggle-slider {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: #c3d7a5;
}

.kolek-toggle-slider::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 1px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

/* Toggle ligado a um checkbox (ex.: "Envio de notificações" em Configurações): a cor e a posição da bolinha
   seguem o estado do input, senão o interruptor fica sempre desenhado como ligado. */
.kolek-toggle input:not(:checked) + .kolek-toggle-slider {
    background: #d1d5db;
}

.kolek-toggle input:not(:checked) + .kolek-toggle-slider::before {
    left: 1px;
}

.kolek-toggle input:checked + .kolek-toggle-slider {
    background: #7cae3b;
}

.kolek-toggle:has(input) {
    cursor: pointer;
}

.kolek-settings-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    color: #111;
}

.kolek-settings-row .row-label,
.kolek-settings-row .row-channels,
.kolek-channel-check {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kolek-inline-input {
    width: 54px;
    height: 28px;
    border: 0;
    border-bottom: 1px solid #777;
    background: transparent;
    text-align: center;
}

.kolek-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
    gap: 18px;
    align-items: start;
}

.kolek-stack {
    min-width: 0;
    display: grid;
    gap: 18px;
}

.kolek-status-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.kolek-actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.btn-action {
    border: 0;
    background: transparent;
    color: #111;
    font-size: 18px;
}

.kolek-chat-button {
    position: fixed;
    right: 20px;
    bottom: 18px;
    z-index: 1200;
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 211, 102, .35);
    text-decoration: none;
}

.kolek-chat-button:hover { color: #fff; background: #1ebe5a; }

.kolek-chat-button i {
    font-size: 30px;
}

/* Botão "Ganhe 1 mês grátis" ao final do menu, com tooltip explicativo no hover. */
.kolek-indicacao-wrap {
    position: relative;
    margin: 12px 10px 6px;
}

.kolek-indicacao-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: #1a7f4b;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.kolek-indicacao-btn:hover { background: #16663c; }

.kolek-indicacao-btn i { font-size: 18px; }

.kolek-indicacao-tip {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(100% + 6px);
    z-index: 1300;
    display: none;
    padding: 10px 12px;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}

.kolek-indicacao-wrap:hover .kolek-indicacao-tip { display: block; }

.kolek-footer {
    margin: auto 20px 0;
    padding: 22px 0;
    color: #9aa0a6;
    font-size: 12px;
}

.kolek-footer a {
    color: #111;
    text-decoration: none;
}

body.sidebar-collapsed .kolek-topbar-left,
body.sidebar-collapsed .kolek-sidebar {
    width: var(--kolek-sidebar-collapsed-width);
}

body.sidebar-collapsed .kolek-brand,
body.sidebar-collapsed .kolek-nav-label,
body.sidebar-collapsed .kolek-beta,
body.sidebar-collapsed .kolek-sidebar-footer {
    display: none;
}

body.sidebar-collapsed .kolek-main {
    margin-left: var(--kolek-sidebar-collapsed-width);
}

body.sidebar-collapsed .kolek-sidenav {
    padding-left: 8px;
    padding-right: 8px;
}

body.sidebar-collapsed .kolek-nav-link {
    justify-content: center;
    padding: 0;
}

/* Menu recolhido: botão de indicação só com o ícone (a dica vem do title); a caixa explicativa não cabe e fica oculta. */
body.sidebar-collapsed .kolek-indicacao-wrap {
    margin: 12px 0 6px;
}

body.sidebar-collapsed .kolek-indicacao-btn {
    justify-content: center;
    height: 44px;
    padding: 0;
}

body.sidebar-collapsed .kolek-indicacao-wrap:hover .kolek-indicacao-tip {
    display: none;
}

@media (max-width: 1180px) {
    .kolek-dashboard-grid,
    .kolek-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .kolek-topbar-left,
    .kolek-sidebar {
        width: var(--kolek-sidebar-collapsed-width);
    }

    .kolek-brand,
    .kolek-nav-label,
    .kolek-beta,
    .kolek-sidebar-footer {
        display: none;
    }

    .kolek-main {
        margin-left: var(--kolek-sidebar-collapsed-width);
    }

    /* Mesmo espaçamento do menu recolhido, senão o botão de indicação fica espremido e com o ícone para fora. */
    .kolek-sidenav {
        padding-left: 8px;
        padding-right: 8px;
    }

    .kolek-nav-link {
        justify-content: center;
        padding: 0;
    }

    .kolek-indicacao-wrap {
        margin: 12px 0 6px;
    }

    .kolek-indicacao-btn {
        justify-content: center;
        height: 44px;
        padding: 0;
    }

    .kolek-indicacao-wrap:hover .kolek-indicacao-tip {
        display: none;
    }

    .kolek-topbar-right {
        gap: 12px;
        padding-right: 12px;
        font-size: 12px;
    }

    .kolek-company-name {
        max-width: 130px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .kolek-page-header,
    .kolek-page {
        margin-left: 12px;
        margin-right: 12px;
    }

    .kolek-form-row,
    .kolek-filter-grid,
    .kolek-filter-grid.cols-4,
    .kolek-stat-grid {
        grid-template-columns: 1fr;
    }

    .kolek-table-toolbar,
    .kolek-table-header,
    .kolek-table-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =====================================================================
   Login page
   ===================================================================== */

.kolek-login-bg {
    background: #eef0f5;
}

.kolek-login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.kolek-login-header {
    padding: 32px 0 0;
    text-align: center;
}

.kolek-login-brand {
    font-size: 28px;
    font-weight: 700;
    color: var(--kolek-blue);
    letter-spacing: -0.5px;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
}

.kolek-login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.kolek-login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, .10);
    padding: 38px 40px 42px;
}

.kolek-login-title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 400;
    color: #111;
    letter-spacing: -0.3px;
}

.kolek-login-subtitle {
    margin: 0 0 28px;
    color: var(--kolek-muted);
    font-size: 12px;
}

.kolek-login-field {
    margin-bottom: 18px;
}

.kolek-login-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #333;
    font-weight: 400;
}

.kolek-login-input {
    height: 40px;
    border-radius: 4px;
    border-color: #d4d8e0;
    font-size: 12px;
    background: #f7f8fc;
    color: #111;
}

.kolek-login-input:focus {
    background: #fff;
    border-color: var(--kolek-blue);
    box-shadow: 0 0 0 3px rgba(48, 63, 146, .12);
}

.kolek-login-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.kolek-login-field-header label {
    margin-bottom: 0;
}

.kolek-login-forgot {
    font-size: 11px;
    color: var(--kolek-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kolek-login-forgot:hover {
    color: var(--kolek-blue);
    opacity: .8;
}

.kolek-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    margin-top: 10px;
    border: 0;
    border-radius: 4px;
    background: var(--kolek-blue);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}

.kolek-login-btn:hover {
    background: #253082;
}

.kolek-login-footer {
    padding: 20px 16px 28px;
    text-align: center;
    color: var(--kolek-muted);
    font-size: 12px;
    line-height: 1.8;
}

.kolek-login-footer a {
    color: var(--kolek-blue);
    text-decoration: none;
}

.kolek-login-footer a:hover {
    text-decoration: underline;
}

/* =====================================================================
   Onboarding / Abertura de conta
   ===================================================================== */

.kolek-ob-tagline {
    margin-top: 4px;
    color: var(--kolek-muted);
    font-size: 12px;
}

.kolek-ob-card {
    width: 100%;
    max-width: 1000px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, .10);
    padding: 32px 34px 38px;
}

.kolek-ob-progress {
    margin-bottom: 24px;
}

.kolek-ob-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 11px;
    color: #333;
}

.kolek-ob-bar {
    height: 6px;
    border-radius: 6px;
    background: #e6e9f2;
    overflow: hidden;
}

.kolek-ob-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: var(--kolek-blue);
    transition: width .25s ease;
}

.kolek-ob-section {
    margin: 26px 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

.kolek-ob-tipo {
    display: flex;
    gap: 18px;
    margin-bottom: 18px;
}

.kolek-ob-tipo-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    cursor: pointer;
}

.kolek-ob-socio {
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid var(--kolek-line);
    border-radius: 8px;
    background: #fafbfd;
}

.kolek-ob-socio-head {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.kolek-ob-termos {
    max-height: 260px;
    overflow-y: auto;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--kolek-line);
    border-radius: 8px;
    background: #fafbfd;
    font-size: 11px;
    line-height: 1.55;
    color: #333;
}

.kolek-ob-aceite {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    cursor: pointer;
}

.kolek-ob-foot-link {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: var(--kolek-muted);
}

.kolek-ob-foot-link a {
    color: var(--kolek-blue);
    text-decoration: none;
}

.kolek-ob-foot-link a:hover {
    text-decoration: underline;
}

.kolek-ob-faceid-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.kolek-ob-faceid-alert i {
    margin-top: 2px;
}

/* =====================================================================
   Cobrança recorrente - tela Adicionar/Editar (form + pré-visualização)
   ===================================================================== */

.rec-add-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 18px;
    align-items: start;
}

.rec-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.rec-field {
    flex: 1;
    min-width: 150px;
}

.rec-field label {
    display: block;
    margin-bottom: 8px;
    color: #222;
    font-size: 12px;
}

.rec-field .req {
    margin-left: 2px;
    color: var(--kolek-danger);
}

.rec-field input,
.rec-field select {
    width: 100%;
    height: 36px;
    padding: 6px 12px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
    color: #111;
    font-size: 12px;
}

.rec-reajuste {
    margin: 6px 0 18px;
}

.rec-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #222;
    font-size: 12px;
}

.rec-itens {
    margin-top: 8px;
    border-top: 1px solid var(--kolek-soft-line);
    padding-top: 16px;
}

.rec-itens-title {
    margin-bottom: 10px;
    color: #222;
    font-size: 12px;
}

.rec-itens table {
    width: 100%;
    border-collapse: collapse;
}

.rec-itens th {
    padding: 6px 8px;
    color: #555;
    font-size: 11px;
    font-weight: 400;
    text-align: left;
    border-bottom: 1px solid var(--kolek-soft-line);
}

.rec-itens th.num,
.rec-itens td.num {
    text-align: right;
}

.rec-itens td {
    padding: 6px 8px;
    vertical-align: middle;
}

.rec-itens input {
    width: 100%;
    height: 34px;
    padding: 4px 8px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
}

.rec-itens input.num {
    text-align: right;
}

.rec-valor {
    color: #111;
    font-size: 12px;
    white-space: nowrap;
}

.rec-remove {
    border: 0;
    background: transparent;
    color: #b91c1c;
    font-size: 15px;
}

.rec-add-linha {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
}

.rec-add-linha button {
    border: 0;
    background: transparent;
    color: #16a34a;
    font-size: 24px;
    line-height: 1;
}

.rec-totais {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 18px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--kolek-soft-line);
}

.rec-total-col {
    text-align: right;
}

.rec-total-label {
    margin-bottom: 4px;
    color: var(--kolek-muted);
    font-size: 11px;
}

.rec-total-value {
    color: #111;
    font-size: 15px;
    font-weight: 700;
}

.rec-total-op {
    align-self: center;
    color: var(--kolek-muted);
    font-size: 15px;
}

.rec-desc {
    color: var(--kolek-danger);
}

.rec-salvar {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}

.rec-preview {
    position: sticky;
    top: calc(var(--kolek-topbar-height) + 16px);
}

.rec-preview-head {
    margin-bottom: 8px;
    color: #111;
    font-weight: 700;
    font-size: 12px;
}

.rec-preview-list .rec-fatura {
    padding: 7px 0;
    border-bottom: 1px solid var(--kolek-soft-line);
    color: var(--kolek-blue);
    font-size: 12px;
}

.rec-preview-retic {
    padding: 6px 0;
    color: var(--kolek-muted);
    font-size: 15px;
}

.rec-preview-rodape {
    margin-top: 12px;
    color: #111;
    font-weight: 700;
    font-size: 12px;
}

@media (max-width: 1180px) {
    .rec-add-grid {
        grid-template-columns: 1fr;
    }

    .rec-preview {
        position: static;
    }
}

/* Importação em lote de faturas */
.rec-import-modelo {
    margin: 4px 0 18px;
}

.rec-import-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.rec-import-file {
    flex: 1;
    min-width: 260px;
}

.rec-import-file input[type=file] {
    width: 100%;
    height: 36px;
    padding: 5px 10px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
}

.rec-import-resumo {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.rec-import-stat {
    display: flex;
    flex-direction: column;
}

.rec-import-num {
    color: #111;
    font-size: 24px;
    font-weight: 700;
}

.rec-import-lbl {
    color: var(--kolek-muted);
    font-size: 11px;
}

.rec-import-erros {
    margin-top: 16px;
    color: #7a2e2e;
}

.rec-import-erros ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

/* Card de importação em lote na tela Adicionar Fatura (lado direito) */
.rec-import-aviso {
    margin-bottom: 18px;
    color: #444;
    font-size: 11px;
}

.rec-import-aviso strong {
    color: #222;
}

.rec-import-aviso ul {
    margin: 8px 0 12px;
    padding-left: 18px;
}

.rec-import-aviso li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.rec-import-aviso p {
    margin: 0;
    font-size: 11px;
}

.rec-import-acao {
    margin-bottom: 16px;
}

.rec-import-acao label {
    display: block;
    margin-bottom: 8px;
    color: #222;
    font-size: 12px;
}

.rec-import-acao input[type=file] {
    width: 100%;
    height: 36px;
    padding: 5px 10px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
}

/* =====================================================================
   Menu do usuário (topbar) - dropdown Perfil / Sair
   ===================================================================== */

.kolek-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #050505;
    font-size: 12px;
    cursor: pointer;
}

.kolek-user-trigger .bi-person-circle {
    font-size: 18px;
    color: #444;
}

.kolek-user-trigger .bi-chevron-down {
    font-size: 12px;
    color: #6b7280;
}

.kolek-user-dropdown.dropdown-menu {
    min-width: 210px;
    padding: 6px 0;
    border: 1px solid var(--kolek-line);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .14);
    font-size: 12px;
}

.kolek-user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 18px;
    color: #222;
}

.kolek-user-dropdown .dropdown-item i {
    width: 18px;
    font-size: 15px;
    color: #555;
    text-align: center;
}

.kolek-user-dropdown .dropdown-item:hover,
.kolek-user-dropdown .dropdown-item:focus {
    background: #f4f4f4;
    color: #111;
}

.kolek-user-dropdown .dropdown-divider {
    margin: 6px 0;
    border-top-color: var(--kolek-soft-line);
}

/* =====================================================================
   Perfil da Conta - grade de informações somente leitura
   ===================================================================== */

.kolek-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.kolek-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kolek-info-label {
    color: var(--kolek-muted);
    font-size: 11px;
}

.kolek-info-value {
    color: #111;
    font-size: 12px;
}

/* Extrato - cor de entrada/saída do valor */
.extrato-entrada {
    color: #168421;
    font-weight: 600;
}

.extrato-saida {
    color: #c0392b;
    font-weight: 600;
}

@media (max-width: 820px) {
    .kolek-info-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* =====================================================================
   Cobrança recorrente - listagem (seleção em massa, paginação client-side e modais em lote)
   ===================================================================== */

/* Barra de filtros (busca + status) à esquerda da toolbar da tabela */
.rec-list-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.rec-status-filtro {
    height: 36px;
    min-width: 160px;
    padding: 6px 10px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
    color: #111;
    font-size: 12px;
}

/* Barra de ações em lote (aparece com seleção ativa) */
.rec-bulkbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 20px;
    background: #f3f6ff;
    border-top: 1px solid var(--kolek-soft-line);
    border-bottom: 1px solid var(--kolek-soft-line);
}

.rec-bulkbar-count {
    color: #1f2937;
    font-size: 12px;
}

.rec-bulkbar-count i {
    color: var(--kolek-blue);
}

.rec-bulkbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Botão/variação de perigo (Apagar) reaproveitando os botões Kolek */
.btn-kolek-outline.rec-btn-danger {
    border-color: #f1b5b2;
    color: var(--kolek-danger);
}

.btn-kolek-outline.rec-btn-danger:hover {
    background: #fdecea;
    color: var(--kolek-danger);
}

.btn-kolek-primary.rec-btn-danger {
    background: var(--kolek-danger);
    border-color: var(--kolek-danger);
}

.btn-kolek-primary.rec-btn-danger:hover {
    background: #d8352b;
}

/* Coluna de checkbox e títulos quebrados em duas linhas */
.rec-col-check {
    width: 44px;
    text-align: center;
}

.rec-col-check input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    vertical-align: middle;
}

.th-2l {
    display: inline-block;
    line-height: 1.25;
}

/* Ícone pequeno exibido antes de valores de lista que são links (ex.: nome do cliente, número da cobrança). */
.link-icon {
    font-size: 11px;
    margin-right: 4px;
    color: var(--kolek-muted);
}

/* Link do número da cobrança (abre a edição da recorrência) */
.rec-num-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--kolek-blue);
    text-decoration: none;
}

.rec-num-link:hover {
    color: var(--kolek-blue);
    text-decoration: underline;
}

.rec-num-link i {
    font-size: 12px;
}

.rec-cliente-link {
    color: var(--kolek-blue);
    text-decoration: none;
}

.rec-cliente-link:hover {
    color: var(--kolek-blue);
    text-decoration: underline;
}

.rec-empty {
    padding: 28px 20px;
    color: #444;
    text-align: center;
}

/* Estado "carregando" compartilhado das telas que buscam dados via JS: loader animado (/images/loader.gif) e texto
   centralizados, com bastante espaço em cima e embaixo para ficarem visíveis. Use num <td colspan> no lugar das
   linhas da tabela, ou numa <div> no lugar do conteúdo:
   <td class="kolek-carregando"><img src="/images/loader.gif" alt="" />Carregando...</td>
   Também serve para a mensagem de falha da busca (sem a imagem). */
.kolek-carregando {
    padding: 70px 20px;
    text-align: center;
    color: #777;
}

    .kolek-carregando img {
        display: block;
        width: 56px;
        height: 56px;
        margin: 0 auto 14px;
    }

/* Botões de paginação client-side com rótulo (Anterior/Próximo) */
.kolek-pagination button {
    padding: 0 10px;
}

/* ---- Modais em lote (Alterar Recorrências / Reajuste / Apagar) ---- */
.rec-modal-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid #bfe3ee;
    border-radius: 6px;
    background: #e9f6fb;
    color: #0b6b86;
    font-size: 12px;
}

.rec-modal-section {
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--kolek-soft-line);
    border-radius: 8px;
}

.rec-modal-section-title {
    margin: 6px 0 12px;
    color: #111;
    font-size: 15px;
    font-weight: 600;
}

.rec-modal-hint {
    margin-top: 6px;
    color: var(--kolek-muted);
    font-size: 11px;
}

.rec-radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 4px;
    cursor: pointer;
}

.rec-radio input {
    margin-top: 3px;
}

.rec-radio > span {
    display: flex;
    flex-direction: column;
}

.rec-radio-title {
    color: #111;
    font-size: 12px;
}

.rec-radio-sub {
    color: var(--kolek-muted);
    font-size: 11px;
}

.rec-toggle-field {
    margin: 4px 0 10px 28px;
    max-width: 360px;
}

.rec-badge-reco {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--kolek-dark);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
}

.rec-check-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #111;
    font-size: 12px;
}

.rec-disabled {
    opacity: .5;
    pointer-events: none;
}

.rec-servicos {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rec-servico-linha {
    display: grid;
    grid-template-columns: 1fr 90px 110px 36px;
    gap: 8px;
    align-items: center;
}

.rec-servico-linha input {
    height: 36px;
    padding: 6px 10px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
}

.rec-servico-remove {
    border: 0;
    background: transparent;
    color: #b91c1c;
    font-size: 15px;
}

.rec-add-servico {
    margin-top: 12px;
}

.rec-modal-aviso {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    margin-top: 8px;
    border: 1px solid #f5d9a8;
    border-radius: 6px;
    background: #fdf6e7;
    color: #8a5a00;
    font-size: 11px;
}

.rec-modal-aviso i {
    font-size: 15px;
}

.rec-modal-aviso--danger {
    border-color: #f1b5b2;
    background: #fdecea;
    color: #a12820;
}

.rec-modal-nota {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    margin-top: 14px;
    border: 1px solid #bfe3ee;
    border-radius: 6px;
    background: #e9f6fb;
    color: #0b6b86;
    font-size: 11px;
}

@media (max-width: 640px) {
    .rec-servico-linha {
        grid-template-columns: 1fr 70px 90px 32px;
    }

    .rec-bulkbar-actions {
        width: 100%;
    }
}

/* =========================================================================================================
   Inadimplência (/Inadimplencia)
   Componentes exclusivos da tela de inadimplência, no mesmo vocabulário visual do Kolek (cartões brancos,
   cantos de 4px, tipografia Inter). Prefixo "inad-" para não colidir com os componentes das outras telas.
   ========================================================================================================= */

/* ---- Cartões de indicador do topo (6 colunas, colapsando em 3 e 2) ---- */
.inad-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.inad-kpi {
    min-width: 0;
    padding: 13px 15px;
    background: var(--kolek-surface);
    border: 1px solid var(--kolek-soft-line);
    border-radius: var(--kolek-radius);
    box-shadow: var(--kolek-shadow);
}

.inad-kpi-label {
    color: var(--kolek-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.inad-kpi-value {
    margin-top: 6px;
    color: #161616;
    font-size: 21px;
    font-weight: 500;
    line-height: 1.15;
}

.inad-kpi-sub {
    margin-top: 5px;
    color: var(--kolek-muted);
    font-size: 12px;
}

.inad-kpi--red .inad-kpi-value {
    color: var(--kolek-danger);
}

.inad-kpi--orange .inad-kpi-value {
    color: #c2620f;
}

.inad-kpi--purple .inad-kpi-value {
    color: #6d28d9;
}

/* ---- Chips de faixa de atraso (seleção única) ---- */
.inad-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.inad-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
}

.inad-chip:hover {
    background: #f6f6f6;
}

.inad-chip.active {
    border-color: var(--kolek-dark);
    background: var(--kolek-dark);
    color: #fff;
}

.inad-chip-n {
    padding: 0 5px;
    border-radius: 2px;
    background: rgba(0, 0, 0, .07);
    font-size: 11px;
    font-weight: 700;
}

.inad-chip.active .inad-chip-n {
    background: rgba(255, 255, 255, .22);
}

/* ---- Badges das faixas de atraso (a1 = atraso mais recente, a6 = mais antigo) ---- */
.inad-aging {
    display: inline-block;
    min-width: 42px;
    padding: 3px 7px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.inad-aging.a1 { background: #dcf5e2; color: #14682a; }
.inad-aging.a2 { background: #fbf0c4; color: #6b5200; }
.inad-aging.a3 { background: #fde5cf; color: #8f3d0b; }
.inad-aging.a4 { background: #fbdcd9; color: #a12820; }
.inad-aging.a5 { background: #f7c7c3; color: #7d1a14; }
.inad-aging.a6 { background: var(--kolek-dark); color: #fff; }

/* ---- Pills da situação de cobrança do devedor ---- */
.inad-status {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.inad-status.cobrancaativa { background: #e2eaf7; color: var(--kolek-blue); }
.inad-status.emnegociacao { background: #fbf0c4; color: #6b5200; }
.inad-status.renegociacaoacordada { background: #caeab7; color: #168421; }
.inad-status.perda { background: var(--kolek-dark); color: #fff; }

/* ---- Badges CLICÁVEIS dos marcadores de acompanhamento (Notificado/Serasa/Protestado/Jurídico).
   Usados na listagem e no detalhe da cobrança (marcadores da COBRANÇA) e nas telas de detalhe do cliente e de
   Inadimplência (marcadores do CADASTRO); o estado é gravado via fetch, sem postback. ---- */
.marcador-cobranca {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid #ccd4df;
    background: #f4f6fa;
    color: #8a97a8;
    user-select: none;
}

.marcador-cobranca:hover { filter: brightness(0.96); }
.marcador-cobranca[disabled] { opacity: .6; cursor: wait; }
.marcador-cobranca.on { border-color: transparent; }
.marcador-cobranca.on.notificado { background: #e2eaf7; color: var(--kolek-blue); }
.marcador-cobranca.on.serasa { background: #fde5cf; color: #8f3d0b; }
.marcador-cobranca.on.protestado { background: #fbdcd9; color: #a12820; }
.marcador-cobranca.on.juridico { background: var(--kolek-dark); color: #fff; }

/* ---- Botões da coluna AÇÃO da listagem de cobranças (só na conta em modo ControleCobranca).
   Cada providência usa a cor do marcador correspondente, da etapa mais leve (Notificar) à mais grave
   (Jurídico); "Regularizar" é verde porque encerra a restrição de uma cobrança já paga. ---- */
.acao-cobranca {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
    background: #f4f6fa;
    color: #55637a;
}

.acao-cobranca:hover { filter: brightness(0.96); }
.acao-cobranca:disabled { opacity: .6; cursor: wait; }
.acao-cobranca.notificar { background: #e2eaf7; color: var(--kolek-blue); }
.acao-cobranca.serasa { background: #fde5cf; color: #8f3d0b; }
.acao-cobranca.protestar { background: #fbdcd9; color: #a12820; }
.acao-cobranca.juridico { background: var(--kolek-dark); color: #fff; }
.acao-cobranca.regularizar { background: #caeab7; color: #168421; }

/* ---- Coluna de saldo e seta de expansão da linha ---- */
.inad-valor {
    color: var(--kolek-danger);
    font-weight: 700;
    white-space: nowrap;
}

.inad-valor-pct {
    color: var(--kolek-muted);
    font-size: 11px;
    font-weight: 400;
}

.inad-nunca {
    color: var(--kolek-danger);
    font-weight: 600;
}

.inad-seta {
    display: inline-block;
    width: 12px;
    margin-right: 6px;
    color: var(--kolek-muted);
    font-size: 10px;
    transition: transform .15s ease;
}

tr.inad-row.expandida .inad-seta {
    transform: rotate(90deg);
}

.table-kolek tbody tr.inad-row {
    cursor: pointer;
}

.table-kolek tbody tr.inad-row.selecionada td {
    background: #f3f6ff;
}

.table-kolek tbody tr.inad-faturas td {
    background: #fafafa;
}

/* Sub-tabela das faturas em aberto do devedor expandido. */
.inad-subtable {
    width: 100%;
    margin: 4px 0 4px 26px;
    padding-left: 12px;
    border-left: 2px solid var(--kolek-line);
    border-collapse: collapse;
}

.inad-subtable th {
    padding: 4px 8px;
    color: var(--kolek-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: left;
}

.inad-subtable td {
    padding: 5px 8px;
    border-bottom: 1px dashed var(--kolek-line);
    background: transparent;
    font-size: 11px;
}

.inad-subtable tr:last-child td {
    border-bottom: 0;
}

/* ---- Gráficos e blocos de análise ---- */
.inad-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.inad-chart {
    position: relative;
    height: 240px;
}

.inad-legenda {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.inad-legenda li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 11px;
}

.inad-legenda-cor {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.inad-legenda-nome {
    flex: 1;
}

.inad-legenda-qtd {
    min-width: 62px;
    color: var(--kolek-muted);
    text-align: right;
}

.inad-destaque {
    padding: 10px 0 4px;
    text-align: center;
}

.inad-destaque-num {
    color: var(--kolek-danger);
    font-size: 36px;
    font-weight: 600;
    line-height: 1;
}

.inad-destaque-texto {
    margin-top: 6px;
    color: var(--kolek-muted);
    font-size: 11px;
}

.inad-concentracao {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid var(--kolek-soft-line);
    border-radius: var(--kolek-radius);
    background: #fafafa;
}

.inad-concentracao-linha {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    font-size: 11px;
}

.inad-concentracao-linha:last-child {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px dashed var(--kolek-line);
}

.inad-subtitulo {
    margin-bottom: 8px;
    color: #444;
    font-size: 11px;
}

/* ---- Modal de detalhe: mini indicadores e timelines ---- */
.inad-modal-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.inad-modal-kpi {
    padding: 10px 12px;
    border: 1px solid var(--kolek-soft-line);
    border-radius: var(--kolek-radius);
    background: #fafafa;
}

.inad-modal-kpi-label {
    color: var(--kolek-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.inad-modal-kpi-valor {
    margin-top: 4px;
    font-size: 18px;
    font-weight: 500;
}

.inad-modal-kpi-valor.vermelho {
    color: var(--kolek-danger);
}

.inad-modal-titulo {
    margin: 18px 0 8px;
    color: #555;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.inad-timeline {
    position: relative;
    padding-left: 22px;
}

.inad-timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--kolek-line);
}

.inad-timeline-item {
    position: relative;
    padding: 7px 0 7px 6px;
}

.inad-timeline-item::before {
    content: "";
    position: absolute;
    left: -21px;
    top: 12px;
    width: 12px;
    height: 12px;
    border: 2px solid var(--kolek-muted);
    border-radius: 50%;
    background: var(--kolek-surface);
}

.inad-timeline-item.fatura::before { border-color: #d8a800; background: #f5d442; }
.inad-timeline-item.whatsapp::before { border-color: #1f9b45; background: #d6f0dd; }
.inad-timeline-item.email::before { border-color: var(--kolek-blue); background: #e2eaf7; }
.inad-timeline-item.nota::before { border-color: #6d28d9; background: #ede9fe; }

.inad-timeline-quando {
    color: var(--kolek-muted);
    font-size: 11px;
}

.inad-timeline-texto {
    margin-top: 2px;
    font-size: 11px;
}

.inad-timeline-obs {
    margin-top: 2px;
    color: #555;
    font-size: 12px;
    font-style: italic;
}

.inad-vazio {
    padding: 8px 0;
    color: var(--kolek-muted);
    font-size: 11px;
}

.inad-nota-nova {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--kolek-soft-line);
    border-radius: var(--kolek-radius);
    background: #fafafa;
}

.inad-nota-nova textarea {
    width: 100%;
    min-height: 62px;
    padding: 8px 10px;
    border: 1px solid #dedede;
    border-radius: 4px;
    font-family: inherit;
    font-size: 11px;
    resize: vertical;
}

/* ---- Cartões selecionáveis do tom da cobrança adicional ---- */
/* Dois cartões por linha: as 4 opções ocupam 2 linhas em vez de 4, para o modal caber na tela sem rolagem. */
.inad-msg-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.inad-msg-opcao {
    display: flex;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--kolek-soft-line);
    border-radius: var(--kolek-radius);
    cursor: pointer;
}

.inad-msg-opcao:hover {
    background: #fafafa;
}

.inad-msg-opcao.selecionada {
    border-color: var(--kolek-blue);
    background: #f3f6ff;
}

.inad-msg-icone {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 15px;
}

.inad-msg-icone.lembrete { background: #e2eaf7; color: var(--kolek-blue); }
.inad-msg-icone.encerramento { background: #fde5cf; color: #8f3d0b; }
.inad-msg-icone.protesto { background: #fbdcd9; color: var(--kolek-danger); }
.inad-msg-icone.negativacao { background: var(--kolek-dark); color: #fff; }

.inad-msg-titulo {
    font-size: 11px;
    font-weight: 600;
}

.inad-msg-desc {
    margin-top: 2px;
    color: var(--kolek-muted);
    font-size: 12px;
    line-height: 1.3;
}

/* ---- Lista de faturas com checkbox (baixa individual) ---- */
.inad-faturas-check {
    padding: 10px;
    border: 1px solid var(--kolek-soft-line);
    border-radius: 4px;
    background: #fafafa;
}

.inad-faturas-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

/* ---- Acentos dos botões de ação (o Kolek é monocromático: só a borda/texto ganham cor) ---- */
.btn-kolek-outline.inad-btn-ok {
    border-color: #a9d391;
    color: #168421;
}

.btn-kolek-outline.inad-btn-alerta {
    border-color: #e8cf6a;
    color: #6b5200;
}

/* ---- Menu de exportação ---- */
.inad-export {
    position: relative;
    display: inline-block;
}

.inad-export-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    display: none;
    min-width: 292px;
    overflow: hidden;
    border: 1px solid var(--kolek-line);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.inad-export-menu.aberto {
    display: block;
}

.inad-export-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    color: #222;
    font-size: 11px;
    text-decoration: none;
}

.inad-export-menu a:hover {
    background: #f6f6f6;
}

.inad-export-titulo {
    padding: 7px 14px;
    background: #fafafa;
    color: var(--kolek-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

@media (max-width: 1200px) {
    .inad-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1000px) {
    .inad-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .inad-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inad-modal-kpis {
        grid-template-columns: 1fr;
    }

    /* No celular o modal já é estreito: dois cartões lado a lado quebrariam o texto em coluna fina. */
    .inad-msg-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
