body {
    --app-accent: #172e5f;
    --app-accent-hover: #101f41;
    --app-accent-soft: #e8edf7;
    --app-bg: #f4f6f8;
    --app-nav-end: #2f3d56;
    --app-nav-start: #11182b;
    --app-sidebar-text: rgba(255, 255, 255, 0.78);
    --app-surface: #ffffff;
    --app-text: #172033;
    background: var(--app-bg);
    color: var(--app-text);
}

body.theme-grafite {
    --app-accent: #3f4754;
    --app-accent-hover: #2d333d;
    --app-accent-soft: #eceff2;
    --app-bg: #f1f2f4;
    --app-nav-end: #353b45;
    --app-nav-start: #181b20;
}

body.theme-petroleo {
    --app-accent: #0f5d62;
    --app-accent-hover: #0a464a;
    --app-accent-soft: #e1f1f0;
    --app-bg: #f0f6f5;
    --app-nav-end: #174f54;
    --app-nav-start: #0b292d;
}

body.theme-escuro {
    --app-accent: #4f8cff;
    --app-accent-hover: #78a7ff;
    --app-accent-soft: rgba(79, 140, 255, 0.14);
    --app-bg: #0e131b;
    --app-nav-end: #1b2838;
    --app-nav-start: #080c12;
    --app-surface: #171e28;
    --app-text: #e3eaf3;
    color-scheme: dark;
}

body.theme-roxo {
    --app-accent: #6846b7;
    --app-accent-hover: #51348f;
    --app-accent-soft: #eee8fa;
    --app-bg: #f6f3fb;
    --app-nav-end: #593985;
    --app-nav-start: #21142f;
}

body.theme-vinho {
    --app-accent: #8a2d4f;
    --app-accent-hover: #6c203c;
    --app-accent-soft: #f8e8ee;
    --app-bg: #faf3f5;
    --app-nav-end: #743047;
    --app-nav-start: #30111d;
}

body.theme-cobre {
    --app-accent: #a65b27;
    --app-accent-hover: #81431d;
    --app-accent-soft: #f9eadf;
    --app-bg: #faf6f1;
    --app-nav-end: #80513a;
    --app-nav-start: #2d1b13;
}

/* Planejamento de instalações */
.install-page {
    margin: 0 auto 3rem;
    max-width: 1920px;
}

.install-page-header {
    align-items: flex-start;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    margin-bottom: 1.35rem;
}

.install-page-header h1 {
    font-size: clamp(1.65rem, 2.2vw, 2.35rem);
    font-weight: 780;
    letter-spacing: -0.035em;
    margin: 0.15rem 0 0.3rem;
}

.install-page-header p {
    color: #667085;
    margin: 0;
    max-width: 780px;
}

.install-eyebrow,
.install-month-kicker {
    color: var(--app-accent);
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.install-header-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.6rem;
}

.install-metrics {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    margin-bottom: 1rem;
}

.install-metric {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid #e3e8ef;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(22, 34, 51, 0.04);
    display: flex;
    gap: 0.8rem;
    min-height: 82px;
    padding: 0.9rem 1rem;
}

