:root {
    --rt-bg: #F5F5F5;
    --rt-panel: #ffffff;
    --rt-text: #2B333D;
    --rt-muted: #6b7280;
    --rt-blue: #002E3A;
    --rt-blue-soft: #073D4B;
    --rt-gold: #DEAB64;
    --rt-border: rgba(0,0,0,0.08);
    --rt-shadow: 0 18px 45px rgba(0,0,0,0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--rt-bg);
    color: var(--rt-text);
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 278px;
    min-height: 100vh;
    padding: 18px;
    background:
        radial-gradient(circle at top left, rgba(222,171,100,0.14), transparent 32%),
        linear-gradient(180deg, #F8F7F3 0%, #EEF1EE 100%);
    border-right: 1px solid rgba(0,0,0,0.06);
    color: var(--rt-text);
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-shell {
    background: rgba(255,255,255,0.58);
    border: 1px solid rgba(255,255,255,0.72);
    border-radius: 28px;
    padding: 14px;
    min-height: calc(100vh - 36px);
    box-shadow: 0 18px 50px rgba(0,0,0,0.06);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px 18px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: var(--rt-blue);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-copy strong {
    display: block;
    font-size: 17px;
    color: var(--rt-blue);
    letter-spacing: -0.03em;
}

.brand-copy span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--rt-muted);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding-right: 2px;
}

.sidebar-section {
    margin: 18px 8px 8px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(43,51,61,0.44);
    font-weight: 800;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 14px;
    color: rgba(43,51,61,0.78);
    text-decoration: none;
    font-size: 14px;
    font-weight: 650;
    transition: 0.18s ease;
}

.sidebar-link:hover {
    background: rgba(0,46,58,0.06);
    color: var(--rt-blue);
}

.sidebar-link.active {
    background: rgba(222,171,100,0.24);
    color: var(--rt-blue);
    box-shadow: inset 0 0 0 1px rgba(222,171,100,0.18);
}

.sidebar-icon {
    width: 24px;
    height: 24px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 14px;
    color: var(--rt-blue);
    background: rgba(0,46,58,0.06);
}

.sidebar-link.active .sidebar-icon {
    background: rgba(255,255,255,0.72);
}

.sidebar-user {
    margin-top: 18px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(0,0,0,0.05);
}

.user-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--rt-blue);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 800;
}

.user-mini strong {
    display: block;
    font-size: 13px;
    color: var(--rt-blue);
}

.user-mini span {
    display: block;
    font-size: 11px;
    color: var(--rt-muted);
    margin-top: 2px;
}

