:root {
    --radius: 8px;
    --brand-bark: #1f2937;
    --brand-cream: #fff1e5;
    --brand-sand: #f3f4f6;
    --brand-gold: #fe7500;
    --brand-gold-soft: #e96b00;
    --background: #fafafa;
    --foreground: #1f2937;
    --card: #ffffff;
    --muted: #f3f4f6;
    --muted-foreground: #6b7280;
    --border: #e5e7eb;
    --primary: #fe7500;
    --crm-sidebar: #353535;
    --crm-sidebar-accent: #434343;
    --crm-sidebar-highlight: #4f4f4f;
    --crm-sidebar-gold: #fe7500;
    --crm-success: #16a34a;
    --crm-warning: #d97706;
    --crm-danger: #dc2626;
    --chart-1: #3b82f6;
    --chart-2: #16a34a;
    --chart-3: #d97706;
    --chart-4: #dc2626;
    --chart-5: #a855f7;
    --font-serif: "Playfair Display", Georgia, serif;
    --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}

.report-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr)) auto;
    align-items: end;
    gap: .65rem;
    margin-bottom: .85rem;
    padding: .85rem;
}

.report-filters label {
    display: grid;
    gap: .35rem;
}

.report-filters label span {
    color: var(--muted-foreground);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.report-filters input,
.report-filters select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(61, 43, 31, .12);
    border-radius: 14px;
    background: #ffffff;
    color: var(--foreground);
    padding: .7rem .85rem;
    font: inherit;
}

.report-option-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.report-option {
    min-height: 142px;
    display: grid;
    align-content: start;
    gap: .55rem;
    padding: 1.1rem;
    border: 1px solid rgba(61, 43, 31, .1);
    border-radius: 0;
    background: #ffffff;
    color: var(--foreground);
    text-decoration: none;
    box-shadow: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.report-option:hover,
.report-option.active {
    transform: translateY(-2px);
    border-color: rgba(201, 168, 76, .75);
    box-shadow: 0 2px 6px rgba(61, 43, 31, .05);
}

.report-option i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 0;
    color: #20160f;
    background: #c9a84c;
    font-size: 1rem;
}

.report-option span {
    color: var(--foreground);
    font-weight: 900;
    font-size: 1.02rem;
    line-height: 1.15;
}

.report-option small {
    color: var(--muted-foreground);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.45;
}

.report-page,
.report-page * {
    font-family: var(--font-sans);
}

.report-page i,
.report-page .fa,
.report-page .fas,
.report-page .far {
    font-family: "Font Awesome 6 Free" !important;
}

.report-page .fa,
.report-page .fas {
    font-weight: 900;
}

.report-page .far {
    font-weight: 400;
}

.report-page .fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

.report-page h1,
.report-page .report-option span,
.report-page .report-kpi strong,
.report-page .report-table th,
.report-page .report-mini-list strong,
.report-page .report-rank-list span,
.report-page .report-rank-list b,
.report-page .funnel-row b,
.report-page .funnel-row strong {
    font-weight: 800;
}

.report-page .report-option small,
.report-page .report-kpi span,
.report-page .report-kpi small,
.report-page .report-table td,
.report-page .report-mini-list span,
.report-page .report-rank-list small,
.report-page .funnel-row small,
.report-page .report-filters label span {
    font-weight: 600;
}

.report-page .page-heading h1 {
    line-height: 1;
    letter-spacing: -.02em;
    font-size: 2rem;
}

.report-page .primary-action.report-export-action {
    border-radius: 0;
    box-shadow: none;
}

.report-page .page-heading.split {
    align-items: center;
    margin-bottom: .85rem;
}

.report-page .page-heading.split > div {
    margin-left: 0;
}

.report-page .page-heading p,
.report-page .eyebrow {
    display: none;
}

.report-export-action,
.report-filters .secondary-action,
.filter-actions .secondary-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem 1rem;
    border: 0;
    border-radius: 0;
    color: #fffaf2;
    background: #353535;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(61, 43, 31, .16);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.report-page .icon-only {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
}

.report-page .icon-only i {
    width: 1rem;
    height: 1rem;
    display: inline-grid;
    place-items: center;
}

.report-export-action:hover,
.report-filters .secondary-action:hover,
.filter-actions .secondary-action:hover {
    background: #4a4a4a;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(61, 43, 31, .2);
}

.report-filters .secondary-action,
.filter-actions .secondary-action {
    white-space: nowrap;
}

.report-page .report-filters {
    border-radius: 0;
}

.report-page .report-filters input,
.report-page .report-filters select {
    border-radius: 0;
}

.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: .85rem;
}

.report-kpi {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.1rem;
    border: 1px solid rgba(61, 43, 31, .1);
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

.report-kpi span,
.report-kpi small {
    color: var(--muted-foreground);
    font-size: .78rem;
    font-weight: 700;
}

.report-kpi strong {
    color: var(--foreground);
    font-family: "Playfair Display", serif;
    font-size: clamp(1.65rem, 2vw, 2.25rem);
    line-height: 1;
}

.report-kpi.success {
    border-color: rgba(46, 125, 50, .18);
}

.report-kpi.warning {
    border-color: rgba(201, 132, 38, .24);
}

.report-funnel {
    display: grid;
    gap: .45rem;
    padding: .75rem .9rem .9rem;
    width: 100%;
}

.funnel-row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(140px, 3fr) 64px;
    align-items: center;
    gap: .5rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid rgba(61, 43, 31, .08);
}

.funnel-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.funnel-row b,
.funnel-row strong {
    color: var(--foreground);
}

.funnel-row small {
    display: block;
    margin-top: .2rem;
    color: var(--muted-foreground);
    font-size: .78rem;
}

.funnel-meter {
    height: 10px;
    overflow: hidden;
    border-radius: 0;
    background: rgba(61, 43, 31, .08);
}

.funnel-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #c9a84c;
}

.report-table-wrap {
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.report-table th,
.report-table td {
    padding: .9rem 1rem;
    border-bottom: 1px solid rgba(61, 43, 31, .08);
    text-align: left;
    vertical-align: middle;
}

.report-table th {
    color: rgba(61, 43, 31, .62);
    background: #ffffff;
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.report-table td {
    font-size: .9rem;
}

.report-table a {
    color: var(--foreground);
    font-weight: 800;
    text-decoration: none;
}

.report-mini-list {
    display: grid;
    gap: .5rem;
    padding: .75rem .9rem .9rem;
}

.report-mini-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .7rem .85rem;
    border: 1px solid rgba(61, 43, 31, .08);
    border-radius: 0;
    background: #ffffff;
}

.report-mini-list span {
    color: var(--muted-foreground);
    font-size: .86rem;
    font-weight: 700;
}

.report-mini-list strong {
    color: var(--foreground);
    font-size: 1rem;
}

.report-rank-list {
    display: grid;
    gap: .65rem;
    padding: .75rem .9rem .9rem;
}

.report-rank-list div {
    position: relative;
    display: grid;
    gap: .25rem;
    padding-bottom: .55rem;
    border-bottom: 1px solid rgba(61, 43, 31, .08);
}

.report-rank-list div:last-child {
    border-bottom: 0;
}

.report-rank-list span,
.report-rank-list b,
.report-rank-list small {
    position: relative;
    z-index: 1;
}

.report-rank-list span {
    color: var(--foreground);
    font-weight: 900;
}

.report-rank-list b {
    color: #8a6a2d;
}

.report-rank-list small {
    color: var(--muted-foreground);
    font-size: .78rem;
}

.report-rank-list em {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    border-radius: 0;
    background: #c9a84c;
}

.report-page .dashboard-grid {
    grid-template-columns: 1fr;
    gap: .75rem;
    margin-bottom: .85rem;
}

.report-page .dashboard-grid .span-2 {
    grid-column: auto;
}

.report-action-list {
    display: grid;
    gap: .45rem;
}

.report-action-list a {
    display: grid;
    gap: .2rem;
    padding: .7rem .85rem;
    border: 1px solid rgba(61, 43, 31, .08);
    border-radius: 0;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
}

.empty-state {
    margin: 0;
    padding: 1rem;
    color: var(--muted-foreground);
    text-align: center;
}

body.modal-open {
    overflow: hidden;
}

.rr-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(32, 22, 15, .58);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity .16s ease;
}

.rr-modal-backdrop.open {
    opacity: 1;
}

.rr-modal-backdrop[hidden] {
    display: none;
}

.rr-modal {
    position: relative;
    width: min(100%, 840px);
    max-height: min(92dvh, 860px);
    overflow: auto;
    padding: 1.35rem;
    border: 1px solid rgba(229, 231, 235, .95);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 28px 90px rgba(31, 41, 55, .12);
    transform: translateY(12px) scale(.98);
    transition: transform .18s ease;
}

.rr-modal-backdrop.open .rr-modal {
    transform: translateY(0) scale(1);
}

.rr-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(61, 43, 31, .1);
    border-radius: 14px;
    color: rgba(61, 43, 31, .7);
    background: #fff;
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
}

.rr-modal-close:hover {
    color: var(--brand-bark);
    border-color: rgba(201, 168, 76, .45);
}

.rr-modal-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: .95rem;
    border-radius: 20px;
    color: #2b1a0d;
    background: #c9a84c;
    box-shadow: 0 16px 34px rgba(201, 168, 76, .22);
    font-size: 1.35rem;
}

.rr-modal-icon.danger {
    color: #fff7ed;
    background: #b91c1c;
    box-shadow: 0 16px 34px rgba(185, 28, 28, .2);
}

.rr-modal h2 {
    color: var(--brand-bark);
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
}

.rr-modal > p {
    max-width: 700px;
    margin: .45rem 0 1.2rem;
    color: rgba(61, 43, 31, .68);
    line-height: 1.6;
}

.rr-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .95rem;
}

.rr-form-grid label {
    display: grid;
    gap: .4rem;
    color: rgba(61, 43, 31, .7);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.rr-form-grid input,
.rr-form-grid select,
.rr-form-grid textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(61, 43, 31, .13);
    border-radius: 16px;
    background: #fff;
    color: var(--foreground);
    padding: .78rem .9rem;
    font: inherit;
    letter-spacing: 0;
    text-transform: none;
    outline: none;
    box-shadow: 0 10px 24px rgba(61, 43, 31, .04);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.rr-form-grid textarea {
    min-height: 108px;
    resize: vertical;
}

.rr-form-grid input::placeholder,
.rr-form-grid textarea::placeholder {
    color: rgba(61, 43, 31, .36);
}

.rr-form-grid input:focus,
.rr-form-grid select:focus,
.rr-form-grid textarea:focus {
    border-color: rgba(201, 168, 76, .78);
    background: #fffdf8;
    box-shadow: 0 0 0 4px rgba(201, 168, 76, .14);
}

.rr-form-grid input:invalid:not(:placeholder-shown) {
    border-color: rgba(220, 38, 38, .55);
}

.rr-form-grid .span-2,
.span-2 {
    grid-column: 1 / -1;
}

.rr-check {
    min-height: 46px;
    display: flex !important;
    align-items: center;
    gap: .65rem !important;
    padding: .8rem .9rem;
    border: 1px solid rgba(61, 43, 31, .11);
    border-radius: 16px;
    background: #fff;
    text-transform: none !important;
    letter-spacing: 0 !important;
    cursor: pointer;
}

.rr-check input {
    width: 18px;
    min-height: 18px;
    box-shadow: none;
}

.rr-modal-actions,
.page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    flex-wrap: wrap;
}

.rr-modal-actions {
    margin-top: .5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(61, 43, 31, .08);
}

.rr-confirm-modal {
    width: min(100%, 460px);
}

.danger-inline-form {
    margin-right: auto;
}

.danger-inline-form button,
.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 38px;
    padding: 0 .85rem;
    border-radius: 13px;
    font-weight: 850;
    cursor: pointer;
}

.danger-inline-form button {
    border: 1px solid rgba(220, 38, 38, .18);
    color: #b91c1c;
    background: rgba(220, 38, 38, .07);
}

.table-action {
    border: 1px solid rgba(61, 43, 31, .11);
    color: var(--brand-bark);
    background: #fffaf2;
}

.table-actions-inline {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.table-actions-inline form {
    margin: 0;
}

.table-action.icon-only {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
}

.table-action.danger {
    border-color: rgba(220, 38, 38, .18);
    color: #b91c1c;
    background: rgba(220, 38, 38, .07);
}

.table-action:hover,
.danger-inline-form button:hover {
    transform: translateY(-1px);
}

.lead-row-cold {
    background: rgba(217, 119, 6, .06);
}

.lead-cold-badge {
    display: inline-flex !important;
    align-items: center;
    gap: .32rem;
    margin-left: .45rem;
    padding: .22rem .5rem;
    border-radius: 999px;
    color: #92400e !important;
    background: rgba(217, 119, 6, .12);
    font-size: .72rem !important;
    font-weight: 900;
}

.kanban-list.drag-over {
    outline: 2px dashed rgba(201, 168, 76, .72);
    outline-offset: 5px;
    background: rgba(201, 168, 76, .08);
}

.kanban-card.dragging {
    opacity: .55;
    transform: rotate(-1deg) scale(.98);
}

@media (max-width: 1180px) {
    .report-option-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .report-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    }
}

