:root {
    --v4-nav: #182a3b;
    --v4-brand: #284d70;
    --v4-brand-strong: #193952;
    --v4-brand-soft: #e8eff6;
    --v4-brand-on-dark: #d5e5f2;
    /* Legacy component tokens keep the same roles across the V4 layouts. */
    --v4-forest-950: var(--v4-nav);
    --v4-forest-900: #20364a;
    --v4-forest-800: var(--v4-brand-strong);
    --v4-green-700: #235a40;
    --v4-green-600: #327455;
    --v4-green-100: #eaf3ec;
    --v4-paper: #f4f1eb;
    --v4-surface: #ffffff;
    --v4-surface-soft: #f6f4f0;
    --v4-ink: #202c37;
    --v4-muted: #53616e;
    --v4-line: #d9d7d2;
    --v4-line-strong: #a4aab0;
    --v4-control: #7e8993;
    --v4-orange: #8e3d27;
    --v4-orange-soft: #fff0e8;
    --v4-red: #9e3c38;
    --v4-red-soft: #fcecea;
    --v4-blue: var(--v4-brand);
    --v4-blue-soft: var(--v4-brand-soft);
    --v4-shadow-sm: 0 3px 12px rgba(24, 42, 59, .045);
    --v4-shadow: 0 10px 30px rgba(24, 42, 59, .08);
    --v4-shadow-lg: 0 22px 56px rgba(24, 42, 59, .15);
}

html,
body.bni-v4 {
    min-width: 320px;
    background: var(--v4-paper);
    color: var(--v4-ink);
}

body.bni-v4 {
    overflow-x: hidden;
}

.bni-v4 .pace .pace-progress {
    background: var(--v4-brand);
}

.bni-v4 .v4-attendance-status-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--attendance-status-bg, var(--v4-surface-soft));
    color: var(--attendance-status-text, var(--v4-muted));
    font-size: 10px;
    font-weight: 750;
    letter-spacing: normal;
    line-height: 1.2;
    text-transform: none;
    white-space: nowrap;
}

.v4-attendance-status-chip::before {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.v4-attendance-status-chip[data-attendance-status="1"] {
    --attendance-status-bg: var(--v4-blue-soft);
    --attendance-status-text: var(--v4-blue);
}

.v4-attendance-status-chip[data-attendance-status="2"] {
    --attendance-status-bg: var(--v4-green-100);
    --attendance-status-text: var(--v4-green-700);
}

.v4-attendance-status-chip[data-attendance-status="3"] {
    --attendance-status-bg: var(--v4-red-soft);
    --attendance-status-text: var(--v4-red);
}

.v4-attendance-status-chip[data-attendance-status="4"] {
    --attendance-status-bg: #fff2dc;
    --attendance-status-text: #794a14;
}

.v4-attendance-status-chip[data-attendance-status="5"] {
    --attendance-status-bg: #e5f3f0;
    --attendance-status-text: #155957;
}

.v4-attendance-status-chip[data-attendance-status="6"] {
    --attendance-status-bg: #edf0f2;
    --attendance-status-text: #47515b;
}

.v4-attendance-status-chip[data-attendance-status="entry"] {
    --attendance-status-bg: #f1ebf7;
    --attendance-status-text: #5b4180;
}

.bni-v4 h1,
.bni-v4 h2,
.bni-v4 h3,
.bni-v4 h4,
.bni-v4 h5,
.bni-v4 h6,
.bni-v4 .card-title {
    color: var(--v4-ink);
}

.bni-v4 a {
    color: var(--v4-brand);
}

.bni-v4 a:hover {
    color: var(--v4-brand-strong);
}

.bni-v4 button,
.bni-v4 input,
.bni-v4 select,
.bni-v4 textarea {
    font: inherit;
}

.bni-v4 button:focus-visible,
.bni-v4 a:focus-visible,
.bni-v4 input:focus-visible,
.bni-v4 select:focus-visible,
.bni-v4 textarea:focus-visible,
.bni-v4 [tabindex]:focus-visible {
    outline: 3px solid var(--v4-blue);
    outline-offset: 2px;
}

/* O atalho de conteúdo posiciona o foco no marco principal sem desenhar
   uma borda do tamanho da página em torno das listagens. */
.bni-v4 #v4-main:focus,
.bni-v4 #v4-main:focus-visible {
    outline: none;
}

.bni-v4 .card {
    border: 1px solid var(--v4-line);
    border-radius: 15px;
    box-shadow: var(--v4-shadow-sm);
}

.bni-v4 .btn {
    min-height: 38px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: -.01em;
}

.bni-v4 .btn svg {
    width: 17px;
    height: 17px;
    margin-right: 7px;
    vertical-align: -4px;
}