.logout-link {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 36px;
    border-radius: 12px;
    background: rgba(0,46,58,0.06);
    color: var(--rt-blue);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.logout-link:hover {
    background: var(--rt-blue);
    color: #fff;
}

.main {
    flex: 1;
    padding: 32px;
}

.topbar h1,
.main h1 {
    color: var(--rt-blue);
    letter-spacing: -0.04em;
}

.card,
.panel,
.module-card {
    border-radius: 22px !important;
    border: 1px solid var(--rt-border) !important;
    box-shadow: var(--rt-shadow) !important;
}

@media (max-width: 1000px) {
    .layout {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
    }

    .sidebar-shell {
        min-height: auto;
    }

    .main {
        padding: 24px;
    }
}

.sidebar-icon svg,
.sidebar-sublink svg,
.logout-link svg {
    width: 15px;
    height: 15px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-subnav {
    margin: 4px 0 10px 36px;
    padding-left: 12px;
    border-left: 1px solid rgba(0,46,58,0.10);
    display: grid;
    gap: 4px;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 12px;
    color: rgba(43,51,61,0.68);
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
    transition: 0.18s ease;
}

.sidebar-sublink span {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    color: rgba(0,46,58,0.72);
}

.sidebar-sublink:hover {
    background: rgba(0,46,58,0.05);
    color: var(--rt-blue);
}

.sidebar-sublink.active {
    background: rgba(255,255,255,0.72);
    color: var(--rt-blue);
    box-shadow: inset 0 0 0 1px rgba(0,46,58,0.06);
}

.logout-link {
    gap: 8px;
}

.logout-link svg {
    width: 14px;
    height: 14px;
}

.rt-hidden-select {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 1px !important;
    height: 1px !important;
}

.rt-select {
    position: relative;
    width: 100%;
}

.rt-select-button {
    width: 100%;
    height: 46px;
    border: 1px solid #d8d8d8;
    border-radius: 14px;
    background: #ffffff;
    color: var(--rt-text);
    padding: 0 14px;
    font-family: inherit;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: 0.18s ease;
}

.rt-select-button:hover {
    border-color: rgba(0,46,58,0.35);
    background: #fbfbfb;
}

.rt-select.open .rt-select-button {
    border-color: var(--rt-blue);
    box-shadow: 0 0 0 4px rgba(0,46,58,0.08);
}

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

.rt-select-arrow {
    width: 18px;
    height: 18px;
    color: var(--rt-blue);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.rt-select-arrow svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: 0.18s ease;
}

.rt-select.open .rt-select-arrow svg {
    transform: rotate(180deg);
}

.rt-select-menu {
    position: absolute;
    z-index: 50;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 22px 55px rgba(0,0,0,0.12);
    backdrop-filter: blur(14px);
    display: none;
}

.rt-select.open .rt-select-menu {
    display: grid;
    gap: 4px;
}

.rt-select-option {
    width: 100%;
    min-height: 38px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--rt-text);
    padding: 9px 11px;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: 0.16s ease;
}

.rt-select-option:hover {
    background: rgba(0,46,58,0.06);
    color: var(--rt-blue);
}

.rt-select-option.selected {
    background: rgba(222,171,100,0.22);
    color: var(--rt-blue);
    font-weight: 800;
}

.rt-select-menu::-webkit-scrollbar {
    width: 8px;
}

.rt-select-menu::-webkit-scrollbar-track {
    background: transparent;
}

.rt-select-menu::-webkit-scrollbar-thumb {
    background: rgba(0,46,58,0.16);
    border-radius: 999px;
}

/* Ajuste fino da barra de scroll dos dropdowns customizados */
.rt-select-menu {
    scrollbar-gutter: stable;
    padding-right: 10px;
}

.rt-select-menu::-webkit-scrollbar {
    width: 6px;
}

.rt-select-menu::-webkit-scrollbar-track {
    background: transparent;
    margin: 10px 0;
}

.rt-select-menu::-webkit-scrollbar-thumb {
    background: rgba(0,46,58,0.16);
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.96);
}

.rt-select-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(0,46,58,0.28);
}

/* Firefox */
.rt-select-menu {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,46,58,0.18) transparent;
}

/* =========================================================
   Rover Tools v0.3.5 — Microinterações globais
   ========================================================= */

:root {
    --rt-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --rt-fast: 160ms;
    --rt-mid: 260ms;
    --rt-slow: 420ms;
}

/* Entrada suave da página */
.main {
    animation: rtPageEnter 420ms var(--rt-ease) both;
}

@keyframes rtPageEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
        filter: blur(3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Cards e painéis mais vivos */
.panel,
.card,
.module-card,
.filters,
.login-card {
    transition:
        transform var(--rt-mid) var(--rt-ease),
        box-shadow var(--rt-mid) var(--rt-ease),
        border-color var(--rt-mid) var(--rt-ease),
        background var(--rt-mid) var(--rt-ease);
}

.module-card:hover,
.card:hover,
.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.08) !important;
}

/* Botões com resposta mais premium */
.button,
.secondary,
button,
.logout-link,
.action-link {
    transition:
        transform var(--rt-fast) var(--rt-ease),
        box-shadow var(--rt-fast) var(--rt-ease),
        background var(--rt-fast) var(--rt-ease),
        color var(--rt-fast) var(--rt-ease),
        border-color var(--rt-fast) var(--rt-ease),
        opacity var(--rt-fast) var(--rt-ease);
}

.button:hover,
button:hover,
.logout-link:hover {
    transform: translateY(-1px);
}

.button:active,
button:active,
.logout-link:active {
    transform: translateY(0) scale(0.985);
}

