:root {
    --color-brand: #a8d91d;
    --color-brand-dark: #8fba16;
    --color-text: #202124;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-bg: #f5f6f8;
    --color-surface: #ffffff;
    --color-danger: #b42318;
    --color-ink: #111827;
    --color-soft: #f8fafc;
    --shadow-sm: 0 8px 24px rgba(20, 24, 32, .08);
    --shadow-md: 0 18px 48px rgba(16, 24, 40, .10);
    --sidebar-width: 256px;
    --sidebar-collapsed-width: 76px;
    --topbar-height: 82px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f7f8fa 0%, #eef1f4 100%);
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 420px);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 32px;
}

.login-logo {
    width: 190px;
    max-width: 100%;
    display: block;
    margin-bottom: 24px;
}

.login-card h1 {
    font-size: 26px;
    margin: 0 0 8px;
}

.login-card p {
    color: var(--color-muted);
    margin: 0 0 24px;
}

.login-card .auth-notice {
    padding: 12px 14px;
    border: 1px solid #d8eab0;
    border-radius: 6px;
    background: #f7fbe9;
    color: #334019;
}

.auth-forgot,
.auth-back {
    color: #526c0c;
    font-weight: 700;
    font-size: 14px;
}

.auth-forgot {
    display: block;
    text-align: right;
    margin: -4px 0 18px;
}

.auth-back {
    display: inline-block;
    margin-top: 22px;
}

.auth-forgot:hover,
.auth-back:hover {
    text-decoration: underline;
}

.login-card .auth-submit {
    width: 100%;
}

label {
    display: grid;
    gap: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font: inherit;
    padding: 12px 14px;
    outline: none;
}

input[type="search"] {
    appearance: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-brand-dark);
    box-shadow: 0 0 0 3px rgba(168, 217, 29, .2);
}