@media (max-width: 760px) {
    .report-option-grid,
    .report-kpi-grid,
    .funnel-row {
        grid-template-columns: 1fr;
    }

    .report-filters {
        grid-template-columns: 1fr;
    }

    .funnel-row {
        gap: .6rem;
    }

    .report-filters .secondary-action {
        width: 44px;
    }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--foreground);
    background: var(--background);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-sans);
    letter-spacing: 0;
}

p { margin: 0; }

button,
input,
select {
    font: inherit;
}

.gold-kicker {
    color: var(--brand-gold);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .26em;
    text-transform: uppercase;
}

.landing-nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1rem max(1.5rem, calc((100vw - 1280px) / 2));
    color: var(--brand-bark);
    transition: background .2s, box-shadow .2s;
}

.landing-nav.scrolled {
    background: rgba(245, 240, 232, .92);
    box-shadow: 0 8px 24px rgba(61, 43, 31, .08);
    backdrop-filter: blur(12px);
}

.landing-brand {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    text-decoration: none;
}

.landing-nav nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.landing-nav nav a {
    color: rgba(61, 43, 31, .8);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}

.landing-nav nav a:hover { color: var(--brand-gold); }

.gold-pill,
.gold-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: .75rem 1.35rem;
    color: var(--brand-bark);
    background: var(--brand-gold);
    border: 0;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, transform .2s;
}

.gold-pill:hover,
.gold-button:hover {
    background: var(--brand-gold-soft);
    transform: translateY(-1px);
}

.landing-menu-button { display: none; }

.hero-editorial {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-editorial > img,
.hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-editorial > img { object-fit: cover; }

.hero-shade {
    background: rgba(53, 53, 53, .72);
}

.hero-inner {
    position: relative;
    width: min(100% - 3rem, 1280px);
    margin: 0 auto;
    padding: 8rem 0 5rem;
    color: var(--brand-cream);
}

.hero-inner h1 {
    max-width: 740px;
    margin-top: 1.4rem;
    font-size: clamp(3.4rem, 7vw, 6.8rem);
    font-weight: 500;
    line-height: 1.04;
}

.hero-inner h1 span {
    color: var(--brand-gold);
    font-style: italic;
}

.hero-copy {
    max-width: 620px;
    margin-top: 1.5rem;
    color: rgba(245, 240, 232, .86);
    font-size: 1.1rem;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: .75rem 1.35rem;
    border: 1px solid rgba(245, 240, 232, .45);
    border-radius: 999px;
    color: var(--brand-cream);
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
}

.ghost-button:hover { background: rgba(245, 240, 232, .12); }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 480px;
    gap: 1.5rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(245, 240, 232, .22);
}

.hero-stats strong {
    display: block;
    color: var(--brand-gold);
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 500;
}

.hero-stats span {
    display: block;
    margin-top: .3rem;
    color: rgba(245, 240, 232, .7);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.landing-section,
.about-section,
.contact-band {
    width: min(100% - 3rem, 1280px);
    margin: 0 auto;
    padding: 6rem 0;
}

.cream-section {
    width: 100%;
    max-width: none;
    padding-inline: max(1.5rem, calc((100vw - 1280px) / 2));
    background: var(--brand-cream);
}

.white-section { background: #fff; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.section-head.compact {
    display: block;
    max-width: 720px;
}

.section-head h2,
.about-copy h2,
.contact-band h2 {
    margin-top: .75rem;
    color: var(--brand-bark);
    font-size: clamp(2.3rem, 4vw, 3.6rem);
    font-weight: 500;
    line-height: 1.08;
}

.text-link {
    color: var(--brand-bark);
    font-size: .9rem;
    font-weight: 700;
    text-decoration-color: var(--brand-gold);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.property-grid,
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.landing-property {
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 24px rgba(61, 43, 31, .07);
}

.property-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.property-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s;
}

.landing-property:hover .property-media img { transform: scale(1.05); }

.property-body { padding: 1.5rem; }

.property-body > p {
    color: var(--brand-gold);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.property-body h3 {
    margin-top: .5rem;
    color: var(--brand-bark);
    font-size: 1.65rem;
    font-weight: 500;
}

.property-body > span {
    display: block;
    margin-top: .35rem;
    color: rgba(61, 43, 31, .6);
    font-size: .9rem;
}

.property-specs {
    display: flex;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(61, 43, 31, .12);
    color: rgba(61, 43, 31, .72);
    font-size: .86rem;
}

.property-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
}

.property-price-row small {
    color: rgba(61, 43, 31, .6);
}

.property-price-row strong {
    display: block;
    color: var(--brand-bark);
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 500;
}

.property-price-row a {
    padding: .62rem 1rem;
    color: var(--brand-cream);
    background: var(--brand-bark);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
}

.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 5rem;
}

.about-photo {
    position: relative;
}

.about-photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    box-shadow: 0 22px 48px rgba(61, 43, 31, .16);
}

.about-photo span {
    position: absolute;
    right: -1.5rem;
    bottom: -1.5rem;
    width: 8rem;
    height: 8rem;
    border: 2px solid var(--brand-gold);
}

.about-copy p:not(.gold-kicker) {
    margin-top: 1.25rem;
    color: rgba(61, 43, 31, .76);
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-copy blockquote {
    margin: 2rem 0 0;
    padding-left: 1.5rem;
    border-left: 2px solid var(--brand-gold);
    color: var(--brand-bark);
    font-family: var(--font-serif);
    font-size: 1.32rem;
    font-style: italic;
    line-height: 1.55;
}

.about-copy footer {
    margin-top: .8rem;
    color: rgba(61, 43, 31, .62);
    font-family: var(--font-sans);
    font-size: .75rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.feature-grid article {
    padding: 1.5rem;
    border: 1px solid rgba(61, 43, 31, .12);
}

.feature-grid strong {
    color: var(--brand-bark);
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 500;
}

.feature-grid p {
    margin-top: .8rem;
    color: rgba(61, 43, 31, .68);
    line-height: 1.7;
}

.contact-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    border-top: 1px solid rgba(61, 43, 31, .12);
}

.rr-home {
    overflow: hidden;
    background: #fafafa;
}

.rr-nav {
    color: #fefefe;
}

.rr-nav.scrolled {
    color: var(--brand-bark);
}

.rr-brand {
    font-weight: 700;
    letter-spacing: -.02em;
}

.rr-nav-cta {
    box-shadow: 0 12px 26px rgba(201, 168, 76, .22);
}

.rr-kicker {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: #9b7220;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.rr-kicker::before {
    content: "";
    width: 30px;
    height: 1px;
    background: currentColor;
}

.rr-hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    align-items: end;
    padding: 7rem max(1.25rem, calc((100vw - 1240px) / 2)) 1.5rem;
    color: #fff7e9;
    isolation: isolate;
}

.rr-hero-bg,
.rr-hero-bg::after,
.rr-hero-glow {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.rr-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    animation: rrHeroDrift 16s ease-in-out infinite alternate;
}

.rr-hero-bg::after {
    content: "";
    z-index: 1;
    background: rgba(53, 53, 53, .18);
}

.rr-hero-glow {
    z-index: -1;
    background: rgba(254, 117, 0, .12);
}

.rr-hero-inner {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    align-items: end;
    gap: clamp(1.5rem, 4vw, 4rem);
    padding-bottom: 2rem;
}

.rr-hero-copy h1 {
    max-width: 780px;
    margin-top: 1rem;
    font-size: clamp(3.2rem, 8.5vw, 7.8rem);
    font-weight: 700;
    line-height: .92;
    letter-spacing: -.06em;
}

.rr-hero-copy h1 span {
    display: inline-block;
    color: #f6d778;
    font-style: italic;
    text-shadow: 0 18px 48px rgba(0, 0, 0, .32);
}

.rr-hero-copy p:not(.rr-kicker) {
    max-width: 710px;
    margin-top: 1.4rem;
    color: rgba(255, 247, 233, .86);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.75;
}

.rr-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    margin-top: 2rem;
}

.rr-primary-btn,
.rr-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .9rem 1.25rem;
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.rr-primary-btn {
    color: #2b1a0d;
    background: #fff1e5;
    box-shadow: 0 16px 34px rgba(201, 155, 45, .26);
}

.rr-secondary-btn {
    color: #fff7e9;
    border: 1px solid rgba(255, 247, 233, .36);
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(12px);
}

.rr-primary-btn:hover,
.rr-secondary-btn:hover {
    transform: translateY(-2px);
}

.rr-approval-card {
    padding: 1.25rem;
    border: 1px solid rgba(255, 247, 233, .22);
    border-radius: 26px;
    background: rgba(255, 247, 233, .12);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
    backdrop-filter: blur(18px);
}

.rr-approval-card span,
.rr-note {
    color: rgba(255, 247, 233, .68);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.rr-approval-card strong {
    display: block;
    margin-top: .55rem;
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.8rem;
    line-height: 1.1;
}

.rr-approval-card p {
    margin-top: .8rem;
    color: rgba(255, 247, 233, .78);
    line-height: 1.6;
}

.rr-approval-card ul {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.rr-approval-card li {
    padding: .45rem .65rem;
    border-radius: 999px;
    background: rgba(255, 247, 233, .14);
    color: #fff7e9;
    font-size: .78rem;
    font-weight: 800;
}

.rr-hero-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 247, 233, .18);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .2);
}

.rr-hero-strip div {
    padding: 1.15rem;
    background: rgba(34, 20, 10, .72);
    backdrop-filter: blur(12px);
}

.rr-hero-strip b,
.rr-hero-strip span {
    display: block;
}

.rr-hero-strip b {
    color: #f6d778;
    font-family: var(--font-serif);
    font-size: 1.25rem;
}

.rr-hero-strip span {
    margin-top: .3rem;
    color: rgba(255, 247, 233, .74);
    font-size: .88rem;
    line-height: 1.45;
}

.rr-section {
    width: min(100% - 2.5rem, 1240px);
    margin: 0 auto;
    padding: clamp(4rem, 8vw, 7rem) 0;
}

.rr-section-head {
    max-width: 820px;
    margin-bottom: 2rem;
}

.rr-section-head.split {
    max-width: none;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.rr-section-head h2,
.rr-program-card h2,
.rr-cta h2 {
    margin-top: .8rem;
    color: #2b1a0d;
    font-size: clamp(2.3rem, 5vw, 4.6rem);
    font-weight: 700;
    line-height: .98;
    letter-spacing: -.05em;
}

.rr-section-head span,
.rr-program-card p,
.rr-cta p {
    display: block;
    max-width: 760px;
    margin-top: 1rem;
    color: rgba(43, 26, 13, .72);
    font-size: 1.06rem;
    line-height: 1.75;
}

.rr-income-grid,
.rr-faq-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.rr-income-grid article,
.rr-faq-grid article {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 1.2rem;
    border: 1px solid rgba(43, 26, 13, .1);
    border-radius: 24px;
    background: rgba(255, 255, 255, .74);
    box-shadow: 0 18px 46px rgba(43, 26, 13, .08);
}

.rr-income-grid article::before {
    content: "";
    position: absolute;
    inset: auto -20% -32% auto;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(201, 168, 76, .18);
}

.rr-income-grid b,
.rr-faq-grid h3 {
    position: relative;
    color: #2b1a0d;
    font-family: var(--font-serif);
    font-size: 1.45rem;
    line-height: 1.1;
}

.rr-income-grid p,
.rr-faq-grid p {
    position: relative;
    margin-top: .85rem;
    color: rgba(43, 26, 13, .68);
    line-height: 1.65;
}

.rr-program {
    width: min(100% - 2.5rem, 1240px);
    margin: 0 auto;
}

.rr-program-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
    gap: 2rem;
    padding: clamp(1.5rem, 5vw, 3rem);
    border-radius: 34px;
    color: #1f2937;
    background: #fff1e5;
    box-shadow: 0 24px 70px rgba(31, 41, 55, .12);
}

.rr-program-card h2,
.rr-program-card p {
    color: inherit;
}

.rr-program-card p {
    color: rgba(255, 247, 233, .76);
}