/* Inputs e selects customizados mais macios */
input,
textarea,
select,
.rt-select-button {
    transition:
        border-color var(--rt-fast) var(--rt-ease),
        box-shadow var(--rt-fast) var(--rt-ease),
        background var(--rt-fast) var(--rt-ease),
        transform var(--rt-fast) var(--rt-ease);
}

input:focus,
textarea:focus,
select:focus,
.rt-select.open .rt-select-button {
    box-shadow: 0 0 0 4px rgba(0,46,58,0.07);
}

/* Dropdown customizado com abertura fluida */
.rt-select-menu {
    display: grid !important;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top center;
    transition:
        opacity var(--rt-mid) var(--rt-ease),
        transform var(--rt-mid) var(--rt-ease),
        visibility var(--rt-mid) var(--rt-ease);
}

.rt-select.open .rt-select-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.rt-select-option {
    transition:
        background var(--rt-fast) var(--rt-ease),
        color var(--rt-fast) var(--rt-ease),
        transform var(--rt-fast) var(--rt-ease);
}

.rt-select-option:hover {
    transform: translateX(2px);
}

/* Sidebar mais fluida */
.sidebar-link,
.sidebar-sublink,
.sidebar-user,
.brand-mark {
    transition:
        transform var(--rt-fast) var(--rt-ease),
        background var(--rt-fast) var(--rt-ease),
        color var(--rt-fast) var(--rt-ease),
        box-shadow var(--rt-fast) var(--rt-ease),
        border-color var(--rt-fast) var(--rt-ease);
}

.sidebar-link:hover,
.sidebar-sublink:hover {
    transform: translateX(2px);
}

.sidebar-link.active,
.sidebar-sublink.active {
    animation: rtSoftPop 240ms var(--rt-ease) both;
}

@keyframes rtSoftPop {
    from {
        transform: scale(0.985);
    }

    to {
        transform: scale(1);
    }
}

/* Tabelas com leitura melhor */
table tbody tr {
    transition:
        background var(--rt-fast) var(--rt-ease),
        transform var(--rt-fast) var(--rt-ease);
}

table tbody tr:hover {
    background: rgba(0,46,58,0.025);
}

/* Badges com micro presença */
.badge {
    transition:
        transform var(--rt-fast) var(--rt-ease),
        box-shadow var(--rt-fast) var(--rt-ease);
}

.badge:hover {
    transform: translateY(-1px);
}

/* Alertas entrando de forma mais natural */
.success,
.alert,
.errors {
    animation: rtAlertEnter 360ms var(--rt-ease) both;
}

@keyframes rtAlertEnter {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Linha do tempo futura */
.timeline-item {
    transition:
        transform var(--rt-mid) var(--rt-ease),
        box-shadow var(--rt-mid) var(--rt-ease),
        background var(--rt-mid) var(--rt-ease);
}

.timeline-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(0,0,0,0.06);
    background: #ffffff;
}

/* Ações rápidas futuras */
.quick-action {
    transition:
        transform var(--rt-mid) var(--rt-ease),
        border-color var(--rt-mid) var(--rt-ease),
        background var(--rt-mid) var(--rt-ease);
}

.quick-action:hover {
    transform: translateY(-2px);
    border-color: rgba(0,46,58,0.28);
    background: rgba(255,255,255,0.92);
}

/* Respeita usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }
}


/* =========================================================
   Rover Tools v0.5.3.2 — Ajuste óptico do logo sidebar
   ========================================================= */

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rt-sidebar-logo {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
    object-position: center;
    transform: translateX(-1.5px);
}
/* =========================================================
   Rover Tools v1.2.3 — Dropdown global unificado
   Compatibilidade: .open + .is-open / .selected + .is-selected
   ========================================================= */
.rt-hidden-select,
.rt-native-hidden {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 1px !important;
    height: 1px !important;
}

.rt-select {
    position: relative;
    width: 100%;
}

.rt-select.open,
.rt-select.is-open {
    z-index: 12000;
}