button,
.button {
    border: 0;
    border-radius: 8px;
    background: var(--color-brand);
    color: #182000;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-weight: 800;
    min-height: 44px;
    padding: 0 18px;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

button:hover,
.button:hover {
    background: var(--color-brand-dark);
}

.button.compact {
    min-height: 38px;
    padding: 0 14px;
}

.alert {
    background: #fff1f0;
    border: 1px solid #ffccc7;
    border-radius: 8px;
    color: var(--color-danger);
    font-weight: 700;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.notice {
    background: #f0f9e8;
    border: 1px solid #d5edaf;
    border-radius: 8px;
    color: #315200;
    font-weight: 800;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns .2s ease;
}

body.sidebar-collapsed .app-shell {
    grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

html.sidebar-collapsed-preload .app-shell {
    grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

.sidebar {
    background: rgba(255, 255, 255, .88);
    border-right: 1px solid rgba(229, 231, 235, .88);
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100vh;
    padding: 16px 12px;
    position: sticky;
    top: 0;
    transition: width .2s ease, padding .2s ease;
    z-index: 20;
}

.sidebar-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-height: 48px;
}

.brand {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 6px 8px;
}

.brand img {
    display: block;
    flex: 0 0 auto;
    max-width: 116px;
    width: 116px;
}

.brand span {
    display: none;
}

.icon {
    display: block;
    fill: currentColor;
    height: 20px;
    width: 20px;
}

.sidebar-toggle,
.icon-button {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: #475467;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    min-height: 38px;
    padding: 0;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
    width: 38px;
}

.sidebar-toggle:hover,
.icon-button:hover {
    background: #eef1f4;
    color: #101828;
}

.nav {
    display: grid;
    gap: 4px;
}

.nav-section {
    color: #98a2b3;
    font-size: 11px;
    font-weight: 900;
    margin: 16px 10px 6px;
    overflow: hidden;
    text-transform: uppercase;
    transition: opacity .16s ease;
    white-space: nowrap;
}

.nav-link {
    align-items: center;
    border-radius: 8px;
    color: #475467;
    display: grid;
    font-weight: 800;
    gap: 10px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    min-height: 42px;
    padding: 0 10px;
    position: relative;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav-link::before {
    background: transparent;
    border-radius: 999px;
    content: "";
    height: 20px;
    left: -8px;
    position: absolute;
    transition: background .18s ease;
    width: 3px;
}

.nav-link.active {
    background: #f1f8dc;
    color: #263800;
}

.nav-link.active::before {
    background: var(--color-brand);
}

.nav-link:hover {
    background: #f7f9fb;
    color: #101828;
}

.nav-group {
    display: grid;
    gap: 4px;
}

.nav-group summary {
    cursor: pointer;
    list-style: none;
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-caret {
    color: #98a2b3;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform .18s ease, color .18s ease;
}

.nav-group[open] .nav-caret {
    color: #516900;
    transform: rotate(90deg);
}

.nav-submenu {
    border-left: 1px solid #e4e7ec;
    display: grid;
    gap: 2px;
    margin: 0 0 2px 20px;
    padding: 2px 0 2px 12px;
}

.nav-submenu a {
    border-radius: 7px;
    color: #667085;
    font-size: 13px;
    font-weight: 800;
    min-height: 32px;
    padding: 8px 10px;
}

.nav-submenu a.active,
.nav-submenu a:hover {
    background: #f8fbea;
    color: #263800;
}

.nav-link.disabled {
    color: #98a2b3;
    cursor: default;
}

.nav-link.disabled:hover {
    background: transparent;
    color: #98a2b3;
}

.nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-pill {
    background: #eef1f4;
    border-radius: 999px;
    color: #667085;
    font-size: 11px;
    padding: 3px 7px;
}

.sidebar-footer {
    align-items: center;
    background: #fafbfc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    margin-top: auto;
    min-height: 58px;
    padding: 10px;
}

.workspace-dot {
    background: var(--color-brand);
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(168, 217, 29, .18);
    flex: 0 0 auto;
    height: 10px;
    width: 10px;
}

.sidebar-footer strong,
.sidebar-footer span {
    display: block;
}

.sidebar-footer strong {
    font-size: 13px;
}

.sidebar-footer span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
}

body.sidebar-collapsed .sidebar {
    padding-left: 10px;
    padding-right: 10px;
}

html.sidebar-collapsed-preload .sidebar {
    padding-left: 10px;
    padding-right: 10px;
}

body.sidebar-collapsed .brand {
    justify-content: center;
    padding: 6px 0;
    width: 100%;
}

html.sidebar-collapsed-preload .brand {
    justify-content: center;
    padding: 6px 0;
    width: 100%;
}

body.sidebar-collapsed .brand img {
    max-width: 38px;
    object-fit: contain;
    object-position: left;
    width: 38px;
}

html.sidebar-collapsed-preload .brand img {
    max-width: 38px;
    object-fit: contain;
    object-position: left;
    width: 38px;
}

body.sidebar-collapsed .sidebar-head {
    display: grid;
    gap: 8px;
    justify-items: center;
}

html.sidebar-collapsed-preload .sidebar-head {
    display: grid;
    gap: 8px;
    justify-items: center;
}

body.sidebar-collapsed .nav-section,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-pill,
body.sidebar-collapsed .nav-caret,
body.sidebar-collapsed .sidebar-footer div {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

html.sidebar-collapsed-preload .nav-section,
html.sidebar-collapsed-preload .nav-label,
html.sidebar-collapsed-preload .nav-pill,
html.sidebar-collapsed-preload .nav-caret,
html.sidebar-collapsed-preload .sidebar-footer div {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

body.sidebar-collapsed .nav-link {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
}

html.sidebar-collapsed-preload .nav-link {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
}

body.sidebar-collapsed .nav-submenu,
html.sidebar-collapsed-preload .nav-submenu {
    display: none;
}

body.sidebar-collapsed .nav-link:hover::after {
    background: #101828;
    border-radius: 8px;
    color: #ffffff;
    content: attr(data-tooltip);
    font-size: 12px;
    font-weight: 800;
    left: calc(100% + 10px);
    padding: 7px 9px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    z-index: 50;
}

body.sidebar-collapsed .sidebar-footer {
    justify-content: center;
}

html.sidebar-collapsed-preload .sidebar-footer {
    justify-content: center;
}

.mobile-nav-backdrop {
    display: none;
}

.main {
    min-width: 0;
}

.topbar {
    align-items: center;
    backdrop-filter: blur(16px);
    background: rgba(245, 246, 248, .86);
    border-bottom: 1px solid rgba(229, 231, 235, .9);
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: var(--topbar-height);
    padding: 14px 28px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-title {
    min-width: 0;
}

.breadcrumbs {
    align-items: center;
    color: var(--color-muted);
    display: flex;
    font-size: 12px;
    font-weight: 800;
    gap: 7px;
    margin-bottom: 2px;
}

.breadcrumbs strong {
    color: #344054;
}

.eyebrow {
    color: var(--color-muted);
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.topbar h1 {
    font-size: 24px;
    margin: 2px 0 0;
}

.topbar p {
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 700;
    margin: 5px 0 0;
}

.topbar-tools {
    align-items: center;
    display: flex;
    gap: 10px;
}

.global-search {
    align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: 20px minmax(180px, 260px);
    min-height: 40px;
    padding: 0 12px;
}

.global-search .icon {
    color: #98a2b3;
}

.global-search input {
    border: 0;
    box-shadow: none;
    min-height: auto;
    padding: 0;
}

.global-search input:focus {
    box-shadow: none;
}

.quick-action {
    align-items: center;
    background: #101828;
    border-radius: 8px;
    color: #ffffff;
    display: inline-flex;
    font-size: 14px;
    font-weight: 900;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
}

.quick-action:hover {
    background: #26313d;
}

.user-menu {
    align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    min-height: 42px;
    padding: 6px 10px 6px 6px;
}

.avatar {
    align-items: center;
    background: #eef6d5;
    border-radius: 8px;
    color: #263800;
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.user-menu strong,
.user-menu a,
.user-menu-actions {
    display: block;
    font-size: 12px;
    line-height: 1.15;
}

.user-menu a {
    color: #516900;
    margin-top: 3px;
}

.user-menu-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-top: 3px;
}

.user-menu-actions a {
    margin-top: 0;
}

.user-menu-actions a + a {
    border-left: 1px solid var(--color-border);
    padding-left: 8px;
}

.user-menu-actions form {
    margin: 0;
}

.user-menu-link {
    background: transparent;
    border: 0;
    color: #516900;
    font-size: 12px;
    font-weight: inherit;
    min-height: 0;
    padding: 0 0 0 8px;
    border-left: 1px solid var(--color-border);
}

.user-menu-link:hover {
    background: transparent;
    color: #263800;
}

.content {
    padding: 24px clamp(22px, 3vw, 40px) 40px;
}

@media (max-width: 1180px) and (min-width: 861px) {
    :root {
        --sidebar-width: 76px;
    }

    .sidebar {
        padding-left: 10px;
        padding-right: 10px;
    }

    .sidebar-head {
        display: grid;
        gap: 8px;
        justify-items: center;
    }

    .brand {
        justify-content: center;
        padding: 6px 0;
        width: 100%;
    }

    .brand img {
        max-width: 38px;
        object-fit: contain;
        object-position: left;
        width: 38px;
    }

    .nav-section,
    .nav-label,
    .nav-pill,
    .nav-caret,
    .sidebar-footer div {
        opacity: 0;
        pointer-events: none;
        position: absolute;
    }

    .nav-link {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 0;
    }

    .nav-submenu {
        display: none;
    }

    .nav-link:hover::after {
        background: #101828;
        border-radius: 8px;
        color: #ffffff;
        content: attr(data-tooltip);
        font-size: 12px;
        font-weight: 800;
        left: calc(100% + 10px);
        padding: 7px 9px;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        white-space: nowrap;
        z-index: 50;
    }

    .sidebar-footer {
        justify-content: center;
    }

    .topbar {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .topbar-tools {
        width: 100%;
    }

    .global-search {
        flex: 1;
        grid-template-columns: 20px minmax(0, 1fr);
    }
}

.stats-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.stat-card,
.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.stat-card {
    display: grid;
    gap: 10px;
    padding: 20px;
    position: relative;
}

.stat-card::before {
    background: var(--color-brand);
    border-radius: 999px;
    content: "";
    height: 8px;
    position: absolute;
    right: 18px;
    top: 18px;
    width: 8px;
}

.stat-card span {
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 800;
}

.stat-card strong {
    font-size: 34px;
}

.panel {
    padding: 22px;
}

.panel h2 {
    font-size: 18px;
    margin: 0 0 8px;
}

.panel p {
    color: var(--color-muted);
    margin: 0;
}

.page-actions {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.page-hint {
    display: grid;
    gap: 4px;
}

.page-hint strong {
    font-size: 16px;
}

.page-hint span {
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 700;
}

.filter-bar {
    align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
    padding: 8px;
    width: min(100%, 760px);
}

.filter-bar.users-filter {
    grid-template-columns: minmax(220px, 1fr) 190px 190px 150px auto auto;
    width: min(100%, 1080px);
}

.filter-bar.client-users-filter {
    grid-template-columns: minmax(220px, 1fr) 190px 150px auto auto;
    width: min(100%, 860px);
}

.filter-bar.forms-filter {
    grid-template-columns: minmax(220px, 1fr) 220px 170px 150px auto auto;
    width: min(100%, 1120px);
}

.filter-bar.client-forms-filter {
    grid-template-columns: minmax(220px, 1fr) 150px auto auto;
    width: min(100%, 780px);
}

.filter-bar.leads-filter {
    grid-template-columns: minmax(220px, 1.2fr) repeat(6, minmax(130px, auto)) auto auto;
    width: min(100%, 1380px);
}

.filter-context {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
    padding: 0 8px;
}

.filter-bar input,
.filter-bar select {
    margin: 0;
    min-height: 38px;
    padding: 9px 12px;
}

.button.secondary {
    background: #eef1f4;
    color: #26313d;
}

.button.secondary:hover {
    background: #e4e8ee;
}

.danger-action {
    background: #fff1f0;
    color: var(--color-danger);
}

.danger-action:hover {
    background: #ffd8d3;
}

.table-panel,
.form-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.table-panel {
    overflow: hidden;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--color-border);
    padding: 16px 18px;
    text-align: left;
    vertical-align: middle;
}

td {
    background: #ffffff;
}

th {
    background: #fafbfc;
    color: #475467;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

tbody tr:hover td {
    background: #fcfdf6;
}

td strong,
td span {
    display: block;
}

td span {
    color: var(--color-muted);
    font-size: 13px;
    margin-top: 4px;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.empty-state {
    align-items: center;
    color: var(--color-muted);
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 28px 16px;
    text-align: center;
}

.empty-state strong {
    color: var(--color-text);
    font-size: 16px;
}

.empty-state span {
    color: var(--color-muted);
    margin: 0;
}

.status-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    padding: 6px 10px;
}

.status-badge.ativo {
    background: #edf9d3;
    color: #365600;
}

.status-badge.inativo {
    background: #f2f4f7;
    color: #475467;
}

.status-badge.aberto {
    background: #eaf2ff;
    color: #174ea6;
}

.status-badge.ganho {
    background: #e8f7ed;
    color: #166534;
}

.status-badge.perdido {
    background: #fff1f0;
    color: #b42318;
}

.status-badge.arquivado {
    background: #f2f4f7;
    color: #475467;
}

.status-badge.pendente {
    background: #fff4d8;
    color: #876000;
}

.status-badge.concluida {
    background: #e8f7ed;
    color: #166534;
}

.status-badge.cancelada {
    background: #f2f4f7;
    color: #475467;
}

.table-actions {
    text-align: right;
    white-space: nowrap;
}

.table-actions form {
    display: inline-block;
    margin-left: 12px;
}

.table-actions a {
    display: inline-block;
    margin-left: 12px;
}

.table-actions a,
.link-button {
    background: transparent;
    color: #516900;
    font-size: 14px;
    font-weight: 900;
    min-height: auto;
    padding: 0;
}

.link-button:hover {
    background: transparent;
    color: #2d3d00;
}

.danger-link {
    color: var(--color-danger);
}

.danger-link:hover {
    color: #7a271a;
}

.table-actions form:first-child,
.table-actions a:first-child {
    margin-left: 0;
}

.entity-form {
    display: grid;
    gap: 18px;
}

.form-section {
    padding: 22px;
}

.form-section h2 {
    font-size: 18px;
    margin: 0 0 18px;
}

.section-title {
    border-bottom: 1px solid var(--color-border);
    margin: -2px 0 18px;
    padding-bottom: 14px;
}

.section-title h2 {
    margin: 0 0 5px;
}

.section-title p {
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 700;
    margin: 0;
}

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid.user-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label:nth-child(1),
.form-grid label:nth-child(2),
.form-grid label:nth-child(3),
.form-grid label:has(textarea) {
    grid-column: span 2;
}

.toggle-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
}

.logo-preview {
    align-items: center;
    background: #fafbfc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: inline-flex;
    gap: 14px;
    margin: 8px 0 16px;
    padding: 12px 14px;
}

.logo-preview span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 900;
}

.logo-preview img {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    display: block;
    max-height: 52px;
    max-width: 160px;
    object-fit: contain;
    padding: 6px;
}

.check-label {
    align-items: center;
    background: #fafbfc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    font-weight: 800;
    gap: 10px;
    margin: 0;
    padding: 14px;
}

.check-label input {
    width: auto;
}

.checkbox-card {
    align-items: center;
    background: #fafbfc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 0;
    padding: 14px;
}

.checkbox-card input {
    width: auto;
}

.form-check-group {
    border: 0;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.form-check-group legend {
    color: var(--color-text);
    font-size: 0.86rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.form-check-group label {
    align-items: center;
    background: #fafbfc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
}

.form-check-group input {
    width: auto;
}

.form-footer {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    justify-content: flex-end;
    position: sticky;
    bottom: 0;
    padding: 16px;
    z-index: 2;
}

.form-inline-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 4px;
}

.color-dot {
    background: var(--dot-color);
    border-radius: 999px;
    display: inline-flex;
    height: 9px;
    margin-right: 8px;
    margin-top: 0;
    vertical-align: 1px;
    width: 9px;
}

.table-toolbar {
    align-items: center;
    background: #fafbfc;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 14px 16px;
}

.table-toolbar div {
    display: grid;
    gap: 3px;
}

.table-toolbar strong {
    font-size: 15px;
}

.table-toolbar span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.save-state {
    background: #f2f4f7;
    border-radius: 999px;
    color: #667085;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 900;
    padding: 6px 10px;
}

.save-state[data-state="saving"] {
    background: #fff7e6;
    color: #9a5b00;
}

.save-state[data-state="saved"] {
    background: #edf9d3;
    color: #365600;
}

.save-state[data-state="error"] {
    background: #fff1f0;
    color: var(--color-danger);
}

.drag-column {
    text-align: center;
    width: 52px;
}

.drag-handle {
    background: #f2f4f7;
    color: #667085;
    cursor: grab;
    font-size: 16px;
    letter-spacing: 0;
    min-height: 32px;
    padding: 0;
    touch-action: none;
    user-select: none;
    width: 32px;
}

.drag-handle:hover {
    background: #e4e8ee;
}

[data-stage-row] {
    cursor: grab;
}

[data-stage-row].is-dragging td {
    background: #fbfdf3;
    opacity: .72;
}

body.is-sorting-stage,
body.is-sorting-stage * {
    cursor: grabbing;
    user-select: none;
}

.helper-text {
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 700;
    margin: 2px 0 0;
}

.readonly-field {
    background: #fafbfc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
    padding: 13px 14px;
}

.readonly-field span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 900;
}

.readonly-field strong {
    color: var(--color-text);
    font-size: 15px;
}

.token-code {
    background: #f3f5f7;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: #344054;
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    padding: 5px 7px;
}

.endpoint-row {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.endpoint-box {
    background: #f7f8fa;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow-x: auto;
    padding: 13px 14px;
}

.endpoint-box code {
    color: #344054;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    white-space: nowrap;
}

.endpoint-box.code-sample code {
    display: block;
    line-height: 1.65;
    white-space: normal;
}

.section-heading-row {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-heading-row h2 {
    margin-bottom: 6px;
}

.section-heading-row h3 {
    font-size: 16px;
    margin: 0 0 4px;
}

.detected-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detected-card {
    align-items: center;
    background: #fafbfc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 160px auto;
    padding: 14px;
}

.detected-card strong,
.detected-card span {
    display: block;
}

.detected-card span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

.embedded-table {
    border: 0;
    box-shadow: none;
}

.technical-details {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-top: 18px;
    padding: 16px 18px;
}

.technical-details summary {
    color: #344054;
    cursor: pointer;
    font-weight: 900;
}

.technical-details.inline-technical {
    background: #fafbfc;
    margin-top: 14px;
}

.technical-grid {
    margin-top: 14px;
}

.lead-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 360px;
}

.lead-layout.lower {
    grid-template-columns: 420px minmax(0, 1fr);
    margin-top: 18px;
}

.lead-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-summary div {
    background: #fafbfc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 14px;
}

.lead-summary span {
    color: var(--color-muted);
    display: block;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.lead-summary strong {
    display: block;
    overflow-wrap: anywhere;
}

.message-box {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: #344054;
    font-weight: 700;
    line-height: 1.55;
    margin-top: 14px;
    padding: 14px;
}

.readonly-field,
.assign-box {
    background: #fafbfc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 14px;
}

.readonly-field span {
    color: var(--color-muted);
    display: block;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.readonly-field strong {
    display: block;
}

.assign-box {
    margin-bottom: 0;
    margin-top: 18px;
}

.assign-box .section-title {
    margin-bottom: 12px;
}

.assign-box button {
    width: 100%;
}

.nested-title {
    margin-top: 22px;
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline article {
    border-left: 3px solid var(--color-brand);
    padding: 6px 0 8px 14px;
}

.timeline-item {
    align-items: flex-start;
    display: grid;
    gap: 12px;
    grid-template-columns: 34px minmax(0, 1fr);
}

.timeline-item.atividade {
    border-left-color: #313946;
}

.timeline-marker {
    align-items: center;
    background: #eef3f8;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: #313946;
    display: flex;
    font-size: 12px;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.timeline-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.timeline strong,
.timeline span,
.timeline p {
    display: block;
}

.timeline p {
    color: #303946;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    margin: 7px 0 0;
}

.timeline span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

.activity-list {
    display: grid;
    gap: 10px;
}

.activity-list article {
    align-items: center;
    background: #fbfcfd;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px;
}

.activity-list article.is-late {
    border-color: #ffd0c7;
    box-shadow: inset 3px 0 0 #e85136;
}

.activity-list span,
.activity-list small {
    color: var(--color-muted);
    display: block;
    font-size: 12px;
    font-weight: 800;
}

.activity-list strong {
    display: block;
    margin: 3px 0;
}

.lead-detail-page {
    display: grid;
    gap: 16px;
    margin: 0 auto;
    max-width: 1360px;
}

.lead-actions {
    margin-bottom: 0;
}

.lead-workspace-grid {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 360px;
}

.lead-primary-column,
.lead-side-column {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.lead-side-column {
    position: sticky;
    top: 104px;
}

.lead-card {
    padding: 20px;
}

.lead-card .section-title {
    margin-bottom: 16px;
}

.lead-info-card .lead-summary {
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lead-info-card .lead-summary div {
    background: #fbfcfd;
    min-height: 74px;
    padding: 13px 14px;
}

.lead-info-card .lead-summary .lead-value-summary {
    background: #f8fbea;
    border-color: #d8eca0;
}

.lead-info-card .lead-summary .lead-value-summary span {
    color: #516900;
}

.lead-info-card .lead-summary .lead-value-summary strong {
    color: #263800;
    font-size: 17px;
}

.lead-info-card .lead-summary strong {
    font-size: 15px;
    line-height: 1.35;
}

.lead-info-card .nested-title {
    margin-top: 24px;
}

.lead-operation-card button[type="submit"],
.lead-operation-card .assign-box button {
    width: 100%;
}

.lead-operation-card .assign-box {
    background: #fbfcfd;
    margin-top: 18px;
}

.closing-fields {
    background: #fbfcfd;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin: 12px 0;
    padding: 12px;
}

.closing-fields[hidden] {
    display: none;
}

.closing-fields textarea {
    min-height: 92px;
}

.closing-hint {
    background: #fff9f3;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
}

.closing-hint strong,
.closing-hint span {
    display: block;
}

.closing-hint strong {
    color: #9a3412;
    font-size: 13px;
}

.closing-hint span {
    color: #7c2d12;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 3px;
}

.lead-activity-card {
    padding-bottom: 18px;
}

.lead-activity-form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-activity-card textarea {
    min-height: 104px;
}

.lead-next-card .empty-note {
    margin: 0;
}

.lead-timeline-card {
    margin-bottom: 0;
}

.lead-timeline {
    gap: 0;
    position: relative;
}

.lead-timeline::before {
    background: #e7ebf0;
    bottom: 10px;
    content: "";
    left: 16px;
    position: absolute;
    top: 8px;
    width: 2px;
}

.lead-timeline .timeline-item {
    border-left: 0;
    gap: 14px;
    padding: 0 0 18px;
    position: relative;
}

.lead-timeline .timeline-item:last-child {
    padding-bottom: 0;
}

.lead-timeline .timeline-marker {
    background: #ffffff;
    position: relative;
    z-index: 1;
}

.lead-timeline .timeline-item.atividade .timeline-marker {
    background: #f3f6f9;
}

.lead-timeline .timeline-head {
    justify-content: flex-start;
}

.lead-timeline .timeline-head strong {
    font-size: 15px;
}

.lead-timeline p {
    background: #fbfcfd;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 10px 12px;
}

.inline-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

.compact-actions {
    flex-wrap: wrap;
    margin-top: 0;
}

.bulk-actions-bar {
    align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 12px;
    padding: 10px;
}

.bulk-actions-bar select {
    max-width: 220px;
    min-height: 38px;
    padding: 8px 12px;
}

.bulk-check {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin: 0 auto 0 0;
    white-space: nowrap;
}

.bulk-check input,
.select-column input {
    width: auto;
}

.select-column {
    text-align: center;
    width: 44px;
}

.import-guide {
    background: #fafbfc;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-muted);
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding: 14px;
}

.import-guide strong {
    color: var(--color-text);
}

.import-result {
    margin-top: 18px;
}

.import-map-table {
    box-shadow: none;
}

.preview-value {
    color: var(--color-muted);
    display: block;
    font-size: 13px;
    font-weight: 700;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    align-items: center;
    background: rgba(16, 24, 40, .46);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 22px;
    position: fixed;
    z-index: 50;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(16, 24, 40, .22);
    max-width: 520px;
    padding: 20px;
    width: min(100%, 520px);
}

.modal-head {
    align-items: flex-start;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 14px;
}

.modal-head span {
    color: #516900;
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.modal-head h2 {
    font-size: 20px;
    margin: 0 0 5px;
}

.modal-head p {
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 700;
    margin: 0;
}

.closing-modal-field[hidden] {
    display: none;
}

.closing-modal-card textarea {
    min-height: 94px;
}

.modal-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

.funnel-card-foot {
    border-top: 1px solid #f2f4f7;
    padding-top: 9px;
}

.funnel-empty {
    border: 1px dashed var(--color-border);
    border-radius: 8px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
    padding: 18px 10px;
    text-align: center;
}

.checkbox-options {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 12px;
}

.checkbox-options label {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin: 0;
}

.checkbox-options input {
    width: auto;
}

.compact-table {
    margin-top: 14px;
}

.empty-note {
    background: #fafbfc;
    border: 1px dashed var(--color-border);
    border-radius: 8px;
    color: var(--color-muted);
    font-weight: 800;
    margin: 14px 0 0;
    padding: 14px;
}

@media (max-width: 860px) {
    :root {
        --topbar-height: auto;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    body.sidebar-collapsed .app-shell,
    html.sidebar-collapsed-preload .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        background: rgba(255, 255, 255, .96);
        border-bottom: 1px solid rgba(229, 231, 235, .92);
        border-right: 0;
        height: auto;
        padding: 12px 16px;
        position: sticky;
        top: 0;
        width: auto;
        z-index: 80;
    }

    .nav {
        background: #ffffff;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        box-shadow: 0 18px 48px rgba(16, 24, 40, .14);
        display: grid;
        gap: 4px;
        left: 14px;
        max-height: min(calc(100vh - 86px), 620px);
        opacity: 0;
        overflow: auto;
        padding: 12px;
        pointer-events: none;
        position: absolute;
        right: 14px;
        top: calc(100% + 8px);
        transform: translateY(-8px);
        transition: opacity .18s ease, transform .18s ease;
        visibility: hidden;
        z-index: 90;
    }

    body.mobile-nav-open .nav {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        visibility: visible;
    }

    .mobile-nav-backdrop {
        background: rgba(16, 24, 40, .18);
        border: 0;
        border-radius: 0;
        display: none;
        inset: 0;
        min-height: 0;
        padding: 0;
        position: fixed;
        z-index: 70;
    }

    body.mobile-nav-open .mobile-nav-backdrop {
        display: block;
    }

    .mobile-nav-backdrop:hover {
        background: rgba(16, 24, 40, .18);
    }

    .sidebar-head {
        display: flex;
        min-height: 48px;
    }

    body.sidebar-collapsed .sidebar-head,
    html.sidebar-collapsed-preload .sidebar-head {
        display: flex;
        justify-items: stretch;
    }

    body.sidebar-collapsed .brand,
    html.sidebar-collapsed-preload .brand {
        justify-content: flex-start;
        padding: 6px 8px;
        width: auto;
    }

    .brand img,
    body.sidebar-collapsed .brand img,
    html.sidebar-collapsed-preload .brand img {
        max-width: 112px;
        width: 112px;
    }

    .sidebar-footer,
    .nav-pill {
        display: none;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .nav-section {
        display: block;
        margin: 12px 10px 6px;
    }

    body.sidebar-collapsed .nav-section,
    html.sidebar-collapsed-preload .nav-section {
        opacity: 1;
        pointer-events: auto;
        position: static;
    }

    .nav-link,
    body.sidebar-collapsed .nav-link,
    html.sidebar-collapsed-preload .nav-link {
        grid-template-columns: 22px minmax(0, 1fr) auto;
        justify-items: stretch;
        min-height: 44px;
        padding: 0 10px;
    }

    body.sidebar-collapsed .nav-label,
    body.sidebar-collapsed .nav-caret,
    html.sidebar-collapsed-preload .nav-label {
        opacity: 1;
        pointer-events: auto;
        position: static;
    }

    html.sidebar-collapsed-preload .nav-caret {
        opacity: 1;
        pointer-events: auto;
        position: static;
    }

    body.sidebar-collapsed .nav-submenu,
    html.sidebar-collapsed-preload .nav-submenu {
        display: grid;
    }

    .nav-submenu {
        margin-left: 18px;
    }

    .topbar {
        align-items: stretch;
        gap: 12px;
        grid-template-columns: 1fr;
        position: static;
        padding: 14px 16px;
    }

    .topbar-tools {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr 44px;
    }

    .global-search {
        grid-column: 1 / -1;
        grid-template-columns: 20px minmax(0, 1fr);
        width: 100%;
    }

    .quick-action {
        grid-column: 1;
        width: 100%;
    }

    .user-menu {
        grid-column: 1 / -1;
        justify-content: flex-start;
        margin-left: 0;
        min-width: 0;
    }

    .icon-button {
        grid-column: 2;
        grid-row: 2;
    }

    .notifications-menu {
        grid-column: 2;
        grid-row: 2;
    }

    .notifications-menu .icon-button {
        grid-column: auto;
        grid-row: auto;
    }

    .notifications-dropdown {
        min-width: 0;
        position: fixed;
        right: 14px;
        left: 14px;
        top: 132px;
    }

    .content {
        padding: 16px 14px 32px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid,
    .dashboard-filter,
    .dashboard-kpi-grid,
    .dashboard-workspace,
    .dashboard-lower-grid,
    .integration-form-page,
    .integration-grid,
    .funnel-controls,
    .funnel-filter,
    .funnel-summary,
    .leads-filter-panel,
    .reports-filter,
    .reports-kpi-grid,
    .reports-grid,
    .profile-layout,
    .profile-form-grid,
    .profile-form-grid.security-grid {
        grid-template-columns: 1fr;
    }

    .profile-hero,
    .profile-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-badges {
        justify-content: flex-start;
    }

    .profile-side {
        position: static;
    }

    .notifications-hero,
    .notifications-page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .notification-row {
        align-items: flex-start;
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 14px;
    }

    .notification-row em {
        grid-column: 2;
    }

    .integration-aside {
        gap: 14px;
        padding: 16px;
        position: static;
    }

    .integration-steps {
        display: none;
    }

    .integration-panel-head {
        align-items: flex-start;
        padding: 16px;
    }

    .integration-grid {
        gap: 14px;
        padding: 16px;
    }

    .integration-grid label:first-child:nth-last-child(odd) {
        grid-column: auto;
    }

    .integration-panel .helper-text {
        padding: 13px 16px 16px;
    }

    .integration-panel .endpoint-box {
        margin: 16px;
    }

    .integration-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .integration-footer button {
        width: 100%;
    }

    .dashboard-hero,
    .dashboard-hero-actions,
    .dashboard-custom-period {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-page {
        gap: 12px;
    }

    .dashboard-page .dashboard-hero,
    .dashboard-filter,
    .dashboard-page .dashboard-kpi,
    .dashboard-page .dashboard-panel {
        border-radius: 8px;
        padding: 16px;
    }

    .dashboard-filter {
        align-items: stretch;
        gap: 12px;
    }

    .dashboard-filter > div span {
        line-height: 1.35;
    }

    .dashboard-period-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .dashboard-period-tabs a {
        min-height: 38px;
        padding: 10px 8px;
        text-align: center;
    }

    .dashboard-custom-wrap summary {
        width: 100%;
    }

    .dashboard-custom-period {
        box-shadow: none;
        position: static;
        margin-top: 8px;
    }

    .dashboard-custom-period input,
    .dashboard-custom-period button {
        min-width: 0;
        width: 100%;
    }

    .dashboard-kpi-grid {
        gap: 10px;
    }

    .dashboard-page .dashboard-kpi {
        gap: 6px;
        min-height: auto;
    }

    .dashboard-page .dashboard-kpi strong {
        font-size: 22px;
    }

    .dashboard-panel-head {
        align-items: flex-start;
        gap: 8px;
    }

    .dashboard-row {
        align-items: flex-start;
    }

    .page-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-bar,
    .filter-bar.users-filter,
    .filter-bar.forms-filter,
    .filter-bar.leads-filter,
    .form-grid,
    .toggle-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .leads-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .funnel-toolbar {
        align-items: stretch;
        flex-direction: column;
        padding: 16px;
    }

    .funnel-title-block {
        align-items: flex-start;
        display: grid;
        gap: 3px;
        min-width: 0;
    }

    .funnel-controls {
        align-items: stretch;
        flex-direction: column;
        min-height: 0;
    }

    .funnel-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .funnel-filter label {
        flex: 0 0 auto;
        max-width: none;
        min-width: 0;
    }

    .funnel-title-block .eyebrow,
    .funnel-title-block strong,
    .funnel-title-block small {
        white-space: normal;
    }

    .funnel-summary {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .funnel-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .funnel-new-lead {
        width: 100%;
    }

    .funnel-shell {
        height: auto;
        min-height: 0;
        margin-inline: 0;
        padding-bottom: 10px;
    }

    .funnel-board {
        grid-auto-columns: minmax(286px, 88vw);
        min-height: 560px;
    }

    .leads-toolbar-actions,
    .leads-filter-actions,
    .leads-bulk-controls {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .lead-search-field {
        grid-column: auto;
    }

    .leads-bulk-bar {
        align-items: stretch;
        display: grid;
        gap: 10px;
        justify-content: stretch;
    }

    .bulk-check {
        margin: 0;
    }

    .leads-table-panel {
        background: transparent;
        border: 0;
        box-shadow: none;
        overflow: visible;
    }

    .leads-table,
    .leads-table thead,
    .leads-table tbody,
    .leads-table tr,
    .leads-table td {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .leads-table thead {
        display: none;
    }

    .leads-table tr {
        background: #ffffff;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
        margin-bottom: 10px;
        overflow: hidden;
    }

    .leads-table td {
        align-items: start;
        border-bottom: 1px solid #f2f4f7;
        display: grid;
        gap: 8px;
        grid-template-columns: 92px minmax(0, 1fr);
        padding: 12px 14px;
    }

    .leads-table td::before {
        color: #98a2b3;
        content: attr(data-label);
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .leads-table td:last-child {
        border-bottom: 0;
    }

    .leads-table .select-column {
        text-align: left;
        width: 100%;
    }

    .leads-table .table-actions {
        align-items: center;
        display: flex;
        gap: 14px;
        justify-content: flex-start;
        white-space: normal;
    }

    .leads-table .table-actions::before {
        display: none;
    }

    .endpoint-row {
        grid-template-columns: 1fr;
    }

    .integration-hero,
    .section-heading-row,
    .integration-token {
        align-items: stretch;
        flex-direction: column;
    }

    .integration-steps,
    .detected-grid,
    .detected-card,
    .lead-layout,
    .lead-layout.lower,
    .lead-summary {
        grid-template-columns: 1fr;
    }

    .form-grid label:nth-child(1),
    .form-grid label:nth-child(2),
    .form-grid label:nth-child(3),
    .form-grid label:has(textarea) {
        grid-column: auto;
    }

    .table-panel {
        overflow-x: auto;
    }

    table {
        min-width: 760px;
    }
}

@media (max-width: 1180px) {
    .lead-workspace-grid {
        grid-template-columns: 1fr;
    }

    .lead-side-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        position: static;
    }

    .lead-info-card .lead-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .lead-side-column,
    .lead-activity-form-grid,
    .lead-info-card .lead-summary {
        grid-template-columns: 1fr;
    }

    .lead-card {
        padding: 16px;
    }

    .lead-timeline .timeline-head {
        align-items: flex-start;
        flex-direction: column;
    }
}