.rr-program-card ul {
    display: grid;
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rr-program-card li {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: .85rem;
    align-items: center;
    padding: .9rem;
    border-radius: 18px;
    background: rgba(255, 247, 233, .1);
}

.rr-program-card li b {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #2b1a0d;
    background: #f6d778;
    font-family: var(--font-serif);
    font-size: 1.25rem;
}

.rr-program-card li span {
    color: rgba(255, 247, 233, .86);
    line-height: 1.45;
}

.rr-text-link {
    color: #2b1a0d;
    font-weight: 900;
    text-decoration-color: var(--brand-gold);
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

.rr-property-card {
    border-radius: 24px;
}

.rr-note {
    margin-top: 1.2rem;
    color: rgba(43, 26, 13, .56);
    letter-spacing: 0;
    text-transform: none;
}

.rr-faq {
    padding-top: 2rem;
}

.rr-faq-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rr-faq-grid article {
    min-height: 190px;
}

.rr-cta {
    width: min(100% - 2.5rem, 1240px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2rem;
    margin: 0 auto 3rem;
    padding: clamp(1.5rem, 5vw, 3rem);
    border-radius: 34px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(31, 41, 55, .1);
}

/* Public home rebrand aligned with the CRM visual language. */
.landing-page,
.rr-home {
    color: #1f2937;
    background: #fafafa;
}

.rr-nav {
    color: #fefefe;
    background: #353535;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.rr-nav.scrolled {
    color: #fefefe;
    background: #353535;
    box-shadow: none;
    backdrop-filter: none;
}

.rr-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: #fefefe;
    font-family: var(--font-sans);
    font-weight: 800;
}

.rr-nav nav a {
    color: rgba(254, 254, 254, .82);
}

.rr-nav nav a:hover,
.rr-text-link:hover {
    color: #fe7500;
}

.rr-nav-cta,
.rr-primary-btn,
.property-price-row a {
    color: #fefefe;
    background: #fe7500;
    box-shadow: none;
}

.rr-nav-cta:hover,
.rr-primary-btn:hover,
.property-price-row a:hover {
    color: #fefefe;
    background: #e96b00;
    transform: none;
}

.rr-kicker {
    color: #fe7500;
}

.rr-hero {
    min-height: 92vh;
    color: #fefefe;
}

.rr-hero-bg::after {
    background: rgba(53, 53, 53, .64);
}

.rr-hero-glow {
    display: none;
}

.rr-hero-copy h1,
.rr-section-head h2,
.rr-program-card h2,
.rr-cta h2,
.rr-renata-copy h2 {
    color: #1f2937;
    font-family: var(--font-sans);
}

.rr-hero-copy h1 {
    color: #fefefe;
}

.rr-hero-copy h1 span {
    color: #fe7500;
    font-style: normal;
    text-shadow: none;
}

.rr-hero-copy p:not(.rr-kicker) {
    color: rgba(254, 254, 254, .88);
}

.rr-secondary-btn {
    color: #fefefe;
    border: 1px solid rgba(254, 254, 254, .42);
    background: transparent;
    backdrop-filter: none;
}

.rr-secondary-btn:hover {
    color: #fe7500;
    border-color: #fe7500;
    transform: none;
}

.rr-approval-card,
.rr-income-grid article,
.rr-faq-grid article,
.landing-property,
.rr-cta,
.rr-renata {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: none;
}

.rr-approval-card {
    backdrop-filter: none;
}

.rr-approval-card span,
.rr-note,
.rr-section-head span,
.rr-program-card p,
.rr-cta p,
.rr-renata-copy p,
.rr-income-grid p,
.rr-faq-grid p,
.property-body > span,
.property-specs,
.property-price-row small {
    color: #6b7280;
}

.rr-approval-card strong,
.rr-income-grid b,
.rr-faq-grid h3,
.property-body h3,
.property-price-row strong,
.rr-hero-strip b {
    color: #1f2937;
    font-family: var(--font-sans);
}

.rr-approval-card p,
.rr-hero-strip span {
    color: #6b7280;
}

.rr-approval-card li {
    color: #1f2937;
    background: #fff1e5;
}

.rr-hero-strip {
    background: #e5e7eb;
    box-shadow: none;
}

.rr-hero-strip div {
    background: #ffffff;
    backdrop-filter: none;
}

.rr-income-grid article::before {
    content: none;
}

.rr-program-card {
    color: #1f2937;
    border: 1px solid #e5e7eb;
    background: #fff1e5;
    box-shadow: none;
}

.rr-program-card p,
.rr-program-card li span {
    color: #6b7280;
}

.rr-program-card li {
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.rr-program-card li b {
    color: #fefefe;
    background: #fe7500;
    font-family: var(--font-sans);
}

.rr-text-link {
    color: #1f2937;
    text-decoration-color: #fe7500;
}

.rr-renata {
    width: min(100% - 2.5rem, 1240px);
    display: grid;
    grid-template-columns: minmax(280px, .75fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
    margin: 0 auto clamp(4rem, 8vw, 7rem);
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.rr-renata-photo {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
}

.rr-renata-photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.rr-renata-copy p:not(.rr-kicker) {
    margin-top: 1rem;
    max-width: 680px;
    line-height: 1.75;
}

.rr-renata-copy .rr-text-link {
    display: inline-flex;
    margin-top: 1.25rem;
}

.landing-page .rr-home *,
.landing-page .rr-nav,
.landing-page .rr-nav * {
    background-image: none !important;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes rrHeroDrift {
    from { transform: scale(1.04) translate3d(0, 0, 0); }
    to { transform: scale(1.1) translate3d(-1.5%, 1%, 0); }
}

.auth-page {
    min-height: 100vh;
    background: #fafafa;
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-visual {
    display: none;
}

.login-visual img {
    display: none;
}

.login-visual::after {
    display: none;
}

.login-visual-content {
    position: relative;
    z-index: 1;
    max-width: 560px;
    animation: loginRise .7s ease both;
}

.login-visual h1 {
    margin-top: .75rem;
    font-size: clamp(3rem, 7vw, 5.8rem);
    font-weight: 700;
    line-height: .95;
    letter-spacing: -.06em;
}

.login-visual span {
    display: block;
    margin-top: 1rem;
    color: rgba(245, 240, 232, .8);
    font-size: 1.05rem;
    line-height: 1.65;
}

.login-proof {
    width: fit-content;
    display: grid;
    gap: .15rem;
    margin-top: 1.5rem;
    padding: .8rem 1rem;
    border: 1px solid rgba(245, 240, 232, .2);
    border-radius: 18px;
    background: rgba(245, 240, 232, .1);
    backdrop-filter: blur(14px);
}

.login-proof strong {
    color: #fff;
    font-size: .9rem;
}

.login-proof small {
    color: rgba(245, 240, 232, .66);
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.login-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(100%, 440px);
}

.login-panel {
    width: min(100%, 440px);
    padding: clamp(1.4rem, 4vw, 2.4rem);
    border: 1px solid rgba(61, 43, 31, .1);
    border-radius: 30px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 18px 48px rgba(61, 43, 31, .1);
    backdrop-filter: blur(18px);
    animation: loginRise .7s .08s ease both;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: 0 auto 1rem;
    color: var(--brand-bark);
    text-decoration: none;
}

.login-heading {
    margin-top: 0;
}

.login-heading span {
    color: #9b7220;
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.login-card h2 {
    margin-top: .55rem;
    color: var(--foreground);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.04em;
}

.login-card p {
    margin-top: .65rem;
    color: rgba(61, 43, 31, .66);
    line-height: 1.55;
}

.form-stack {
    display: grid;
    gap: 1rem;
    margin-top: 1.8rem;
}

.form-stack label span,
.filter-row label span {
    display: block;
    margin-bottom: .45rem;
    color: rgba(61, 43, 31, .68);
    font-size: .83rem;
    font-weight: 800;
}

.form-stack input,
.filter-row input,
.filter-row select {
    width: 100%;
    min-height: 46px;
    padding: .78rem .9rem;
    color: var(--foreground);
    background: #fff;
    border: 1px solid rgba(61, 43, 31, .14);
    border-radius: 14px;
    outline: 0;
}

.form-stack input:focus,
.filter-row input:focus,
.filter-row select:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 4px rgba(201, 168, 76, .16);
}

.form-stack button,
.primary-action {
    min-height: 46px;
    padding: .78rem 1rem;
    color: #fffaf2;
    background: #353535;
    border: 0;
    border-radius: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.form-stack button:hover,
.primary-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(61, 43, 31, .18);
}

.form-alert {
    margin-top: 1rem;
    padding: .8rem 1rem;
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
}

.login-home-link {
    display: inline-flex;
    margin-top: 1.2rem;
    color: rgba(61, 43, 31, .62);
    font-size: .86rem;
    font-weight: 800;
    text-decoration-color: var(--brand-gold);
    text-underline-offset: 5px;
}

@keyframes loginRise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crm-page {
    min-height: 100vh;
    background: #fafafa;
}

.crm-shell {
    display: flex;
    min-height: 100vh;
}

.crm-sidebar {
    position: sticky;
    top: 0;
    width: 272px;
    height: 100vh;
    flex: 0 0 272px;
    display: flex;
    flex-direction: column;
    color: rgba(255, 255, 255, .92);
    background: var(--crm-sidebar);
    transition: width .2s ease, flex-basis .2s ease;
}

.crm-sidebar-brand {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 0 1rem 0 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.crm-sidebar-brand a {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}

.crm-brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: #fe7500;
    border-radius: 12px;
    font-family: var(--font-serif);
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.crm-brand-text {
    display: grid;
    min-width: 0;
    line-height: 1.1;
}

.crm-brand-text strong {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-brand-text small {
    margin-top: .2rem;
    color: rgba(255, 255, 255, .55);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.desktop-only { display: inline-grid; }

.sidebar-inline-toggle { margin-left: auto; }

.crm-sidebar-brand .mobile-only { display: none; }

.crm-nav {
    flex: 1;
    display: grid;
    align-content: start;
    gap: .35rem;
    padding: .9rem .75rem;
}

.crm-nav a {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: .85rem;
    min-height: 46px;
    padding: .78rem .9rem;
    color: rgba(255, 255, 255, .72);
    border-radius: 14px;
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.crm-nav a .nav-icon {
    width: 24px;
    text-align: center;
    color: rgba(255, 255, 255, .58);
    font-size: .98rem;
}

.crm-nav a:hover,
.crm-nav a.active {
    color: #fff;
    background: var(--crm-sidebar-highlight);
    transform: translateX(1px);
}

.crm-nav a.active .nav-icon,
.crm-nav a:hover .nav-icon {
    color: #e7c97c;
}

.crm-sidebar-footer {
    padding: 1rem 1.15rem 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .4);
    font-size: .74rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.crm-content {
    min-width: 0;
    flex: 1;
}

.crm-header {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 2rem;
    background: rgba(255, 255, 255, .82);
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    backdrop-filter: blur(14px);
}

.crm-welcome {
    color: var(--muted-foreground);
    font-size: .92rem;
}

.crm-welcome strong { color: var(--foreground); }

.crm-header-actions {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-left: auto;
}

.crm-icon-button,
.crm-notification,
.crm-avatar {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: var(--foreground);
    background: transparent;
    border: 0;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
}

.crm-notification {
    position: relative;
    color: rgba(22, 32, 47, .72);
}

.crm-notification span {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 7px;
    height: 7px;
    background: var(--crm-danger);
    border-radius: 999px;
}

.crm-avatar {
    color: #fff;
    background: var(--primary);
    font-size: .8rem;
    font-weight: 800;
}

.crm-main {
    padding: 1.5rem 2rem 2rem;
}

.sidebar-collapsed .crm-sidebar {
    width: 92px;
    flex-basis: 92px;
}

.sidebar-collapsed .crm-brand-text,
.sidebar-collapsed .crm-sidebar-footer,
.sidebar-collapsed .nav-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

.sidebar-collapsed .crm-sidebar-brand {
    justify-content: center;
    padding-inline: .5rem;
}

.sidebar-collapsed .crm-sidebar-brand a {
    justify-content: center;
}

.sidebar-collapsed .crm-sidebar-brand .desktop-only {
    margin-left: 0;
}

.sidebar-collapsed .crm-nav a {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-inline: .75rem;
}

.sidebar-collapsed .crm-nav a .nav-icon {
    width: auto;
}

.sidebar-collapsed .sidebar-inline-toggle i {
    transform: rotate(180deg);
}

.page-heading {
    margin-bottom: 1.5rem;
}

.page-heading.split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.page-heading h1 {
    color: var(--foreground);
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 700;
    line-height: .98;
    letter-spacing: -.04em;
}

.page-heading p {
    display: none;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-card,
.crm-card {
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(61, 43, 31, .09);
    border-radius: 24px;
    box-shadow: 0 18px 46px rgba(61, 43, 31, .08);
    backdrop-filter: blur(16px);
}

.metric-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -52px;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: rgba(201, 168, 76, .14);
}

.metric-card span,
.metric-card small {
    display: block;
    color: rgba(61, 43, 31, .58);
    font-size: .84rem;
}

.metric-card b {
    display: block;
    margin-top: .75rem;
    color: var(--brand-bark);
    font-size: 2rem;
    font-weight: 700;
}

.metric-card i {
    color: var(--brand-gold);
    font-style: normal;
    font-size: .75rem;
    font-weight: 900;
}
.brand-logo {
    display: block;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(61, 43, 31, .08);
    background: #fff;
    flex: 0 0 auto;
}

.brand-logo-sm {
    width: 34px;
    height: 34px;
}

.brand-logo-md {
    width: 46px;
    height: 46px;
}

.brand-logo-lg {
    width: 58px;
    height: 58px;
}

.landing-brand span,
.login-brand span,
.admin-top-brand b {
    display: inline-block;
}

.auth-brand-mark {
    display: block;
    margin: 0 auto 1rem;
    text-decoration: none;
    width: fit-content;
}

.admin-sidebar-brand a {
    width: 100%;
}

.admin-top-brand {
    color: #fefefe;
    text-decoration: none;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    height: auto;
    margin: 0 auto 1rem;
    color: var(--brand-bark);
    text-decoration: none;
}

.login-logo-frame {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.login-logo-frame .brand-logo {
    --logo-size: 76px;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center center;
    border-radius: 50%;
    border: 0;
    background: #fff;
    box-shadow: none;
}

.landing-brand {
    color: var(--brand-bark);
    text-decoration: none;
}


.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: .85rem;
}

.dashboard-grid .span-2 { grid-column: 1 / -1; }

.crm-card header {
    padding: .9rem .9rem 0;
}

.crm-card h2 {
    color: var(--brand-bark);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.report-page .crm-card,
.report-page .metric-card {
    border-radius: 0 !important;
    box-shadow: none;
    background: #ffffff;
}

.report-page .report-kpi,
.report-page .report-mini-list div,
.report-page .report-rank-list div,
.report-page .report-action-list a,
.report-page .report-filters,
.report-page .report-filters input,
.report-page .report-filters select,
.report-page .report-export-action,
.report-page .primary-action,
.report-page .secondary-action,
.report-page .status-badge,
.report-page .lead-cold-badge,
.report-page .funnel-meter,
.report-page .funnel-meter span,
.report-page .report-rank-list em {
    border-radius: 0 !important;
}

.report-page .report-action-list {
    padding: .75rem .9rem .9rem;
}

.report-page h1,
.report-page h2,
.report-page h3,
.report-page p,
.report-page a,
.report-page button,
.report-page label,
.report-page input,
.report-page select,
.report-page option,
.report-page span,
.report-page small,
.report-page strong,
.report-page b,
.report-page em,
.report-page th,
.report-page td {
    font-family: var(--font-sans) !important;
}

.bar-chart {
    height: 320px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: stretch;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1.25rem;
}

.bar-chart div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    gap: .7rem;
    height: 100%;
    text-align: center;
}

.bar-chart span {
    display: block;
    width: 100%;
    flex: 0 0 auto;
    background: #c9a84c;
    border: 1px solid rgba(61, 43, 31, .14);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    box-shadow: inset 0 0 0 1px rgba(255, 250, 242, .26);
}

.bar-chart div:nth-child(2n) span {
    background: #8a6a2d;
}

.bar-chart div:nth-child(3n) span {
    background: #3d2b1f;
}

.bar-chart div:nth-child(4n) span {
    background: #d8b76e;
}

.bar-chart small {
    color: var(--muted-foreground);
    font-size: .75rem;
    min-height: 34px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.25;
}

.donut-wrap {
    display: grid;
    place-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.donut {
    width: 150px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #fe7500;
    position: relative;
}

.donut::after {
    content: "";
    position: absolute;
    inset: 34px;
    background: #fffaf2;
    border-radius: inherit;
}

.donut-wrap ul {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: .5rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted-foreground);
    font-size: .8rem;
}

.donut-wrap li {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.donut-wrap li span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #c9a84c;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, .16);
}

.donut-wrap li:nth-child(2) span {
    background: #3d2b1f;
    box-shadow: 0 0 0 3px rgba(61, 43, 31, .12);
}

.donut-wrap li:nth-child(3) span {
    background: #8a6a2d;
    box-shadow: 0 0 0 3px rgba(138, 106, 45, .14);
}

.donut-wrap li:nth-child(4) span {
    background: #d8b76e;
    box-shadow: 0 0 0 3px rgba(216, 183, 110, .18);
}

.activity-list,
.stale-list {
    padding: .75rem 1.25rem 1.25rem;
}

.activity-list div,
.stale-list div {
    display: grid;
    gap: .2rem;
    padding: .8rem 0;
    border-bottom: 1px solid rgba(61, 43, 31, .08);
}

.activity-list div:last-child,
.stale-list div:last-child { border-bottom: 0; }

.activity-list b,
.stale-list b {
    font-size: .92rem;
}

.activity-list span,
.activity-list small,
.stale-list small {
    color: var(--muted-foreground);
    font-size: .82rem;
}

.stale-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stale-list em {
    padding: .25rem .55rem;
    color: #92400e;
    border: 1px solid rgba(217, 119, 6, .4);
    border-radius: 999px;
    font-style: normal;
    font-size: .76rem;
    font-weight: 700;
}

.filter-row {
    display: flex;
    gap: .75rem;
    margin-bottom: 1rem;
}

.filter-row .search-field { flex: 1; }

.filter-row label:not(.search-field) { width: 190px; }

.filter-actions {
    display: flex;
    align-items: flex-end;
    gap: .4rem;
    padding-top: 1.15rem;
    flex: 0 0 auto;
}

.filter-row .filter-actions .icon-only {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
}

.table-card {
    overflow-x: auto;
    padding: 0;
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.crm-table th,
.crm-table td {
    padding: .95rem 1rem;
    border-bottom: 1px solid rgba(61, 43, 31, .08);
    text-align: left;
    vertical-align: middle;
}

.crm-table th {
    color: rgba(61, 43, 31, .62);
    background: rgba(255, 250, 242, .78);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.crm-table td {
    font-size: .9rem;
}

.crm-table td small {
    display: block;
    margin-top: .25rem;
    color: rgba(61, 43, 31, .58);
}

.status-badge {
    display: inline-flex;
    padding: .3rem .55rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-style: normal;
    font-size: .74rem;
    font-weight: 800;
    text-transform: capitalize;
}

.status-badge.novo { color: #1d4ed8; background: #dbeafe; border-color: #bfdbfe; }
.status-badge.em_atendimento { color: #92400e; background: #fef3c7; border-color: #fde68a; }
.status-badge.convertido { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.status-badge.perdido { color: #991b1b; background: #fee2e2; border-color: #fecaca; }

.table-foot {
    margin: 0;
    padding: .85rem 1rem;
    color: var(--muted-foreground);
    font-size: .8rem;
}

.crm-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem .75rem;
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: .78rem;
}

.crm-pagination div {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.crm-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 .5rem;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--foreground);
    font-weight: 700;
}

.crm-pagination a.active,
.crm-pagination a:hover {
    border-color: var(--primary);
    background: var(--brand-cream);
    color: var(--primary);
}

.crm-pagination a.disabled {
    pointer-events: none;
    opacity: .45;
}

.crm-property-grid + .crm-pagination {
    border: 1px solid var(--border);
    background: #fff;
}

.settings-user-filters {
    margin: .65rem .75rem;
}

[data-async-region] {
    position: relative;
}

[data-async-region].async-loading {
    min-height: 120px;
    pointer-events: none;
}

[data-async-region].async-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 20;
    background: rgba(250, 250, 250, .72);
}

[data-async-region].async-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 21;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary);
    animation: async-spin .65s linear infinite;
}

@keyframes async-spin {
    to { transform: rotate(360deg); }
}

.kanban-board {
    display: flex;
    gap: .75rem;
    overflow-x: auto;
    padding: .15rem .05rem .75rem;
    scroll-snap-type: x proximity;
}

.pipeline-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
    padding: .75rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.pipeline-search {
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 38px;
    padding: 0 .75rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #6b7280;
}

.pipeline-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1f2937;
    font-size: .84rem;
}

.pipeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    color: #6b7280;
    font-size: .74rem;
    font-weight: 700;
}

.pipeline-legend span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.pipeline-dot {
    width: .5rem;
    height: .5rem;
    display: inline-block;
    background: #fe7500;
}

.pipeline-dot.value {
    background: #1f2937;
}

.pipeline-stage-summary {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    gap: .5rem;
    margin-bottom: .75rem;
    overflow-x: auto;
    padding-bottom: .1rem;
}

.pipeline-summary-card {
    min-width: 120px;
    padding: .65rem;
    border: 1px solid #e5e7eb;
    border-top: 3px solid var(--stage-color, #fe7500);
    background: #ffffff;
}

.pipeline-summary-card span,
.pipeline-summary-card small {
    display: block;
}

.pipeline-summary-card span {
    color: #6b7280;
    font-size: .68rem;
    font-weight: 850;
    text-transform: uppercase;
}

.pipeline-summary-card strong {
    display: block;
    margin-top: .2rem;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 900;
}

.pipeline-summary-card small {
    margin-top: .1rem;
    color: #6b7280;
    font-size: .7rem;
}

.kanban-column {
    width: min(310px, 82vw);
    min-width: min(310px, 82vw);
    min-height: 540px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    scroll-snap-align: start;
}

.kanban-column header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 74px;
    padding: .75rem;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.kanban-column header > div:first-child {
    min-width: 0;
    flex: 1;
}

.kanban-column h2 {
    color: #1f2937;
    font-family: var(--font-sans);
    font-size: .86rem;
    font-weight: 800;
    letter-spacing: 0;
}

.kanban-column header small {
    display: block;
    margin-top: .2rem;
    color: #6b7280;
    font-size: .72rem;
    font-weight: 700;
}

.kanban-column-meta {
    min-width: 68px;
    text-align: right;
}

.kanban-column-meta span {
    width: 28px;
    height: 28px;
    margin-left: auto;
    display: grid;
    place-items: center;
    color: #fefefe;
    background: #fe7500;
    font-size: .78rem;
    font-weight: 800;
}

.kanban-column-meta small {
    color: #6b7280;
    font-size: .68rem;
}

.kanban-add-lead {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #fe7500;
    cursor: pointer;
}

.kanban-add-lead:hover {
    border-color: #fe7500;
    background: #fff1e5;
    color: #e96b00;
}

.kanban-list {
    display: grid;
    align-content: start;
    gap: .55rem;
    min-height: 460px;
    padding: .75rem;
}

.kanban-card,
.kanban-empty {
    padding: .75rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    box-shadow: none;
}

.kanban-card {
    cursor: grab;
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card.is-cold {
    border-left: 3px solid #fe7500;
}

.kanban-empty {
    color: #6b7280;
    font-size: .78rem;
}

.kanban-card-title {
    min-width: 0;
    color: #1f2937;
    text-decoration: none;
}

.kanban-card-title strong {
    display: block;
    overflow: hidden;
    color: #1f2937;
    font-size: .92rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
}

.kanban-drag-handle {
    color: #9ca3af;
    font-size: .76rem;
}

.kanban-interest {
    display: block;
    margin-top: .32rem;
    color: #6b7280;
    font-size: .78rem;
    line-height: 1.35;
}

.kanban-meta-grid {
    display: grid;
    gap: .32rem;
    margin-top: .65rem;
    padding-top: .6rem;
    border-top: 1px solid #e5e7eb;
}

.kanban-meta-grid small {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
    color: #6b7280;
    font-size: .74rem;
    line-height: 1.25;
}

.kanban-meta-grid small i {
    width: .85rem;
    color: #fe7500;
    text-align: center;
}

.kanban-meta-grid .kanban-cold {
    color: #c2410c;
    font-weight: 800;
}

.kanban-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .7rem;
}

.kanban-whatsapp-action,
.kanban-detail-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 30px;
    padding: .32rem .5rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #166534;
    font-size: .76rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.kanban-detail-action {
    color: #1f2937;
}

.kanban-whatsapp-action:hover,
.kanban-detail-action:hover {
    border-color: #fe7500;
    background: #fff1e5;
    color: #1f2937;
}

.kanban-card form,
.crm-table td form {
    margin: 0;
}

.crm-property-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem;
}

.crm-property-card {
    overflow: hidden;
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(61, 43, 31, .08);
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(61, 43, 31, .07);
}

.crm-property-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--muted);
}

.crm-property-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.crm-property-card:hover img { transform: scale(1.05); }

.crm-property-media span {
    position: absolute;
    top: .75rem;
    left: .75rem;
    padding: .3rem .55rem;
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    text-transform: capitalize;
}

.crm-property-body {
    padding: .8rem;
}

.crm-property-body p {
    color: var(--muted-foreground);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.crm-property-body h2 {
    margin-top: .35rem;
    font-family: var(--font-serif);
    font-size: .95rem;
    font-weight: 800;
}

.crm-property-body > span {
    display: block;
    margin-top: .35rem;
    color: var(--muted-foreground);
    font-size: .78rem;
}

.crm-property-body div {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .65rem;
    font-size: .76rem;
    color: var(--muted-foreground);
}

.crm-property-body footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(61, 43, 31, .08);
}

.crm-property-body strong {
    color: var(--primary);
    font-family: var(--font-serif);
    font-size: .98rem;
}

.property-card-actions {
    display: flex !important;
    align-items: center;
    gap: .35rem !important;
    margin: 0 !important;
}

.property-card-actions form {
    margin: 0;
}

.crm-property-body button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    background: #fff;
    border: 1px solid rgba(61, 43, 31, .12);
    border-radius: 12px;
    color: var(--brand-bark);
    cursor: pointer;
}

.crm-property-body button:hover {
    border-color: rgba(201, 168, 76, .55);
    color: #8a6a2d;
}

.settings-config-table {
    margin-top: 1.25rem;
}

.whatsapp-status {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 38px;
    padding: .55rem .8rem;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(61, 43, 31, .1);
    border-radius: var(--radius);
    color: var(--muted-foreground);
    font-size: .82rem;
    font-weight: 700;
}

.whatsapp-status i { font-size: .55rem; }
.whatsapp-status.online i { color: var(--crm-success); }
.whatsapp-status.offline i { color: var(--crm-warning); }

.whatsapp-workspace {
    display: grid;
    grid-template-columns: minmax(290px, 360px) minmax(0, 1fr) minmax(230px, 300px);
    gap: .9rem;
    height: calc(100vh - 64px - 4rem);
    min-height: 540px;
    max-height: calc(100vh - 64px - 4rem);
    overflow: hidden;
}

.whatsapp-inbox,
.whatsapp-chat,
.whatsapp-context {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.whatsapp-inbox,
.whatsapp-context {
    display: flex;
    flex-direction: column;
}

.whatsapp-inbox header,
.whatsapp-context header,
.whatsapp-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid rgba(61, 43, 31, .08);
    background: #fffaf2;
}

.whatsapp-inbox h2,
.whatsapp-context h2,
.whatsapp-chat-header h2 {
    font-family: var(--font-sans);
    font-size: .98rem;
    font-weight: 800;
}

.whatsapp-inbox small,
.whatsapp-chat-header span {
    display: block;
    margin-top: .25rem;
    color: var(--muted-foreground);
    font-size: .78rem;
}

.whatsapp-conversation-list {
    flex: 1;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    padding: .45rem;
}

.whatsapp-context-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.whatsapp-search {
    position: relative;
    display: block;
    padding: .75rem .8rem .45rem;
}

.whatsapp-search i {
    position: absolute;
    left: 1.65rem;
    top: 50%;
    color: rgba(61, 43, 31, .45);
    transform: translateY(-22%);
}

.whatsapp-search input {
    width: 100%;
    min-height: 40px;
    padding: .6rem .85rem .6rem 2.35rem;
    border: 1px solid rgba(61, 43, 31, .1);
    border-radius: 999px;
    background: #f6efe3;
    color: var(--foreground);
    outline: 0;
}

.whatsapp-search input:focus {
    border-color: rgba(201, 168, 76, .72);
    background: #fff;
}

.whatsapp-thread {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
    padding: .72rem;
    border-radius: 16px;
    color: var(--foreground);
    text-decoration: none;
}

.whatsapp-thread:hover,
.whatsapp-thread.active {
    background: rgba(201, 168, 76, .16);
}

.whatsapp-thread-avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    position: relative;
    border-radius: 999px;
    background: var(--brand-bark);
    color: #fff;
    font-weight: 800;
    overflow: hidden;
}

.whatsapp-thread-avatar.large {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
}

.whatsapp-mobile-inbox-toggle {
    display: none;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #1f2937;
    cursor: pointer;
}

.whatsapp-thread-avatar.has-photo {
    background: #eadfce;
}

.whatsapp-avatar-initial {
    position: relative;
    z-index: 1;
}

.whatsapp-thread-avatar.has-photo img {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.whatsapp-thread-main,
.whatsapp-thread-meta {
    min-width: 0;
}

.whatsapp-thread-main b,
.whatsapp-thread-main small,
.whatsapp-thread-meta small {
    display: block;
}

.whatsapp-thread-main b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .9rem;
}

.whatsapp-thread-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: .2rem;
    color: var(--muted-foreground);
    font-size: .78rem;
}

.whatsapp-thread-meta {
    display: grid;
    justify-items: end;
    gap: .25rem;
}

.whatsapp-thread-meta time {
    color: var(--muted-foreground);
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
}
.whatsapp-thread-meta em {
    min-width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--brand-gold);
    color: var(--brand-bark);
    font-style: normal;
    font-size: .72rem;
    font-weight: 800;
}

.whatsapp-thread-meta small {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted-foreground);
    font-size: .72rem;
}

.whatsapp-chat {
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    min-width: 0;
    position: relative;
}

.whatsapp-chat-header {
    min-height: 70px;
    justify-content: flex-start;
}

.whatsapp-header-actions {
    margin-left: auto;
}

.icon-action {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(61, 43, 31, .12);
    border-radius: 999px;
    color: var(--brand-bark);
    background: #fff;
    cursor: pointer;
}

.whatsapp-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: .7rem;
    padding: 1rem;
    background: #f3f4f6;
    scroll-behavior: smooth;
}

.whatsapp-history-loader {
    display: flex;
    justify-content: center;
    padding: .15rem 0 .45rem;
}

.whatsapp-history-loader[hidden] {
    display: none;
}

.whatsapp-history-loader span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .35rem .8rem;
    border-radius: 999px;
    color: rgba(61, 43, 31, .62);
    background: rgba(255, 250, 242, .86);
    box-shadow: 0 8px 20px rgba(61, 43, 31, .08);
    font-size: .74rem;
    font-weight: 800;
}

.whatsapp-bubble {
    position: relative;
    width: fit-content;
    min-width: 118px;
    max-width: min(78%, 560px);
    padding: .5rem 1.9rem .42rem .72rem;
    border: 0;
    border-radius: 16px 16px 16px 4px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(61, 43, 31, .08);
}

.whatsapp-bubble.outbound {
    align-self: flex-end;
    border-radius: 16px 16px 4px 16px;
    background: #d9fdd3;
}

.whatsapp-bubble.inbound {
    align-self: flex-start;
}

.whatsapp-bubble p {
    line-height: 1.5;
    font-size: .9rem;
    word-break: break-word;
}

.whatsapp-bubble small {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .35rem;
    margin-top: .18rem;
    color: var(--muted-foreground);
    font-size: .72rem;
}

.whatsapp-bubble small i {
    color: #53bdeb;
}

.message-menu-button {
    position: absolute;
    top: .35rem;
    right: .4rem;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: rgba(61, 43, 31, .48);
    background: transparent;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s ease, background .15s ease;
}

.whatsapp-media-image,
.whatsapp-media-video {
    width: min(330px, 70vw);
    max-height: 360px;
    margin: 0 0 .35rem;
    border-radius: 12px;
    object-fit: cover;
}

.whatsapp-media-open {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-width: 168px;
    max-width: min(100%, 330px, 70vw);
    box-sizing: border-box;
    padding: .72rem .85rem;
    margin: 0 0 .35rem;
    border-radius: 12px;
    background: rgba(61, 43, 31, .05);
    color: var(--foreground);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 700;
}

button.whatsapp-media-open {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.whatsapp-media-open i {
    color: var(--brand-gold);
}

.whatsapp-media-audio {
    width: min(320px, 70vw);
    margin: .15rem 0 .25rem;
}

.whatsapp-media-preview-modal .whatsapp-media-preview-stage {
    width: min(78vw, 720px);
    max-height: min(70vh, 680px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(11, 31, 58, 0.08);
}

.whatsapp-media-preview-modal .whatsapp-media-preview-stage img,
.whatsapp-media-preview-modal .whatsapp-media-preview-stage video {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 20px;
}

.whatsapp-bubble:hover .message-menu-button,
.message-menu-button:focus {
    opacity: 1;
}

.message-menu-button:hover {
    background: rgba(61, 43, 31, .08);
}

.whatsapp-composer {
    display: flex;
    align-items: flex-end;
    gap: .55rem;
    padding: .8rem;
    border-top: 1px solid rgba(61, 43, 31, .08);
    background: #f7f1e8;
}

.whatsapp-composer textarea {
    flex: 1;
    resize: vertical;
    min-height: 44px;
    max-height: 160px;
    padding: .72rem .95rem;
    border: 1px solid rgba(61, 43, 31, .14);
    border-radius: 22px;
    background: #fff;
    outline: 0;
}

.whatsapp-composer textarea:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, .16);
}

.whatsapp-composer button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: var(--brand-bark);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.whatsapp-composer .composer-tool {
    color: rgba(61, 43, 31, .68);
    background: transparent;
}

.whatsapp-composer .composer-tool:hover {
    background: rgba(61, 43, 31, .08);
}

.whatsapp-composer .composer-tool.record.recording {
    color: #fff;
    background: #dc2626;
    animation: pulseRecord 1s infinite;
}

.recording-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .8);
    animation: recordDot 1s infinite;
}