.bni-v4 .btn-primary,
.bni-v4 .btn-primary:hover,
.bni-v4 .btn-primary:focus {
    border-color: var(--v4-brand) !important;
    background: var(--v4-brand) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.bni-v4 .btn-primary:hover,
.bni-v4 .btn-primary:focus {
    border-color: var(--v4-brand-strong) !important;
    background: var(--v4-brand-strong) !important;
}

.bni-v4 .btn-outline-primary {
    border-color: var(--v4-control) !important;
    background: #fff;
    color: var(--v4-brand) !important;
}

.bni-v4 .btn-outline-primary:hover,
.bni-v4 .btn-outline-primary:focus {
    border-color: var(--v4-brand) !important;
    background: var(--v4-brand-soft) !important;
    color: var(--v4-brand-strong) !important;
}

.bni-v4 .btn-outline-secondary {
    border-color: var(--v4-line-strong);
    color: var(--v4-muted);
}

.bni-v4 .btn-flat-secondary {
    color: var(--v4-muted);
}

.bni-v4 .form-control,
.bni-v4 .form-select {
    min-height: 42px;
    border-color: var(--v4-line);
    border-radius: 9px;
    color: var(--v4-ink);
    font-size: 13px;
}

.bni-v4 .form-control::placeholder {
    color: var(--v4-muted);
}

.bni-v4 .form-control:focus,
.bni-v4 .form-select:focus {
    border-color: var(--v4-brand);
    box-shadow: 0 0 0 3px rgba(40, 77, 112, .12);
}

.bni-v4 .bg-light-success {
    background: var(--v4-green-100) !important;
}

.bni-v4 .text-success {
    color: var(--v4-green-700) !important;
}

.bni-v4 .text-primary {
    color: var(--v4-brand) !important;
}

.bni-v4 .bg-light-danger {
    background: var(--v4-red-soft) !important;
}

.bni-v4 .text-danger {
    color: var(--v4-red) !important;
}

/* Vuexy shell */
.bni-v4 .main-menu.menu-dark {
    background: var(--v4-forest-950);
}

.bni-v4 .main-menu.menu-dark .navbar-header,
.bni-v4 .main-menu.menu-dark .main-menu-content,
.bni-v4 .main-menu.menu-dark .navigation {
    background: transparent;
}

.bni-v4 .main-menu .navbar-brand .brand-text,
.bni-v4 .main-menu .modern-nav-toggle svg {
    color: #fff !important;
}

.bni-v4 .main-menu .navbar-brand .v4-brand-mark {
    display: block;
    width: 34px;
    height: 34px;
}

.bni-v4 .main-menu :is(a, button):focus-visible {
    outline-color: var(--v4-brand-on-dark);
}

.bni-v4 .main-menu.menu-dark .navigation > li.navigation-header span,
.bni-v4 .main-menu.menu-dark .navigation > li.navigation-header svg {
    color: #afbfce;
}

.bni-v4 .main-menu.menu-dark .navigation > li > a {
    min-height: 46px;
    margin: 0 13px 7px;
    border-radius: 10px;
    color: var(--v4-brand-on-dark);
}

.bni-v4 .main-menu.menu-dark .navigation > li > a:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.bni-v4 .main-menu.menu-dark .navigation > li.active > a,
.bni-v4 .main-menu.menu-dark .navigation > li.active > a:hover {
    background: var(--v4-brand) !important;
    color: #fff !important;
    box-shadow: inset 2px 0 0 var(--v4-brand-on-dark);
}

.bni-v4 .main-menu.menu-dark .navigation > li.active > a svg,
.bni-v4 .main-menu.menu-dark .navigation > li.active > a .menu-title {
    color: #fff !important;
}

.bni-v4 .v4-nav-secondary::before {
    display: block;
    height: 1px;
    margin: 12px 16px 8px;
    background: rgb(175 191 206 / 26%);
    content: "";
}

.bni-v4 .v4-nav-secondary:not([hidden]) ~ .v4-nav-secondary::before {
    display: none;
}

.bni-v4 .v4-nav-management > a:not([hidden]) ~ a {
    display: none !important;
}

.bni-v4 .v4-nav-management:not(:has(> a:not([hidden]))),
.v4-management-navigation:not(:has(> a:not([hidden]))) {
    display: none;
}

.v4-management-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 0 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--v4-line);
}

.v4-management-navigation a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 2px solid transparent;
    color: var(--v4-ink);
    font-weight: 600;
    white-space: nowrap;
}

.v4-management-navigation a[aria-current="page"] {
    border-color: var(--v4-brand);
    color: var(--v4-brand);
}

.v4-management-navigation a:hover {
    background: var(--v4-brand-soft);
}

.v4-management-navigation a:focus-visible {
    outline: 2px solid var(--v4-brand);
    outline-offset: -3px;
}

#v4-main:has(> .v4-management-navigation:not([hidden])) :is(
    .v4-company-header a[href="/v4/empresa"],
    .v4-company-header a[href="/v4/associados"],
    .v4-people-head a[href="/v4/configuracoes"]
) {
    display: none;
}

.bni-v4.menu-collapsed .main-menu.menu-fixed {
    width: 80px;
}

.bni-v4.menu-collapsed .main-menu .navigation > li > a {
    margin-right: 10px;
    margin-left: 10px;
}

@media (min-width: 1200px) {
    /* Keep the collapsed shell on Vuexy's native 80 px rail and content offset. */
    .bni-v4.menu-collapsed .main-menu.menu-fixed:not(.expanded) {
        width: 80px;
    }

    .bni-v4.menu-collapsed .app-content.content {
        margin-left: 80px;
    }

    .bni-v4.menu-collapsed .header-navbar.floating-nav {
        left: 80px;
    }

    .bni-v4.menu-collapsed .main-menu:not(.expanded) .navbar-header {
        width: 80px;
        padding-right: 0;
        padding-left: 0;
    }

    .bni-v4.menu-collapsed .main-menu:not(.expanded) .navbar-brand {
        width: 80px;
        justify-content: center;
        margin: 0;
    }

    .bni-v4.menu-collapsed .main-menu:not(.expanded) .v4-navigation-header {
        display: none !important;
    }

    .bni-v4.menu-collapsed .main-menu:not(.expanded) .navigation {
        padding-top: 10px;
    }

    .bni-v4.menu-collapsed .main-menu:not(.expanded) .navigation > li {
        overflow: visible;
    }

    .bni-v4.menu-collapsed .main-menu:not(.expanded) .navigation > li > a {
        position: relative;
        width: 52px;
        min-height: 48px;
        justify-content: center;
        margin: 0 auto 8px;
        padding: 0 !important;
        overflow: visible;
    }

    .bni-v4.menu-collapsed .main-menu:not(.expanded) .navigation > li > a > svg,
    .bni-v4.menu-collapsed .main-menu:not(.expanded) .navigation > li > a > i {
        width: 20px;
        height: 20px;
        flex: 0 0 20px;
        margin: 0 !important;
    }

    .bni-v4.menu-collapsed .main-menu:not(.expanded) .navigation > li > a .menu-title {
        display: none !important;
    }

    .bni-v4.menu-collapsed .main-menu:not(.expanded) .v4-nav-badge {
        position: absolute;
        top: 4px;
        right: 3px;
        min-width: 18px;
        height: 18px;
        margin: 0 !important;
        padding: 3px 5px;
        font-size: 8px;
        line-height: 12px;
        white-space: nowrap;
    }
}

.bni-v4 .header-navbar.floating-nav {
    min-height: 62px;
    border: 1px solid rgba(24, 42, 59, .055);
    border-radius: 14px;
    box-shadow: var(--v4-shadow-sm);
}

.bni-v4 .header-navbar .navbar-container {
    min-width: 0;
    min-height: 62px;
    padding: .6rem 1.15rem;
    gap: 12px;
}

.v4-topbar-title {
    min-width: 0;
    line-height: 1.15;
}

.v4-topbar-title small {
    color: var(--v4-muted) !important;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .12em;
}

.v4-topbar-title strong {
    display: block;
    overflow: hidden;
    color: var(--v4-ink);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v4-topbar-actions {
    min-width: 0;
    flex-wrap: nowrap;
    gap: 10px;
}

.v4-bni-return-action {
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--v4-line);
    background: var(--v4-brand-soft);
    color: var(--v4-brand) !important;
    white-space: nowrap;
}