.rt-select.open .rt-select-button,
.rt-select.is-open .rt-select-button {
    border-color: var(--rt-blue) !important;
    box-shadow: 0 0 0 4px rgba(0,46,58,0.08) !important;
}

.rt-select.open .rt-select-arrow svg,
.rt-select.is-open .rt-select-arrow svg {
    transform: rotate(180deg);
}

.rt-select-menu {
    z-index: 12001 !important;
}

.rt-select.open .rt-select-menu,
.rt-select.is-open .rt-select-menu,
.rt-select-menu.is-open {
    display: grid !important;
    gap: 4px;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
}

.rt-select-option.selected,
.rt-select-option.is-selected {
    background: rgba(222,171,100,0.22) !important;
    color: var(--rt-blue) !important;
    font-weight: 900 !important;
}

.rt-select-option.is-disabled,
.rt-select-option:disabled {
    opacity: .46;
    cursor: not-allowed;
}

.modal-backdrop,
.modal-card,
.replace-card,
.category-panel,
.form-card,
.content,
.main,
.page-shell,
.form-grid,
.field,
.form-field {
    overflow: visible;
}

/* =========================================================
   Rover Tools v1.2.4 — Date range financeiro global
   ========================================================= */
.finance-date-range {
    position: relative;
    z-index: 20;
}

.finance-date-range.is-open {
    z-index: 4000;
}

.finance-range-trigger {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d8d8d8;
    border-radius: 14px;
    padding: 0 14px;
    background: #fff;
    color: var(--rt-text);
    font-size: 14px;
    font-weight: 850;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
}

.finance-range-trigger:hover,
.finance-date-range.is-open .finance-range-trigger {
    border-color: var(--rt-blue);
    box-shadow: 0 0 0 4px rgba(0,46,58,0.06);
}

.finance-range-icon {
    color: var(--rt-blue);
    font-size: 12px;
}

.finance-range-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(860px, calc(100vw - 48px));
    background: #fff;
    border: 1px solid rgba(0,46,58,0.10);
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(0,0,0,0.16);
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    overflow: hidden;
    z-index: 9998;
}

.finance-range-popover[hidden] {
    display: none !important;
}

.finance-range-sidebar {
    background: #fbfbfb;
    border-right: 1px solid rgba(0,0,0,0.06);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.finance-range-sidebar span {
    color: var(--rt-muted);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 6px;
}

.finance-range-sidebar button {
    border: 0;
    background: transparent;
    text-align: left;
    color: var(--rt-text);
    font-weight: 850;
    font-family: inherit;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
}

.finance-range-sidebar button:hover,
.finance-range-sidebar button.is-active {
    background: rgba(222,171,100,0.18);
    color: var(--rt-blue);
}

.finance-range-main {
    padding: 18px;
    min-width: 0;
}

.finance-range-top,
.finance-range-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.finance-range-top strong {
    color: var(--rt-blue);
    font-size: 14px;
}

.finance-range-nav {
    display: flex;
    gap: 8px;
}

.finance-range-nav button {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(0,46,58,0.10);
    background: #fff;
    color: var(--rt-blue);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.finance-range-nav button:hover {
    background: rgba(0,46,58,0.05);
}

.finance-calendars {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 16px;
}

.finance-calendar-title {
    color: var(--rt-blue);
    font-weight: 950;
    text-align: center;
    margin-bottom: 14px;
}

.finance-calendar-weekdays,
.finance-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 7px;
}

.finance-calendar-weekdays span {
    text-align: center;
    color: var(--rt-muted);
    font-size: 11px;
    font-weight: 950;
}

.finance-day {
    min-width: 0;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--rt-blue);
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
    justify-self: center;
}

.finance-day:hover {
    background: rgba(222,171,100,0.20);
}

.finance-day.is-muted {
    color: rgba(0,46,58,0.28);
}

.finance-day.is-in-range {
    background: rgba(222,171,100,0.20);
}

.finance-day.is-start,
.finance-day.is-end {
    background: var(--rt-blue);
    color: #fff;
    box-shadow: 0 8px 16px rgba(0,46,58,0.18);
}