@keyframes recordDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); }
    50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
}

.whatsapp-composer .composer-send {
    background: #128c7e;
}

@keyframes pulseRecord {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.whatsapp-context-list {
    display: grid;
    gap: .9rem;
    padding: 1rem;
}

.whatsapp-context-list div {
    display: grid;
    gap: .35rem;
    padding: .75rem;
    border-bottom: 1px solid rgba(61, 43, 31, .08);
    border-radius: 14px;
    background: rgba(255, 250, 242, .72);
}

.whatsapp-context-list div:last-child {
    border-bottom: 0;
}

.whatsapp-context-list b {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: rgba(61, 43, 31, .58);
}

.whatsapp-context-list span {
    color: var(--foreground);
    font-size: .92rem;
    line-height: 1.45;
}

.whatsapp-empty,
.whatsapp-chat-placeholder {
    min-height: 220px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: .55rem;
    padding: 1.25rem;
    color: var(--muted-foreground);
    text-align: center;
}

.whatsapp-empty.compact {
    min-height: 120px;
}

.whatsapp-empty i,
.whatsapp-chat-placeholder i {
    color: var(--brand-gold);
    font-size: 1.5rem;
}

.whatsapp-context-menu {
    position: fixed;
    z-index: 200;
    min-width: 190px;
    padding: .35rem;
    border: 1px solid rgba(61, 43, 31, .12);
    border-radius: 14px;
    background: #fffaf2;
    box-shadow: 0 18px 44px rgba(61, 43, 31, .18);
}

.whatsapp-context-menu button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem .75rem;
    border: 0;
    border-radius: 10px;
    color: var(--foreground);
    background: transparent;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.whatsapp-context-menu button:hover {
    background: rgba(201, 168, 76, .14);
}

.whatsapp-context-menu .danger {
    color: #b91c1c;
}

.whatsapp-context-menu form {
    margin: 0;
}

.whatsapp-toast {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    z-index: 220;
    padding: .75rem 1rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(32, 22, 15, .92);
    box-shadow: 0 16px 34px rgba(32, 22, 15, .22);
    transform: translateX(-50%);
    font-size: .88rem;
    font-weight: 800;
}

.whatsapp-chat-placeholder h2 {
    font-family: var(--font-sans);
    font-size: 1rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.settings-panel {
    padding: 1.25rem;
}

.settings-card-header,
.settings-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.settings-card-header {
    justify-content: space-between;
    margin-bottom: .9rem;
}

.settings-eyebrow {
    color: var(--brand-gold);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.settings-panel h2 {
    margin-bottom: .45rem;
    font-family: var(--font-serif);
    color: var(--brand-bark);
    font-size: clamp(1.4rem, 2vw, 2rem);
}

.settings-panel p {
    max-width: 760px;
    color: var(--muted-foreground);
    line-height: 1.55;
}

.whatsapp-health {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin: 1.1rem 0;
}

.whatsapp-health div,
.settings-current {
    display: grid;
    gap: .25rem;
    padding: .9rem;
    border: 1px solid rgba(61, 43, 31, .1);
    border-radius: var(--radius);
    background: rgba(255, 250, 244, .72);
}

.whatsapp-health strong,
.settings-current strong {
    color: rgba(61, 43, 31, .62);
    font-size: .72rem;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.whatsapp-health span,
.settings-current small {
    color: var(--foreground);
    font-weight: 700;
}

.qr-box {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid rgba(201, 168, 76, .32);
    border-radius: calc(var(--radius) + 8px);
    background: rgba(255, 255, 255, .92);
}

.qr-box img {
    width: 180px;
    max-width: 100%;
    border-radius: 18px;
    border: 10px solid #fff;
    box-shadow: 0 18px 36px rgba(61, 43, 31, .16);
}

.qr-placeholder {
    min-height: 170px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: .65rem;
    margin: 1rem 0;
    border: 1px dashed rgba(61, 43, 31, .18);
    border-radius: calc(var(--radius) + 8px);
    background: rgba(255, 255, 255, .55);
    color: var(--muted-foreground);
    text-align: center;
}

.qr-placeholder i {
    color: var(--brand-gold);
    font-size: 2.2rem;
}

.qr-placeholder.connected {
    border-style: solid;
    border-color: rgba(34, 197, 94, .24);
    background: rgba(34, 197, 94, .08);
}

.qr-placeholder.waiting {
    border-style: solid;
    border-color: rgba(201, 168, 76, .34);
    background: rgba(201, 168, 76, .1);
}

.qr-placeholder small {
    max-width: 520px;
    color: rgba(61, 43, 31, .62);
    line-height: 1.45;
}

.settings-actions {
    margin-top: 1rem;
}

.settings-actions form {
    margin: 0;
}

.settings-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 42px;
    padding: 0 1rem;
    border: 0;
    border-radius: var(--radius);
    color: #ffffff;
    background: #fe7500;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(254, 117, 0, .2);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.settings-primary-action:hover {
    background: #e96b00;
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(254, 117, 0, .26);
}

.btn-secondary,
.btn-danger-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 42px;
    padding: 0 1rem;
    border-radius: var(--radius);
    font-weight: 800;
    cursor: pointer;
}

.btn-secondary {
    border: 1px solid rgba(61, 43, 31, .14);
    background: #fff;
    color: var(--brand-bark);
}

.btn-danger-soft {
    border: 1px solid rgba(239, 68, 68, .18);
    background: rgba(239, 68, 68, .08);
    color: #b91c1c;
}

.settings-alert {
    padding: .85rem 1rem;
    border: 1px solid rgba(239, 68, 68, .18);
    border-radius: var(--radius);
    background: rgba(239, 68, 68, .08);
    color: #991b1b;
    font-weight: 700;
}

.safety-list {
    display: grid;
    gap: .75rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.safety-list li {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: .65rem;
    align-items: start;
    color: var(--foreground);
    line-height: 1.45;
}

.safety-list i {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(201, 168, 76, .18);
    color: var(--brand-bark);
    font-size: .75rem;
}

.settings-current {
    margin-top: 1rem;
}

.mobile-only { display: none; }

.crm-overlay { display: none; }

html,
body {
    height: 100%;
}

body.crm-page {
    overflow: hidden;
    background: #fafafa;
}

#wrapper {
    height: 100vh;
    display: flex;
    overflow: hidden;
}

#sidebar {
    width: 268px;
    min-width: 268px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #353535;
    border-right: 1px solid #4a4a4a;
    box-shadow: 16px 0 44px rgba(31, 41, 55, .18);
    transition: width .3s cubic-bezier(.4, 0, .2, 1), min-width .3s cubic-bezier(.4, 0, .2, 1);
}

html.sidebar-collapsed #sidebar {
    width: 72px;
    min-width: 72px;
}