.v4-bni-return-action:hover,
.v4-bni-return-action:focus {
    border-color: var(--v4-brand);
    color: var(--v4-brand-strong) !important;
}

.v4-bni-return-action svg {
    flex: 0 0 auto;
}

.v4-bni-return-label {
    display: inline;
    font-weight: 750;
}

.v4-topbar-status {
    padding-right: 2px;
}

.v4-topbar-status .badge {
    padding: 7px 11px;
    border: 1px solid rgba(40, 77, 112, .07);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.v4-notification-trigger,
.v4-mobile-notification-link {
    position: relative;
    display: inline-grid;
    width: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid var(--v4-line);
    border-radius: 13px;
    background: var(--v4-surface);
    color: var(--v4-ink);
    text-decoration: none;
}

.v4-notification-trigger:hover,
.v4-notification-trigger:focus-visible,
.v4-mobile-notification-link:hover,
.v4-mobile-notification-link:focus-visible {
    border-color: var(--v4-brand);
    color: var(--v4-brand);
}

.v4-notification-trigger .v4-notification-count,
.v4-mobile-notification-link .v4-notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    display: grid;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    place-items: center;
    border: 2px solid var(--v4-surface);
    border-radius: 999px;
    background: #b4232f;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.v4-notification-count[hidden] {
    display: none !important;
}

.bni-v4 .header-navbar .navbar-container .dropdown-user {
    position: relative;
}

.bni-v4 .v4-user-menu-trigger {
    display: inline-flex !important;
    min-height: 46px;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 4px 7px 4px 10px !important;
    border-radius: 12px;
    background: transparent !important;
    color: var(--v4-ink) !important;
    line-height: 1 !important;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.bni-v4 .v4-user-menu-trigger:hover,
.bni-v4 .v4-user-menu-trigger[aria-expanded="true"] {
    background: var(--v4-surface-soft) !important;
}

.bni-v4 .v4-user-menu-trigger::after {
    display: none;
}

.bni-v4 .v4-user-menu-trigger .user-nav {
    min-width: 0;
    max-width: 210px;
    align-items: flex-end;
    margin: 0;
    line-height: 1.15;
}

.bni-v4 .v4-user-menu-trigger .user-name,
.bni-v4 .v4-user-menu-trigger .user-status {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bni-v4 .v4-user-menu-trigger .user-name {
    margin: 0 0 4px;
    color: var(--v4-ink);
    font-size: 12px;
    font-weight: 700;
}

.bni-v4 .v4-user-menu-trigger .user-status {
    color: var(--v4-muted);
    font-size: 10px;
    font-weight: 550;
}

.bni-v4 .v4-user-menu-trigger .avatar,
.bni-v4 .v4-user-menu-summary .avatar {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 1px solid rgba(40, 77, 112, .1);
    border-radius: 50%;
}

.bni-v4 .v4-user-menu-trigger .avatar-content,
.bni-v4 .v4-user-menu-summary .avatar-content {
    width: auto;
    height: auto;
    color: var(--v4-brand);
    font-size: 12px;
    font-weight: 750;
}

.v4-user-menu-chevron {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    margin-left: -4px;
    color: #7f8d86;
    transition: transform .15s ease;
}

.v4-user-menu-trigger[aria-expanded="true"] .v4-user-menu-chevron {
    transform: rotate(180deg);
}

.bni-v4 .header-navbar .navbar-container .v4-user-menu {
    width: min(360px, calc(100vw - 16px)) !important;
    margin-top: 8px;
    padding: 8px;
    overflow: hidden;
    border: 1px solid var(--v4-line);
    border-radius: 14px;
    background: var(--v4-surface);
    box-shadow: var(--v4-shadow-lg);
}

.v4-user-menu-summary {
    display: grid;
    min-width: 0;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 11px 10px 13px;
    border-radius: 10px;
    background: var(--v4-surface-soft);
}

.v4-user-menu-identity {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.v4-user-menu-identity strong,
.v4-user-menu-identity span,
.v4-user-menu-identity small {
    display: block;
    line-height: 1.3;
}

.v4-user-menu-identity strong {
    color: var(--v4-ink);
    font-size: 15px;
    font-weight: 750;
}

.v4-user-menu-identity span {
    color: var(--v4-brand);
    font-size: 12px;
    font-weight: 650;
}

.v4-user-menu-identity small {
    overflow: hidden;
    color: var(--v4-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v4-user-menu-section {
    padding-top: 8px;
}

.v4-user-menu-section[hidden] {
    display: none !important;
}

.v4-user-menu-label {
    display: block;
    padding: 4px 10px 5px;
    color: #849189;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.bni-v4 .v4-user-menu .v4-user-menu-action {
    display: grid;
    width: 100%;
    min-height: 58px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--v4-ink);
    text-align: left;
}

.bni-v4 .v4-user-menu .v4-user-menu-action[hidden] {
    display: none !important;
}

.bni-v4 .v4-user-menu .v4-user-menu-action:hover,
.bni-v4 .v4-user-menu .v4-user-menu-action:focus {
    background: var(--v4-surface-soft);
    color: var(--v4-forest-950);
}

.v4-user-menu-action-icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
}

.v4-user-menu-action-icon svg,
.v4-user-menu-action-arrow {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
}

.v4-user-menu-action-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.v4-user-menu-action-copy strong,
.v4-user-menu-action-copy small {
    display: block;
    line-height: 1.3;
    white-space: normal;
}

.v4-user-menu-action-copy strong {
    font-size: 14px;
    font-weight: 700;
}

.v4-user-menu-action-copy small {
    color: var(--v4-muted);
    font-size: 11px;
}

.bni-v4 .v4-user-menu .v4-user-menu-action.is-company-switch {
    background: var(--v4-brand-soft);
}

.bni-v4 .v4-user-menu .v4-user-menu-action.is-company-switch:hover,
.bni-v4 .v4-user-menu .v4-user-menu-action.is-company-switch:focus {
    background: #dff5e7;
}

.v4-user-menu-action-arrow {
    color: #8b9991;
}

.bni-v4 .v4-user-menu .dropdown-divider {
    margin: 7px 2px;
    border-color: var(--v4-line);
}

.bni-v4 .v4-user-menu .v4-user-menu-action.is-logout {
    color: var(--v4-red);
}

.bni-v4 .v4-user-menu .is-logout .v4-user-menu-action-icon {
    background: var(--v4-red-soft);
    color: var(--v4-red);
}

.bni-v4 .v4-user-menu .v4-user-menu-action:disabled {
    opacity: .62;
    pointer-events: none;
}

.bni-v4 .dropdown-user .avatar {
    border: 1px solid rgba(40, 77, 112, .08);
}

.bni-v4 .app-content.content {
    min-height: calc(100vh - 96px);
}

@media (min-width: 1200px) {
    /* O shell legado reserva 26 px após a barra; a V4 usa 12 px antes das
       páginas operacionais para manter o primeiro conteúdo visível. */
    .bni-v4 .app-content.content {
        padding-top: calc(4.45rem + 2.3rem);
    }
}

.bni-v4 .content-wrapper {
    width: 100%;
    max-width: 1880px;
    margin: 0 auto;
}

.v4-skip-link {
    position: fixed;
    z-index: 1200;
    top: 8px;
    left: 50%;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--v4-forest-950);
    color: #fff !important;
    transform: translate(-50%, -160%);
    transition: transform .15s ease;
}

.v4-skip-link:focus {
    transform: translate(-50%, 0);
}

.v4-eyebrow {
    display: inline-block;
    color: var(--v4-brand);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.v4-page,
.v4-workspace {
    padding: 12px 3px 28px;
}

.v4-toast-region {
    position: fixed;
    z-index: 1300;
    right: 22px;
    bottom: 22px;
    display: grid;
    width: min(380px, calc(100vw - 32px));
    gap: 9px;
    pointer-events: none;
}

.v4-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 11px;
    background: var(--v4-forest-950);
    color: #fff;
    box-shadow: var(--v4-shadow-lg);
    font-size: 12px;
    font-weight: 600;
    transition: opacity .2s ease, transform .2s ease;
}

.v4-toast.is-error {
    background: #812d33;
}

.v4-toast.is-warning {
    background: #75401f;
}

.v4-toast.is-leaving {
    opacity: 0;
    transform: translateY(8px);
}

.v4-empty-state,
.v4-workspace-empty,
.v4-workspace-error,
.v4-workspace-loading {
    display: flex;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--v4-line-strong);
    border-radius: 14px;
    background: rgba(255, 255, 255, .68);
    color: var(--v4-muted);
    text-align: center;
}

.v4-empty-state,
.v4-workspace-empty,
.v4-workspace-error {
    flex-direction: column;
    padding: 34px;
}

.v4-empty-state svg,
.v4-state-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    color: var(--v4-brand);
}