.install-metric > span {
    align-items: center;
    background: #eef2f6;
    border-radius: 11px;
    color: #596577;
    display: flex;
    font-size: 1.15rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.install-metric.is-ready > span { background: #e6f7ef; color: #14804a; }
.install-metric.is-warning > span { background: #fff5d9; color: #ad6c00; }
.install-metric.is-danger > span { background: #ffebec; color: #bd2934; }
.install-metric strong { display: block; font-size: 1.45rem; line-height: 1; }
.install-metric small { color: #707b8d; display: block; font-size: 0.78rem; margin-top: 0.25rem; }

.install-toolbar {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid #e1e6ed;
    border-radius: 14px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.7rem;
}

.install-month-nav,
.install-filter-fields {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.install-month-nav input { min-width: 155px; }
.install-filter-fields select { min-width: 190px; }
.install-filter-fields input { min-width: 220px; }

.install-workspace {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: 330px minmax(780px, 1fr);
}

.install-backlog {
    background: var(--app-surface);
    border: 1px solid #e1e6ed;
    border-radius: 16px;
    max-height: calc(100vh - 110px);
    overflow: hidden;
    position: sticky;
    top: 1rem;
}

.install-backlog-header {
    align-items: center;
    border-bottom: 1px solid #e8ecf1;
    display: flex;
    justify-content: space-between;
    padding: 1rem;
}

.install-backlog-header h2 { font-size: 1.15rem; margin: 0.1rem 0 0; }
.install-count { background: var(--app-accent-soft); border-radius: 999px; color: var(--app-accent); font-size: 0.78rem; font-weight: 800; padding: 0.25rem 0.55rem; }
.install-backlog-help { background: #f7f9fb; color: #687386; font-size: 0.72rem; line-height: 1.45; padding: 0.65rem 0.85rem; }
.install-backlog-help i { color: #c17b00; margin-right: 0.35rem; }
.install-backlog-list { max-height: calc(100vh - 255px); overflow-y: auto; padding: 0.75rem; }

.install-order-card {
    background: var(--app-surface);
    border: 1px solid #dfe5ec;
    border-left: 4px solid #708096;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(22, 34, 51, 0.035);
    margin-bottom: 0.7rem;
    padding: 0.8rem;
}

.install-order-card.is-pronta { border-left-color: #18a05e; }
.install-order-card.is-aguardando_producao { border-left-color: #3d72c3; }
.install-order-card.is-aguardando_obra { border-left-color: #e3a008; }
.install-order-card.is-bloqueada { border-left-color: #d63c49; }
.install-order-card.is-highlighted { box-shadow: 0 0 0 3px var(--app-accent-soft); }
.install-order-topline { align-items: center; color: #7b8695; display: flex; font-size: 0.68rem; justify-content: space-between; }
.install-order-topline .badge { font-size: 0.62rem; font-weight: 700; }
.install-order-card h3 { font-size: 0.98rem; margin: 0.65rem 0 0.15rem; }
.install-order-card > p { color: #748094; font-size: 0.73rem; margin: 0 0 0.6rem; }
.install-order-card > p i { margin-right: 0.25rem; }

.install-readiness-line { align-items: center; display: flex; gap: 0.5rem; }
.install-readiness-line > span { background: #e9edf2; border-radius: 999px; flex: 1; height: 5px; overflow: hidden; }
.install-readiness-line > span i { background: linear-gradient(90deg, #1b9a5a, #35bd79); display: block; height: 100%; }
.install-readiness-line strong { color: #687386; font-size: 0.65rem; }
.install-order-meta { color: #6e798b; display: flex; flex-wrap: wrap; font-size: 0.67rem; gap: 0.55rem; margin: 0.55rem 0; }
.install-order-meta i { color: #8a95a6; margin-right: 0.2rem; }
.install-requested-date { background: #fff6dc; border-radius: 7px; color: #895b00; font-size: 0.69rem; margin: 0.55rem 0; padding: 0.4rem 0.5rem; }
.install-requested-date i { margin-right: 0.3rem; }
.install-requested-date.is-scheduled { background: #e9f1fd; color: #245b9f; }
.install-order-actions { display: flex; gap: 0.4rem; margin-top: 0.7rem; }
.install-order-actions .btn { flex: 1; font-size: 0.7rem; }

.install-calendar-area { min-width: 0; }
.install-month { background: var(--app-surface); border: 1px solid #e1e6ed; border-radius: 16px; box-shadow: 0 5px 18px rgba(22, 34, 51, 0.04); margin-bottom: 1rem; overflow: hidden; }
.install-month-header { align-items: center; border-bottom: 1px solid #e5e9ee; display: flex; justify-content: space-between; padding: 1rem 1.2rem; }
.install-month-header h2 { font-size: 1.25rem; margin: 0.1rem 0 0; }
.install-month-team-label { background: #f1f4f8; border-radius: 999px; color: #667285; font-size: 0.7rem; font-weight: 700; padding: 0.35rem 0.65rem; }
.install-calendar { display: grid; grid-template-columns: repeat(7, minmax(112px, 1fr)); overflow-x: auto; }
.install-weekday { background: #f6f8fa; border-bottom: 1px solid #dfe5ec; color: #667285; font-size: 0.68rem; font-weight: 800; padding: 0.55rem 0.7rem; text-align: center; text-transform: uppercase; }
.install-day { border-bottom: 1px solid #e5e9ee; border-right: 1px solid #e5e9ee; min-height: 156px; padding: 0.45rem; position: relative; }
.install-day:nth-child(7n) { border-right: 0; }
.install-day.is-empty { background: #f8f9fb; }
.install-day.is-weekend { background: #fbfcfd; }
.install-day.is-today { background: color-mix(in srgb, var(--app-accent-soft) 48%, white); box-shadow: inset 0 0 0 2px var(--app-accent); }
.install-day-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 0.35rem; }
.install-day-number { color: #354052; font-size: 0.74rem; font-weight: 800; }
.install-today-label { background: var(--app-accent); border-radius: 999px; color: #fff; font-size: 0.54rem; font-weight: 800; margin-left: 0.25rem; padding: 0.12rem 0.3rem; text-transform: uppercase; }
.install-day-add { align-items: center; background: transparent; border: 0; border-radius: 5px; color: #8a95a6; display: flex; font-size: 0.68rem; height: 22px; justify-content: center; opacity: 0; width: 22px; }
.install-day:hover .install-day-add, .install-day-add:focus { background: var(--app-accent-soft); color: var(--app-accent); opacity: 1; }
.install-capacity { align-items: center; display: flex; gap: 0.3rem; margin-bottom: 0.35rem; }
.install-capacity > span { background: #e7ebf0; border-radius: 99px; flex: 1; height: 3px; overflow: hidden; }
.install-capacity > span i { background: #5790df; display: block; height: 100%; }
.install-capacity small { color: #929ba8; font-size: 0.52rem; white-space: nowrap; }
.install-day-events { display: flex; flex-direction: column; gap: 0.3rem; }
.install-event { background: color-mix(in srgb, var(--team-color) 9%, white); border: 0; border-left: 3px solid var(--team-color); border-radius: 6px; color: #263247; display: block; padding: 0.35rem 0.4rem; text-align: left; width: 100%; }
.install-event:hover { box-shadow: 0 3px 9px rgba(20, 35, 60, 0.12); transform: translateY(-1px); }
.install-event[draggable="true"] { cursor: grab; }
.install-event.is-dragging { opacity: 0.35; }
.install-day.is-drop-target { background: var(--app-accent-soft); box-shadow: inset 0 0 0 2px var(--app-accent); }
.install-event.is-reserva { border-style: dashed; }
.install-event.is-reagendamento_solicitado { background: #fff1f0; border-left-color: #d83c48; }
.install-event.is-concluido { filter: saturate(0.4); opacity: 0.7; }
.install-event span, .install-event em { display: block; font-size: 0.56rem; font-style: normal; line-height: 1.25; }
.install-event strong { display: block; font-size: 0.68rem; line-height: 1.25; margin: 0.08rem 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.install-event-time { color: #657185; font-weight: 700; }
.install-event em { color: #b52a36; font-weight: 700; margin-top: 0.2rem; }
.install-calendar-loader { color: #7d8796; font-size: 0.75rem; padding: 1.25rem; text-align: center; }

.install-conflict-panel { align-items: flex-start; background: #fff8e6; border: 1px solid #efc76a; border-radius: 14px; display: flex; gap: 1rem; margin-bottom: 1rem; padding: 1rem; position: relative; }
.install-conflict-icon { align-items: center; background: #f7d579; border-radius: 11px; color: #7c5200; display: flex; flex: 0 0 42px; font-size: 1.15rem; height: 42px; justify-content: center; }
.install-conflict-content { flex: 1; }
.install-conflict-content h2 { font-size: 1.1rem; margin: 0.15rem 0 0.2rem; }
.install-conflict-content > p { color: #745f34; font-size: 0.8rem; margin-bottom: 0.65rem; }
.install-conflict-list { display: grid; gap: 0.5rem; }
.install-conflict-list article { align-items: center; background: rgba(255,255,255,.72); border: 1px solid #ecd79f; border-radius: 9px; display: flex; gap: 1rem; justify-content: space-between; padding: 0.65rem; }
.install-conflict-list article strong, .install-conflict-list article span { display: block; }
.install-conflict-list article span { color: #786942; font-size: 0.7rem; }
.install-swap-form { align-items: center; display: flex; gap: 0.65rem; }
.install-swap-form label { color: #65552f; font-size: 0.7rem; }

.install-empty-state { align-items: center; color: #7a8596; display: flex; flex-direction: column; padding: 2.5rem 1rem; text-align: center; }
.install-empty-state i { color: #a8b1bd; font-size: 2rem; margin-bottom: 0.4rem; }
.install-empty-state strong { color: #4c5869; }
.install-empty-state span { font-size: 0.75rem; margin-top: 0.2rem; }
.install-selected-order { align-items: center; background: var(--app-accent-soft); border-radius: 10px; color: var(--app-accent); display: flex; gap: 0.65rem; margin-bottom: 1rem; padding: 0.65rem 0.75rem; }
.install-selected-order i { font-size: 1.35rem; }
.install-selected-order strong, .install-selected-order span { display: block; }
.install-selected-order span { font-size: 0.72rem; opacity: 0.75; }
.install-readiness-modal-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; }
.install-readiness-modal-grid h6 { border-bottom: 1px solid #e7ebf0; margin-bottom: 0.75rem; padding-bottom: 0.55rem; }
.install-check-row { align-items: center; border-bottom: 1px solid #eef1f4; cursor: pointer; display: flex; font-size: 0.82rem; gap: 0.65rem; padding: 0.62rem 0; }
.install-check-row input { position: absolute; opacity: 0; }
.install-check-row > span { align-items: center; border: 1px solid #cbd3de; border-radius: 6px; color: transparent; display: flex; flex: 0 0 25px; height: 25px; justify-content: center; }
.install-check-row input:checked + span { background: #1b9a5a; border-color: #1b9a5a; color: #fff; }
.install-history { padding: 0.25rem 0; }
.install-history-item { display: flex; gap: 0.75rem; padding: 0.4rem 0 0.75rem; position: relative; }
.install-history-item::before { background: #dde3ea; content: ''; height: 100%; left: 5px; position: absolute; top: 12px; width: 1px; }
.install-history-item:last-child::before { display: none; }
.install-history-dot { background: var(--app-accent); border: 2px solid var(--app-surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--app-accent); flex: 0 0 11px; height: 11px; margin-top: 0.3rem; position: relative; z-index: 1; }
.install-history-item strong { font-size: 0.77rem; }
.install-history-item p { color: #697487; font-size: 0.72rem; margin: 0.1rem 0; }
.install-history-item small { color: #939ba7; font-size: 0.65rem; }
.install-team-list { display: grid; gap: 0.4rem; }
.install-team-list > div { align-items: center; background: #f6f8fa; border-radius: 8px; display: grid; gap: 0.55rem; grid-template-columns: 10px 1fr auto; padding: 0.55rem 0.65rem; }
.install-team-list i { border-radius: 50%; height: 10px; width: 10px; }
.install-team-list span { color: #7a8493; font-size: 0.72rem; }

body.theme-escuro .install-page-header p,
body.theme-escuro .install-order-card > p,
body.theme-escuro .install-order-meta { color: #a6b0be; }
body.theme-escuro .install-metric,
body.theme-escuro .install-toolbar,
body.theme-escuro .install-backlog,
body.theme-escuro .install-month { border-color: #2a3544; }
body.theme-escuro .install-weekday,
body.theme-escuro .install-backlog-help,
body.theme-escuro .install-day.is-empty,
body.theme-escuro .install-day.is-weekend { background: #141b24; }
body.theme-escuro .install-day { border-color: #293442; }
body.theme-escuro .install-day-number { color: #dce5ef; }

@media (max-width: 1199.98px) {
    .install-workspace { grid-template-columns: 285px minmax(740px, 1fr); overflow-x: auto; }
    .install-metrics { grid-template-columns: repeat(2, 1fr); }
    .install-toolbar { align-items: stretch; flex-direction: column; }
}

@media (max-width: 767.98px) {
    .install-page-header { flex-direction: column; }
    .install-header-actions, .install-header-actions .btn { width: 100%; }
    .install-metrics { grid-template-columns: 1fr 1fr; }
    .install-metric { min-height: 72px; padding: 0.7rem; }
    .install-filter-fields { align-items: stretch; flex-direction: column; }
    .install-filter-fields select, .install-filter-fields input { min-width: 0; width: 100%; }
    .install-workspace { display: block; overflow: visible; }
    .install-backlog { max-height: 520px; position: static; }
    .install-calendar-area { margin-top: 1rem; overflow-x: auto; }
    .install-month { min-width: 820px; }
    .install-readiness-modal-grid { grid-template-columns: 1fr; }
    .install-conflict-panel, .install-conflict-list article, .install-swap-form { align-items: stretch; flex-direction: column; }
}

a {
    color: var(--app-accent);
}

.brand-strip {
    background: #f8fafc;
    border-bottom: 1px solid #dce3eb;
    color: #526071;
    font-size: 0.84rem;
    padding: 0.45rem 0;
}

.brand-strip-contact {
    color: #172033;
    font-weight: 600;
}

.app-navbar {
    background: linear-gradient(135deg, var(--app-nav-start) 0%, var(--app-accent) 58%, var(--app-nav-end) 100%);
    border-bottom: 4px solid #c9ced6;
    box-shadow: 0 8px 24px rgba(17, 24, 43, 0.18);
    padding: 0.52rem 0;
}

.app-navbar .container-fluid {
    flex-wrap: nowrap;
    gap: 0.8rem;
}

.brand-logo-wrap {
    align-items: center;
    display: inline-flex;
    gap: 0.85rem;
    margin-right: 0.6rem;
    white-space: nowrap;
}

.brand-logo {
    height: 44px;
    max-width: 188px;
    object-fit: contain;
}

.navbar-dark .navbar-nav .nav-link {
    align-items: center;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.82);
    display: inline-flex;
    font-size: 0.84rem;
    gap: 0.4rem;
    line-height: 1;
    margin: 0 0.08rem;
    padding: 0.62rem 0.64rem;
    transition: background-color 0.18s ease, color 0.18s ease;
    white-space: nowrap;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .show > .nav-link {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    color: #fff;
}

.app-navbar-links {
    align-items: center;
    min-width: 0;
}

.app-navbar-dropdown {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(12, 29, 54, 0.2);
    margin-top: 0.55rem;
    min-width: 215px;
    overflow: hidden;
    padding: 0.42rem;
}

.app-navbar-dropdown .dropdown-header {
    color: #8a96a8;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.45rem 0.7rem 0.35rem;
    text-transform: uppercase;
}

.app-navbar-dropdown .dropdown-item {
    align-items: center;
    border-radius: 8px;
    color: #344258;
    display: flex;
    font-size: 0.82rem;
    gap: 0.58rem;
    padding: 0.58rem 0.7rem;
}

.app-navbar-dropdown .dropdown-item i {
    color: #587397;
    font-size: 0.92rem;
    width: 18px;
}

.app-navbar-dropdown .dropdown-item:hover,
.app-navbar-dropdown .dropdown-item:focus {
    background: #eef4fb;
    color: #173a78;
}

.app-navbar-dropdown .dropdown-item.active {
    background: #e6effc;
    color: #173a78;
    font-weight: 700;
}

.app-navbar-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.45rem;
    margin-left: 0.7rem;
}

.app-navbar-user {
    align-items: center;
    color: rgba(255, 255, 255, 0.76);
    display: inline-flex;
    font-size: 0.78rem;
    gap: 0.42rem;
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-navbar-user i {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1rem;
}

.app-navbar-action {
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-size: 0.76rem;
    gap: 0.38rem;
    justify-content: center;
    min-height: 34px;
    padding: 0.42rem 0.58rem;
    white-space: nowrap;
}

.app-navbar-action:hover,
.app-navbar-action:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.72);
    color: #fff;
}

.app-navbar-logout {
    padding-left: 0.52rem;
    padding-right: 0.52rem;
}

@media (max-width: 1399.98px) and (min-width: 1200px) {
    .app-navbar-user {
        display: none;
    }

    .navbar-dark .navbar-nav .nav-link {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .app-navbar-actions {
        margin-left: 0.35rem;
    }
}

@media (max-width: 1199.98px) {
    .app-navbar .container-fluid {
        flex-wrap: wrap;
    }

    .app-navbar .navbar-collapse {
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        margin-top: 0.55rem;
        padding: 0.65rem 0 0.2rem;
        width: 100%;
    }

    .app-navbar-links {
        align-items: stretch;
    }

    .navbar-dark .navbar-nav .nav-link {
        display: flex;
        margin: 0.08rem 0;
        padding: 0.68rem 0.72rem;
    }

    .app-navbar-dropdown {
        border-radius: 9px;
        box-shadow: none;
        margin: 0.2rem 0 0.4rem;
    }

    .app-navbar-actions {
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        flex-wrap: wrap;
        margin: 0.55rem 0 0;
        padding-top: 0.65rem;
    }

    .app-navbar-user {
        margin-right: auto;
        max-width: none;
    }
}

.card {
    background: var(--app-surface);
    border: 1px solid #e1e6ed;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(23, 32, 51, 0.08);
}

.btn-primary {
    background-color: var(--app-accent);
    border-color: var(--app-accent);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--app-accent-hover);
    border-color: var(--app-accent-hover);
}

.btn-outline-primary {
    border-color: var(--app-accent);
    color: var(--app-accent);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--app-accent);
    border-color: var(--app-accent);
}

.app-sidebar {
    background: linear-gradient(180deg, var(--app-nav-start) 0%, var(--app-accent) 68%, var(--app-nav-end) 100%);
    bottom: 0;
    box-shadow: 14px 0 36px rgba(17, 24, 43, 0.18);
    color: #fff;
    display: flex;
    flex-direction: column;
    left: 0;
    position: fixed;
    top: 0;
    width: 278px;
    z-index: 1040;
}

.sidebar-brand {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    min-height: 82px;
    padding: 1rem 1.25rem;
}

.sidebar-brand img {
    height: 48px;
    max-width: 190px;
    object-fit: contain;
}

.sidebar-close {
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    border-radius: 10px;
    color: #fff;
    height: 38px;
    width: 38px;
}

.sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem 0.85rem;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
    scrollbar-width: thin;
}

.sidebar-section-label {
    color: rgba(255, 255, 255, 0.46);
    display: block;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    padding: 0.35rem 0.8rem 0.55rem;
    text-transform: uppercase;
}

.sidebar-link {
    align-items: center;
    border-radius: 12px;
    color: var(--app-sidebar-text);
    display: flex;
    font-size: 0.92rem;
    font-weight: 600;
    gap: 0.8rem;
    margin-bottom: 0.2rem;
    min-height: 44px;
    padding: 0.68rem 0.82rem;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-link > i:first-child {
    font-size: 1.08rem;
    text-align: center;
    width: 22px;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    transform: translateX(2px);
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.88);
    color: #fff;
}

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

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

.sidebar-chevron {
    font-size: 0.75rem;
    margin-left: auto;
    transition: transform 0.18s ease;
}

.sidebar-group[open] .sidebar-chevron {
    transform: rotate(180deg);
}

.sidebar-submenu {
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    margin: 0.2rem 0 0.6rem 1.5rem;
    padding-left: 0.75rem;
}

.sidebar-submenu a {
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.66);
    display: block;
    font-size: 0.84rem;
    padding: 0.42rem 0.65rem;
    text-decoration: none;
}

.sidebar-submenu a:hover,
.sidebar-submenu a.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-user {
    align-items: center;
    background: rgba(0, 0, 0, 0.14);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    gap: 0.7rem;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    padding: 0.9rem 1rem;
}

.sidebar-avatar {
    align-items: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    display: flex;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.sidebar-user-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.sidebar-user-info strong {
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-info small {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.68rem;
}

.sidebar-user-actions {
    display: flex;
    gap: 0.25rem;
}

.sidebar-user-actions a {
    align-items: center;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.sidebar-user-actions a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.app-main {
    margin-left: 278px;
    min-height: 100vh;
}

.sidebar-mobile-header {
    align-items: center;
    background: linear-gradient(135deg, var(--app-nav-start), var(--app-accent));
    box-shadow: 0 6px 20px rgba(17, 24, 43, 0.16);
    display: flex;
    height: 64px;
    justify-content: space-between;
    padding: 0.6rem 1rem;
}

.sidebar-mobile-header img {
    height: 40px;
    max-width: 160px;
    object-fit: contain;
}

.sidebar-toggle,
.sidebar-mobile-logout {
    align-items: center;
    color: #fff;
    display: flex;
    font-size: 1.35rem;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.sidebar-overlay {
    background: rgba(8, 15, 27, 0.55);
    border: 0;
    bottom: 0;
    display: none;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1035;
}

.settings-card {
    border-radius: 16px;
}

.settings-icon {
    align-items: center;
    background: var(--app-accent-soft);
    border-radius: 14px;
    color: var(--app-accent);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.3rem;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.settings-legend {
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.appearance-option {
    cursor: pointer;
    display: block;
    position: relative;
}

.appearance-option input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.appearance-option-body {
    background: var(--app-surface);
    border: 2px solid #dce2ea;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    height: 100%;
    padding: 0.8rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.appearance-option-body.compact {
    align-items: center;
    text-align: center;
}

.appearance-option input:checked + .appearance-option-body {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px var(--app-accent-soft);
    transform: translateY(-1px);
}

.appearance-option-body small {
    color: #667085;
}

.menu-preview {
    background: #f3f5f8;
    border: 1px solid #d9e0e8;
    border-radius: 8px;
    display: grid;
    height: 78px;
    margin-bottom: 0.25rem;
    overflow: hidden;
}

.menu-preview-superior {
    grid-template-rows: 18px 1fr;
}

.menu-preview-lateral {
    grid-template-columns: 26px 1fr;
}

.menu-preview-nav {
    background: linear-gradient(135deg, var(--app-nav-start), var(--app-accent));
}

.menu-preview-content {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px;
}

.menu-preview-content i {
    background: #d8dee7;
    border-radius: 3px;
    display: block;
    height: 8px;
}

.menu-preview-content i:nth-child(2) { width: 74%; }
.menu-preview-content i:nth-child(3) { width: 46%; }

.theme-swatches {
    display: flex;
    gap: 6px;
    margin: 0.25rem 0 0.45rem;
}

.theme-swatches i {
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #d4dae3;
    display: block;
    height: 24px;
    width: 24px;
}

.theme-swatches-azul i:nth-child(1) { background: #11182b; }
.theme-swatches-azul i:nth-child(2) { background: #172e5f; }
.theme-swatches-azul i:nth-child(3) { background: #e8edf7; }
.theme-swatches-grafite i:nth-child(1) { background: #181b20; }
.theme-swatches-grafite i:nth-child(2) { background: #3f4754; }
.theme-swatches-grafite i:nth-child(3) { background: #eceff2; }
.theme-swatches-petroleo i:nth-child(1) { background: #0b292d; }
.theme-swatches-petroleo i:nth-child(2) { background: #0f5d62; }
.theme-swatches-petroleo i:nth-child(3) { background: #e1f1f0; }
.theme-swatches-escuro i:nth-child(1) { background: #080c12; }
.theme-swatches-escuro i:nth-child(2) { background: #171e28; }
.theme-swatches-escuro i:nth-child(3) { background: #4f8cff; }
.theme-swatches-roxo i:nth-child(1) { background: #21142f; }
.theme-swatches-roxo i:nth-child(2) { background: #6846b7; }
.theme-swatches-roxo i:nth-child(3) { background: #eee8fa; }
.theme-swatches-vinho i:nth-child(1) { background: #30111d; }
.theme-swatches-vinho i:nth-child(2) { background: #8a2d4f; }
.theme-swatches-vinho i:nth-child(3) { background: #f8e8ee; }
.theme-swatches-cobre i:nth-child(1) { background: #2d1b13; }
.theme-swatches-cobre i:nth-child(2) { background: #a65b27; }
.theme-swatches-cobre i:nth-child(3) { background: #f9eadf; }

@media (max-width: 991.98px) {
    .layout-lateral .app-sidebar {
        transform: translateX(-105%);
        transition: transform 0.22s ease;
    }

    .layout-lateral.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .layout-lateral.sidebar-open .sidebar-overlay {
        display: block;
    }

    .layout-lateral .app-main {
        margin-left: 0;
    }

    .layout-lateral.sidebar-open {
        overflow: hidden;
    }
}

table.table thead {
    background-color: var(--app-accent-soft);
}

.theme-escuro .card,
.theme-escuro .modal-content,
.theme-escuro .dropdown-menu,
.theme-escuro .list-group-item,
.theme-escuro .searchable-select-list {
    background-color: var(--app-surface);
    border-color: #2d3948;
    color: var(--app-text);
}

.theme-escuro .card {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.theme-escuro .text-muted,
.theme-escuro .form-text,
.theme-escuro .muted,
.theme-escuro .formula-hint {
    color: #95a5b8 !important;
}

.theme-escuro .table {
    --bs-table-bg: transparent;
    --bs-table-border-color: #334153;
    --bs-table-color: #dce5f0;
    --bs-table-hover-bg: rgba(79, 140, 255, 0.08);
    --bs-table-hover-color: #ffffff;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.025);
    --bs-table-striped-color: #dce5f0;
}

.theme-escuro table.table thead {
    background-color: #202b38;
}

.theme-escuro .form-control,
.theme-escuro .form-select,
.theme-escuro .input-group-text {
    background-color: #111823;
    border-color: #354255;
    color: #e7edf5;
}

.theme-escuro .form-control:focus,
.theme-escuro .form-select:focus {
    background-color: #141d29;
    border-color: var(--app-accent);
    box-shadow: 0 0 0 0.2rem rgba(79, 140, 255, 0.18);
    color: #ffffff;
}

.theme-escuro .form-control::placeholder {
    color: #738297;
}

.theme-escuro .form-select {
    color-scheme: dark;
}

.theme-escuro .dropdown-item,
.theme-escuro .searchable-select-option {
    color: #dbe5f0;
}

.theme-escuro .dropdown-item:hover,
.theme-escuro .dropdown-item:focus,
.theme-escuro .searchable-select-option:hover,
.theme-escuro .searchable-select-option.is-selected {
    background-color: #243246;
    color: #ffffff;
}

.theme-escuro .modal-header,
.theme-escuro .modal-footer {
    border-color: #303d4e;
}

.theme-escuro .btn-close {
    filter: invert(1) grayscale(100%) brightness(180%);
}

.theme-escuro .btn-outline-secondary {
    border-color: #66778c;
    color: #c5d0dd;
}

.theme-escuro .btn-outline-secondary:hover {
    background-color: #66778c;
    color: #fff;
}

.theme-escuro .appearance-option-body,
.theme-escuro .menu-preview {
    background-color: #111823;
    border-color: #354255;
}

.theme-escuro .menu-preview-content i {
    background: #334153;
}

.theme-escuro .appearance-option-body small {
    color: #95a5b8;
}

.theme-escuro .alert-success {
    background-color: #12372d;
    border-color: #235f4e;
    color: #b9eadb;
}

.theme-escuro .alert-danger {
    background-color: #3b1d25;
    border-color: #713443;
    color: #f2c3ce;
}

.formula-hint {
    font-size: 0.85rem;
    color: #6c757d;
}

.formula-input {
    font-family: 'Consolas', 'Courier New', monospace;
}

.searchable-select {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
}

.searchable-select.is-open {
    z-index: 1070;
}

.searchable-native-select {
    height: 1px !important;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 1px !important;
}

.searchable-select-input {
    background-image: linear-gradient(45deg, transparent 50%, #526071 50%), linear-gradient(135deg, #526071 50%, transparent 50%);
    background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding-right: 1.75rem;
}

.searchable-select-list {
    background: #fff;
    border: 1px solid #cfd7e3;
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(23, 32, 51, 0.18);
    display: none;
    left: 0;
    max-height: min(480px, 58vh);
    overscroll-behavior: contain;
    overflow-y: auto;
    padding: 0.25rem;
    position: absolute;
    right: 0;
    scrollbar-color: #8c96a5 #eef1f5;
    scrollbar-gutter: stable;
    scrollbar-width: auto;
    top: calc(100% + 4px);
    z-index: 1050;
}

.searchable-select.opens-up .searchable-select-list {
    bottom: calc(100% + 4px);
    top: auto;
}

.searchable-select-list::-webkit-scrollbar {
    width: 12px;
}

.searchable-select-list::-webkit-scrollbar-track {
    background: #eef1f5;
    border-radius: 0 8px 8px 0;
}

.searchable-select-list::-webkit-scrollbar-thumb {
    background: #8c96a5;
    border: 3px solid #eef1f5;
    border-radius: 999px;
}

.searchable-select.is-open .searchable-select-list {
    display: block;
}

.searchable-select-option {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #172033;
    display: block;
    font-size: 0.925rem;
    line-height: 1.35;
    padding: 0.62rem 0.65rem;
    text-align: left;
    width: 100%;
}

.searchable-select-option:hover,
.searchable-select-option.is-selected {
    background: #eef2f7;
    color: #172e5f;
}

.searchable-select-empty {
    color: #667085;
    font-size: 0.85rem;
    padding: 0.55rem;
}

.orcamento-items-card,
.orcamento-add-card {
    border: 1px solid #dfe5ee;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(23, 32, 51, 0.07);
    overflow: visible;
}

.orcamento-section-header {
    align-items: center;
    background: linear-gradient(135deg, #fbfcfe 0%, #f3f6fa 100%);
    border-bottom: 1px solid #e4e9f0;
    border-radius: 14px 14px 0 0;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.15rem;
}

.orcamento-section-heading {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.orcamento-section-heading h5 {
    color: #16233b;
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
}

.orcamento-section-heading p {
    color: #748094;
    font-size: 0.78rem;
    margin: 0.18rem 0 0;
}

.orcamento-section-icon {
    align-items: center;
    background: #e8f0ff;
    border-radius: 10px;
    color: #2563eb;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.05rem;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.orcamento-items-count,
.orcamento-add-step {
    align-items: center;
    background: #edf3ff;
    border: 1px solid #dce7fa;
    border-radius: 999px;
    color: #285cae;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 800;
    gap: 0.35rem;
    padding: 0.38rem 0.65rem;
}

.orcamento-items-header-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.65rem;
}

.orcamento-add-trigger {
    align-items: center;
    background: linear-gradient(135deg, #173a78 0%, #176da5 100%);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(23, 58, 120, 0.2);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 750;
    gap: 0.42rem;
    padding: 0.58rem 0.82rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.orcamento-add-trigger:hover,
.orcamento-add-trigger:focus-visible {
    background: linear-gradient(135deg, #12346e 0%, #126394 100%);
    box-shadow: 0 10px 24px rgba(23, 58, 120, 0.28);
    transform: translateY(-1px);
}

.orcamento-items-table-wrap {
    border-radius: 0 0 14px 14px;
    overflow: hidden;
}

.orcamento-items-table thead th {
    background: #f8fafc;
    border-bottom: 1px solid #dfe5ed;
    color: #5e6a7d;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    padding: 0.75rem 1rem;
    text-transform: uppercase;
}

.orcamento-items-table tbody td {
    border-color: #ebeff4;
    padding: 0.85rem 1rem;
}

.orcamento-items-table tbody tr:hover td {
    background: #fbfdff;
}

.modelo-imagem-preview {
    align-items: center;
    background: #fff;
    border: 1px solid #d9e0e8;
    border-radius: 8px;
    display: flex;
    height: 130px;
    justify-content: center;
    overflow: hidden;
    padding: 6px;
    width: 170px;
}

.modelo-imagem-preview img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.modelo-imagem-preview img.is-removed {
    filter: grayscale(1);
    opacity: 0.35;
}

.modelo-imagem-vazia {
    color: #8b95a5;
    font-size: 0.75rem;
    padding: 0 0.4rem;
    text-align: center;
}

.theme-escuro .modelo-imagem-preview {
    background: #111823;
    border-color: #354255;
}

.orcamento-item-price {
    display: inline-block;
    margin: 0;
    max-width: 205px;
    width: 100%;
}

.orcamento-item-price-input .input-group-text {
    background: #f2f6fb;
    border-color: #d5deea;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

/* Alinha o inicio dos dois campos, apesar de "R$" e "Lucro" terem larguras diferentes. */
.orcamento-item-price-input .input-group-text:first-child {
    justify-content: center;
    min-width: 48px;
}

.orcamento-item-price-input .form-control {
    border-color: #d5deea;
    font-weight: 600;
}

.orcamento-item-price-input .form-control:focus {
    border-color: #4a86d8;
    box-shadow: 0 0 0 0.18rem rgba(74, 134, 216, 0.18);
}

.orcamento-item-price-meta {
    align-items: center;
    color: #6b7688;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.72rem;
    gap: 0.3rem;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

.orcamento-item-price-meta .badge {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.orcamento-item-price-meta .js-item-price-reset {
    font-size: 0.72rem;
    text-decoration: underline;
}

.orcamento-item-price-status {
    font-size: 0.68rem;
    min-height: 0.9rem;
    color: #8b95a5;
}

.orcamento-effective-margin {
    align-items: center;
    background: #f2f7fd;
    border: 1px solid #dbe6f5;
    border-radius: 10px;
    display: flex;
    font-size: 0.74rem;
    gap: 0.5rem;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
}

.orcamento-effective-margin strong {
    color: #1f4b8e;
    font-size: 0.9rem;
}

.orcamento-commission-preview {
    background: #f8f9fa;
}

.orcamento-items-empty {
    align-items: center;
    color: #778296;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.orcamento-items-empty > span {
    align-items: center;
    background: #eff4fb;
    border-radius: 50%;
    color: #54719d;
    display: inline-flex;
    font-size: 1.15rem;
    height: 42px;
    justify-content: center;
    margin-bottom: 0.25rem;
    width: 42px;
}

.orcamento-items-empty strong {
    color: #43516a;
    font-size: 0.9rem;
}

.orcamento-items-empty small {
    font-size: 0.75rem;
}

.orcamento-add-card {
    border-color: #cad9ee;
    box-shadow: 0 16px 36px rgba(28, 73, 139, 0.1);
}

.orcamento-add-header {
    background: linear-gradient(135deg, #eef5ff 0%, #f7fbff 60%, #effcff 100%);
    border-bottom-color: #d8e5f5;
}

.orcamento-add-header .orcamento-section-icon {
    background: linear-gradient(135deg, #173a78, #176da5);
    box-shadow: 0 7px 16px rgba(23, 58, 120, 0.2);
    color: #fff;
}

.orcamento-add-body {
    padding: 1.15rem;
}

.orcamento-primary-add {
    background: #fbfdff;
    border: 1px solid #dbe6f3;
    border-left: 4px solid #2563eb;
    border-radius: 11px;
    padding: 1rem;
}

.orcamento-primary-add .form-label {
    color: #43516a;
    font-weight: 700;
}

.orcamento-primary-add .form-control,
.orcamento-primary-add .form-select {
    border-color: #ced8e6;
}

.orcamento-add-submit {
    align-items: center;
    border-radius: 9px;
    display: inline-flex;
    font-weight: 700;
    gap: 0.42rem;
    padding: 0.55rem 0.9rem;
}

.orcamento-add-modal .modal-dialog {
    max-width: min(1480px, calc(100vw - 2rem));
}

.orcamento-add-modal .modal-content {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(11, 28, 55, 0.28);
    max-height: calc(100vh - 2rem);
    overflow: hidden;
}

.orcamento-add-modal-header {
    align-items: center;
    background:
        radial-gradient(circle at 86% 12%, rgba(79, 185, 255, 0.2), transparent 26%),
        linear-gradient(135deg, #102d61 0%, #17477d 55%, #126c8d 100%);
    border: 0;
    color: #fff;
    padding: 1.15rem 1.35rem;
}

.orcamento-add-modal-title {
    align-items: center;
    display: flex;
    gap: 0.9rem;
}

.orcamento-add-modal-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 13px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.2rem;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.orcamento-add-modal-eyebrow {
    color: #9bdcff;
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.14rem;
    text-transform: uppercase;
}

.orcamento-add-modal-title h5 {
    color: #fff;
    font-size: 1.18rem;
    font-weight: 800;
    margin: 0;
}

.orcamento-add-modal-title p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    margin: 0.2rem 0 0;
}

.orcamento-add-modal .orcamento-add-body {
    background: #f4f7fb;
    padding: 1.2rem;
}

.orcamento-add-modal .orcamento-primary-add {
    background: #fff;
    border: 1px solid #dce5f0;
    border-left: 4px solid #2563eb;
    box-shadow: 0 10px 26px rgba(31, 55, 91, 0.06);
}

.orcamento-add-modal .orcamento-extra-card {
    box-shadow: 0 5px 15px rgba(31, 55, 91, 0.035);
}

.orcamento-add-modal-footer {
    align-items: center;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
}

.orcamento-add-modal-footer > div {
    color: #7a8799;
    font-size: 0.74rem;
}

.orcamento-add-modal-footer .btn {
    border-radius: 9px;
    min-width: 92px;
}

.orcamento-extra-heading {
    align-items: flex-end;
    border-top: 1px solid #e6ebf2;
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
    margin-top: 1.15rem;
    padding: 1rem 0 0.65rem;
}

.orcamento-extra-heading span {
    color: #26354e;
    font-size: 0.88rem;
    font-weight: 800;
}

.orcamento-extra-heading small {
    color: #8490a1;
    font-size: 0.7rem;
}

.orcamento-extra-card {
    background: #fff;
    border: 1px solid #e0e6ee;
    border-radius: 10px;
    margin-top: 0.6rem;
}

.orcamento-extra-card summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: 36px minmax(0, 1fr) 18px;
    list-style: none;
    padding: 0.75rem 0.85rem;
}

.orcamento-extra-card summary::-webkit-details-marker {
    display: none;
}

.orcamento-extra-card summary > span:nth-child(2) {
    display: flex;
    flex-direction: column;
}

.orcamento-extra-card summary strong {
    color: #35435a;
    font-size: 0.82rem;
}

.orcamento-extra-card summary small {
    color: #818c9e;
    font-size: 0.7rem;
}

.orcamento-extra-icon {
    align-items: center;
    border-radius: 9px;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.orcamento-extra-icon-info {
    background: #def7fc;
    color: #0891b2;
}

.orcamento-extra-icon-warning {
    background: #fff1cf;
    color: #c77a00;
}

.orcamento-extra-chevron {
    color: #8791a1;
    transition: transform 0.2s ease;
}

.orcamento-extra-card[open] .orcamento-extra-chevron {
    transform: rotate(180deg);
}

.orcamento-extra-content {
    border-top: 1px solid #e7ebf1;
    padding: 0.9rem;
}

.theme-escuro .orcamento-section-header,
.theme-escuro .orcamento-add-header,
.theme-escuro .orcamento-primary-add,
.theme-escuro .orcamento-extra-card {
    background: #171e28;
    border-color: #354255;
}

.theme-escuro .orcamento-section-heading h5,
.theme-escuro .orcamento-extra-heading span,
.theme-escuro .orcamento-extra-card summary strong {
    color: #e3eaf3;
}

.theme-escuro .orcamento-items-table thead th,
.theme-escuro .orcamento-items-table tbody td {
    background: #171e28;
    border-color: #354255;
    color: #dbe3ed;
}

.theme-escuro .orcamento-items-table tbody tr:hover td {
    background: #202b38;
    border-color: #405068;
    color: #f2f6fb;
}

.theme-escuro .orcamento-contract-deadline {
    background: #111823 !important;
    border-color: #354255 !important;
    color: #e3eaf3;
}

.theme-escuro .orcamento-commission-preview {
    background: #111823;
    border-color: #354255;
    color: #e7edf5;
}

.theme-escuro .orcamento-item-price-input .input-group-text {
    background: #111823;
    border-color: #405068;
    color: #9fb0c6;
}

.theme-escuro .orcamento-item-price-input .form-control {
    background: #111823;
    border-color: #405068;
    color: #e7edf5;
}

.theme-escuro .orcamento-item-price-meta,
.theme-escuro .orcamento-item-price-status {
    color: #9fb0c6;
}

.theme-escuro .orcamento-effective-margin {
    background: #111823;
    border-color: #354255;
    color: #cbd7e6;
}

.theme-escuro .orcamento-effective-margin strong {
    color: #8fb7ec;
}

.theme-escuro .orcamento-add-modal .orcamento-add-body,
.theme-escuro .orcamento-add-modal-footer {
    background: #111821;
    border-color: #354255;
}

.theme-escuro .orcamento-add-modal .modal-content {
    background: #111821;
}

@media (max-width: 767.98px) {
    .orcamento-section-header,
    .orcamento-extra-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .orcamento-add-body {
        padding: 0.8rem;
    }

    .orcamento-primary-add {
        padding: 0.8rem;
    }

    .orcamento-items-header-actions {
        justify-content: space-between;
        width: 100%;
    }

    .orcamento-add-modal .modal-dialog {
        margin: 0.4rem;
        max-width: calc(100vw - 0.8rem);
    }

    .orcamento-add-modal .modal-content {
        border-radius: 14px;
        max-height: calc(100vh - 0.8rem);
    }

    .orcamento-add-modal-header {
        padding: 0.9rem;
    }

    .orcamento-add-modal-title p,
    .orcamento-add-modal-footer > div {
        display: none;
    }

    .orcamento-add-modal .orcamento-add-body {
        padding: 0.75rem;
    }

    .orcamento-add-modal-footer {
        justify-content: flex-end;
    }
}

.orcamento-item-modal {
    height: calc(100vh - 1rem);
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    max-width: min(1680px, calc(100vw - 1rem));
}

.orcamento-item-modal .modal-content {
    max-height: 100%;
    overflow: hidden;
}

.orcamento-item-modal .modal-body {
    max-height: calc(100vh - 9rem);
    overflow-y: auto;
}

.orcamento-item-modal .searchable-select-list {
    z-index: 1065;
}

.orcamento-status-form {
    display: inline-flex;
}

.orcamento-status-select {
    appearance: none;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
    padding: 0.42rem 2.15rem 0.42rem 0.85rem;
    text-align: left;
}

.orcamento-status-form {
    position: relative;
}

.orcamento-status-form::after {
    border-left: 0.35rem solid transparent;
    border-right: 0.35rem solid transparent;
    border-top: 0.42rem solid currentColor;
    content: "";
    pointer-events: none;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-40%);
}

.orcamento-status-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

.orcamento-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.orcamento-sidebar > .card {
    border: 1px solid #e1e6ed;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(23, 32, 51, 0.07);
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.orcamento-sidebar > .card h5 {
    align-items: center;
    color: #172033;
    display: flex;
    font-size: 1rem;
    font-weight: 800;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.orcamento-payment-card {
    border-color: #cfdced !important;
    overflow: visible;
}

.orcamento-payment-header {
    align-items: center;
    background: linear-gradient(135deg, #edf4ff 0%, #f8fbff 58%, #eefcff 100%);
    border-bottom: 1px solid #dce6f2;
    border-radius: 10px 10px 0 0;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.9rem;
}

.orcamento-payment-heading {
    align-items: center;
    display: flex;
    gap: 0.65rem;
}

.orcamento-payment-heading > span {
    align-items: center;
    background: linear-gradient(135deg, #183b78, #1680aa);
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(23, 75, 132, 0.2);
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1rem;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.orcamento-payment-heading h5 {
    display: block !important;
    font-size: 0.92rem !important;
    margin: 0 !important;
}

.orcamento-payment-heading p {
    color: #768398;
    font-size: 0.68rem;
    line-height: 1.3;
    margin: 0.15rem 0 0;
}

.orcamento-payment-status {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.66rem;
    font-weight: 800;
    gap: 0.3rem;
    padding: 0.35rem 0.55rem;
}

.orcamento-payment-status.is-pending {
    background: #fff3d8;
    color: #a65f00;
}

.orcamento-payment-status.is-paid {
    background: #ddf8e9;
    color: #087a4a;
}

.orcamento-payment-body {
    padding: 0.9rem;
}

.orcamento-payment-overview {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.orcamento-payment-metric {
    background: #f8fafc;
    border: 1px solid #e4e9f0;
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0.65rem;
}

.orcamento-payment-metric.is-total {
    background: linear-gradient(135deg, #101d3a, #193e72);
    border: 0;
    color: #fff;
    grid-column: 1 / -1;
}

.orcamento-payment-metric span {
    color: #7b8798;
    font-size: 0.65rem;
}

.orcamento-payment-metric.is-total span {
    color: rgba(255, 255, 255, 0.65);
}

.orcamento-payment-metric strong {
    color: #26364f;
    font-size: 0.92rem;
    margin-top: 0.12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.orcamento-payment-metric.is-total strong {
    color: #fff;
    font-size: 1.25rem;
}

.orcamento-payment-metric.is-received strong {
    color: #078653;
}

.orcamento-payment-metric.is-due strong {
    color: #cf334f;
}

.orcamento-payment-progress {
    margin-top: 0.8rem;
}

.orcamento-payment-progress > div:first-child {
    color: #6f7c8f;
    display: flex;
    font-size: 0.68rem;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.orcamento-payment-progress .progress {
    background: #edf1f5;
    border-radius: 999px;
    height: 7px;
}

.orcamento-payment-registration-note {
    background: #f8fafc;
    border: 1px dashed #d6dee9;
    border-radius: 9px;
    display: grid;
    gap: 0.15rem 0.5rem;
    grid-template-columns: 1fr auto;
    margin: 0.8rem 0;
    padding: 0.65rem;
}

.orcamento-payment-registration-note > span {
    color: #6f7c8f;
    font-size: 0.67rem;
}

.orcamento-payment-registration-note > strong {
    color: #2b3a52;
    font-size: 0.74rem;
}

.orcamento-payment-registration-note small {
    color: #8a94a3;
    font-size: 0.62rem;
    grid-column: 1 / -1;
}

.orcamento-payment-open {
    align-items: center;
    border-radius: 9px;
    display: flex;
    font-weight: 700;
    gap: 0.45rem;
    justify-content: center;
}

.orcamento-payment-help {
    color: #8791a0;
    font-size: 0.62rem;
    line-height: 1.35;
    margin-top: 0.55rem;
}

.orcamento-payment-history {
    border-top: 1px solid #e5eaf0;
    margin-top: 0.85rem;
    padding-top: 0.8rem;
}

.orcamento-payment-history h6 {
    color: #35445b;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.orcamento-payment-history .list-group-item {
    background: transparent;
    border-color: #edf0f4;
    font-size: 0.68rem;
    padding: 0.5rem 0;
}

.orcamento-payment-locked {
    align-items: flex-start;
    color: #768397;
    display: flex;
    gap: 0.7rem;
    padding: 1rem;
}

.orcamento-payment-locked > i {
    align-items: center;
    background: #f0f3f7;
    border-radius: 9px;
    color: #66758b;
    display: inline-flex;
    flex: 0 0 auto;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.orcamento-payment-locked div {
    display: flex;
    flex-direction: column;
}

.orcamento-payment-locked strong {
    color: #44536b;
    font-size: 0.76rem;
}

.orcamento-payment-locked span {
    font-size: 0.67rem;
}

.orcamento-payment-modal {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 28px 70px rgba(12, 27, 55, 0.24);
    overflow: hidden;
}

.orcamento-payment-modal .modal-header {
    background: linear-gradient(135deg, #f2f7ff, #f7fcff);
    border-bottom-color: #dfe7f1;
}

.orcamento-payment-modal .modal-title {
    display: block !important;
    font-size: 1.15rem !important;
    margin: 0 !important;
}

.orcamento-payment-modal .form-label {
    color: #3d4c64;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.orcamento-payment-modal-balance {
    align-items: center;
    background: linear-gradient(135deg, #101d3a, #193e72);
    border-radius: 11px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.8rem 0.9rem;
}

.orcamento-payment-modal-balance span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
}

.orcamento-payment-modal-balance strong {
    font-size: 1.05rem;
}

.orcamento-client-edit-trigger {
    font-size: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.client-edit-modal-eyebrow {
    color: #1769d2;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 0.18rem;
    text-transform: uppercase;
}

.client-edit-section {
    background: #f8fafd;
    border: 1px solid #e2e9f3;
    border-radius: 13px;
    padding: 1rem;
}

.client-edit-section-title {
    align-items: center;
    color: #173d72;
    display: flex;
    font-size: 0.82rem;
    font-weight: 800;
    gap: 0.42rem;
    margin-bottom: 0.8rem;
}

.orcamento-list-filter {
    background: #fff;
    border: 1px solid #dfe6ef;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 31, 66, 0.055);
    padding: 0.85rem 1rem 1rem;
}

.orcamento-list-filter-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.7rem;
}

.orcamento-list-filter-heading div {
    align-items: center;
    color: #173d72;
    display: flex;
    gap: 0.42rem;
}

.orcamento-list-filter-heading span {
    background: #eef4fd;
    border-radius: 999px;
    color: #42618d;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.28rem 0.6rem;
}

.orcamento-list-filter-grid {
    align-items: end;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(125px, 0.85fr)) repeat(2, minmax(145px, 1fr)) repeat(2, minmax(120px, 0.8fr)) auto;
}

.orcamento-list-filter .form-label {
    color: #526078;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.28rem;
}

.orcamento-list-filter-actions {
    display: flex;
    gap: 0.35rem;
}

.orcamento-status-legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.orcamento-status-legend span {
    align-items: center;
    background: #fff;
    border: 1px solid #e2e7ee;
    border-radius: 999px;
    color: #5b6779;
    display: inline-flex;
    font-size: 0.66rem;
    gap: 0.3rem;
    padding: 0.2rem 0.48rem;
}

.orcamento-status-legend i {
    background: var(--status-accent, #8792a2);
    border-radius: 50%;
    display: block;
    height: 7px;
    width: 7px;
}

.orcamento-sort-link {
    align-items: center;
    color: inherit;
    display: flex;
    gap: 0.3rem;
    text-decoration: none;
    white-space: nowrap;
}

.orcamento-sort-link:hover {
    color: #1769d2;
}

.orcamento-sort-link i {
    color: #8a97a9;
    font-size: 0.68rem;
}

.orcamento-list-table tbody .orcamento-status-row > * {
    background-color: var(--status-bg, #fff);
    transition: background-color 0.15s ease;
}

.orcamento-list-table tbody .orcamento-status-row:hover > * {
    background-color: var(--status-hover, #f4f7fb);
}

.orcamento-list-table .orcamento-status-row > td:first-child {
    box-shadow: inset 4px 0 0 var(--status-accent, #8792a2);
}

.orcamento-list-table .orcamento-status-row .form-select {
    background-color: rgba(255, 255, 255, 0.78);
}

.status-rascunho { --status-bg: #f7f8fa; --status-hover: #eef1f5; --status-accent: #7b8794; }
.status-enviado { --status-bg: #eef8ff; --status-hover: #e0f2ff; --status-accent: #18a9ca; }
.status-aprovado { --status-bg: #edf9f2; --status-hover: #dff3e8; --status-accent: #209a61; }
.status-em_producao { --status-bg: #fff8e6; --status-hover: #ffefc4; --status-accent: #e9a11a; }
.status-producao_finalizada { --status-bg: #e8f4ff; --status-hover: #d9ecff; --status-accent: #2583c5; }
.status-finalizado { --status-bg: #f3f0ff; --status-hover: #e9e2ff; --status-accent: #7256c7; }
.status-recusado { --status-bg: #fff0f2; --status-hover: #ffe1e6; --status-accent: #dc3f55; }
.status-cancelado { --status-bg: #f0f1f3; --status-hover: #e5e7ea; --status-accent: #7d8692; }

@media (max-width: 1399.98px) {
    .orcamento-list-filter-grid {
        grid-template-columns: repeat(4, minmax(135px, 1fr));
    }
}

@media (max-width: 767.98px) {
    .orcamento-list-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .orcamento-list-filter-actions .btn:first-of-type {
        flex: 1;
    }
}

@media (max-width: 479.98px) {
    .orcamento-list-filter-grid {
        grid-template-columns: 1fr;
    }
}

.orcamento-financial-card .orcamento-payment-body {
    padding: 1rem;
}

.orcamento-financial-subtotal {
    align-items: center;
    display: flex;
    font-size: 0.88rem;
    justify-content: space-between;
}

.orcamento-financial-subtotal strong {
    color: #23334d;
    font-size: 1rem;
}

.orcamento-financial-discount {
    background: #f8fafc;
    border: 1px solid #e3e9f1;
    border-radius: 10px;
    margin-top: 0.85rem;
    padding: 0.75rem;
}

.orcamento-financial-discount .form-label {
    color: #536176;
    font-weight: 700;
}

.orcamento-financial-total {
    align-items: center;
    background: linear-gradient(135deg, #101d3a, #193e72);
    border-radius: 11px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    margin-top: 0.85rem;
    padding: 0.85rem;
}

.orcamento-financial-total span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
}

.orcamento-financial-total strong {
    color: #fff;
    font-size: 1.25rem;
}

.orcamento-financial-received-grid {
    margin-top: 0.7rem;
}

.orcamento-financial-card .orcamento-payment-history {
    margin-bottom: 0.8rem;
}

.orcamento-financial-card .orcamento-payment-history .list-group-item > div:first-child span {
    color: #20334f;
    font-weight: 800;
}

.orcamento-financial-crediario {
    border-top: 1px solid #e5eaf0;
    margin-top: 0.9rem;
    padding-top: 0.85rem;
}

.theme-escuro .orcamento-payment-header,
.theme-escuro .orcamento-payment-modal .modal-header,
.theme-escuro .orcamento-payment-registration-note,
.theme-escuro .orcamento-payment-metric:not(.is-total),
.theme-escuro .orcamento-financial-discount {
    background: #171e28;
    border-color: #354255;
}

@media (max-width: 575.98px) {
    .orcamento-payment-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .orcamento-payment-modal-balance {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }
}

.orcamento-cost-card {
    padding: 0.85rem !important;
}

.orcamento-cost-card h5 {
    font-size: 0.92rem !important;
    line-height: 1.25;
    margin-bottom: 0.5rem !important;
}

.orcamento-cost-card form {
    display: grid;
    gap: 0.45rem;
}

.orcamento-cost-card .mb-2 {
    margin-bottom: 0 !important;
}

.orcamento-cost-card .form-label.small {
    font-size: 0.7rem;
}

.orcamento-cost-card .form-control-sm {
    min-height: 30px;
    padding-bottom: 0.25rem;
    padding-top: 0.25rem;
}

.orcamento-cost-card .js-auto-save-status {
    font-size: 0.72rem;
}

.financeiro-kpi-button {
    border: 1px solid #e1e6ed;
    background: #fff;
    padding: 0;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.financeiro-kpi-button:hover,
.financeiro-kpi-button:focus {
    border-color: rgba(25, 101, 206, 0.35);
    box-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.finance-balance-page {
    --finance-navy: #0f2c5c;
    --finance-blue: #1769d2;
    --finance-border: #e1e8f2;
    --finance-muted: #748197;
    color: #172033;
    padding-bottom: 2rem;
}

.finance-balance-hero {
    align-items: center;
    background: linear-gradient(118deg, #0c2148 0%, #153e78 62%, #1680b9 100%);
    border-radius: 18px;
    box-shadow: 0 18px 38px rgba(13, 43, 89, 0.16);
    color: #fff;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    overflow: hidden;
    padding: 1.35rem 1.5rem;
    position: relative;
}

.finance-balance-hero::after {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: '';
    height: 210px;
    position: absolute;
    right: 12%;
    top: -155px;
    width: 210px;
}

.finance-balance-hero > * {
    position: relative;
    z-index: 1;
}

.finance-balance-eyebrow {
    color: #91ddff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.finance-balance-hero h3 {
    font-size: 1.65rem;
    font-weight: 800;
    margin: 0;
}

.finance-balance-hero p {
    color: rgba(255, 255, 255, 0.72);
    margin: 0.2rem 0 0;
}

.finance-balance-filter,
.finance-balance-card,
.finance-balance-kpi {
    background: #fff;
    border: 1px solid var(--finance-border);
    border-radius: 15px;
    box-shadow: 0 10px 28px rgba(23, 32, 51, 0.055);
}

.finance-balance-filter {
    align-items: end;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(210px, 0.75fr) minmax(520px, 2fr);
    padding: 1rem 1.1rem;
}

.finance-balance-filter-title {
    align-items: center;
    display: flex;
    gap: 0.7rem;
}

.finance-balance-filter-title strong,
.finance-balance-filter-title small {
    display: block;
}

.finance-balance-filter-title small {
    color: var(--finance-muted);
    margin-top: 0.12rem;
}

.finance-balance-icon {
    align-items: center;
    background: #edf5ff;
    border-radius: 11px;
    color: var(--finance-blue);
    display: inline-flex;
    font-size: 1.1rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.finance-balance-filter-fields {
    align-items: end;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: 1fr 1fr 1.15fr auto;
}

.finance-balance-filter .form-label {
    color: #536075;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.finance-balance-filter-actions {
    display: flex;
    gap: 0.4rem;
}

.finance-balance-context {
    color: var(--finance-muted);
    display: flex;
    font-size: 0.78rem;
    gap: 1rem;
    margin: 0.75rem 0;
}

.finance-balance-context span {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
}

.finance-balance-kpis {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 0.9rem;
}

.finance-balance-kpi {
    align-items: center;
    display: flex;
    gap: 0.7rem;
    min-width: 0;
    padding: 0.9rem;
}

.finance-balance-kpi-icon {
    align-items: center;
    border-radius: 11px;
    display: inline-flex;
    flex: 0 0 38px;
    font-size: 1rem;
    height: 38px;
    justify-content: center;
}

.finance-balance-kpi div {
    min-width: 0;
}

.finance-balance-kpi small,
.finance-balance-kpi strong {
    display: block;
}

.finance-balance-kpi small {
    color: var(--finance-muted);
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
}

.finance-balance-kpi strong {
    font-size: clamp(0.82rem, 1.05vw, 1.05rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-balance-kpi.is-entry .finance-balance-kpi-icon { background: #e5f8ef; color: #138a57; }
.finance-balance-kpi.is-exit .finance-balance-kpi-icon { background: #ffeaed; color: #d94455; }
.finance-balance-kpi.is-balance .finance-balance-kpi-icon { background: #e9f1ff; color: #2866cf; }
.finance-balance-kpi.is-receivable .finance-balance-kpi-icon { background: #fff4d8; color: #c67a05; }
.finance-balance-kpi.is-payable .finance-balance-kpi-icon { background: #fff0e4; color: #d45c1b; }
.finance-balance-kpi.is-projected .finance-balance-kpi-icon { background: #f0eaff; color: #7544cf; }

.finance-health-card {
    align-items: center;
    background: linear-gradient(120deg, #101d3a, #17396f);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 15px 34px rgba(10, 31, 68, 0.17);
    color: #fff;
    display: grid;
    gap: 2rem;
    grid-template-columns: 1.35fr 0.8fr;
    margin-bottom: 0.9rem;
    padding: 1.15rem 1.25rem;
}

.finance-health-card.is-saudavel { background: linear-gradient(120deg, #0c3f3a, #146c59); }
.finance-health-card.is-atencao { background: linear-gradient(120deg, #4b3511, #9d6810); }
.finance-health-card.is-critico { background: linear-gradient(120deg, #4c1722, #a32d42); }

.finance-health-main {
    align-items: center;
    display: flex;
    gap: 0.9rem;
}

.finance-health-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    display: inline-flex;
    flex: 0 0 52px;
    font-size: 1.45rem;
    height: 52px;
    justify-content: center;
}

.finance-health-main small,
.finance-health-metric span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.finance-health-main h4 {
    font-size: 1.15rem;
    margin: 0.14rem 0;
}

.finance-health-main p,
.finance-health-metric small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.79rem;
    margin: 0;
}

.finance-health-metric strong {
    display: block;
    font-size: 1.25rem;
    margin-top: 0.1rem;
}

.finance-health-track {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    height: 6px;
    margin: 0.35rem 0;
    overflow: hidden;
}

.finance-health-track span {
    background: #6ee7b7;
    border-radius: inherit;
    display: block;
    height: 100%;
}

.finance-balance-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.8fr);
    margin-bottom: 0.9rem;
}

.finance-balance-card {
    overflow: hidden;
}

.finance-balance-card > header {
    align-items: center;
    border-bottom: 1px solid var(--finance-border);
    display: flex;
    justify-content: space-between;
    padding: 0.9rem 1rem;
}

.finance-balance-card > header h4 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.finance-balance-card > header p {
    color: var(--finance-muted);
    font-size: 0.74rem;
    margin: 0.15rem 0 0;
}

.finance-flow-legend {
    display: flex;
    gap: 0.8rem;
}

.finance-flow-legend span {
    align-items: center;
    color: var(--finance-muted);
    display: inline-flex;
    font-size: 0.72rem;
    gap: 0.3rem;
}

.finance-flow-legend i,
.finance-type-dot {
    border-radius: 50%;
    display: inline-block;
    height: 8px;
    width: 8px;
}

.finance-flow-legend .is-entry,
.finance-type-dot.is-entrada { background: #20ad72; }
.finance-flow-legend .is-exit,
.finance-type-dot.is-saida { background: #e14b5e; }

.finance-flow-list,
.finance-category-list {
    max-height: 380px;
    overflow: auto;
    padding: 0.5rem 1rem 0.75rem;
}

.finance-flow-row {
    align-items: center;
    border-bottom: 1px solid #edf1f6;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: 52px 1fr;
    padding: 0.62rem 0;
}

.finance-flow-row:last-child,
.finance-category-row:last-child { border-bottom: 0; }

.finance-flow-date {
    color: #526077;
    font-size: 0.75rem;
    font-weight: 700;
}

.finance-flow-bars {
    display: grid;
    gap: 0.28rem;
}

.finance-flow-line {
    align-items: center;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: minmax(70px, 1fr) 105px;
}

.finance-flow-line strong {
    font-size: 0.72rem;
    text-align: right;
}

.finance-flow-track,
.finance-category-track {
    background: #edf1f6;
    border-radius: 999px;
    display: block;
    height: 7px;
    overflow: hidden;
}

.finance-flow-track i,
.finance-category-track span {
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 0;
}

.finance-flow-track .is-entry,
.finance-category-track .is-entrada { background: linear-gradient(90deg, #15945f, #48c793); }
.finance-flow-track .is-exit,
.finance-category-track .is-saida { background: linear-gradient(90deg, #d83d51, #f27783); }

.finance-category-row {
    border-bottom: 1px solid #edf1f6;
    padding: 0.68rem 0;
}

.finance-category-title {
    align-items: center;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: auto 1fr auto;
    margin-bottom: 0.42rem;
}

.finance-category-title strong,
.finance-category-title small {
    display: block;
}

.finance-category-title strong,
.finance-category-title b {
    font-size: 0.78rem;
}

.finance-category-title small,
.finance-category-meta {
    color: var(--finance-muted);
    font-size: 0.66rem;
}

.finance-category-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
}

.finance-empty {
    align-items: center;
    color: var(--finance-muted);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    justify-content: center;
    min-height: 160px;
    text-align: center;
}

.finance-empty i { color: #93a7c4; font-size: 1.45rem; }
.finance-empty strong { color: #44536b; font-size: 0.85rem; }
.finance-empty span { font-size: 0.75rem; }

.finance-movements-card .table th {
    background: #f7f9fc;
    color: #607089;
    font-size: 0.68rem;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.finance-movements-card .table td {
    border-color: #edf1f6;
    font-size: 0.78rem;
}

.finance-movements-card .table td strong,
.finance-movements-card .table td small {
    display: block;
}

.finance-movements-card .table td small {
    color: var(--finance-muted);
}

.finance-movement-icon {
    align-items: center;
    border-radius: 9px;
    display: inline-flex;
    flex: 0 0 32px;
    height: 32px;
    justify-content: center;
}

.finance-movement-icon.is-entrada { background: #e5f8ef; color: #138a57; }
.finance-movement-icon.is-saida { background: #ffeaed; color: #d94455; }

/* Tema escuro: balanco financeiro */
body.theme-escuro .finance-balance-page {
    --finance-navy: #edf3fa;
    --finance-blue: #74a5ff;
    --finance-border: #2d3948;
    --finance-muted: #98a8bb;
    color: #e3eaf3;
}

body.theme-escuro .finance-balance-filter,
body.theme-escuro .finance-balance-card,
body.theme-escuro .finance-balance-kpi {
    background: #171e28;
    border-color: var(--finance-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
    color: #e3eaf3;
}

body.theme-escuro .finance-balance-hero .btn-light {
    background: rgba(8, 12, 18, 0.48);
    border-color: rgba(255, 255, 255, 0.28);
    color: #f4f7fb;
}

body.theme-escuro .finance-balance-hero .btn-light:hover,
body.theme-escuro .finance-balance-hero .btn-light:focus {
    background: rgba(8, 12, 18, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

body.theme-escuro .finance-balance-icon {
    background: rgba(79, 140, 255, 0.15);
    color: #74a5ff;
}

body.theme-escuro .finance-balance-filter .form-label,
body.theme-escuro .finance-flow-date {
    color: #b2bfd0;
}

body.theme-escuro .finance-balance-kpi strong,
body.theme-escuro .finance-balance-card > header h4,
body.theme-escuro .finance-category-title strong,
body.theme-escuro .finance-category-title b,
body.theme-escuro .finance-empty strong {
    color: #edf3fa;
}

body.theme-escuro .finance-balance-kpi.is-entry .finance-balance-kpi-icon,
body.theme-escuro .finance-movement-icon.is-entrada { background: rgba(16, 185, 129, 0.15); color: #46d6a2; }
body.theme-escuro .finance-balance-kpi.is-exit .finance-balance-kpi-icon,
body.theme-escuro .finance-movement-icon.is-saida { background: rgba(239, 71, 111, 0.15); color: #ff718f; }
body.theme-escuro .finance-balance-kpi.is-balance .finance-balance-kpi-icon { background: rgba(79, 140, 255, 0.15); color: #74a5ff; }
body.theme-escuro .finance-balance-kpi.is-receivable .finance-balance-kpi-icon { background: rgba(245, 158, 11, 0.14); color: #f4b942; }
body.theme-escuro .finance-balance-kpi.is-payable .finance-balance-kpi-icon { background: rgba(249, 115, 22, 0.14); color: #fb9857; }
body.theme-escuro .finance-balance-kpi.is-projected .finance-balance-kpi-icon { background: rgba(139, 92, 246, 0.16); color: #ad8bff; }

body.theme-escuro .finance-balance-card > header,
body.theme-escuro .finance-flow-row,
body.theme-escuro .finance-category-row {
    border-color: #293647;
}

body.theme-escuro .finance-flow-track,
body.theme-escuro .finance-category-track {
    background: #263242;
}

body.theme-escuro .finance-empty i { color: #7890ad; }

body.theme-escuro .finance-movements-card .table th {
    background: #202b38;
    border-color: #334153;
    color: #a8b6c8;
}

body.theme-escuro .finance-movements-card .table td {
    background: #171e28;
    border-color: #293647;
    color: #dce5f0;
}

body.theme-escuro .finance-movements-card .table-hover tbody tr:hover td {
    background: #202b38;
    color: #f2f6fb;
}

@media (max-width: 1199.98px) {
    .finance-balance-filter { grid-template-columns: 1fr; }
    .finance-balance-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .finance-balance-hero { align-items: flex-start; flex-direction: column; gap: 0.9rem; }
    .finance-balance-filter-fields { grid-template-columns: 1fr; }
    .finance-balance-filter-actions .btn:first-child { flex: 1; }
    .finance-balance-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .finance-health-card,
    .finance-balance-grid { grid-template-columns: 1fr; }
    .finance-health-card { gap: 1rem; }
    .finance-balance-context { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
}

@media (max-width: 479.98px) {
    .finance-balance-kpis { grid-template-columns: 1fr; }
    .finance-flow-line { grid-template-columns: minmax(60px, 1fr) 92px; }
}

.dashboard-page {
    --dash-border: #e7ebf2;
    --dash-muted: #6d788a;
    --dash-navy: #0f1f42;
    --dash-shadow: 0 18px 45px rgba(15, 31, 66, 0.08);
    padding-bottom: 2rem;
}

.dashboard-page .card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--dash-border);
    border-radius: 16px;
    box-shadow: var(--dash-shadow);
    overflow: hidden;
}

.dashboard-hero {
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(120deg, #0b1733 0%, #152f66 57%, #1768a8 100%);
    background-size: 28px 28px, 28px 28px, auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 16px 38px rgba(10, 34, 76, 0.18);
    color: #fff;
    overflow: hidden;
    padding: clamp(0.9rem, 1.6vw, 1.25rem);
    position: relative;
}

.dashboard-hero::after {
    border: 1px solid rgba(116, 220, 255, 0.22);
    border-radius: 50%;
    content: '';
    height: 190px;
    position: absolute;
    right: 12%;
    top: -140px;
    width: 190px;
}

.dashboard-hero-glow {
    background: #21c7f3;
    border-radius: 50%;
    filter: blur(58px);
    height: 130px;
    opacity: 0.22;
    position: absolute;
    right: -35px;
    top: -50px;
    width: 190px;
}

.dashboard-hero-content {
    align-items: center;
    display: flex;
    gap: 1.2rem;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.dashboard-hero h1 {
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin: 0.34rem 0 0.12rem;
}

.dashboard-hero p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.86rem;
    margin: 0;
}

.dashboard-live-badge {
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #ddecff;
    display: inline-flex;
    font-size: 0.64rem;
    font-weight: 700;
    gap: 0.4rem;
    letter-spacing: 0.05em;
    padding: 0.28rem 0.58rem;
    text-transform: uppercase;
}

.dashboard-live-badge span {
    animation: dashboard-pulse 2s infinite;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.12);
    height: 6px;
    width: 6px;
}

.dashboard-hero-date {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.7rem;
    margin-top: 0.5rem;
}

.dashboard-hero-date i {
    color: #67d9ff;
    margin-right: 0.35rem;
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.dashboard-btn-glass,
.dashboard-btn-light {
    align-items: center;
    border-radius: 9px;
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    gap: 0.42rem;
    padding: 0.55rem 0.78rem;
}

.dashboard-btn-glass {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.dashboard-btn-glass:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.dashboard-btn-light {
    background: #fff;
    border: 1px solid #fff;
    color: #123263;
    box-shadow: 0 10px 28px rgba(5, 18, 45, 0.2);
}

.dashboard-btn-light:hover {
    background: #eaf7ff;
    border-color: #eaf7ff;
    color: #0e2a55;
    transform: translateY(-1px);
}

.dashboard-kpi {
    --kpi-accent: #2d6cdf;
    --kpi-soft: #edf4ff;
    min-height: 166px;
    padding: 1.15rem 1.2rem;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.dashboard-kpi::before {
    background: linear-gradient(90deg, var(--kpi-accent), transparent);
    content: '';
    height: 3px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.dashboard-kpi::after {
    background: var(--kpi-soft);
    border-radius: 50%;
    content: '';
    height: 120px;
    opacity: 0.65;
    position: absolute;
    right: -50px;
    top: -55px;
    width: 120px;
}

.dashboard-kpi:hover {
    box-shadow: 0 22px 50px rgba(15, 31, 66, 0.13);
    transform: translateY(-3px);
}

.dashboard-kpi-blue { --kpi-accent: #2563eb; --kpi-soft: #dbeafe; }
.dashboard-kpi-green { --kpi-accent: #10b981; --kpi-soft: #d1fae5; }
.dashboard-kpi-cyan { --kpi-accent: #06b6d4; --kpi-soft: #cffafe; }
.dashboard-kpi-violet { --kpi-accent: #7c3aed; --kpi-soft: #ede9fe; }

.dashboard-kpi-top {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 1;
}

.dashboard-kpi-icon {
    align-items: center;
    background: var(--kpi-soft);
    border-radius: 11px;
    color: var(--kpi-accent);
    display: inline-flex;
    font-size: 1.2rem;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.dashboard-kpi-signal {
    color: var(--kpi-accent);
    font-size: 0.88rem;
    font-weight: 700;
}

.dashboard-kpi-label {
    color: var(--dash-muted);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.dashboard-kpi-value {
    color: #14213a;
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.15;
    margin: 0.28rem 0;
    position: relative;
    z-index: 1;
}

.dashboard-kpi-meta {
    color: #7b8494;
    font-size: 0.92rem;
}

.dashboard-kpi-meta strong {
    color: var(--kpi-accent);
}

.dashboard-panel {
    height: 100%;
}

.dashboard-panel-header {
    align-items: center;
    border-bottom: 1px solid #edf0f5;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 76px;
    padding: 1rem 1.2rem;
}

.dashboard-panel-body {
    padding: 1.15rem 1.2rem;
}

.dashboard-section-title {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.dashboard-section-title h5 {
    color: #19263d;
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
}

.dashboard-section-title p {
    color: #8791a1;
    font-size: 0.9rem;
    margin: 0.18rem 0 0;
}

.dashboard-section-icon {
    align-items: center;
    border-radius: 10px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1rem;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.dashboard-section-icon-blue { background: #e7f0ff; color: #2563eb; }
.dashboard-section-icon-violet { background: #f0eaff; color: #7c3aed; }
.dashboard-section-icon-cyan { background: #e2faff; color: #0891b2; }
.dashboard-section-icon-amber { background: #fff4d8; color: #d97706; }
.dashboard-section-icon-red { background: #ffeaeb; color: #dc3545; }
.dashboard-section-icon-green { background: #dcf8eb; color: #059669; }

.dashboard-time-chip,
.dashboard-ai-chip,
.dashboard-panel-chip {
    align-items: center;
    background: #f4f7fb;
    border: 1px solid #e7ebf2;
    border-radius: 9px;
    color: #697489;
    display: inline-flex;
    font-size: 0.9rem;
    gap: 0.45rem;
    padding: 0.45rem 0.65rem;
}

.dashboard-time-chip i { color: #2563eb; }
.dashboard-time-chip strong { color: #1d2d49; }
.dashboard-ai-chip { background: #f2edff; color: #6941c6; font-weight: 800; }
.dashboard-panel-chip { color: #2563eb; font-weight: 800; }

.dashboard-funnel-row {
    align-items: center;
    display: grid;
    gap: 0.9rem;
    grid-template-columns: minmax(185px, 1.1fr) minmax(140px, 2fr) minmax(110px, 0.75fr);
    padding: 0.63rem 0;
}

.dashboard-funnel-row + .dashboard-funnel-row {
    border-top: 1px solid #f0f2f6;
}

.dashboard-funnel-label {
    align-items: center;
    display: flex;
    gap: 0.55rem;
}

.dashboard-status-dot {
    border-radius: 50%;
    box-shadow: 0 0 0 4px #f0f3f7;
    height: 8px;
    width: 8px;
}

.dashboard-funnel-name {
    color: #35435a;
    font-size: 1rem;
    font-weight: 700;
}

.dashboard-count-pill {
    background: #f0f3f7;
    border-radius: 999px;
    color: #697489;
    font-size: 0.85rem;
    font-weight: 800;
    margin-left: auto;
    min-width: 24px;
    padding: 0.18rem 0.42rem;
    text-align: center;
}

.dashboard-funnel-bar {
    background: #edf1f6;
    border-radius: 999px;
    height: 9px;
    overflow: hidden;
}

.dashboard-funnel-fill {
    border-radius: inherit;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.18);
    height: 100%;
    min-width: 5px;
    overflow: hidden;
    position: relative;
}

.dashboard-funnel-fill span {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
}

.dashboard-funnel-value {
    color: #26344c;
    font-size: 0.98rem;
    font-weight: 800;
    text-align: right;
}

.dashboard-ai-panel {
    background: linear-gradient(160deg, #fff 0%, #faf8ff 100%) !important;
}

.dashboard-insights-list {
    display: grid;
    gap: 0.62rem;
}

.dashboard-insight {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e8ebf2;
    border-radius: 11px;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: 34px 1fr;
    padding: 0.72rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.dashboard-insight:hover {
    border-color: #cdd7e7;
    transform: translateX(2px);
}

.dashboard-insight-icon {
    align-items: center;
    background: #eef3ff;
    border-radius: 9px;
    color: #2563eb;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.dashboard-insight-warning .dashboard-insight-icon { background: #fff5db; color: #d97706; }
.dashboard-insight-danger .dashboard-insight-icon { background: #ffe8ea; color: #dc3545; }
.dashboard-insight-success .dashboard-insight-icon { background: #ddf8eb; color: #059669; }
.dashboard-insight-info .dashboard-insight-icon { background: #ddf8ff; color: #0891b2; }

.dashboard-insight-type {
    color: #8a93a2;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-insight-title {
    color: #24324a;
    font-size: 1rem;
    font-weight: 800;
    margin: 0.08rem 0;
}

.dashboard-insight-text {
    color: #667286;
    font-size: 0.9rem;
    line-height: 1.45;
}

.dashboard-month-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-month-stat {
    --month-color: #2563eb;
    background: #f8fafc;
    border: 1px solid #edf0f4;
    border-radius: 11px;
    display: flex;
    flex-direction: column;
    min-height: 82px;
    padding: 0.75rem;
}

.dashboard-month-stat span {
    color: #798497;
    font-size: 0.9rem;
}

.dashboard-month-stat span i { color: var(--month-color); margin-right: 0.25rem; }
.dashboard-month-stat strong { color: #1c2b43; font-size: 1.6rem; line-height: 1; margin-top: auto; }
.dashboard-month-stat-blue { --month-color: #2563eb; }
.dashboard-month-stat-green { --month-color: #059669; }
.dashboard-month-stat-cyan { --month-color: #0891b2; }
.dashboard-month-stat-red { --month-color: #dc3545; }

.dashboard-summary-lines {
    border-top: 1px solid #edf0f4;
    margin-top: 1rem;
    padding-top: 0.75rem;
}

.dashboard-summary-lines > div {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.35rem 0;
}

.dashboard-summary-lines span { color: #7a8596; font-size: 0.92rem; }
.dashboard-summary-lines strong { color: #29374f; font-size: 1rem; }

.dashboard-opportunity-panel {
    background: linear-gradient(155deg, #fff 0%, #fffaf0 100%) !important;
}

.dashboard-opportunity {
    background: linear-gradient(135deg, #101d3a 0%, #183d71 100%);
    border-radius: 13px;
    box-shadow: 0 14px 30px rgba(16, 29, 58, 0.16);
    color: #fff;
    overflow: hidden;
    padding: 1rem;
    position: relative;
}

.dashboard-opportunity::after {
    border: 24px solid rgba(63, 198, 255, 0.09);
    border-radius: 50%;
    content: '';
    height: 120px;
    position: absolute;
    right: -45px;
    top: -55px;
    width: 120px;
}

.dashboard-opportunity-top {
    color: rgba(255, 255, 255, 0.62);
    display: flex;
    font-size: 0.88rem;
    justify-content: space-between;
}

.dashboard-opportunity a { color: #77ddff; display: inline-block; font-size: 1.08rem; font-weight: 800; margin-top: 0.45rem; }
.dashboard-opportunity-client { color: rgba(255, 255, 255, 0.78); font-size: 0.94rem; }
.dashboard-opportunity-value { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 300; letter-spacing: -0.03em; margin: 0.5rem 0 0.25rem; }
.dashboard-opportunity-date { color: rgba(255, 255, 255, 0.62); font-size: 0.84rem; }
.dashboard-summary-lines-compact { margin-top: 0.8rem; }
.dashboard-summary-lines-compact span i { color: #d99a22; margin-right: 0.25rem; }

.dashboard-loss-head {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.dashboard-loss-value { color: #dc3545; font-size: clamp(1.4rem, 2vw, 1.8rem); font-weight: 800; letter-spacing: -0.03em; }
.dashboard-loss-head > div > span { color: #838d9c; font-size: 0.92rem; }

.dashboard-loss-ring {
    align-items: center;
    background: conic-gradient(#ef476f var(--loss), #f1f3f7 0);
    border-radius: 50%;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    height: 76px;
    justify-content: center;
    position: relative;
    width: 76px;
}

.dashboard-loss-ring::before {
    background: #fff;
    border-radius: 50%;
    content: '';
    inset: 7px;
    position: absolute;
}

.dashboard-loss-ring strong,
.dashboard-loss-ring span { position: relative; z-index: 1; }
.dashboard-loss-ring strong { color: #c92d4b; font-size: 0.88rem; }
.dashboard-loss-ring span { color: #9199a6; font-size: 0.65rem; text-transform: uppercase; }

.dashboard-loss-progress {
    border-top: 1px solid #edf0f4;
    margin-top: 1rem;
    padding-top: 0.8rem;
}

.dashboard-loss-progress .d-flex { color: #778294; font-size: 0.92rem; }
.dashboard-loss-progress .progress { background: #f1f3f7; border-radius: 999px; height: 7px; margin-top: 0.5rem; }
.dashboard-loss-progress p { color: #8a93a1; font-size: 0.86rem; margin: 0.65rem 0 0; }

.dashboard-table-panel,
.dashboard-recent-panel { min-height: 100%; }

.dashboard-table thead th {
    background: #f8fafc;
    border-bottom: 1px solid #e8ecf2;
    color: #7a8595;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    padding: 0.7rem 1rem;
    text-transform: uppercase;
}

.dashboard-table tbody td {
    border-color: #eff2f6;
    color: #48556a;
    font-size: 0.96rem;
    padding: 0.72rem 1rem;
}

.dashboard-table tbody tr:hover td { background: #fbfdff; }

.dashboard-seller {
    align-items: center;
    display: flex;
    gap: 0.6rem;
}

.dashboard-seller-avatar {
    align-items: center;
    background: linear-gradient(135deg, #e4efff, #dff8ff);
    border: 1px solid #d8e6f8;
    border-radius: 9px;
    color: #2563eb;
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 900;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.dashboard-conversion {
    align-items: center;
    display: flex;
    gap: 0.55rem;
    justify-content: flex-end;
}

.dashboard-conversion span { font-weight: 800; min-width: 42px; }
.dashboard-conversion > div { background: #edf1f5; border-radius: 99px; height: 5px; overflow: hidden; width: 48px; }
.dashboard-conversion i { background: linear-gradient(90deg, #2563eb, #22c7e8); border-radius: inherit; display: block; height: 100%; }

.dashboard-panel-link {
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-panel-link:hover { color: #174aa5; }
.dashboard-recent-list .list-group-item { border-color: #eef1f5; padding: 0.68rem 1rem; }
.dashboard-recent-list .list-group-item:hover { background: #f8fbff; }

.dashboard-recent-item {
    align-items: center;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: 34px minmax(0, 1fr) auto 12px;
}

.dashboard-recent-icon {
    align-items: center;
    background: #edf4ff;
    border-radius: 9px;
    color: #2563eb;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.dashboard-recent-main { display: flex; flex-direction: column; min-width: 0; }
.dashboard-recent-main strong { color: #27354c; font-size: 0.96rem; }
.dashboard-recent-main span { color: #8992a0; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-recent-side { align-items: flex-end; display: flex; flex-direction: column; gap: 0.18rem; }
.dashboard-recent-side .badge { font-size: 0.72rem; }
.dashboard-recent-side strong { color: #3e4b60; font-size: 0.9rem; }
.dashboard-recent-arrow { color: #bcc4cf; font-size: 0.65rem; }

@keyframes dashboard-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.12); }
    50% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0.03); }
}

@media (max-width: 991.98px) {
    .dashboard-hero-content { align-items: flex-start; flex-direction: column; }
    .dashboard-hero-actions { justify-content: flex-start; }
}

@media (max-width: 767.98px) {
    .dashboard-hero { border-radius: 15px; }
    .dashboard-hero-actions { width: 100%; }
    .dashboard-hero-actions .btn { flex: 1 1 auto; justify-content: center; }
    .dashboard-panel-header { align-items: flex-start; flex-direction: column; }
    .dashboard-time-chip { align-self: stretch; justify-content: center; }
    .dashboard-funnel-row { gap: 0.5rem; grid-template-columns: 1fr; }
    .dashboard-funnel-value { text-align: left; }
    .dashboard-count-pill { margin-left: 0; }
    .dashboard-recent-item { grid-template-columns: 32px minmax(0, 1fr) auto; }
    .dashboard-recent-arrow { display: none; }
}

@media (max-width: 420px) {
    .dashboard-month-grid { grid-template-columns: 1fr; }
    .dashboard-loss-head { align-items: flex-start; }
    .dashboard-recent-side .badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-live-badge span { animation: none; }
    .dashboard-kpi,
    .dashboard-insight,
    .dashboard-btn-light { transition: none; }
}

/* Tema escuro: painel comercial */
body.theme-escuro .dashboard-page {
    --dash-border: #2b394a;
    --dash-muted: #a4b1c2;
    --dash-navy: #eef4fb;
    --dash-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

body.theme-escuro .dashboard-page .card {
    background: #171e28;
    border-color: var(--dash-border);
    color: #e3eaf3;
}

body.theme-escuro .dashboard-kpi-blue { --kpi-soft: rgba(37, 99, 235, 0.18); }
body.theme-escuro .dashboard-kpi-green { --kpi-soft: rgba(16, 185, 129, 0.16); }
body.theme-escuro .dashboard-kpi-cyan { --kpi-soft: rgba(6, 182, 212, 0.16); }
body.theme-escuro .dashboard-kpi-violet { --kpi-soft: rgba(124, 58, 237, 0.18); }

body.theme-escuro .dashboard-kpi:hover {
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

body.theme-escuro .dashboard-kpi-label,
body.theme-escuro .dashboard-kpi-meta,
body.theme-escuro .dashboard-section-title p,
body.theme-escuro .dashboard-insight-text,
body.theme-escuro .dashboard-month-stat span,
body.theme-escuro .dashboard-summary-lines span,
body.theme-escuro .dashboard-loss-head > div > span,
body.theme-escuro .dashboard-loss-progress .d-flex,
body.theme-escuro .dashboard-loss-progress p,
body.theme-escuro .dashboard-recent-main span {
    color: #9aa9bb;
}

body.theme-escuro .dashboard-kpi-value,
body.theme-escuro .dashboard-section-title h5,
body.theme-escuro .dashboard-funnel-name,
body.theme-escuro .dashboard-funnel-value,
body.theme-escuro .dashboard-insight-title,
body.theme-escuro .dashboard-month-stat strong,
body.theme-escuro .dashboard-summary-lines strong,
body.theme-escuro .dashboard-recent-main strong,
body.theme-escuro .dashboard-recent-side strong {
    color: #edf3fa;
}

body.theme-escuro .dashboard-panel-header,
body.theme-escuro .dashboard-funnel-row + .dashboard-funnel-row,
body.theme-escuro .dashboard-summary-lines,
body.theme-escuro .dashboard-loss-progress {
    border-color: #293647;
}

body.theme-escuro .dashboard-section-icon-blue,
body.theme-escuro .dashboard-recent-icon { background: rgba(79, 140, 255, 0.16); color: #74a5ff; }
body.theme-escuro .dashboard-section-icon-violet { background: rgba(139, 92, 246, 0.16); color: #ad8bff; }
body.theme-escuro .dashboard-section-icon-cyan { background: rgba(34, 211, 238, 0.14); color: #51d7ec; }
body.theme-escuro .dashboard-section-icon-amber { background: rgba(245, 158, 11, 0.14); color: #f4b942; }
body.theme-escuro .dashboard-section-icon-red { background: rgba(239, 71, 111, 0.14); color: #ff718f; }
body.theme-escuro .dashboard-section-icon-green { background: rgba(16, 185, 129, 0.14); color: #46d6a2; }

body.theme-escuro .dashboard-time-chip,
body.theme-escuro .dashboard-ai-chip,
body.theme-escuro .dashboard-panel-chip,
body.theme-escuro .dashboard-count-pill {
    background: #111823;
    border-color: #304056;
    color: #afbed0;
}

body.theme-escuro .dashboard-time-chip strong { color: #edf3fa; }
body.theme-escuro .dashboard-ai-chip { color: #b69aff; }
body.theme-escuro .dashboard-panel-chip,
body.theme-escuro .dashboard-time-chip i { color: #74a5ff; }
body.theme-escuro .dashboard-status-dot { box-shadow: 0 0 0 4px #263242; }
body.theme-escuro .dashboard-funnel-bar,
body.theme-escuro .dashboard-conversion > div,
body.theme-escuro .dashboard-loss-progress .progress { background: #263242; }

body.theme-escuro .dashboard-ai-panel,
body.theme-escuro .dashboard-opportunity-panel {
    background: linear-gradient(155deg, #171e28 0%, #151c26 100%) !important;
}

body.theme-escuro .dashboard-insight,
body.theme-escuro .dashboard-month-stat {
    background: #111823;
    border-color: #2a384a;
}

body.theme-escuro .dashboard-insight:hover { border-color: #435873; }
body.theme-escuro .dashboard-insight-icon { background: rgba(79, 140, 255, 0.16); color: #74a5ff; }
body.theme-escuro .dashboard-insight-warning .dashboard-insight-icon { background: rgba(245, 158, 11, 0.14); color: #f4b942; }
body.theme-escuro .dashboard-insight-danger .dashboard-insight-icon { background: rgba(239, 71, 111, 0.14); color: #ff718f; }
body.theme-escuro .dashboard-insight-success .dashboard-insight-icon { background: rgba(16, 185, 129, 0.14); color: #46d6a2; }
body.theme-escuro .dashboard-insight-info .dashboard-insight-icon { background: rgba(34, 211, 238, 0.14); color: #51d7ec; }
body.theme-escuro .dashboard-insight-type { color: #91a1b5; }

body.theme-escuro .dashboard-loss-ring {
    background: conic-gradient(#ef476f var(--loss), #263242 0);
}

body.theme-escuro .dashboard-loss-ring::before { background: #171e28; }
body.theme-escuro .dashboard-loss-ring strong { color: #ff718f; }
body.theme-escuro .dashboard-loss-ring span { color: #9aa9bb; }

body.theme-escuro .dashboard-table thead th {
    background: #202b38;
    border-color: #334153;
    color: #a8b6c8;
}

body.theme-escuro .dashboard-table tbody td {
    border-color: #293647;
    color: #cbd6e3;
}

body.theme-escuro .dashboard-table tbody tr:hover td,
body.theme-escuro .dashboard-recent-list .list-group-item:hover { background: #1d2938; }
body.theme-escuro .dashboard-seller-avatar { background: rgba(79, 140, 255, 0.14); border-color: #30476a; color: #74a5ff; }
body.theme-escuro .dashboard-recent-list .list-group-item { border-color: #293647; }
body.theme-escuro .dashboard-panel-link { color: #74a5ff; }
body.theme-escuro .dashboard-panel-link:hover { color: #a6c5ff; }

/* Tema escuro: listagem de orcamentos */
body.theme-escuro .orcamento-list-filter {
    background: #171e28;
    border-color: #2d3948;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

body.theme-escuro .orcamento-list-filter-heading div { color: #edf3fa; }
body.theme-escuro .orcamento-list-filter-heading span {
    background: rgba(79, 140, 255, 0.14);
    color: #a9c5ff;
}

body.theme-escuro .orcamento-list-filter .form-label { color: #aebbc9; }
body.theme-escuro .orcamento-status-legend span {
    background: #171e28;
    border-color: #354255;
    color: #c6d1de;
}

body.theme-escuro .orcamento-list-table tbody .orcamento-status-row > * {
    background-color: var(--status-bg, #171e28);
    color: #dce5f0;
}

body.theme-escuro .orcamento-list-table tbody .orcamento-status-row:hover > * {
    background-color: var(--status-hover, #202c3a);
}

body.theme-escuro .orcamento-list-table .orcamento-status-row .form-select {
    background-color: rgba(8, 12, 18, 0.58);
    border-color: #405068;
    color: #e7edf5;
}

body.theme-escuro .status-rascunho { --status-bg: #171e28; --status-hover: #202a37; --status-accent: #93a1b2; }
body.theme-escuro .status-enviado { --status-bg: #13242e; --status-hover: #18313e; --status-accent: #32c5e6; }
body.theme-escuro .status-aprovado { --status-bg: #142820; --status-hover: #1a3529; --status-accent: #40cd8d; }
body.theme-escuro .status-em_producao { --status-bg: #2a2416; --status-hover: #382f19; --status-accent: #f1b53d; }
body.theme-escuro .status-producao_finalizada { --status-bg: #142534; --status-hover: #193247; --status-accent: #54a7df; }
body.theme-escuro .status-finalizado { --status-bg: #201d32; --status-hover: #2b2643; --status-accent: #a58bee; }
body.theme-escuro .status-recusado { --status-bg: #2c1920; --status-hover: #3b1e28; --status-accent: #f26178; }
body.theme-escuro .status-cancelado { --status-bg: #1d2229; --status-hover: #282e37; --status-accent: #9ba5b2; }

.orcamento-sidebar .form-label.small {
    color: #4b5565;
    font-size: 0.76rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.orcamento-sidebar .form-control-sm,
.orcamento-sidebar .form-select-sm {
    min-height: 34px;
}

.orcamento-sidebar textarea[rows="6"] {
    max-height: 145px;
    min-height: 96px;
}

.orcamento-sidebar textarea[rows="2"] {
    max-height: 82px;
}

.orcamento-vendedor-card {
    border-left: 4px solid #172e5f;
}

.info-help {
    align-items: center;
    background: #eef2f7;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #172e5f;
    cursor: help;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    height: 20px;
    justify-content: center;
    line-height: 1;
    margin-left: 0.35rem;
    text-transform: lowercase;
    vertical-align: middle;
    width: 20px;
}

.info-help:hover,
.info-help:focus {
    background: #172e5f;
    border-color: #172e5f;
    color: #fff;
}

.orcamento-sidebar > .card:nth-of-type(1) {
    order: 1;
}

.orcamento-sidebar > .card:nth-of-type(2) {
    order: 2;
}

.orcamento-sidebar > .card:nth-of-type(3) {
    order: 3;
}

.orcamento-sidebar > .card:nth-of-type(4) {
    order: 4;
}

@media (min-width: 992px) {
    .orcamento-sidebar {
        align-self: flex-start;
        padding-right: 0.2rem;
        position: sticky;
        top: 1rem;
    }
}

.proposal-toolbar {
    background: #fff;
    border: 1px solid #e1e6ed;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(23, 32, 51, 0.08);
    padding: 1rem;
}

.proposal-preview {
    display: flex;
    justify-content: center;
    padding-bottom: 2rem;
    overflow-x: auto;
}

.proposal-document {
    background: #fff;
    box-shadow: 0 18px 44px rgba(23, 32, 51, 0.14);
    color: #172033;
    font-size: 11px;
    line-height: 1.38;
    max-width: 1122px;
    min-height: 794px;
    padding: 0;
    position: relative;
    overflow: hidden;
    width: min(1122px, calc(100vw - 2rem));
}

.proposal-preview.proposal-portrait .proposal-document {
    max-width: 794px;
    min-height: 1122px;
    width: min(794px, calc(100vw - 2rem));
}

.proposal-preview.proposal-portrait .proposal-status-watermark {
    font-size: clamp(38px, 10vw, 76px);
    left: 50%;
    letter-spacing: 0.05em;
    max-width: calc(100% - 48px);
    width: max-content;
}

.proposal-document > * {
    position: relative;
    z-index: 1;
}

.proposal-document > .proposal-status-watermark {
    color: #172e5f;
    font-size: clamp(68px, 9vw, 128px);
    font-weight: 800;
    left: 50%;
    letter-spacing: 0.12em;
    line-height: 1;
    opacity: 0.055;
    pointer-events: none;
    position: absolute;
    text-align: center;
    top: 72%;
    transform: translate(-50%, -50%);
    user-select: none;
    white-space: nowrap;
    width: 94%;
    z-index: 0;
}

.proposal-watermark-logo {
    left: 18%;
    opacity: 0.52;
    pointer-events: none;
    position: absolute;
    top: 31%;
    width: 64%;
    z-index: 2;
}

.proposal-head {
    align-items: center;
    background: #11182b;
    border-bottom: 3px solid #c9ced6;
    color: #fff;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    padding: 8px 12px;
}

.proposal-logo {
    max-height: 42px;
    max-width: 138px;
    object-fit: contain;
}

.proposal-company {
    color: rgba(255, 255, 255, 0.86);
    display: grid;
    font-size: 8.8px;
    gap: 1px;
    line-height: 1.22;
    text-align: right;
}

.proposal-company strong {
    color: #fff;
}

.proposal-meta {
    background: #eef2f7;
    border: 1px solid #d9e0e8;
    margin: 8px 28px;
    padding: 6px 8px;
}

.proposal-meta h1 {
    color: #172033;
    font-size: 15px;
    margin-bottom: 4px;
}

.proposal-meta span,
.proposal-total span {
    color: #667085;
    display: block;
    font-size: 7.7px;
    font-weight: 700;
    text-transform: uppercase;
}

.proposal-meta strong {
    color: #172033;
    font-size: 10px;
}

.proposal-document section:not(.proposal-meta) {
    margin: 8px 28px;
}

.proposal-document h2 {
    color: #172e5f;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 7px;
}

.proposal-box {
    border: 1px solid #d9e0e8;
    padding: 6px 8px;
}

.proposal-box p {
    margin-bottom: 2px;
}

.proposal-table {
    margin-top: 10px;
}

.proposal-table > :not(caption) > * > * {
    padding: 7px 8px;
}

.proposal-table thead th {
    background: #172e5f;
    color: #fff;
    font-size: 10px;
    text-align: center;
    text-transform: uppercase;
}

.proposal-items-table thead th.text-end {
    text-align: center !important;
}

.proposal-items-table {
    table-layout: fixed;
}

.proposal-items-table th:nth-child(1),
.proposal-items-table td:nth-child(1) {
    width: 48%;
}

.proposal-items-table th:nth-child(2),
.proposal-items-table td:nth-child(2) {
    width: 7%;
}

.proposal-items-table th:nth-child(3),
.proposal-items-table td:nth-child(3) {
    width: 9%;
}

.proposal-items-table th:nth-child(4),
.proposal-items-table td:nth-child(4) {
    width: 10%;
}

.proposal-items-table th:nth-child(5),
.proposal-items-table td:nth-child(5) {
    width: 4%;
}

.proposal-items-table th:nth-child(6),
.proposal-items-table td:nth-child(6),
.proposal-items-table th:nth-child(7),
.proposal-items-table td:nth-child(7) {
    width: 11%;
}

.proposal-items-table tbody .proposal-item-card-row > td {
    border: 0 !important;
    padding: 6px 0 !important;
    width: auto !important;
}

.proposal-item-card {
    border: 2px solid #172e5f;
}

.proposal-item-layout {
    border-collapse: collapse;
    margin: 0;
    table-layout: fixed;
    width: 100%;
}

.proposal-item-layout td {
    border: 0 !important;
    border-left: 1px solid #d9e0e8 !important;
    padding: 0.72rem 0.55rem;
    text-align: center;
    vertical-align: middle;
}

.proposal-item-layout td:first-child {
    border-left: 0 !important;
}

.proposal-item-grid {
    align-items: center;
    display: grid;
    grid-template-columns: 48% 7% 9% 10% 4% 11% 11%;
}

.proposal-item-grid > div {
    border-left: 1px solid #d9e0e8;
    min-width: 0;
    padding: 0.72rem 0.55rem;
    text-align: center;
}

.proposal-item-grid > div:first-child {
    border-left: 0;
}

.proposal-item-grid > .text-end {
    text-align: center !important;
}

.proposal-item-card-note {
    background: #f4f7fb;
    border-top: 1px solid #d9e0e8;
    color: #4b5565;
    font-size: 0.78rem;
    padding: 0.42rem 1rem 0.55rem;
}

.proposal-item-card-note strong {
    color: #172e5f;
}

.proposal-product-cell {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    min-width: 0;
    padding-left: 2.5rem;
    text-align: left;
}

.proposal-product-image {
    background: #fff;
    border: 1px solid #d9e0e8;
    flex: 0 0 76px;
    height: 48px;
    object-fit: contain;
    padding: 3px;
    width: 76px;
}

.proposal-payment-table .payment-total-row td {
    background: #11182b;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    padding: 0.75rem 0.9rem;
}

.proposal-payment-table .payment-total-row strong {
    color: #fff;
    font-size: 1.35rem;
}

.proposal-total {
    margin-left: auto !important;
    max-width: 315px;
}

.proposal-total > div {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 3px 8px;
}

.proposal-total .grand-total {
    background: #11182b;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    margin-top: 4px;
    padding: 8px;
}

.proposal-total .grand-total span,
.proposal-total .grand-total strong {
    color: #fff;
}

.proposal-footer {
    border-top: 1px solid #d9e0e8;
    color: #667085;
    font-size: 9px;
    margin: 18px 28px 0;
    padding: 8px 0 12px;
    text-align: center;
}

@media (max-width: 767.98px) {
    .proposal-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .proposal-company {
        text-align: left;
    }

    .proposal-meta h1 {
        font-size: 1.55rem;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 10mm;
    }

    .brand-strip,
    .app-navbar,
    .app-sidebar,
    .sidebar-overlay,
    .sidebar-mobile-header,
    .proposal-toolbar {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .container-fluid {
        padding: 0 !important;
    }

    .app-main {
        margin-left: 0 !important;
    }

    .proposal-preview {
        display: block;
        overflow: visible;
        padding: 0;
    }

    .proposal-document {
        box-shadow: none;
        max-width: none;
        width: 100%;
    }

    .proposal-head {
        padding: 7px 10px;
    }

    .proposal-logo {
        max-height: 38px;
        max-width: 128px;
    }

    .proposal-company {
        font-size: 8px;
        line-height: 1.16;
    }

    .proposal-meta {
        margin: 6px 24px;
        padding: 5px 7px;
    }

    .proposal-meta h1 {
        font-size: 14px;
        margin-bottom: 3px;
    }

    .proposal-meta span {
        font-size: 7px;
    }

    .proposal-meta strong {
        font-size: 9px;
    }

    .proposal-document section:not(.proposal-meta) {
        margin: 6px 24px;
    }

    .proposal-box {
        padding: 5px 7px;
    }

    .proposal-head,
    .proposal-table thead th,
    .proposal-total .grand-total,
    .proposal-status-watermark {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

.login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.login-shell {
    flex: 1;
    min-height: 0;
}

.login-card {
    background: #ffffff;
    max-width: 420px;
    overflow: hidden;
    width: 100%;
}

.login-brand {
    background: linear-gradient(135deg, #11182b 0%, #172e5f 100%);
    margin: -1.5rem -1.5rem 1.5rem;
    padding: 1.4rem 1.5rem;
    text-align: center;
}

.login-brand img {
    max-width: 260px;
    width: 100%;
}

.login-brand p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    margin: 0.65rem 0 0;
}

.login-developer-footer {
    align-items: center;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    padding: 0.75rem 0 1rem;
    text-align: center;
}

.login-developer-footer span {
    font-size: 0.8rem;
}

.login-developer-footer img {
    height: auto;
    width: 92px;
}

.honeypot-field {
    left: -9999px;
    position: absolute;
    top: -9999px;
}

.promissoria-page {
    background: #fff;
    box-shadow: 0 18px 44px rgba(23, 32, 51, 0.12);
    color: #111827;
    margin: 0 auto 2rem;
    max-width: 900px;
    padding: 36px;
}

.promissoria-head {
    align-items: center;
    border-bottom: 3px solid #172e5f;
    display: flex;
    gap: 22px;
    margin-bottom: 26px;
    padding-bottom: 18px;
}

.promissoria-head img {
    background: #11182b;
    max-height: 74px;
    max-width: 220px;
    object-fit: contain;
    padding: 10px 14px;
}

.promissoria-page h1 {
    color: #172e5f;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.promissoria-title {
    align-items: baseline;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.promissoria-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, 1fr);
    margin: 20px 0;
}

.promissoria-grid > div {
    border: 1px solid #cbd5e1;
    padding: 10px 12px;
}

.promissoria-grid span {
    color: #64748b;
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.promissoria-text {
    font-size: 17px;
    line-height: 1.65;
    margin: 22px 0;
    text-align: justify;
}

.promissoria-assinaturas {
    display: grid;
    gap: 48px;
    grid-template-columns: 1fr 1fr;
    margin-top: 70px;
}

.promissoria-assinaturas > div,
.promissoria-assinatura-unica > div {
    border-top: 1px solid #111827;
    padding-top: 8px;
    text-align: center;
}

.promissoria-assinatura-unica {
    margin: 80px auto 0;
    max-width: 520px;
    text-align: center;
}

.promissoria-assinatura-unica span {
    color: #64748b;
    font-size: 12px;
}

@media print {
    .no-print {
        display: none !important;
    }

    .promissoria-page {
        box-shadow: none;
        margin: 0;
        max-width: none;
        padding: 0;
    }

    .promissoria-head img {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

@media (max-width: 575.98px) {
    .brand-logo {
        height: 34px;
        max-width: 145px;
    }

    .brand-logo-wrap span {
        display: none;
    }
}

/* Checklist operacional compartilhado entre Orçamentos e Instalações */
.orcamento-list-table { min-width: 1260px; }
.os-status-cell { min-width: 154px; }
.os-quick-status {
    border-color: transparent;
    font-size: .75rem;
    font-weight: 700;
    min-width: 145px;
}
.os-quick-status.is-aguardando,
.os-quick-status.is-nao_verificada { background-color: #f1f4f8; color: #536174; }
.os-quick-status.is-em_producao { background-color: #e9f1ff; color: #1858ad; }
.os-quick-status.is-finalizada,
.os-quick-status.is-liberada { background-color: #e7f7ee; color: #147645; }
.os-quick-status.is-bloqueada { background-color: #fdebed; color: #ae2936; }

.os-row-actions {
    align-items: center;
    display: inline-flex;
    gap: .3rem;
    justify-content: flex-end;
    white-space: nowrap;
}
.os-icon-action {
    align-items: center;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    padding: 0;
    width: 32px;
}

.orcamento-vendedor-cell {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.os-shared-checklist { display: grid; gap: 1rem; }
.os-shared-status-grid {
    display: grid;
    gap: .9rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.os-shared-status-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.os-shared-status-grid .form-label { font-size: .78rem; font-weight: 700; }
.os-checklist-list {
    border: 1px solid #e4e9ef;
    border-radius: 10px;
    padding: 0 .9rem;
}
.os-checklist-list .install-check-row { font-size: .9rem; padding: .75rem 0; }
.os-checklist-list .install-check-row:last-child { border-bottom: 0; }
.os-checklist-details {
    background: #f8fafc;
    border: 1px solid #e4e9ef;
    border-radius: 10px;
    padding: .75rem .9rem;
}
.os-checklist-details summary { color: #334155; cursor: pointer; font-size: .82rem; font-weight: 700; }
.orcamento-operational-card { border-color: #dce4ee; overflow: hidden; }
.orcamento-operational-header {
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid #e4e9ef;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: .9rem 1rem;
}
.orcamento-operational-header > div { align-items: center; display: flex; gap: .8rem; }
.orcamento-operational-header p { color: #6b7789; font-size: .76rem; }
.orcamento-operational-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.orcamento-operational-icon {
    align-items: center;
    background: #e8f0ff;
    border-radius: 9px;
    color: var(--app-accent);
    display: flex;
    flex: 0 0 38px;
    font-size: 1.05rem;
    height: 38px;
    justify-content: center;
}

body.theme-escuro .os-checklist-list,
body.theme-escuro .os-checklist-details,
body.theme-escuro .orcamento-operational-card,
body.theme-escuro .orcamento-operational-header { border-color: #2a3544; }
body.theme-escuro .os-checklist-details,
body.theme-escuro .orcamento-operational-header { background: #141b24; }

@media (max-width: 767.98px) {
    .os-shared-status-grid { grid-template-columns: 1fr; }
    .orcamento-operational-header { align-items: flex-start; flex-direction: column; }
    .orcamento-operational-header > div { align-items: flex-start; }
    .orcamento-operational-actions { justify-content: flex-start; width: 100%; }
}
