: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: 14px;
    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: 14px;
}

.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: 14px;
    font-weight: 500;
    text-decoration: none;
}

.kolek-nav-link i {
    width: 18px;
    min-width: 18px;
    color: #050505;
    font-size: 17px;
    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: 17px;
}

.kolek-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    color: var(--kolek-muted);
    font-size: 14px;
}

.kolek-breadcrumb a {
    color: #1d1d1d;
    text-decoration: none;
}

.kolek-breadcrumb i {
    font-size: 13px;
}

.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: 14px;
}

.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: 14px;
}

.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));
}

.kolek-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #222;
    font-size: 14px;
    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: 14px;
}

.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: 14px;
    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: 13px;
    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: 14px;
    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;
}

.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);
}

.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: #314487;
    color: #fff;
    box-shadow: 0 6px 16px rgba(49, 68, 135, .25);
}

.kolek-chat-button i {
    font-size: 30px;
}

.kolek-footer {
    margin: auto 20px 0;
    padding: 22px 0;
    color: #9aa0a6;
    font-size: 14px;
}

.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;
}

@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);
    }

    .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: 14px;
}

.kolek-login-field {
    margin-bottom: 18px;
}

.kolek-login-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
    font-weight: 400;
}

.kolek-login-input {
    height: 40px;
    border-radius: 4px;
    border-color: #d4d8e0;
    font-size: 14px;
    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: 13px;
    color: var(--kolek-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kolek-login-forgot:hover {
    color: var(--kolek-blue);
    opacity: .8;
}

.kolek-login-btn {
    width: 100%;
    height: 46px;
    margin-top: 10px;
    border: 0;
    border-radius: 4px;
    background: var(--kolek-blue);
    color: #fff;
    font-size: 15px;
    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: 14px;
}

.kolek-ob-card {
    width: 100%;
    max-width: 560px;
    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: 13px;
    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: 16px;
    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: 14px;
    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: 13px;
    line-height: 1.55;
    color: #333;
}

.kolek-ob-aceite {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.kolek-ob-faceid-quem {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 8px;
    background: #eef0f9;
    color: #303f92;
    font-size: 14px;
}

.kolek-ob-faceid-box {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.kolek-ob-faceid-box input {
    flex: 1;
}

.kolek-ob-faceid-box .btn-kolek-primary {
    white-space: nowrap;
}

.kolek-ob-foot-link {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
    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;
}

/* =====================================================================
   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: 14px;
}

.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: 14px;
}

.rec-reajuste {
    margin: 6px 0 18px;
}

.rec-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #222;
    font-size: 14px;
}

.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: 14px;
}

.rec-itens table {
    width: 100%;
    border-collapse: collapse;
}

.rec-itens th {
    padding: 6px 8px;
    color: #555;
    font-size: 13px;
    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: 14px;
}

.rec-itens input.num {
    text-align: right;
}

.rec-valor {
    color: #111;
    font-size: 14px;
    white-space: nowrap;
}

.rec-remove {
    border: 0;
    background: transparent;
    color: #b91c1c;
    font-size: 16px;
}

.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: 13px;
}

.rec-total-value {
    color: #111;
    font-size: 17px;
    font-weight: 700;
}

.rec-total-op {
    align-self: center;
    color: var(--kolek-muted);
    font-size: 16px;
}

.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: 14px;
}

.rec-preview-list .rec-fatura {
    padding: 7px 0;
    border-bottom: 1px solid var(--kolek-soft-line);
    color: var(--kolek-blue);
    font-size: 14px;
}

.rec-preview-retic {
    padding: 6px 0;
    color: var(--kolek-muted);
    font-size: 16px;
}

.rec-preview-rodape {
    margin-top: 12px;
    color: #111;
    font-weight: 700;
    font-size: 14px;
}

@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: 13px;
}

.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: 13px;
}

.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: 13px;
}

.rec-import-acao {
    margin-bottom: 16px;
}

.rec-import-acao label {
    display: block;
    margin-bottom: 8px;
    color: #222;
    font-size: 14px;
}

.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 / Contas Bancárias / Sair
   ===================================================================== */

.kolek-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #050505;
    font-size: 14px;
    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: 14px;
}

.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: 16px;
    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: 13px;
}

.kolek-info-value {
    color: #111;
    font-size: 15px;
}

/* =====================================================================
   Contas Bancárias - seções e cartões de conta
   ===================================================================== */

.kolek-section-title {
    margin: 0 0 14px;
    color: #444;
    font-size: 18px;
    font-weight: 400;
}

.kolek-bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    max-width: 980px;
}

.kolek-bank-card {
    display: flex;
    flex-direction: column;
    min-height: 168px;
    padding: 20px;
    background: var(--kolek-surface);
    border: 1px solid var(--kolek-soft-line);
    border-radius: var(--kolek-radius);
    box-shadow: var(--kolek-shadow);
}

.kolek-bank-card--principal {
    border-top: 3px solid var(--kolek-green);
}

.kolek-bank-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.kolek-bank-kolek {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--kolek-muted);
    font-size: 14px;
}

.kolek-bank-name {
    color: var(--kolek-muted);
    font-size: 14px;
}

.kolek-bank-holder {
    margin-bottom: 8px;
    color: #111;
    font-size: 16px;
    font-weight: 600;
}

.kolek-bank-line {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.7;
}

.kolek-bank-line strong {
    font-weight: 600;
}

.kolek-bank-principal-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #168421;
    font-size: 12px;
    font-weight: 600;
}

.kolek-bank-card-foot {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.kolek-bank-actions {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.kolek-bank-card--add {
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #fafafa;
    border: 1px dashed #cfcfcf;
    color: var(--kolek-muted);
    font-size: 15px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.kolek-bank-card--add:hover {
    background: #f2f2f2;
    border-color: #b6b6b6;
    color: #555;
}

.kolek-bank-add-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 1px solid #c8c8c8;
    border-radius: 50%;
    font-size: 30px;
    color: #9aa0a6;
}

/* 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: 14px;
}

/* 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: 14px;
}

.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;
}

/* 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: 14px;
}

.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: 16px;
    font-weight: 600;
}

.rec-modal-hint {
    margin-top: 6px;
    color: var(--kolek-muted);
    font-size: 13px;
}

.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: 14px;
}

.rec-radio-sub {
    color: var(--kolek-muted);
    font-size: 13px;
}

.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: 14px;
}

.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: 14px;
}

.rec-servico-remove {
    border: 0;
    background: transparent;
    color: #b91c1c;
    font-size: 16px;
}

.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: 13px;
}

.rec-modal-aviso i {
    font-size: 16px;
}

.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: 13px;
}

@media (max-width: 640px) {
    .rec-servico-linha {
        grid-template-columns: 1fr 70px 90px 32px;
    }

    .rec-bulkbar-actions {
        width: 100%;
    }
}