.v4-state-icon svg {
    width: 28px;
    height: 28px;
}

.v4-empty-state h2,
.v4-workspace-empty h2,
.v4-workspace-error h2 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
}

.v4-empty-state p,
.v4-workspace-empty p,
.v4-workspace-error p {
    max-width: 480px;
    margin: 0 0 15px;
    font-size: 12px;
}

.v4-workspace-error .v4-state-icon,
.v4-empty-state.is-error > svg {
    color: var(--v4-red);
}

/* Unified service workspace */
.v4-workspace-header,
.v4-properties-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 14px;
}

.v4-workspace-header h1,
.v4-properties-header h1 {
    margin: 2px 0 2px;
    font-size: clamp(25px, 2.2vw, 34px);
    font-weight: 720;
    letter-spacing: -.04em;
}

.v4-workspace-header p,
.v4-properties-header p {
    margin: 0;
    color: var(--v4-muted);
    font-size: 12px;
}

.v4-workspace-header-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 12px;
}

.v4-updated-at,
.v4-property-updated {
    color: var(--v4-muted);
    font-size: 10px;
    font-weight: 600;
}

.v4-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 11px;
    overflow: hidden;
    border: 1px solid rgba(24, 42, 59, .06);
    border-radius: 14px;
    background: var(--v4-surface);
    box-shadow: var(--v4-shadow-sm);
}

.v4-metric {
    position: relative;
    display: flex;
    min-height: 78px;
    flex-direction: column;
    justify-content: center;
    padding: 14px 19px;
    border-right: 1px solid var(--v4-line);
}

.v4-metric:last-child {
    border-right: 0;
}

.v4-metric::before {
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 0;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: transparent;
    content: "";
}

.v4-metric.is-new::before {
    background: var(--v4-brand);
}

.v4-metric.is-attention::before {
    background: var(--v4-orange);
}

.v4-metric span {
    color: var(--v4-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.v4-metric strong {
    margin-top: 2px;
    color: var(--v4-ink);
    font-size: 23px;
    font-weight: 720;
    letter-spacing: -.04em;
}

.v4-workspace-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 11px;
    padding: 10px;
    border: 1px solid rgba(24, 42, 59, .06);
    border-radius: 14px;
    background: var(--v4-surface);
    box-shadow: var(--v4-shadow-sm);
}

.v4-search {
    position: relative;
    display: block;
}

.v4-search > svg,
.v4-search > i {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 13px;
    width: 17px;
    height: 17px;
    color: var(--v4-muted);
    transform: translateY(-50%);
}

.v4-search .form-control {
    padding-left: 41px;
    background: var(--v4-paper);
}

.v4-filter-group,
.v4-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--v4-line);
    border-radius: 10px;
    background: var(--v4-paper);
}

.v4-filter,
.v4-view-toggle button {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--v4-muted);
    font-size: 10px;
    font-weight: 650;
}

.v4-filter.is-active,
.v4-view-toggle button.is-active {
    background: var(--v4-surface);
    color: var(--v4-forest-950);
    box-shadow: 0 2px 8px rgba(24, 42, 59, .08);
}

.v4-filter-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--v4-line-strong);
}

.v4-filter-dot.is-new {
    background: var(--v4-brand);
}

.v4-filter-dot.is-attention {
    background: var(--v4-orange);
}

.v4-workspace-loading {
    min-height: 380px;
    gap: 9px;
    font-size: 12px;
}

.v4-workspace-body {
    display: grid;
    grid-template-columns: minmax(520px, 1.45fr) minmax(330px, .8fr);
    align-items: start;
    gap: 11px;
}

.v4-queue-panel,
.v4-board-panel,
.v4-detail-panel {
    min-width: 0;
    border: 1px solid rgba(24, 42, 59, .065);
    border-radius: 15px;
    background: var(--v4-surface);
    box-shadow: var(--v4-shadow-sm);
}