.finance-range-bottom {
    border-top: 1px solid rgba(0,0,0,0.06);
    padding-top: 14px;
    margin-top: 16px;
}

.finance-range-bottom span {
    color: var(--rt-muted);
    font-weight: 900;
    font-size: 13px;
}

.finance-range-bottom div {
    display: flex;
    gap: 8px;
}

.finance-range-cancel,
.finance-range-apply {
    min-height: 38px;
    border-radius: 12px;
    padding: 0 16px;
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
}

.finance-range-cancel {
    border: 1px solid rgba(0,46,58,0.10);
    background: #fff;
    color: var(--rt-blue);
}

.finance-range-apply {
    border: 1px solid var(--rt-blue);
    background: var(--rt-blue);
    color: #fff;
}

.finance-range-cancel:hover,
.finance-range-apply:hover {
    transform: translateY(-1px);
}

.finance-filter-range {
    overflow: visible;
}

@media (max-width: 900px) {
    .finance-range-popover {
        left: 0;
        right: auto;
        grid-template-columns: 1fr;
        width: min(100%, calc(100vw - 32px));
    }

    .finance-range-sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    .finance-calendars {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Rover Tools v1.2.6 — Ícones do menu + animação de entrada
   ========================================================= */
.sidebar-icon {
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    isolation: isolate;
}

.sidebar-icon svg,
.logout-link svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.95;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-icon svg *,
.logout-link svg * {
    vector-effect: non-scaling-stroke;
}

.sidebar-link:hover .sidebar-icon {
    background: rgba(0,46,58,0.10);
    transform: translateY(-1px);
}

.sidebar-link.active .sidebar-icon {
    background: #fff;
    color: var(--rt-blue);
    box-shadow: inset 0 0 0 1px rgba(0,46,58,0.06), 0 8px 18px rgba(0,46,58,0.08);
}

.sidebar-link.active .sidebar-icon::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 999px;
    background: rgba(222,171,100,0.18);
    z-index: -1;
    transform: scale(0.72);
}

.sidebar-sublink {
    position: relative;
}

.sidebar-sublink::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(0,46,58,0.18);
    margin-right: 2px;
    flex: 0 0 auto;
}

.sidebar-sublink.active::before,
.sidebar-sublink:hover::before {
    background: var(--rt-blue);
}

.brand-mark {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.brand-mark::after,
.sidebar-icon::after {
    content: '';
    position: absolute;
    inset: -40%;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.55) 50%, transparent 65%);
    transform: translateX(-130%) rotate(8deg);
    pointer-events: none;
}