.admin-sidebar-brand {
    height: 76px;
    display: flex;
    align-items: center;
    padding: .85rem .75rem;
    border-bottom: 1px solid rgba(255, 247, 233, .08);
}

.admin-sidebar-brand a {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .8rem;
    min-width: 0;
    color: #fefefe;
    text-decoration: none;
}

.admin-logo-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    border-radius: 16px;
    color: #ffffff;
    background: #fe7500;
    box-shadow: 0 12px 26px rgba(254, 117, 0, .24);
    font-family: var(--font-serif);
    font-weight: 800;
    letter-spacing: -.03em;
}

.admin-logo-text {
    display: grid;
    min-width: 0;
    line-height: 1.05;
}

.admin-logo-text strong {
    overflow: hidden;
    color: #fefefe;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.admin-logo-text small {
    margin-top: .26rem;
    color: rgba(254, 254, 254, .72);
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

html.sidebar-collapsed .admin-sidebar-brand {
    justify-content: center;
    padding-inline: .75rem;
}

html.sidebar-collapsed .admin-logo-text {
    display: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .85rem .55rem 1rem;
}

.admin-sidebar-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.admin-sidebar-list li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-toggle-item {
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    margin-bottom: .5rem;
}

.sidebar-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border: 0;
    background: transparent;
    color: var(--crm-sidebar-gold);
    cursor: pointer;
}