.v4-queue-panel,
.v4-board-panel {
    overflow: hidden;
}

.v4-panel-heading {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--v4-line);
}

.v4-panel-heading h2 {
    margin: 1px 0 0;
    font-size: 17px;
    font-weight: 700;
}

.v4-panel-heading > span {
    color: var(--v4-muted);
    font-size: 10px;
    font-weight: 600;
}

.v4-queue-list {
    max-height: calc(100vh - 340px);
    min-height: 340px;
    overflow: auto;
    overscroll-behavior: contain;
}

.v4-queue-item {
    border-bottom: 1px solid var(--v4-line);
}

.v4-queue-item:last-child {
    border-bottom: 0;
}

.v4-entry-card {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 78px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 12px 20px;
    border: 0;
    background: #fff;
    color: var(--v4-ink);
    text-align: left;
    transition: background .15s ease, box-shadow .15s ease;
}

.v4-entry-card:hover,
.v4-entry-card.is-selected {
    background: #f7faf6;
}

.v4-entry-card.is-selected {
    box-shadow: inset 3px 0 0 var(--v4-brand);
}

.v4-priority-marker {
    position: absolute;
    top: 7px;
    left: 20px;
    color: var(--v4-muted);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.v4-priority-marker.is-new {
    color: var(--v4-orange);
}

.v4-priority-marker.is-attention {
    color: var(--v4-blue);
}

.v4-entry-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    padding-top: 7px;
}

.v4-avatar {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
    font-size: 10px;
    font-weight: 750;
}

.v4-avatar.is-large {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    font-size: 12px;
}

.v4-entry-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.v4-entry-copy strong,
.v4-entry-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v4-entry-copy strong {
    font-size: 12px;
    font-weight: 700;
}

.v4-entry-copy span,
.v4-entry-meta {
    color: var(--v4-muted);
    font-size: 9px;
}

.v4-entry-meta {
    display: grid;
    justify-items: end;
    gap: 4px;
    padding-top: 7px;
    white-space: nowrap;
}

.v4-entry-meta > span {
    color: var(--v4-brand);
    font-weight: 650;
}

.v4-board {
    display: grid;
    max-height: calc(100vh - 340px);
    min-height: 340px;
    grid-auto-columns: minmax(235px, 1fr);
    grid-auto-flow: column;
    gap: 9px;
    overflow: auto;
    padding: 10px;
    background: var(--v4-paper);
    overscroll-behavior: contain;
}

.v4-board-column {
    min-height: 320px;
    overflow: hidden;
    border: 1px solid var(--v4-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .72);
}

.v4-board-column-header {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 11px;
    border-bottom: 1px solid var(--v4-line);
}

.v4-board-column-header h3 {
    margin: 0;
    font-size: 10px;
    font-weight: 720;
}

.v4-board-column-header span {
    display: inline-flex;
    min-width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--v4-surface-soft);
    color: var(--v4-muted);
    font-size: 9px;
    font-weight: 700;
}

.v4-board-cards {
    display: grid;
    gap: 7px;
    padding: 8px;
}

.v4-board-card {
    display: grid;
    width: 100%;
    gap: 7px;
    padding: 11px;
    border: 1px solid var(--v4-line);
    border-radius: 10px;
    background: #fff;
    color: var(--v4-ink);
    text-align: left;
    box-shadow: 0 3px 10px rgba(24, 42, 59, .045);
}

.v4-board-card:hover,
.v4-board-card.is-selected {
    border-color: #8fb29f;
    box-shadow: 0 7px 18px rgba(24, 42, 59, .09);
}

.v4-board-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.v4-board-card-top strong {
    font-size: 11px;
}

.v4-board-card-top > span {
    padding: 3px 5px;
    border-radius: 6px;
    background: var(--v4-surface-soft);
    color: var(--v4-muted);
    font-size: 7px;
    font-weight: 750;
    text-transform: uppercase;
}

.v4-board-card-top > span.is-new {
    background: var(--v4-orange-soft);
    color: var(--v4-orange);
}

.v4-board-card-top > span.is-attention {
    background: var(--v4-blue-soft);
    color: var(--v4-blue);
}

.v4-board-card > span:not(.v4-board-card-top),
.v4-board-card time,
.v4-board-column-empty {
    color: var(--v4-muted);
    font-size: 9px;
}

.v4-board-card time {
    justify-self: end;
}

.v4-board-column-empty {
    padding: 16px 4px;
    text-align: center;
}

.v4-detail-panel {
    position: sticky;
    top: 94px;
    max-height: calc(100vh - 112px);
    min-height: 420px;
    overflow: auto;
    overscroll-behavior: contain;
}

.v4-detail-empty {
    display: flex;
    min-height: 420px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    color: var(--v4-muted);
    text-align: center;
}

.v4-detail-empty h2 {
    margin: 0 0 6px;
    font-size: 16px;
}

.v4-detail-empty p {
    max-width: 280px;
    margin: 0;
    font-size: 11px;
}

.v4-detail-content > .v4-detail-content {
    padding: 15px;
}

.v4-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
}

.v4-detail-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
}

.v4-detail-identity h2 {
    margin: 0 0 2px;
    font-size: 16px;
    font-weight: 720;
}

.v4-detail-identity p {
    margin: 0;
    color: var(--v4-muted);
    font-size: 9px;
}

.v4-icon-button {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--v4-line);
    border-radius: 9px;
    background: #fff;
    color: var(--v4-muted);
}

.v4-detail-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.v4-stage-badge,
.v4-signal {
    padding: 4px 7px;
    border-radius: 7px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
    font-size: 8px;
    font-weight: 720;
}

.v4-signal.is-new {
    background: var(--v4-orange-soft);
    color: var(--v4-orange);
}

.v4-signal.is-attention,
.v4-signal.is-overdue {
    background: var(--v4-blue-soft);
    color: var(--v4-blue);
}

.v4-signal.is-overdue {
    background: var(--v4-red-soft);
    color: var(--v4-red);
}

.v4-detail-section {
    padding: 13px 0;
    border-top: 1px solid var(--v4-line);
}

.v4-detail-section-header {
    margin-bottom: 9px;
}

.v4-detail-section-header h3 {
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 720;
}

.v4-detail-section-header p,
.v4-inline-note {
    margin: 0;
    color: var(--v4-muted);
    font-size: 8px;
    line-height: 1.45;
}

.v4-contact-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
}

.v4-contact-action {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--v4-line);
    border-radius: 9px;
    background: var(--v4-paper);
    color: var(--v4-ink) !important;
    font-size: 9px;
    font-weight: 650;
}