body.rt-icons-animate .brand-mark {
    animation: rtBrandPop 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.rt-icons-animate .brand-mark::after {
    animation: rtIconSheen 900ms cubic-bezier(0.22, 1, 0.36, 1) 180ms both;
}

body.rt-icons-animate .sidebar-link .sidebar-icon {
    animation: rtIconPop 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(140ms + (var(--rt-icon-index, 0) * 90ms));
}

body.rt-icons-animate .sidebar-link .sidebar-icon::after {
    animation: rtIconSheen 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(300ms + (var(--rt-icon-index, 0) * 90ms));
}

body.rt-icons-animate .sidebar-link .sidebar-icon svg * {
    stroke-dasharray: 42;
    stroke-dashoffset: 42;
    animation: rtIconDraw 760ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(210ms + (var(--rt-icon-index, 0) * 90ms));
}

@keyframes rtIconDraw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes rtIconPop {
    0% {
        opacity: 0;
        transform: scale(0.72) rotate(-6deg);
        filter: blur(3px);
    }
    60% {
        opacity: 1;
        transform: scale(1.06) rotate(1deg);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
        filter: blur(0);
    }
}

@keyframes rtBrandPop {
    0% {
        opacity: 0;
        transform: scale(0.76) rotate(-7deg);
        filter: blur(4px);
    }
    65% {
        opacity: 1;
        transform: scale(1.08) rotate(1deg);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
        filter: blur(0);
    }
}

@keyframes rtIconSheen {
    from {
        transform: translateX(-130%) rotate(8deg);
    }
    to {
        transform: translateX(130%) rotate(8deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.rt-icons-animate .brand-mark,
    body.rt-icons-animate .sidebar-link .sidebar-icon,
    body.rt-icons-animate .brand-mark::after,
    body.rt-icons-animate .sidebar-link .sidebar-icon::after,
    body.rt-icons-animate .sidebar-link .sidebar-icon svg * {
        animation: none !important;
        stroke-dashoffset: 0 !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}


/* =========================================================
   Rover Tools v2.0.2 — Calendário simples global
   Usa o mesmo desenho do lançamento financeiro em qualquer input type=date
   ========================================================= */
.rt-date-host,
.form-field,
.field,
.rt-lead-close-modal label,
.rt-commercial-adjust-field {
    position: relative;
}

.rt-date-display {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(0,46,58,.14);
    border-radius: 14px;
    background: #fff;
    color: var(--rt-blue);
    padding: 0 42px 0 14px;
    font: inherit;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
    outline: none;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

.rt-date-display:hover,
.rt-date-display:focus {
    border-color: var(--rt-blue);
    box-shadow: 0 0 0 4px rgba(0,46,58,.08);
}

.rt-datepicker {
    position: absolute;
    z-index: 13000;
    top: calc(100% + 8px);
    left: 0;
    width: 318px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(0,46,58,.10);
    box-shadow: 0 22px 55px rgba(0,0,0,.18);
    padding: 14px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px) scale(.98);
    transform-origin: top left;
    transition: opacity .18s var(--rt-ease), transform .18s var(--rt-ease), visibility .18s var(--rt-ease);
}

.rt-datepicker.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.rt-date-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.rt-date-title {
    color: var(--rt-blue);
    font-weight: 950;
    font-size: 13px;
}

.rt-date-nav {
    display: flex;
    gap: 6px;
}

.rt-date-nav button,
.rt-date-actions button {
    min-height: 34px;
    border: 1px solid rgba(0,46,58,.10);
    background: #fff;
    color: var(--rt-blue);
    border-radius: 10px;
    font-weight: 900;
    cursor: pointer;
    padding: 0 10px;
    font-family: inherit;
}

.rt-date-nav button:hover,
.rt-date-actions button:hover {
    background: rgba(0,46,58,.05);
}

.rt-date-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.rt-date-weekday {
    text-align: center;
    color: var(--rt-muted);
    font-size: 11px;
    font-weight: 950;
    padding: 5px 0;
}

.rt-date-day {
    min-height: 34px;
    border: 0;
    border-radius: 10px;
    background: #F7F4EF;
    color: var(--rt-text);
    font-weight: 900;
    cursor: pointer;
    font-family: inherit;
}

.rt-date-day:hover {
    background: #EDE9DD;
}

.rt-date-day.is-selected {
    background: var(--rt-blue);
    color: #fff;
}

.rt-date-day.is-muted {
    opacity: .35;
}

.rt-date-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    border-top: 1px solid rgba(0,46,58,.08);
    padding-top: 12px;
}

.rt-date-actions .danger-soft {
    color: #9d241f;
}

.rt-modal-backdrop,
.rt-lead-close-backdrop,
.unsaved-modal-backdrop {
    overflow: visible !important;
}

.rt-modal,
.rt-lead-close-modal,
.unsaved-modal {
    overflow: visible !important;
}

/* =========================================================
   Rover Tools v2.1.0 — Modal de proposta / forecast
   ========================================================= */
.rt-proposal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 15000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(18, 27, 31, .52);
    backdrop-filter: blur(9px);
}

.rt-proposal-modal {
    width: min(680px, 100%);
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(0,46,58,.10);
    box-shadow: 0 26px 80px rgba(0,0,0,.24);
    overflow: visible;
    animation: rtProposalEnter 220ms var(--rt-ease, ease) both;
}

@keyframes rtProposalEnter {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.rt-proposal-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 16px;
    border-bottom: 1px solid rgba(0,46,58,.08);
}

.rt-proposal-head h2 {
    margin: 0;
    color: var(--rt-blue);
    font-size: 22px;
    letter-spacing: -.04em;
}

.rt-proposal-head p {
    margin: 7px 0 0;
    color: var(--rt-muted);
    line-height: 1.45;
}

.rt-proposal-close {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 0;
    background: rgba(0,46,58,.06);
    color: var(--rt-blue);
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    flex: 0 0 auto;
}

.rt-proposal-body {
    padding: 18px 22px;
    display: grid;
    gap: 14px;
}

.rt-proposal-summary,
.rt-proposal-grid label,
.rt-proposal-note {
    border: 1px solid rgba(0,46,58,.08);
    border-radius: 18px;
    background: rgba(0,46,58,.018);
    padding: 14px;
}

.rt-proposal-summary span,
.rt-proposal-grid span,
.rt-proposal-note span {
    display: block;
    color: var(--rt-muted);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 7px;
}

.rt-proposal-summary strong {
    display: block;
    color: var(--rt-blue);
    font-size: 18px;
    letter-spacing: -.03em;
}

.rt-proposal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rt-proposal-grid input,
.rt-proposal-grid select,
.rt-proposal-note input,
.rt-proposal-note textarea {
    width: 100%;
    border: 1px solid rgba(0,46,58,.14);
    border-radius: 14px;
    background: #fff;
    color: var(--rt-blue);
    font: inherit;
    font-weight: 850;
    outline: none;
}

.rt-proposal-grid input,
.rt-proposal-grid select,
.rt-proposal-note input {
    height: 44px;
    padding: 0 12px;
}

.rt-proposal-grid select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--rt-blue) 50%), linear-gradient(135deg, var(--rt-blue) 50%, transparent 50%);
    background-position: calc(100% - 16px) 19px, calc(100% - 11px) 19px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.rt-proposal-note textarea {
    min-height: 82px;
    padding: 12px;
    resize: vertical;
}