.sidebar-toggle-btn:focus-visible,
.toggler-btn:focus-visible {
    outline: 2px solid #e7a444;
    outline-offset: 2px;
}

.sidebar-toggle-btn i,
.sidebar-link i {
    width: 46px;
    min-width: 46px;
    text-align: center;
    font-size: 1.15rem;
    flex: 0 0 55px;
}

.sidebar-toggle-btn span,
.sidebar-link span {
    white-space: nowrap;
    font-size: .86rem;
    font-weight: 800;
}

html.sidebar-collapsed .sidebar-toggle-btn span,
html.sidebar-collapsed .sidebar-link span,
html.sidebar-collapsed .sidebar-header {
    display: none;
}

html.sidebar-collapsed .sidebar-nav {
    padding-inline: .5rem;
}

html.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding-inline: 0;
}

html.sidebar-collapsed .sidebar-link i {
    width: 48px;
    min-width: 48px;
    flex-basis: 48px;
}

.sidebar-header {
    padding: 1.25rem 1.5rem .35rem;
    color: rgba(255, 255, 255, .24);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sidebar-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    color: rgba(255, 250, 242, .72);
    padding: .8rem 0;
    margin: .12rem 0;
    border-radius: 16px;
    text-decoration: none;
    transition: all .2s ease;
}

.sidebar-link.text-danger {
    color: #ef4444;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 250, 242, .08);
}

.sidebar-link.active {
    background: rgba(254, 117, 0, .18);
    color: #fefefe;
    box-shadow: inset 0 0 0 1px rgba(254, 117, 0, .14);
}

.sidebar-link.active i,
.sidebar-link:hover i {
    color: var(--crm-sidebar-gold);
}

.main {
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fafafa;
}

.navbar {
    background: #f3f4f6;
    backdrop-filter: none;
    border-bottom: 1px solid #e5e7eb;
    min-height: 64px;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0;
    display: flex;
    align-items: center;
}

.navbar-content {
    width: 100%;
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

.admin-navbar-left {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}

.admin-top-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: #fefefe;
    text-decoration: none;
}

.admin-top-brand span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #2b1a0d;
    background: #c9a84c;
    font-family: var(--font-sans);
    font-size: .82rem;
    font-weight: 800;
}

.admin-top-brand b {
    color: #fefefe;
    font-family: var(--font-sans);
    font-size: 1.12rem;
    line-height: 1;
}

.admin-navbar-user {
    min-width: 0;
}

.admin-navbar-user h5 {
    margin: 0;
    color: #6b7280;
    font-family: var(--font-sans);
    font-size: .85rem;
    font-weight: 400;
    line-height: 1;
}

.admin-navbar-user span {
    color: #1f2937;
    font-weight: 700;
}

.admin-navbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.toggler-btn {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s ease;
}

.toggler-btn:hover {
    color: #fefefe;
    background: #353535;
    border-color: #353535;
    transform: translateY(-1px);
}

.page-body {
    min-height: calc(100vh - 64px);
    padding: 2rem;
    background: transparent;
}

#sidebarOverlay {
    display: none;
}

@media (max-width: 992px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 50;
        transform: translateX(-100%);
        width: 268px;
        min-width: 268px;
    }

    html.sidebar-collapsed #sidebar {
        width: 268px;
        min-width: 268px;
    }

    html.sidebar-collapsed .admin-logo-text,
    html.sidebar-collapsed .sidebar-link span {
        display: grid;
    }

    html.sidebar-collapsed .sidebar-link {
        justify-content: flex-start;
    }

    #sidebar.open {
        transform: translateX(0);
    }

    #sidebarOverlay {
        position: fixed;
        inset: 0;
        z-index: 45;
        display: none;
        background: rgba(0, 0, 0, .45);
    }

    #sidebarOverlay.open {
        display: block;
    }

    .page-body {
        padding: 1.25rem;
    }

    .admin-navbar-user {
        display: none;
    }
}

html.sidebar-collapsed #sidebar .admin-sidebar-brand,
html.sidebar-collapsed #sidebar .admin-sidebar-brand a,
html.sidebar-collapsed #sidebar .sidebar-link {
    width: 74px !important;
    min-width: 74px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
}

html.sidebar-collapsed #sidebar .brand-logo,
html.sidebar-collapsed #sidebar .sidebar-link i {
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;
    display: inline-grid !important;
    place-items: center !important;
    margin: 0 auto !important;
    text-align: center !important;
}

html.sidebar-collapsed #sidebar .sidebar-link i {
    height: 42px !important;
}

@media (max-width: 992px) {
    html.sidebar-collapsed #sidebar .admin-sidebar-brand,
    html.sidebar-collapsed #sidebar .admin-sidebar-brand a,
    html.sidebar-collapsed #sidebar .sidebar-link {
        width: 100% !important;
        min-width: 0 !important;
        justify-content: flex-start !important;
        padding-left: .75rem !important;
        padding-right: .75rem !important;
        gap: .6rem !important;
    }

    html.sidebar-collapsed #sidebar .brand-logo {
        width: 46px !important;
        min-width: 46px !important;
        height: 46px !important;
        flex: 0 0 46px !important;
        margin: 0 !important;
    }

    #sidebar .admin-sidebar-brand {
        padding: .8rem .75rem !important;
    }

    #sidebar .admin-sidebar-brand a {
        gap: .7rem !important;
    }

    #sidebar .admin-sidebar-brand .brand-logo {
        margin: 0 !important;
    }

    html.sidebar-collapsed #sidebar .sidebar-link i {
        width: 24px !important;
        min-width: 24px !important;
        height: auto !important;
        flex: 0 0 24px !important;
        margin: 0 !important;
    }
}