.v4-contact-action:hover {
    border-color: #8eaa9b;
    background: var(--v4-brand-soft);
}

.v4-contact-action.is-disabled {
    opacity: .45;
    pointer-events: none;
}

.v4-contact-facts,
.v4-detail-facts {
    display: grid;
    margin: 0;
    gap: 6px 10px;
}

.v4-contact-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v4-detail-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v4-detail-fact {
    min-width: 0;
    padding: 8px;
    border-radius: 8px;
    background: var(--v4-paper);
}

.v4-detail-fact dt {
    margin-bottom: 2px;
    color: var(--v4-muted);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.v4-detail-fact dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--v4-ink);
    font-size: 9px;
    font-weight: 600;
}

.v4-client-message {
    margin: 9px 0 0;
    padding: 10px 11px;
    border-left: 3px solid var(--v4-brand);
    border-radius: 0 8px 8px 0;
    background: #f7faf7;
}

.v4-client-message span {
    color: var(--v4-brand);
    font-size: 7px;
    font-weight: 720;
    text-transform: uppercase;
}

.v4-client-message p {
    display: -webkit-box;
    margin: 4px 0 0;
    overflow: hidden;
    color: var(--v4-ink);
    font-size: 9px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}

.v4-status-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.v4-status-actions .btn {
    min-height: 34px;
    padding: 6px;
    font-size: 8px;
}

.v4-note-field textarea {
    min-height: 82px;
    resize: vertical;
    font-size: 10px;
}

.v4-note-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
}

.v4-note-actions > span {
    color: var(--v4-muted);
    font-size: 8px;
}

.v4-note-actions .btn {
    min-height: 32px;
    padding: 5px 9px;
    font-size: 9px;
}

.v4-stage-field {
    display: block;
}

.v4-properties-link {
    width: 100%;
}

.v4-inline-note {
    margin-top: 7px;
}

/* Property operation */
.v4-properties-heading {
    max-width: 760px;
}

.v4-property-sync {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    color: var(--v4-muted);
    font-size: 10px;
    font-weight: 600;
}

.v4-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--v4-green-600);
    box-shadow: 0 0 0 4px rgba(33, 131, 89, .1);
}

.v4-property-sync.is-error .v4-live-dot {
    background: var(--v4-red);
    box-shadow: 0 0 0 4px rgba(169, 54, 61, .1);
}

.v4-property-context {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin-bottom: 11px;
    padding: 10px 12px;
    border: 1px solid rgba(40, 77, 112, .15);
    border-radius: 13px;
    background: var(--v4-brand-soft);
}

.v4-property-context-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff;
    color: var(--v4-brand);
}

.v4-property-context > div:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.v4-property-context span,
.v4-property-context small {
    color: var(--v4-muted);
    font-size: 8px;
}

.v4-property-context strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v4-property-workspace {
    display: grid;
    grid-template-columns: 260px minmax(460px, 1fr) 320px;
    align-items: start;
    gap: 11px;
}

.v4-property-filters,
.v4-property-inspector {
    position: sticky;
    top: 94px;
    margin: 0;
}

.v4-property-filters .card-body,
.v4-property-inspector .card-body {
    padding: 14px;
}

.v4-property-panel-heading,
.v4-property-results-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.v4-property-panel-heading {
    margin-bottom: 14px;
}

.v4-property-panel-heading h2,
.v4-property-results-head h2,
.v4-property-inspector h2 {
    margin: 2px 0 0;
    font-size: 14px;
    font-weight: 710;
    letter-spacing: -.025em;
}

.v4-property-field {
    display: grid;
    margin-bottom: 11px;
    gap: 5px;
}

.v4-property-field > span:first-child,
.v4-property-price-fields legend,
.v4-property-price-fields label > span {
    color: var(--v4-muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.v4-property-input-with-icon {
    position: relative;
}

.v4-property-input-with-icon > svg,
.v4-property-input-with-icon > i {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 11px;
    width: 16px;
    color: var(--v4-muted);
    transform: translateY(-50%);
}

.v4-property-input-with-icon .form-control {
    padding-left: 36px;
}

.v4-property-price-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
}

.v4-property-price-fields legend {
    grid-column: 1 / -1;
    margin: 0;
}

.v4-property-price-fields label {
    display: grid;
    gap: 4px;
}

.v4-property-price-fields .form-control {
    padding: 8px;
}

.v4-property-filter-error {
    margin: 0 0 10px;
    color: var(--v4-red);
    font-size: 9px;
}

.v4-active-property-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.v4-active-property-filters > span,
.v4-property-filter-chip {
    padding: 4px 6px;
    border-radius: 7px;
    background: var(--v4-surface-soft);
    color: var(--v4-muted);
    font-size: 8px;
    font-weight: 650;
}

.v4-property-results {
    min-width: 0;
}

.v4-property-results-head {
    min-height: 52px;
    align-items: center;
    margin-bottom: 9px;
    padding: 0 2px;
}

.v4-property-results-head p {
    margin: 2px 0 0;
    color: var(--v4-muted);
    font-size: 9px;
}

.v4-property-shortlist {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    padding: 9px 10px;
    border: 1px solid rgba(40, 77, 112, .16);
    border-radius: 12px;
    background: var(--v4-brand-soft);
}

.v4-property-shortlist-copy {
    display: flex;
    align-items: center;
    gap: 8px;
}

.v4-property-shortlist-count {
    display: inline-flex;
    width: 29px;
    height: 29px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--v4-forest-950);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.v4-property-shortlist-copy > div {
    display: grid;
}

.v4-property-shortlist-copy strong {
    font-size: 11px;
}

.v4-property-shortlist-copy small {
    color: var(--v4-muted);
    font-size: 10px;
}

.v4-property-shortlist-items {
    display: flex;
    min-width: 0;
    gap: 5px;
}

.v4-property-shortlist-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

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

.v4-property-skeleton {
    min-height: 248px;
    border: 1px solid var(--v4-line);
    border-radius: 13px;
    background: linear-gradient(100deg, #e9eee8 20%, #f7f9f6 38%, #e9eee8 56%);
    background-size: 200% 100%;
    animation: v4-skeleton 1.3s ease-in-out infinite;
}

@keyframes v4-skeleton {
    to { background-position-x: -200%; }
}

.v4-property-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.v4-property-pagination > span {
    color: var(--v4-muted);
    font-size: 9px;
    font-weight: 650;
}

.v4-property-inspector {
    max-height: calc(100vh - 112px);
    overflow: auto;
}

.v4-property-inspector-empty {
    display: flex;
    min-height: 390px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--v4-muted);
    text-align: center;
}

.v4-property-inspector-empty > span {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 14px;
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
}

.v4-property-inspector-empty p {
    margin: 6px 0 0;
    font-size: 9px;
    line-height: 1.55;
}

.v4-property-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(24, 42, 59, .075);
    border-radius: 13px;
    background: var(--v4-surface);
    box-shadow: var(--v4-shadow-sm);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.v4-property-card:hover,
.v4-property-card.is-active,
.v4-property-card.is-selected {
    border-color: #8faf9e;
    box-shadow: var(--v4-shadow);
    transform: translateY(-1px);
}

.v4-property-card.is-selected {
    box-shadow: inset 0 0 0 2px rgba(40, 77, 112, .16), var(--v4-shadow-sm);
}

.v4-property-card.is-added {
    border-color: rgba(40, 77, 112, .28);
}

.v4-property-card-media {
    position: relative;
    display: block;
    width: 100%;
    height: 170px;
    overflow: hidden;
    border: 0;
    background: #e7ece6;
    color: var(--v4-muted);
    text-align: left;
}

.v4-property-card-media img,
.v4-property-inspector-media img {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.v4-property-card:hover .v4-property-card-media img {
    transform: scale(1.025);
}

.v4-property-image-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    color: #839189;
    font-size: 8px;
    font-weight: 600;
}

.v4-property-image-fallback svg {
    width: 25px;
    height: 25px;
}

.v4-property-status,
.v4-property-code {
    position: absolute;
    z-index: 2;
    top: 9px;
    padding: 5px 7px;
    border-radius: 7px;
    background: rgba(24, 42, 59, .84);
    color: #fff;
    font-size: 7px;
    font-weight: 720;
    backdrop-filter: blur(8px);
}

.v4-property-status {
    left: 9px;
}

.v4-property-status.is-available {
    background: rgba(40, 77, 112, .9);
}

.v4-property-code {
    right: 9px;
}

.v4-property-card-body {
    display: grid;
    gap: 9px;
    padding: 12px;
}

.v4-property-card-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
}