.rt-proposal-grid input:focus,
.rt-proposal-grid select:focus,
.rt-proposal-note input:focus,
.rt-proposal-note textarea:focus {
    border-color: var(--rt-blue);
    box-shadow: 0 0 0 4px rgba(0,46,58,.08);
}

.rt-proposal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px 22px;
    border-top: 1px solid rgba(0,46,58,.08);
}

.rt-proposal-cancel,
.rt-proposal-submit {
    min-height: 42px;
    border-radius: 14px;
    padding: 0 18px;
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
}

.rt-proposal-cancel {
    background: #fff;
    color: var(--rt-blue);
    border: 1px solid rgba(0,46,58,.12);
}

.rt-proposal-submit {
    background: var(--rt-blue);
    color: #fff;
    border: 1px solid var(--rt-blue);
}

@media (max-width: 640px) {
    .rt-proposal-grid {
        grid-template-columns: 1fr;
    }
    .rt-proposal-footer {
        flex-direction: column-reverse;
    }
    .rt-proposal-cancel,
    .rt-proposal-submit {
        width: 100%;
    }
}

/* Rover Tools v2.1.7 — Datepicker dentro dos modais de proposta/fechamento */
.rt-proposal-backdrop,
.rt-proposal-modal,
.rt-proposal-grid label,
.rt-modal-backdrop,
.rt-modal,
.rt-lead-close-backdrop,
.rt-lead-close-modal {
    overflow: visible !important;
}

.rt-proposal-modal .rt-datepicker,
.rt-lead-close-modal .rt-datepicker,
.rt-modal .rt-datepicker {
    z-index: 14000;
}

@media (max-width: 640px) {
    .rt-datepicker {
        width: min(318px, calc(100vw - 44px));
    }
}


/* =========================================================
   Rover Tools v2.3.1 — Correção de largura das páginas
   Mantém o conteúdo dentro da tela e evita scroll horizontal do navegador.
   ========================================================= */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.layout {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.sidebar {
    flex: 0 0 278px;
}

.main {
    min-width: 0 !important;
    max-width: calc(100vw - 278px);
    overflow-x: clip !important;
    overflow-y: visible !important;
}

@media (max-width: 1000px) {
    .main {
        max-width: 100%;
    }
}