@media (max-width: 640px) {
    .page-body {
        padding: 1rem;
    }

    .navbar-content {
        padding-inline: 1rem;
    }

    .admin-top-brand b {
        max-width: 132px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}

@media (max-width: 1040px) {
    .property-grid,
    .feature-grid,
    .crm-property-grid,
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid .span-2 { grid-column: auto; }

    .whatsapp-workspace {
        grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .rr-hero-inner,
    .rr-program-card,
    .rr-cta,
    .rr-renata {
        grid-template-columns: 1fr;
    }

    .rr-income-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rr-faq-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .whatsapp-context {
        display: none;
    }
}

@media (max-width: 860px) {
    .landing-nav nav,
    .landing-nav .gold-pill { display: none; }
    .landing-menu-button { display: inline-flex; }

    .landing-nav.menu-open nav {
        position: absolute;
        top: calc(100% + .5rem);
        left: 1rem;
        right: 1rem;
        display: grid;
        gap: .35rem;
        padding: .9rem;
        border: 1px solid rgba(61, 43, 31, .1);
        border-radius: 18px;
        background: rgba(255, 250, 244, .96);
        box-shadow: 0 16px 44px rgba(61, 43, 31, .16);
        backdrop-filter: blur(14px);
    }

    .landing-nav.menu-open nav a {
        color: var(--brand-bark);
        padding: .7rem .8rem;
        border-radius: 12px;
    }

    .landing-nav.menu-open nav a:hover {
        background: rgba(201, 168, 76, .14);
    }

    .landing-menu-button {
        min-height: 38px;
        padding: .55rem .85rem;
        border: 1px solid rgba(255, 255, 255, .35);
        border-radius: 999px;
        color: inherit;
        background: rgba(255, 255, 255, .1);
        font-weight: 900;
    }

    .landing-nav.scrolled .landing-menu-button,
    .landing-nav.menu-open .landing-menu-button {
        border-color: rgba(61, 43, 31, .12);
        color: var(--brand-bark);
        background: #fff;
    }

    .rr-hero {
        min-height: auto;
        padding-top: 6rem;
    }

    .rr-hero-copy h1 {
        font-size: clamp(3.1rem, 17vw, 5.5rem);
    }

    .rr-approval-card {
        margin-top: 1rem;
    }

    .rr-hero-strip {
        grid-template-columns: 1fr;
    }

    .rr-section-head.split {
        display: grid;
    }

    .about-section,
    .login-screen {
        grid-template-columns: 1fr;
    }

    .auth-page {
        background: #fafafa;
    }

    .login-screen {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }

    .login-visual {
        display: none;
    }

    .login-card {
        width: 100%;
        min-height: auto;
        padding: 0;
        background: transparent;
    }

    .login-panel {
        margin: 0 auto;
        background: rgba(255, 250, 242, .92);
    }

    .mobile-only { display: inline-grid; }
    .desktop-only { display: none !important; }

    .crm-sidebar {
        position: fixed;
        left: 0;
        z-index: 50;
        width: 280px;
        flex-basis: 280px;
        transform: translateX(-100%);
        transition: transform .2s;
    }

    .crm-sidebar.open { transform: translateX(0); }

    .crm-overlay.open {
        position: fixed;
        inset: 0;
        z-index: 45;
        display: block;
        background: rgba(0, 0, 0, .45);
    }

    .crm-header { padding: 0 1rem; }
    .crm-main { padding: 1rem; }
    .crm-welcome { display: none; }
    .sidebar-collapsed .crm-sidebar {
        width: 280px;
        flex-basis: 280px;
    }
    .sidebar-collapsed .crm-brand-text,
    .sidebar-collapsed .crm-sidebar-footer,
    .sidebar-collapsed .nav-label {
        opacity: 1;
        width: auto;
        overflow: visible;
        pointer-events: auto;
    }

    .whatsapp-workspace {
        grid-template-columns: 1fr;
        height: calc(100dvh - 64px - 2rem);
        min-height: 560px;
        max-height: calc(100dvh - 64px - 2rem);
        position: relative;
    }

    .whatsapp-conversation-list {
        max-height: 220px;
    }

    .whatsapp-mobile-inbox-toggle {
        display: inline-grid;
        flex: 0 0 auto;
    }

    .whatsapp-workspace.has-selected-conversation.inbox-collapsed .whatsapp-inbox {
        display: none;
    }

    .whatsapp-workspace.has-selected-conversation:not(.inbox-collapsed) .whatsapp-inbox {
        position: absolute;
        inset: 0;
        z-index: 30;
        display: flex;
        height: 100%;
        max-height: 100%;
        background: #ffffff;
    }

    .whatsapp-workspace.has-selected-conversation:not(.inbox-collapsed) .whatsapp-conversation-list {
        max-height: none;
    }

    .whatsapp-chat {
        min-height: 0;
        height: 100%;
    }

    .whatsapp-health,
    .qr-box {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .rr-hero {
        padding-inline: 1rem;
        padding-bottom: 1rem;
    }

    .rr-hero-inner {
        gap: 1rem;
    }

    .rr-hero-copy p:not(.rr-kicker) {
        font-size: .98rem;
        line-height: 1.65;
    }

    .rr-hero-actions,
    .rr-cta {
        align-items: stretch;
    }

    .rr-primary-btn,
    .rr-secondary-btn {
        width: 100%;
        text-align: center;
    }

    .rr-section,
    .rr-program,
    .rr-cta,
    .rr-renata {
        width: min(100% - 1.5rem, 1240px);
    }

    .rr-section {
        padding: 3.4rem 0;
    }

    .rr-section-head h2,
    .rr-program-card h2,
    .rr-cta h2 {
        font-size: clamp(2.2rem, 13vw, 3.4rem);
    }

    .rr-income-grid,
    .rr-faq-grid {
        grid-template-columns: 1fr;
    }

    .pipeline-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .pipeline-search {
        min-width: 0;
    }

    .pipeline-stage-summary {
        grid-template-columns: repeat(7, 120px);
    }

    .rr-income-grid article,
    .rr-faq-grid article {
        min-height: auto;
    }

    .rr-program-card,
    .rr-cta,
    .rr-renata {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .rr-program-card li {
        grid-template-columns: 40px 1fr;
    }

    .rr-program-card li b {
        width: 40px;
        height: 40px;
    }

    .login-screen {
        padding: .9rem;
    }

    .login-panel {
        border-radius: 24px;
        padding: 1.25rem;
    }

    .login-heading {
        margin-top: 1.6rem;
    }

    .login-card h2 {
        font-size: 2.2rem;
    }

    .hero-inner h1 { font-size: 3rem; }
    .hero-stats,
    .property-grid,
    .feature-grid,
    .metric-grid,
    .crm-property-grid {
        grid-template-columns: 1fr;
    }

    .section-head,
    .contact-band,
    .page-heading.split,
    .filter-row {
        display: grid;
    }

    .filter-row label:not(.search-field) { width: auto; }

    .whatsapp-composer {
        grid-template-columns: 1fr;
    }

    .whatsapp-bubble {
        width: 92%;
    }
}

.whatsapp-workspace.is-switching .whatsapp-chat::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 12;
    border-radius: 22px;
    background: rgba(255, 250, 242, .74);
    backdrop-filter: blur(3px);
}

.whatsapp-workspace.is-switching .whatsapp-chat::after {
    content: "Carregando conversa...";
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 13;
    padding: .85rem 1rem;
    border: 1px solid rgba(61, 43, 31, .1);
    border-radius: 999px;
    background: #fff;
    color: var(--brand-bark);
    font-size: .86rem;
    font-weight: 800;
    box-shadow: var(--shadow);
    transform: translate(-50%, -50%);
}

.whatsapp-thread.is-disabled {
    pointer-events: none;
    opacity: .68;
}



.lead-heading .lead-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .75rem;
    color: rgba(61, 43, 31, .7);
    font-size: .9rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: .3rem .7rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.status-pill.is-blue { background: rgba(59, 130, 246, .12); color: #1d4ed8; border-color: rgba(59, 130, 246, .2); }
.status-pill.is-cyan { background: rgba(14, 165, 233, .12); color: #0e7490; border-color: rgba(14, 165, 233, .2); }
.status-pill.is-amber { background: rgba(245, 158, 11, .12); color: #b45309; border-color: rgba(245, 158, 11, .2); }
.status-pill.is-violet { background: rgba(139, 92, 246, .12); color: #6d28d9; border-color: rgba(139, 92, 246, .2); }
.status-pill.is-orange { background: rgba(249, 115, 22, .12); color: #c2410c; border-color: rgba(249, 115, 22, .2); }
.status-pill.is-green { background: rgba(34, 197, 94, .12); color: #15803d; border-color: rgba(34, 197, 94, .2); }
.status-pill.is-red { background: rgba(239, 68, 68, .12); color: #b91c1c; border-color: rgba(239, 68, 68, .2); }
.status-pill.is-neutral { background: rgba(61, 43, 31, .08); color: var(--brand-bark); border-color: rgba(61, 43, 31, .12); }

.metric-card strong {
    display: block;
    margin-top: .75rem;
    color: var(--brand-bark);
    font-size: 1.45rem;
    font-weight: 800;
}

.lead-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
    padding: 1.25rem;
}

.crm-page h1,
.crm-page h2,
.crm-page h3,
.crm-page h4,
.crm-page h5,
.crm-page h6,
.crm-page p,
.crm-page a,
.crm-page button,
.crm-page input,
.crm-page select,
.crm-page textarea,
.crm-page label,
.crm-page span,
.crm-page small,
.crm-page strong,
.crm-page b,
.crm-page th,
.crm-page td {
    font-family: var(--font-sans) !important;
}

.crm-page i,
.crm-page .fa,
.crm-page .fas,
.crm-page .far {
    font-family: "Font Awesome 6 Free" !important;
}

.crm-page .fa,
.crm-page .fas {
    font-weight: 900;
}

.crm-page .far {
    font-weight: 400;
}

.crm-page .fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

.lead-summary-grid div {
    padding: .9rem 1rem;
    border: 1px solid rgba(61, 43, 31, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .72);
}

.lead-summary-grid b,
.lead-notes b {
    display: block;
    margin-bottom: .35rem;
    color: var(--brand-bark);
    font-size: .8rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.lead-summary-grid span,
.lead-notes p,
.timeline-empty span {
    color: rgba(61, 43, 31, .78);
    font-size: .95rem;
    line-height: 1.5;
}

.lead-notes {
    padding: 0 1.25rem 1.25rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: .9rem;
    padding: .9rem 0;
    border-bottom: 1px solid rgba(61, 43, 31, .08);
}

.timeline-item:last-child { border-bottom: 0; }

.timeline-dot {
    width: 14px;
    height: 14px;
    margin-top: .25rem;
    border-radius: 999px;
    background: #fe7500;
    box-shadow: 0 0 0 5px rgba(254, 117, 0, .14);
}

@media (max-width: 820px) {
    .lead-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Global flat visual language */
body,
body *:not(i):not(.fa):not(.fas):not(.far):not(.fab) {
    font-family: var(--font-sans) !important;
}

body * {
    border-radius: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
}

i,
.fa,
.fas,
.far {
    font-family: "Font Awesome 6 Free" !important;
}

.fa,
.fas {
    font-weight: 900;
}

.far {
    font-weight: 400;
}

.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

.navbar,
.main,
.page-body,
body.crm-page {
    background-image: none !important;
}

/* Data visualizations keep their functional geometry even in the flat theme. */
.donut,
.donut::after,
.donut-wrap li span,
.timeline-dot,
.status-indicator,
.metric-card::after,
[data-async-region].async-loading::after,
.brand-logo,
.login-logo-frame {
    border-radius: 999px !important;
}

.brand-logo,
.login-logo-frame .brand-logo {
    display: block;
    width: var(--logo-size, 46px);
    height: var(--logo-size, 46px);
    min-width: var(--logo-size, 46px);
    min-height: var(--logo-size, 46px);
    max-width: var(--logo-size, 46px);
    max-height: var(--logo-size, 46px);
    object-fit: cover;
    object-position: center center;
    clip-path: circle(50%);
}

.brand-logo-sm { --logo-size: 34px; }
.brand-logo-md { --logo-size: 46px; }
.brand-logo-lg { --logo-size: 58px; }
.login-logo-frame { --logo-size: 76px; }

.bar-chart span {
    border-radius: 6px 6px 0 0 !important;
}

.funnel-meter,
.funnel-meter span,
.report-rank-list em {
    border-radius: 999px !important;
}

.timeline-dot {
    box-shadow: 0 0 0 5px rgba(254, 117, 0, .14) !important;
}

/* Compact CRM density, aligned with Imperial Bebidas client tables. */
.crm-page {
    font-size: .875rem;
}

.page-body,
.crm-main {
    padding: 1rem !important;
}

.page-heading {
    margin-bottom: .85rem !important;
}

.page-heading h1 {
    font-size: 1.55rem !important;
    line-height: 1.1 !important;
}

.metric-grid,
.dashboard-grid,
.report-option-grid,
.report-kpi-grid,
.crm-property-grid,
.settings-grid,
.lead-summary-grid {
    gap: .65rem !important;
    margin-bottom: .75rem !important;
}

.metric-card,
.crm-card,
.report-option,
.report-kpi,
.kanban-column,
.crm-property-card,
.settings-panel,
.whatsapp-inbox,
.whatsapp-chat,
.whatsapp-context {
    padding: .75rem !important;
}

.table-card,
.whatsapp-inbox,
.whatsapp-chat,
.whatsapp-context {
    padding: 0 !important;
}

.crm-card header,
.settings-card-header,
.whatsapp-inbox header,
.whatsapp-context header,
.whatsapp-chat-header {
    padding: .65rem .75rem 0 !important;
}

.crm-card h2,
.settings-card-header h2,
.whatsapp-chat-header h2 {
    font-size: .95rem !important;
    line-height: 1.15 !important;
}

.crm-card header p,
.settings-card-header p,
.whatsapp-chat-header span {
    font-size: .78rem !important;
}

.crm-table th,
.crm-table td,
.report-table th,
.report-table td {
    padding: .4rem .35rem !important;
    font-size: .78rem !important;
    line-height: 1.25 !important;
}

.crm-table th,
.report-table th {
    font-size: .72rem !important;
    font-weight: 700 !important;
}

.table-action,
.primary-action,
.secondary-action,
.btn-secondary,
.btn-danger-soft,
.settings-primary-action,
.danger-inline-form button,
.report-export-action,
.report-filters .secondary-action {
    min-height: 34px !important;
    height: 34px !important;
    padding: .35rem .65rem !important;
    font-size: .78rem !important;
}

.icon-only,
.report-page .icon-only {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
}

.filter-row,
.report-filters,
.rr-form-grid {
    gap: .55rem !important;
}

.filter-row input,
.filter-row select,
.report-filters input,
.report-filters select,
.rr-form-grid input,
.rr-form-grid select,
.rr-form-grid textarea {
    min-height: 34px !important;
    padding: .42rem .55rem !important;
    font-size: .8rem !important;
}

.filter-row label span,
.report-filters label span,
.rr-form-grid label {
    font-size: .7rem !important;
}

.report-mini-list,
.report-rank-list,
.report-action-list,
.activity-list,
.stale-list,
.kanban-list,
.lead-summary-grid,
.whatsapp-messages,
.whatsapp-context-body {
    gap: .45rem !important;
    padding: .65rem .75rem !important;
}

.report-mini-list div,
.report-action-list a,
.kanban-card,
.kanban-empty,
.lead-summary-grid div,
.whatsapp-thread,
.whatsapp-context-item {
    padding: .55rem .6rem !important;
}

.status-badge,
.status-pill,
.report-tag,
.lead-cold-badge {
    padding: .18rem .4rem !important;
    font-size: .68rem !important;
}

.navbar-content {
    height: 52px !important;
    padding: 0 1rem !important;
}

.navbar {
    min-height: 52px !important;
}

.toggler-btn {
    width: 34px !important;
    height: 34px !important;
}

.filter-actions .secondary-action,
.lead-history-filter-actions .secondary-action,
.report-filters .secondary-action,
.secondary-action.icon-only {
    cursor: pointer !important;
    transition: background .15s ease, border-color .15s ease, color .15s ease !important;
}

.filter-actions .secondary-action:hover,
.lead-history-filter-actions .secondary-action:hover,
.report-filters .secondary-action:hover,
.secondary-action.icon-only:hover {
    background: #fff1e5 !important;
    border-color: #fe7500 !important;
    color: #fe7500 !important;
}

.filter-actions .secondary-action i,
.lead-history-filter-actions .secondary-action i,
.report-filters .secondary-action i {
    pointer-events: none;
}

.landing-page .rr-nav {
    color: #1f2937 !important;
    background: rgba(255, 255, 255, .96) !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 8px 24px rgba(31, 41, 55, .08) !important;
    backdrop-filter: blur(10px) !important;
}

.landing-page .rr-brand,
.landing-page .rr-brand span,
.landing-page .rr-nav nav a,
.landing-page .landing-menu-button {
    color: #1f2937 !important;
}

.landing-page .rr-brand span {
    font-weight: 900 !important;
}

.landing-page .rr-nav nav a:hover {
    color: #fe7500 !important;
}

.landing-page .landing-menu-button {
    border: 1px solid #e5e7eb !important;
    background: #ffffff !important;
}

@media (max-width: 900px) {
    .landing-page .landing-menu-button {
        display: none !important;
    }
}

.landing-page .rr-nav-cta,
.landing-page .rr-primary-btn,
.landing-page .rr-secondary-btn,
.landing-page .rr-cta .rr-primary-btn {
    border-radius: 999px !important;
}

.landing-page .rr-nav-cta,
.landing-page .rr-primary-btn,
.landing-page .rr-cta .rr-primary-btn {
    color: #fefefe !important;
    background: #fe7500 !important;
    border: 1px solid #fe7500 !important;
}

.landing-page .rr-nav-cta:hover,
.landing-page .rr-primary-btn:hover,
.landing-page .rr-cta .rr-primary-btn:hover {
    background: #e96b00 !important;
    border-color: #e96b00 !important;
}

.landing-page .rr-secondary-btn {
    color: #fefefe !important;
    border: 1px solid rgba(254, 254, 254, .72) !important;
    background: rgba(53, 53, 53, .28) !important;
}

.landing-page .rr-secondary-btn:hover {
    color: #fefefe !important;
    border-color: #fe7500 !important;
    background: #fe7500 !important;
}

.landing-page .rr-program-card li b {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 999px !important;
}

.landing-page .rr-program-card li {
    border-radius: 22px !important;
}

.page-body {
    padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 640px) {
    .page-body {
        padding-bottom: calc(8rem + env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (max-width: 1040px) {
    .whatsapp-workspace.has-selected-conversation.inbox-collapsed .whatsapp-inbox {
        display: none !important;
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        border: 0 !important;
    }

    .whatsapp-workspace.has-selected-conversation.inbox-collapsed {
        grid-template-columns: 1fr !important;
    }

    .whatsapp-workspace.has-selected-conversation.inbox-collapsed .whatsapp-chat {
        grid-column: 1 / -1 !important;
    }

    .whatsapp-workspace.has-selected-conversation:not(.inbox-collapsed) .whatsapp-inbox {
        display: flex !important;
    }

    .whatsapp-workspace.has-selected-conversation.inbox-collapsed [data-whatsapp-inbox],
    [data-whatsapp-inbox][hidden] {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .whatsapp-bubble {
        max-width: calc(100vw - 4.5rem) !important;
        overflow-wrap: anywhere;
    }

    .whatsapp-media-open,
    .whatsapp-media-image,
    .whatsapp-media-video,
    .whatsapp-media-audio {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

/* Sidebar refresh: flatter and closer to the CRM visual language. */
#sidebar {
    background: #f3f4f6 !important;
    border-right: 1px solid #e5e7eb !important;
    box-shadow: none !important;
    will-change: width, min-width, transform !important;
    transition:
        width .26s cubic-bezier(.22, 1, .36, 1),
        min-width .26s cubic-bezier(.22, 1, .36, 1),
        transform .28s cubic-bezier(.22, 1, .36, 1) !important;
}

.admin-sidebar-brand {
    height: 72px !important;
    padding: .8rem 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #ffffff !important;
}

.admin-sidebar-brand a {
    gap: .35rem !important;
    color: #1f2937 !important;
}

.admin-sidebar-brand .brand-logo {
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;
    margin-left: 14px !important;
    margin-right: 14px !important;
    border: 2px solid #fff1e5 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(31, 41, 55, .08) !important;
}

.admin-logo-text strong {
    color: #1f2937 !important;
    font-family: var(--font-sans) !important;
    font-size: .98rem !important;
    font-weight: 900 !important;
    letter-spacing: -.03em !important;
}

.admin-logo-text,
.sidebar-link span {
    max-width: 180px !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
    overflow: hidden !important;
    transition:
        opacity .16s ease,
        max-width .22s cubic-bezier(.22, 1, .36, 1),
        transform .2s ease !important;
}

.admin-logo-text small {
    color: #6b7280 !important;
    font-size: .62rem !important;
    letter-spacing: .1em !important;
}

.sidebar-nav {
    padding: .8rem 0 1rem !important;
}

.sidebar-link {
    display: flex !important;
    align-items: center !important;
    min-height: 42px !important;
    gap: .35rem !important;
    margin: .16rem 0 !important;
    padding: .56rem 0 !important;
    border: 1px solid transparent !important;
    color: #4b5563 !important;
    background: transparent !important;
    border-radius: 0 !important;
    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease !important;
}

.sidebar-link i {
    width: 74px !important;
    min-width: 74px !important;
    flex: 0 0 74px !important;
    display: inline-grid !important;
    place-items: center !important;
    text-align: center !important;
    color: #6b7280 !important;
    font-size: .95rem !important;
}

.sidebar-link span {
    font-size: .82rem !important;
    font-weight: 800 !important;
    letter-spacing: -.01em !important;
    margin-left: -.15rem !important;
}

.sidebar-link:hover {
    color: #1f2937 !important;
    border-color: #e5e7eb !important;
    background: #ffffff !important;
}

.sidebar-link:hover i {
    color: #fe7500 !important;
}

.sidebar-link.active {
    color: #1f2937 !important;
    border-color: #fe7500 !important;
    background: #fff1e5 !important;
    box-shadow: none !important;
}

.sidebar-link.active i {
    color: #fe7500 !important;
}

html.sidebar-collapsed #sidebar {
    width: 74px !important;
    min-width: 74px !important;
}

html.sidebar-collapsed .admin-logo-text,
html.sidebar-collapsed .sidebar-link span {
    display: grid !important;
    max-width: 0 !important;
    opacity: 0 !important;
    transform: translateX(-6px) !important;
    pointer-events: none !important;
}

html.sidebar-collapsed .admin-sidebar-brand {
    padding-inline: 0 !important;
}

html.sidebar-collapsed .sidebar-nav {
    padding-inline: 0 !important;
}

html.sidebar-collapsed .sidebar-link {
    justify-content: flex-start !important;
    min-height: 42px !important;
    margin: .16rem 0 !important;
    padding: .56rem 0 !important;
}

html.sidebar-collapsed .sidebar-link i {
    width: 74px !important;
    min-width: 74px !important;
    flex-basis: 74px !important;
    height: auto !important;
    min-height: 0 !important;
}

@media (max-width: 992px) {
    html.sidebar-collapsed #sidebar,
    #sidebar {
        width: 268px !important;
        min-width: 268px !important;
        box-shadow: 12px 0 28px rgba(31, 41, 55, .12) !important;
        transform: translateX(calc(-100% - 12px)) !important;
        transition:
            transform .3s cubic-bezier(.22, 1, .36, 1),
            box-shadow .2s ease !important;
    }

    #sidebar.open {
        transform: translateX(0) !important;
    }

    #sidebarOverlay {
        display: block !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity .22s ease !important;
    }

    #sidebarOverlay.open {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    html.sidebar-collapsed .admin-logo-text,
    html.sidebar-collapsed .sidebar-link span {
        display: grid !important;
        max-width: 180px !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
        pointer-events: auto !important;
    }

    html.sidebar-collapsed .admin-sidebar-brand,
    html.sidebar-collapsed #sidebar .admin-sidebar-brand,
    html.sidebar-collapsed #sidebar .admin-sidebar-brand a {
        width: auto !important;
        min-width: 0 !important;
        justify-content: flex-start !important;
        padding-inline: .75rem !important;
    }

    html.sidebar-collapsed #sidebar .admin-sidebar-brand a {
        width: 100% !important;
    }

    html.sidebar-collapsed #sidebar .brand-logo {
        width: 46px !important;
        min-width: 46px !important;
        height: 46px !important;
        flex: 0 0 46px !important;
        margin-left: 14px !important;
        margin-right: 14px !important;
    }

    html.sidebar-collapsed .sidebar-nav {
        padding: .8rem 0 1rem !important;
    }

    .sidebar-link,
    html.sidebar-collapsed .sidebar-link {
        display: flex !important;
        justify-content: flex-start !important;
        gap: .6rem !important;
        padding: .56rem .75rem !important;
    }

    .sidebar-link i,
    html.sidebar-collapsed .sidebar-link i {
        width: 24px !important;
        min-width: 24px !important;
        flex: 0 0 24px !important;
        height: auto !important;
        margin: 0 !important;
        display: inline-grid !important;
        place-items: center !important;
        text-align: center !important;
    }
}

@media (max-width: 992px) {
    body.crm-page #sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 1000 !important;
        width: min(82vw, 268px) !important;
        min-width: min(82vw, 268px) !important;
        max-width: min(82vw, 268px) !important;
        height: 100dvh !important;
        transform: translate3d(-110%, 0, 0) !important;
    }

    body.crm-page #sidebar.open {
        transform: translate3d(0, 0, 0) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    body.crm-page #sidebarOverlay {
        z-index: 999 !important;
    }
}

@media (min-width: 993px) {
    html.sidebar-collapsed #sidebar .admin-sidebar-brand {
        height: 72px !important;
        min-height: 72px !important;
        padding-top: .8rem !important;
        padding-bottom: .8rem !important;
    }

    html.sidebar-collapsed #sidebar .admin-sidebar-brand a {
        height: auto !important;
        min-height: 0 !important;
    }

    html.sidebar-collapsed #sidebar .brand-logo {
        width: 46px !important;
        min-width: 46px !important;
        height: 46px !important;
        flex: 0 0 46px !important;
        margin-left: 14px !important;
        margin-right: 14px !important;
        line-height: 1 !important;
    }

    html.sidebar-collapsed #sidebar .sidebar-link {
        min-height: 42px !important;
        height: auto !important;
        margin: .16rem 0 !important;
        padding-top: .56rem !important;
        padding-bottom: .56rem !important;
    }

    html.sidebar-collapsed #sidebar .sidebar-link i {
        width: 74px !important;
        min-width: 74px !important;
        flex: 0 0 74px !important;
        height: auto !important;
        min-height: 0 !important;
        line-height: 1 !important;
    }
}

@media (min-width: 993px) {
    #sidebar .admin-sidebar-brand a,
    #sidebar .sidebar-link,
    html.sidebar-collapsed #sidebar .admin-sidebar-brand a,
    html.sidebar-collapsed #sidebar .sidebar-link {
        justify-content: flex-start !important;
        gap: .35rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #sidebar .brand-logo,
    html.sidebar-collapsed #sidebar .brand-logo {
        margin-left: 14px !important;
        margin-right: 14px !important;
    }

    #sidebar .sidebar-link i,
    html.sidebar-collapsed #sidebar .sidebar-link i {
        width: 74px !important;
        min-width: 74px !important;
        flex: 0 0 74px !important;
        margin: 0 !important;
        transform: none !important;
    }
}