.v4-property-card-heading h3 {
    display: -webkit-box;
    margin: 1px 0 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.v4-property-select {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 4px;
    padding: 5px 7px;
    border: 1px solid var(--v4-line);
    border-radius: 8px;
    background: var(--v4-paper);
    color: var(--v4-muted);
    font-size: 7px;
    font-weight: 700;
}

.v4-property-select svg {
    width: 13px;
    height: 13px;
}

.v4-property-select.is-selected {
    border-color: rgba(40, 77, 112, .2);
    background: var(--v4-brand-soft);
    color: var(--v4-brand);
}

.v4-property-card-location,
.v4-property-inspector-address {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    color: var(--v4-muted);
    font-size: 8px;
    line-height: 1.45;
}

.v4-property-card-location svg,
.v4-property-inspector-address svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.v4-property-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 9px;
    padding-top: 8px;
    border-top: 1px solid var(--v4-line);
}

.v4-property-card-price {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.v4-property-card-price span,
.v4-property-inspector-price span {
    color: var(--v4-muted);
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
}

.v4-property-card-price strong {
    overflow: hidden;
    font-size: 12px;
    font-weight: 720;
    letter-spacing: -.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v4-property-details-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--v4-brand);
    font-size: 8px;
    font-weight: 700;
}

.v4-property-details-link svg {
    width: 13px;
    height: 13px;
}

.v4-property-shortlist-chip {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 4px;
    padding: 4px 5px 4px 7px;
    border: 1px solid rgba(40, 77, 112, .13);
    border-radius: 7px;
    background: #fff;
    color: var(--v4-forest-950);
    font-size: 8px;
    font-weight: 700;
}

.v4-property-shortlist-chip button {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: var(--v4-paper);
    color: var(--v4-muted);
}

.v4-property-shortlist-chip svg {
    width: 12px;
    height: 12px;
}

.v4-property-inspector-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 11px;
}

.v4-property-inspector-media {
    position: relative;
    height: 190px;
    margin: 0 -4px 12px;
    overflow: hidden;
    border-radius: 11px;
    background: #e7ece6;
}

.v4-property-inspector-price {
    display: grid;
    gap: 1px;
    margin-bottom: 8px;
}

.v4-property-inspector-price strong {
    font-size: 20px;
    font-weight: 730;
    letter-spacing: -.04em;
}

.v4-property-inspector-facts,
.v4-property-comparison-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 12px 0;
}

.v4-property-fact {
    min-width: 0;
    padding: 8px;
    border-radius: 8px;
    background: var(--v4-paper);
}

.v4-property-fact dt {
    color: var(--v4-muted);
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
}

.v4-property-fact dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    color: var(--v4-ink);
    font-size: 9px;
    font-weight: 650;
}

.v4-property-inspector-actions {
    display: grid;
    gap: 6px;
}

.v4-property-secondary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
}

.v4-property-secondary-action {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px;
    border: 1px solid var(--v4-line);
    border-radius: 9px;
    background: var(--v4-paper);
    color: var(--v4-ink) !important;
    font-size: 7px;
    font-weight: 700;
    text-align: center;
}

.v4-property-secondary-action svg {
    width: 14px;
    height: 14px;
}

.v4-property-comparison {
    display: grid;
    gap: 8px;
}

.v4-property-comparison-card {
    padding: 10px;
    border: 1px solid var(--v4-line);
    border-radius: 10px;
    background: var(--v4-paper);
}

.v4-property-comparison-card > strong {
    color: var(--v4-brand);
    font-size: 8px;
}

.v4-property-comparison-card h3 {
    margin: 3px 0 2px;
    font-size: 11px;
    font-weight: 700;
}

.v4-property-comparison-card > p {
    margin: 0;
    color: var(--v4-muted);
    font-size: 8px;
}

.v4-property-comparison-card .btn {
    width: 100%;
    min-height: 32px;
    font-size: 8px;
}

.v4-property-compare-add {
    margin-top: 8px;
}

[hidden] {
    display: none !important;
}

.bni-v4:not([data-bni-shell="full"]) #main-menu-navigation > [data-bni-return-item] {
    display: none !important;
}

@media (max-width: 1399.98px) {
    .v4-property-workspace {
        grid-template-columns: 245px minmax(430px, 1fr) 290px;
    }

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

@media (max-width: 1199.98px) {
    /* O template legado ainda desloca a barra 80 px como se o menu lateral
       recolhido estivesse visível. Em tablet e celular o menu vira gaveta;
       mantenha o cabeçalho dentro da viewport e alinhado ao conteúdo. */
    .bni-v4 .header-navbar.floating-nav {
        left: 0 !important;
        right: auto !important;
        width: calc(100% - 2rem) !important;
        margin-right: 1rem !important;
        margin-left: 1rem !important;
    }

    .bni-v4.vertical-layout.menu-collapsed .main-menu.menu-fixed {
        width: 0;
    }

    .bni-v4.vertical-overlay-menu.menu-collapsed .main-menu.menu-fixed {
        width: 260px;
    }

    .v4-workspace-body {
        grid-template-columns: minmax(0, 1fr) 330px;
    }

    .v4-property-workspace {
        grid-template-columns: 235px minmax(0, 1fr);
    }

    .v4-property-inspector {
        position: relative;
        top: auto;
        max-height: none;
        grid-column: 1 / -1;
    }

    .v4-property-inspector-empty {
        min-height: 180px;
    }
}

@media (max-width: 991.98px) {
    .v4-workspace-toolbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .v4-search {
        grid-column: 1 / -1;
    }

    .v4-workspace-body {
        grid-template-columns: 1fr;
    }

    .v4-queue-list,
    .v4-board {
        max-height: none;
    }

    .v4-detail-panel {
        position: relative;
        top: auto;
        max-height: none;
    }

    .v4-property-workspace {
        grid-template-columns: 1fr;
    }

    .v4-property-filters,
    .v4-property-inspector {
        position: relative;
        top: auto;
    }

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

@media (max-width: 767.98px) {
    .bni-v4 .header-navbar.floating-nav {
        border-radius: 11px;
    }

    .bni-v4 .header-navbar .navbar-container {
        min-height: 58px;
        padding: .45rem .7rem;
        gap: 7px;
    }

    .bni-v4 .header-navbar .navbar-container .dropdown-user {
        position: relative;
    }

    .bni-v4 .header-navbar .navbar-container .v4-user-menu {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        right: 0 !important;
        left: auto !important;
        width: min(360px, calc(100vw - 16px)) !important;
        margin: 0 !important;
    }

    .bni-v4 .v4-user-menu-trigger {
        min-height: 44px;
        padding: 3px !important;
    }

    .bni-v4 .v4-user-menu-trigger .avatar {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .v4-page,
    .v4-workspace {
        padding-right: 0;
        padding-left: 0;
    }

    .v4-workspace-header,
    .v4-properties-header {
        align-items: flex-start;
    }

    .v4-workspace-header p,
    .v4-properties-header p,
    .v4-updated-at,
    .v4-property-sync > span:not(.v4-live-dot) {
        display: none;
    }

    .v4-workspace-header-actions {
        align-self: flex-end;
    }

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

    .v4-metric:nth-child(2) {
        border-right: 0;
    }

    .v4-metric:nth-child(-n + 2) {
        border-bottom: 1px solid var(--v4-line);
    }

    .v4-workspace-toolbar {
        grid-template-columns: 1fr;
    }

    .v4-filter-group,
    .v4-view-toggle {
        width: 100%;
    }

    .v4-filter,
    .v4-view-toggle button {
        flex: 1;
    }

    .v4-property-context {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .v4-property-context .btn {
        grid-column: 1 / -1;
    }

    .v4-property-shortlist {
        grid-template-columns: 1fr;
    }

    .v4-property-shortlist-items {
        overflow: auto;
    }

    .v4-property-shortlist-actions {
        justify-content: flex-end;
    }

    .v4-property-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 479.98px) {
    .v4-topbar-title small {
        display: none;
    }

    .v4-topbar-title strong {
        max-width: 150px;
    }

    .v4-bni-return-action {
        min-height: 36px;
        padding: 6px 8px;
        font-size: 11px;
    }

    .v4-bni-return-action svg {
        width: 15px;
        height: 15px;
        margin-right: 3px;
    }

    .v4-workspace-header h1,
    .v4-properties-header h1 {
        font-size: 23px;
    }

    .v4-contact-facts,
    .v4-detail-facts,
    .v4-contact-actions,
    .v4-status-actions,
    .v4-property-price-fields {
        grid-template-columns: 1fr;
    }

    .v4-entry-card {
        grid-template-columns: 1fr;
    }

    .v4-property-shortlist-actions {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr;
    }

    .v4-property-shortlist-actions .btn {
        width: 100%;
    }

    .v4-entry-meta {
        display: flex;
        justify-content: space-between;
        padding-top: 0;
        padding-left: 45px;
    }

    .v4-property-sync .btn span {
        display: none;
    }

    .v4-property-sync .btn svg {
        margin-right: 0;
    }
}

/* Operational text must remain readable even in the denser queue and catalog. */
.v4-topbar-title small,
.v4-workspace :where(span, p, small, dt, dd, time, button, select, textarea, label),
.v4-properties-page :where(span, p, small, dt, dd, time, button, select, textarea, label),
.v4-board-column-header h3 {
    font-size: max(11px, 1em);
}

.v4-property-inspector-backdrop {
    position: fixed;
    z-index: 1090;
    inset: 0;
    background: rgba(24, 42, 59, .42);
    backdrop-filter: blur(2px);
}

@media (max-width: 1199.98px) {
    body.v4-property-drawer-open {
        overflow: hidden;
    }

    .v4-property-inspector {
        position: fixed !important;
        z-index: 1100;
        top: 0 !important;
        right: 0;
        bottom: 0;
        width: min(440px, calc(100vw - 24px));
        max-height: 100dvh;
        margin: 0;
        overflow: auto;
        border: 0;
        border-radius: 16px 0 0 16px;
        box-shadow: -18px 0 54px rgba(24, 42, 59, .22);
        transform: translateX(105%);
        transition: transform .22s ease;
    }

    .v4-property-inspector.is-open {
        transform: translateX(0);
    }

    .v4-property-inspector:focus-visible {
        outline: 3px solid var(--v4-brand);
        outline-offset: -3px;
    }
}

@media (max-width: 479.98px) {
    .v4-property-inspector {
        width: calc(100vw - 10px);
        border-radius: 12px 0 0 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bni-v4 *,
    .bni-v4 *::before,
    .bni-v4 *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