.rr-brokers-page {
    background: #FAFAFA;
}

.rr-brokers-hero {
    padding-top: 6.2rem;
    padding-bottom: 1rem;
}

.rr-brokers-section {
    padding-top: 1rem;
}

.rr-broker-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
}

.rr-broker-grid.compact {
    grid-template-columns: 1fr;
}

.rr-broker-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: .75rem;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    padding: .65rem;
    box-shadow: 0 4px 12px rgba(31, 41, 55, .05);
}

.rr-broker-card img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    background: #F3F4F6;
}

.rr-broker-card > div {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
}

.rr-broker-card p {
    grid-column: 1 / -1;
    margin: 0 0 -.35rem;
    color: #FE7500;
    font-size: .64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.rr-broker-card h2 {
    margin: 0;
    color: #1F2937;
    font-size: .98rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rr-broker-card .rr-primary-btn {
    min-height: 38px;
    padding: .55rem .7rem;
    font-size: .78rem;
    white-space: nowrap;
}

.rr-empty-brokers {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    padding: 1.25rem;
}

.rr-public-modal[hidden] {
    display: none !important;
}

.rr-public-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: end center;
    padding: 1rem;
    background: rgba(31, 41, 55, .42);
    opacity: 0;
    transition: opacity .16s ease;
}

.rr-public-modal.open {
    opacity: 1;
}

.rr-public-modal-card {
    width: min(100%, 430px);
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    padding: 1rem;
    box-shadow: 0 14px 35px rgba(31, 41, 55, .14);
    transform: translateY(12px);
    transition: transform .16s ease;
}

.rr-public-modal.open .rr-public-modal-card {
    transform: translateY(0);
}

.rr-public-modal-card > button {
    float: right;
    border: 0;
    background: #F3F4F6;
    color: #1F2937;
    width: 34px;
    height: 34px;
    cursor: pointer;
}

.rr-public-modal-card h2 {
    margin: .2rem 0 1rem;
    color: #1F2937;
}

.rr-public-modal-card form {
    display: grid;
    gap: .75rem;
}

.rr-public-modal-card label span {
    display: block;
    margin-bottom: .3rem;
    color: #6B7280;
    font-size: .78rem;
    font-weight: 800;
}

.rr-public-modal-card input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #E5E7EB;
    background: #FAFAFA;
    color: #1F2937;
    padding: .65rem .75rem;
}

.rr-hp {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
}

@media (max-width: 390px) {
    .rr-broker-card {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .rr-broker-card img {
        width: 76px;
        height: 76px;
    }

    .rr-broker-card > div {
        grid-template-columns: 1fr;
        gap: .45rem;
    }

    .rr-broker-card p {
        margin-bottom: -.25rem;
    }

    .rr-broker-card .rr-primary-btn {
        width: 100%;
    }
}

@media (min-width: 760px) {
    .rr-broker-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rr-broker-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rr-public-modal[hidden] {
    display: none !important;
}

.rr-public-modal {
        place-items: center;
    }
}

@media (min-width: 1120px) {
    .rr-broker-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rr-broker-grid.compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
