body {
    font-family: 'Outfit', system-ui, sans-serif;
}

/* Marca FGP */
.fgp-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.fgp-brand--auth {
    justify-content: center;
}

.fgp-brand__logo {
    display: block;
    width: auto;
    object-fit: contain;
}

.fgp-brand--auth .fgp-brand__logo {
    max-width: 17.5rem;
    height: auto;
}

.fgp-brand--compact .fgp-brand__logo {
    height: 2.85rem;
    max-width: min(14rem, 44vw);
}

.fgp-brand__logo-surface {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border-radius: 0.5rem;
    padding: 0.125rem 0.375rem;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.15);
}

.fgp-brand--compact .fgp-brand__logo-surface {
    padding: 0.1rem 0.3rem;
    border-radius: 0.375rem;
}

.fgp-brand--hero {
    justify-content: center;
    width: 100%;
}

.fgp-brand--hero .fgp-brand__logo-surface {
    padding: 0.5rem 0.85rem;
    border-radius: 0.875rem;
    box-shadow: 0 4px 14px rgb(0 0 0 / 0.2);
}

.fgp-brand--hero .fgp-brand__logo {
    height: 8.5rem;
    max-width: 36rem;
}

@media (min-width: 768px) {
    .fgp-brand--hero .fgp-brand__logo {
        height: 11rem;
        max-width: 44rem;
    }

    .fgp-brand--hero .fgp-brand__logo-surface {
        padding: 0.65rem 1.1rem;
    }
}

.fgp-header-meta {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: rgb(148 163 184);
    line-height: 1.4;
}

.fgp-header-meta__version {
    color: rgb(251 191 36 / 0.75);
}

.revision-activities-table,
.revision-history-table {
    table-layout: fixed;
    width: 100%;
}

.fm-revision-block {
    border: 1px solid rgb(226 232 240);
    border-radius: 0.875rem;
    overflow: hidden;
    background: rgb(255 255 255);
}

.fm-revision-block__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.125rem;
    border-bottom: 1px solid rgb(226 232 240);
    background: rgb(223 230 216 / 0.55);
}

.fm-revision-block__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    color: rgb(30 41 59);
    line-height: 1.3;
}

.fm-revision-block__meta {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: rgb(71 85 105);
    line-height: 1.35;
}

.fm-revision-block__meta-sep {
    margin: 0 0.35rem;
    color: rgb(203 213 225);
}

.fm-revision-block__table-wrap {
    background: rgb(255 255 255);
}

.fm-revision-block__table-wrap thead {
    background: rgb(255 255 255);
    color: rgb(148 163 184);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fm-revision-block__table-wrap thead th {
    border-bottom: 1px solid rgb(236 239 234);
}

.fm-revision-block__table-wrap tbody tr {
    border-top: 1px solid rgb(241 245 249);
}

.fm-revision-modal__body,
.fm-revision-history-modal__body {
    background: rgb(255 255 255);
}

.fm-revision-modal__footer,
.fm-revision-history-modal__footer {
    background: rgb(252 252 251);
}

.revision-activity-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.45rem;
    border-radius: 0.375rem;
    border: 1px solid rgb(254 202 202);
    background: rgb(255 255 255);
    color: rgb(185 28 28);
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.revision-activity-remove-btn:hover {
    background: rgb(254 242 242);
}

.revision-activities-table th,
.revision-activities-table td,
.revision-history-table th,
.revision-history-table td {
    vertical-align: top;
}

.revision-resizable-field {
    display: block;
    width: 100%;
    min-height: 2.25rem;
    max-height: 10rem;
    overflow: auto;
    resize: vertical;
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.25rem;
    word-break: break-word;
    white-space: pre-wrap;
    box-sizing: border-box;
}

.revision-resizable-field--readonly {
    background: rgb(248 250 252);
    border: 1px solid rgb(226 232 240);
    border-radius: 0.5rem;
}

.revision-activity-attachments {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
}

.revision-activity-attachments__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.revision-activity-attachments__add-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 0.375rem;
    border: 1px solid rgb(203 213 225);
    background: rgb(255 255 255);
    color: rgb(51 65 85);
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.2;
}

.revision-activity-attachments__add-btn:hover {
    background: rgb(248 250 252);
    border-color: rgb(148 163 184);
}

.revision-activity-attachments__empty {
    font-size: 0.6875rem;
    color: rgb(148 163 184);
}

.revision-activity-attachment-item {
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgb(226 232 240);
    background: rgb(248 250 252);
}

.revision-activity-attachment-item__preview-wrap,
.revision-activity-attachment-item__preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.revision-activity-attachment-item__remove {
    position: absolute;
    top: 0.125rem;
    right: 0.125rem;
    width: 1rem;
    height: 1rem;
    border: none;
    border-radius: 999px;
    background: rgb(15 23 42 / 0.72);
    color: rgb(255 255 255);
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
}

.revision-activity-attachments__readonly {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.revision-activity-attachment-thumb {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 1px solid rgb(226 232 240);
    background: rgb(248 250 252);
    cursor: pointer;
}

.revision-activity-attachment-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.revision-resizable-input {
    width: 100%;
    min-height: 2.25rem;
    max-height: 10rem;
    resize: vertical;
    overflow: auto;
    box-sizing: border-box;
}

.welcome-profile-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

.welcome-profile-dot--consultor { background: rgb(14 165 233); }
.welcome-profile-dot--projetista { background: rgb(139 92 246); }
.welcome-profile-dot--gestor { background: rgb(217 119 6); }

.welcome-legend {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    border-width: 1px;
}

.welcome-legend--gestor-comercial {
    color: rgb(4 120 87);
    background: rgb(236 253 245);
    border-color: rgb(167 243 208);
}

.welcome-legend--projetista-conferente {
    color: rgb(109 40 217);
    background: rgb(245 243 255);
    border-color: rgb(221 214 254);
}

.welcome-legend--consultor {
    color: rgb(3 105 161);
    background: rgb(224 242 254);
    border-color: rgb(186 230 253);
}

.welcome-legend--projetista {
    color: rgb(67 56 202);
    background: rgb(238 242 255);
    border-color: rgb(199 210 254);
}

.welcome-legend--revisor {
    color: rgb(15 118 110);
    background: rgb(240 253 250);
    border-color: rgb(153 246 228);
}

.welcome-legend--projetista-ppcp {
    color: rgb(194 65 12);
    background: rgb(255 247 237);
    border-color: rgb(254 215 170);
}

.welcome-legend--gestor-fabrica {
    color: rgb(120 53 15);
    background: rgb(254 243 199);
    border-color: rgb(253 230 138);
}

.welcome-pipeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 56rem;
    margin: 0 auto;
}

.welcome-pipeline-segment {
    display: grid;
    grid-template-columns: minmax(9.5rem, 11rem) minmax(0, 1fr);
    gap: 0.75rem 1rem;
    align-items: stretch;
    padding: 0.875rem 1rem;
    border-radius: 0.875rem;
    border: 1px solid rgb(226 232 240);
    background: rgb(255 255 255);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.welcome-pipeline-segment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.5rem;
}

.welcome-pipeline-segment-accent {
    width: 0.25rem;
    align-self: stretch;
    border-radius: 9999px;
    flex-shrink: 0;
}

.welcome-pipeline-segment-title {
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.35;
    color: rgb(51 65 85);
}

.welcome-pipeline-track {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0;
    min-height: 2.5rem;
}

.welcome-pipeline-node {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.875rem;
    border-radius: 0.625rem;
    border: 1px solid;
    background: rgb(255 255 255);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    flex-shrink: 0;
}

.welcome-pipeline-node-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(30 41 59);
    white-space: nowrap;
    text-align: center;
}

.welcome-pipeline-connector {
    display: inline-flex;
    align-items: center;
    width: 1.75rem;
    height: 1rem;
    flex-shrink: 0;
    position: relative;
}

.welcome-pipeline-connector-line {
    display: block;
    width: 100%;
    height: 2px;
    background: rgb(203 213 225);
    border-radius: 9999px;
}

.welcome-pipeline-connector-head {
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid rgb(148 163 184);
}

.welcome-pipeline-bridge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.125rem 0 0.375rem;
    margin-left: 5.25rem;
}

.welcome-pipeline-bridge-line {
    width: 2px;
    height: 0.875rem;
    background: linear-gradient(to bottom, rgb(203 213 225), rgb(148 163 184));
    border-radius: 9999px;
}

.welcome-pipeline-bridge-arrow {
    font-size: 0.625rem;
    line-height: 1;
    color: rgb(148 163 184);
    margin-top: -0.125rem;
}

.welcome-pipeline-segment--gestor-comercial .welcome-pipeline-segment-accent { background: rgb(16 185 129); }
.welcome-pipeline-segment--gestor-comercial { background: linear-gradient(90deg, rgb(236 253 245 / 0.65) 0%, rgb(255 255 255) 38%); }
.welcome-pipeline-node--gestor-comercial { border-color: rgb(167 243 208); background: rgb(240 253 244); }

.welcome-pipeline-segment--projetista-conferente .welcome-pipeline-segment-accent { background: rgb(139 92 246); }
.welcome-pipeline-segment--projetista-conferente { background: linear-gradient(90deg, rgb(245 243 255 / 0.8) 0%, rgb(255 255 255) 38%); }
.welcome-pipeline-node--projetista-conferente { border-color: rgb(221 214 254); background: rgb(250 245 255); }

.welcome-pipeline-segment--consultor .welcome-pipeline-segment-accent { background: rgb(14 165 233); }
.welcome-pipeline-segment--consultor { background: linear-gradient(90deg, rgb(224 242 254 / 0.75) 0%, rgb(255 255 255) 38%); }
.welcome-pipeline-node--consultor { border-color: rgb(186 230 253); background: rgb(240 249 255); }

.welcome-pipeline-segment--projetista .welcome-pipeline-segment-accent { background: rgb(99 102 241); }
.welcome-pipeline-segment--projetista { background: linear-gradient(90deg, rgb(238 242 255 / 0.75) 0%, rgb(255 255 255) 38%); }
.welcome-pipeline-node--projetista { border-color: rgb(199 210 254); background: rgb(238 242 255); }

.welcome-pipeline-segment--revisor .welcome-pipeline-segment-accent { background: rgb(13 148 136); }
.welcome-pipeline-segment--revisor { background: linear-gradient(90deg, rgb(240 253 250 / 0.8) 0%, rgb(255 255 255) 38%); }
.welcome-pipeline-node--revisor { border-color: rgb(153 246 228); background: rgb(240 253 250); }

.welcome-pipeline-segment--projetista-ppcp .welcome-pipeline-segment-accent { background: rgb(249 115 22); }
.welcome-pipeline-segment--projetista-ppcp { background: linear-gradient(90deg, rgb(255 247 237 / 0.8) 0%, rgb(255 255 255) 38%); }
.welcome-pipeline-node--projetista-ppcp { border-color: rgb(254 215 170); background: rgb(255 247 237); }

.welcome-pipeline-segment--gestor-fabrica .welcome-pipeline-segment-accent { background: rgb(217 119 6); }
.welcome-pipeline-segment--gestor-fabrica { background: linear-gradient(90deg, rgb(254 243 199 / 0.55) 0%, rgb(255 255 255) 38%); }
.welcome-pipeline-node--gestor-fabrica { border-color: rgb(253 230 138); background: rgb(255 251 235); }

.welcome-flow-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 32rem;
    margin: 0 auto;
    padding: 0.5rem 0;
}

.welcome-flow-timeline-item {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.875rem;
    align-items: center;
    width: 100%;
}

.welcome-flow-timeline-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: 2px solid rgb(255 255 255);
    box-shadow: 0 0 0 1px rgb(226 232 240), 0 1px 2px rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
}

.welcome-flow-timeline-order {
    font-size: 0.6875rem;
    font-weight: 800;
    color: rgb(255 255 255);
}

.welcome-flow-timeline-marker--gestor-comercial { background: rgb(16 185 129); }
.welcome-flow-timeline-marker--projetista-conferente { background: rgb(139 92 246); }
.welcome-flow-timeline-marker--consultor { background: rgb(14 165 233); }
.welcome-flow-timeline-marker--projetista { background: rgb(99 102 241); }
.welcome-flow-timeline-marker--revisor { background: rgb(13 148 136); }
.welcome-flow-timeline-marker--projetista-ppcp { background: rgb(249 115 22); }
.welcome-flow-timeline-marker--gestor-fabrica { background: rgb(217 119 6); }

.welcome-flow-timeline-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.625rem 1rem;
}

.welcome-flow-timeline-owner {
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.welcome-flow-timeline-connector {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    width: 100%;
    padding: 0.125rem 0;
}

.welcome-flow-timeline-line {
    display: block;
    width: 2px;
    height: 1.25rem;
    background: linear-gradient(to bottom, rgb(203 213 225), rgb(148 163 184));
    border-radius: 9999px;
    justify-self: center;
}

@media (max-width: 640px) {
    .welcome-pipeline-segment {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .welcome-pipeline-segment-header {
        min-height: auto;
    }

    .welcome-pipeline-bridge {
        margin-left: 0;
    }

    .welcome-pipeline-track {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
    }
}

.gestao-performance-bar-chart {
    width: 100%;
}

.gestao-performance-bar-row {
    display: grid;
    grid-template-columns: minmax(11rem, 18rem) minmax(0, 1fr) minmax(5.5rem, 7.5rem);
    gap: 0.75rem 1rem;
    align-items: center;
}

.gestao-performance-bar-meta {
    min-width: 0;
}

.gestao-performance-bar-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(30 41 59);
    line-height: 1.3;
}

.gestao-performance-bar-label-text {
    min-width: 0;
}

.gestao-performance-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: help;
}

.gestao-performance-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 9999px;
    border: 1px solid rgb(203 213 225);
    background: rgb(248 250 252);
    color: rgb(100 116 139);
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
}

.gestao-performance-help-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.5rem);
    transform: translateX(-50%);
    width: max-content;
    max-width: 16rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    background: rgb(15 23 42);
    color: rgb(248 250 252);
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 20;
}

.gestao-performance-help-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgb(15 23 42) transparent transparent transparent;
}

.gestao-performance-help:hover .gestao-performance-help-tooltip,
.gestao-performance-help:focus .gestao-performance-help-tooltip,
.gestao-performance-help:focus-visible .gestao-performance-help-tooltip {
    opacity: 1;
    visibility: visible;
}

.gestao-performance-help:focus {
    outline: none;
}

.gestao-performance-help:focus-visible .gestao-performance-help-icon {
    box-shadow: 0 0 0 2px rgb(255 255 255), 0 0 0 4px rgb(99 102 241);
}

.gestao-performance-bar-sample {
    font-size: 0.625rem;
    color: rgb(148 163 184);
    margin-top: 0.125rem;
}

.gestao-performance-bar-track {
    height: 0.75rem;
    border-radius: 9999px;
    background: rgb(241 245 249);
    border: 1px solid rgb(226 232 240);
    overflow: hidden;
}

.gestao-performance-bar-fill {
    height: 100%;
    border-radius: 9999px;
    min-width: 0;
    transition: width 0.25s ease;
}

.gestao-performance-bar-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(51 65 85);
    text-align: right;
    white-space: nowrap;
}

.gestao-performance-count-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.gestao-performance-exit-chart-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.gestao-performance-exit-chart {
    display: grid;
    grid-template-columns: repeat(var(--gestao-performance-exit-month-count, 6), minmax(2.5rem, 1fr));
    gap: 0.5rem;
    align-items: end;
    min-height: 11rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.gestao-performance-exit-month {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.gestao-performance-exit-month-bars {
    width: 100%;
    height: 10rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.2rem;
    background: linear-gradient(to top, transparent 0, transparent calc(100% - 1px), rgb(241 245 249) calc(100% - 1px));
}

.gestao-performance-exit-bar {
    width: 28%;
    min-width: 0.35rem;
    border-radius: 0.2rem 0.2rem 0 0;
    min-height: 0;
}

.gestao-performance-exit-month-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: rgb(100 116 139);
    text-align: center;
}

.gestao-performance-exit-month-total {
    font-size: 0.5625rem;
    color: rgb(148 163 184);
    min-height: 0.85rem;
    text-align: center;
}

.gestao-performance-exit-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.6875rem;
    color: rgb(71 85 105);
}

.gestao-performance-exit-legend li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.gestao-performance-exit-legend__swatch {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

.gestao-performance-exit-table-wrap {
    overflow-x: auto;
}

.gestao-performance-exit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.6875rem;
}

.gestao-performance-exit-table th,
.gestao-performance-exit-table td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid rgb(241 245 249);
    text-align: right;
    white-space: nowrap;
}

.gestao-performance-exit-table th:first-child,
.gestao-performance-exit-table td:first-child,
.gestao-performance-exit-table__month {
    text-align: left;
}

.gestao-performance-exit-table thead th {
    font-size: 0.625rem;
    font-weight: 700;
    color: rgb(100 116 139);
    background: rgb(248 250 252);
}

.gestao-performance-exit-table__metric {
    font-weight: 600;
    color: rgb(51 65 85);
}

.gestao-performance-exit-table__swatch {
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 9999px;
    margin-right: 0.3rem;
    vertical-align: middle;
}

.gestao-performance-exit-table__value {
    font-weight: 600;
    color: rgb(51 65 85);
}

.gestao-performance-exit-project-lists {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gestao-performance-exit-month-group {
    border: 1px solid rgb(226 232 240);
    border-radius: 0.5rem;
    background: rgb(255 255 255);
    padding: 0.35rem 0.5rem;
}

.gestao-performance-exit-month-group__summary {
    cursor: pointer;
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgb(51 65 85);
    list-style: none;
}

.gestao-performance-exit-month-group__summary::-webkit-details-marker {
    display: none;
}

.gestao-performance-exit-month-group__summary::before {
    content: '▸ ';
    color: rgb(100 116 139);
}

.gestao-performance-exit-month-group[open] .gestao-performance-exit-month-group__summary::before {
    content: '▾ ';
}

.gestao-performance-exit-month-group__statuses {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.35rem;
    padding-left: 0.35rem;
}

.gestao-performance-exit-project-list .gestao-performance-project-list__summary {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.performance-projeto-week-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font: inherit;
    font-weight: 700;
    color: rgb(51 65 85);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
}

.performance-projeto-week-toggle:hover {
    color: rgb(67 56 202);
}

.performance-projeto-week-toggle__chevron {
    color: rgb(100 116 139);
    flex-shrink: 0;
}

.performance-projeto-week-detail__cell {
    background: rgb(248 250 252);
    padding: 0.5rem 0.75rem 0.75rem !important;
    border-bottom: 1px solid rgb(226 232 240);
}

@media (max-width: 767px) {
    #performance-projeto-content .gestao-performance-exit-chart,
    #gestao-performance-content .gestao-performance-exit-chart {
        min-height: 8.5rem;
        -webkit-overflow-scrolling: touch;
    }

    #performance-projeto-content .gestao-performance-exit-table thead {
        display: none;
    }

    #performance-projeto-content .gestao-performance-exit-table tr.performance-projeto-week-row {
        display: block;
        margin-bottom: 0.65rem;
        border: 1px solid rgb(226 232 240);
        border-radius: 0.5rem;
        overflow: hidden;
        background: rgb(255 255 255);
    }

    #performance-projeto-content .gestao-performance-exit-table tr.performance-projeto-week-row th,
    #performance-projeto-content .gestao-performance-exit-table tr.performance-projeto-week-row td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        white-space: normal;
        text-align: right;
        border-bottom: 1px solid rgb(241 245 249);
        padding: 0.55rem 0.65rem;
    }

    #performance-projeto-content .gestao-performance-exit-table tr.performance-projeto-week-row th {
        text-align: left;
        background: rgb(248 250 252);
        font-weight: 700;
    }

    #performance-projeto-content .gestao-performance-exit-table tr.performance-projeto-week-row td[data-metric-label]::before {
        content: attr(data-metric-label);
        font-weight: 600;
        color: rgb(100 116 139);
        text-align: left;
        flex: 1;
        min-width: 0;
    }

    #performance-projeto-content .gestao-performance-exit-table tr.performance-projeto-week-detail {
        display: block;
        margin: -0.35rem 0 0.65rem;
        border: 1px solid rgb(226 232 240);
        border-top: 0;
        border-radius: 0 0 0.5rem 0.5rem;
    }

    #performance-projeto-content .gestao-performance-exit-table tr.performance-projeto-week-detail td {
        display: block;
        white-space: normal;
    }

    #performance-projeto-content .gestao-performance-project-list__item,
    #gestao-performance-content .gestao-performance-project-list__item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        font-size: 0.75rem;
    }

    #performance-projeto-content .gestao-performance-project-list__items,
    #gestao-performance-content .gestao-performance-project-list__items {
        max-height: none;
    }

    #performance-projeto-content .gestao-performance-history-btn,
    #gestao-performance-content .gestao-performance-history-btn {
        align-self: flex-start;
        min-height: 2.25rem;
        padding: 0.35rem 0.65rem;
        font-size: 0.75rem;
    }

    #performance-projeto-content .performance-projeto-week-toggle {
        width: 100%;
        justify-content: flex-start;
        min-height: 2.25rem;
    }
}

.gestao-commercial-finance-table {
    width: 100%;
    border-collapse: collapse;
}

.gestao-commercial-finance-table th,
.gestao-commercial-finance-table td {
    border-bottom: 1px solid rgb(241 245 249);
    vertical-align: middle;
}

.gestao-commercial-finance-card {
    width: 100%;
}

.gestao-commercial-finance-metric strong {
    display: block;
    margin-top: 0.2rem;
}

.gestao-commercial-finance-consultant-group__summary {
    list-style: none;
}

.gestao-commercial-finance-consultant-group__summary::-webkit-details-marker {
    display: none;
}

.gestao-commercial-finance-consultant-group__summary::before {
    content: '▸ ';
    color: rgb(100 116 139);
}

.gestao-commercial-finance-consultant-group[open] .gestao-commercial-finance-consultant-group__summary::before {
    content: '▾ ';
}

.gestao-commercial-finance-sale-row--confirmed {
    background: rgb(240 253 244);
}

.gestao-commercial-finance-sale-row--locked {
    background: rgb(248 250 252);
}

.gestao-commercial-finance-sale-row--locked.gestao-commercial-finance-sale-row--confirmed {
    background: rgb(236 253 245);
}

.gestao-commercial-finance-meta-layout {
    width: 100%;
}

.gestao-commercial-finance-meta-calendar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.gestao-commercial-finance-meta-month-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    min-height: 6.75rem;
    padding: 0.75rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    background: rgb(255 255 255);
    text-align: left;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.gestao-commercial-finance-meta-month-card:hover {
    border-color: rgb(199 210 254);
    background: rgb(248 250 252);
}

.gestao-commercial-finance-meta-month-card.is-current {
    border-color: rgb(165 180 252);
}

.gestao-commercial-finance-meta-month-card.is-selected {
    border-color: rgb(99 102 241);
    background: rgb(238 242 255);
    box-shadow: 0 0 0 1px rgb(199 210 254);
}

.gestao-commercial-finance-meta-month-card__label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgb(100 116 139);
    text-transform: uppercase;
}

.gestao-commercial-finance-meta-month-card__metric {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    line-height: 1.25;
}

.gestao-commercial-finance-meta-month-card__metric-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: rgb(148 163 184);
    white-space: nowrap;
}

.gestao-commercial-finance-meta-month-card__value {
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgb(30 41 59);
}

.gestao-commercial-finance-meta-month-card__realized {
    font-size: 0.6875rem;
    font-weight: 700;
}

.gestao-commercial-finance-meta-month-card__realized.is-above {
    color: rgb(5 150 105);
}

.gestao-commercial-finance-meta-month-card__realized.is-below {
    color: rgb(220 38 38);
}

.gestao-commercial-finance-meta-month-card__realized.is-neutral,
.gestao-commercial-finance-meta-month-card__realized.is-empty {
    color: rgb(100 116 139);
}

.gestao-commercial-finance-summary-matrix th:first-child,
.gestao-commercial-finance-summary-matrix td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: inherit;
}

.gestao-commercial-finance-summary-matrix tbody td:first-child {
    background: #fff;
}

.gestao-commercial-finance-summary-matrix tbody tr.bg-slate-50 td:first-child {
    background: #f8fafc;
}

.gestao-commercial-finance-detail-matrix th:nth-child(-n+5),
.gestao-commercial-finance-detail-matrix td:nth-child(-n+5) {
    position: sticky;
    z-index: 1;
    background: inherit;
}

.gestao-commercial-finance-detail-matrix th:nth-child(1),
.gestao-commercial-finance-detail-matrix td:nth-child(1) {
    left: 0;
    min-width: 5.5rem;
}

.gestao-commercial-finance-detail-matrix th:nth-child(2),
.gestao-commercial-finance-detail-matrix td:nth-child(2) {
    left: 5.5rem;
    min-width: 4.5rem;
}

.gestao-commercial-finance-detail-matrix th:nth-child(3),
.gestao-commercial-finance-detail-matrix td:nth-child(3) {
    left: 10rem;
    min-width: 8rem;
}

.gestao-commercial-finance-detail-matrix th:nth-child(4),
.gestao-commercial-finance-detail-matrix td:nth-child(4) {
    left: 18rem;
    min-width: 7rem;
}

.gestao-commercial-finance-detail-matrix th:nth-child(5),
.gestao-commercial-finance-detail-matrix td:nth-child(5) {
    left: 25rem;
    min-width: 6rem;
}

.gestao-commercial-finance-detail-matrix tbody td:nth-child(-n+5) {
    background: #fff;
}

.gestao-commercial-finance-detail-matrix tfoot td:nth-child(-n+5) {
    background: #eef2ff;
}

.gestao-commercial-finance-detail-table-shell .interactive-table-toolbar {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgb(226 232 240);
    background: #fff;
}

.gestao-commercial-finance-detail-table-shell .interactive-table-filter-input {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
}

.commercial-finance-detail-month-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
    line-height: 1.2;
    min-width: 4.75rem;
}

.commercial-finance-detail-month-cell__client {
    color: rgb(30 41 59);
    white-space: nowrap;
}

.commercial-finance-detail-month-cell__commission {
    color: rgb(67 56 202);
    font-size: 0.625rem;
    font-weight: 700;
    white-space: nowrap;
}

.commercial-finance-detail-month-cell-td {
    vertical-align: top;
}

.gestao-commercial-finance-meta-month-card__meta {
    font-size: 0.625rem;
    color: rgb(148 163 184);
}

@media (max-width: 1024px) {
    .gestao-commercial-finance-meta-calendar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .gestao-commercial-finance-meta-calendar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.gestao-performance-project-list {
    margin-left: 0.15rem;
}

.gestao-performance-project-list__summary {
    cursor: pointer;
    font-size: 0.625rem;
    font-weight: 600;
    color: rgb(79 70 229);
    list-style: none;
}

.gestao-performance-project-list__summary::-webkit-details-marker {
    display: none;
}

.gestao-performance-project-list__summary::before {
    content: '▸ ';
}

.gestao-performance-project-list[open] .gestao-performance-project-list__summary::before {
    content: '▾ ';
}

.gestao-performance-project-list__items {
    margin-top: 0.25rem;
    max-height: 10rem;
    overflow-y: auto;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.5rem;
    background: rgb(248 250 252);
    padding: 0.35rem 0.5rem;
}

.gestao-performance-project-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.625rem;
    line-height: 1.45;
    color: rgb(71 85 105);
    padding: 0.25rem 0;
    border-bottom: 1px solid rgb(241 245 249);
}

.gestao-performance-project-list__text {
    min-width: 0;
    flex: 1;
}

.gestao-performance-project-list__total {
    margin-top: 0.35rem;
    padding: 0.35rem 0.5rem 0.15rem;
    border-top: 1px solid rgb(226 232 240);
    font-size: 0.625rem;
    font-weight: 700;
    color: rgb(51 65 85);
    text-align: right;
}

#performance-montagem-externa-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.performance-montagem-hint {
    margin: 0;
}

.performance-montagem-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.performance-montagem-table {
    --performance-montagem-cols: 1.25rem minmax(3.25rem, 0.55fr) minmax(4.5rem, 1.1fr) minmax(4.5rem, 1fr) minmax(4rem, 0.65fr) minmax(4rem, 0.65fr) minmax(3.25rem, 0.5fr) minmax(3.25rem, 0.5fr);
    min-width: 44rem;
    background: #fff;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.performance-montagem-table__head,
.performance-montagem-table__summary {
    display: grid;
    grid-template-columns: var(--performance-montagem-cols);
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.performance-montagem-table__head {
    padding: 0.65rem 0.85rem;
    background: rgb(248 250 252);
    border-bottom: 1px solid rgb(226 232 240);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(100 116 139);
}

.performance-montagem-table__head-cell--metric,
.performance-montagem-table__cell--metric {
    text-align: right;
    justify-self: end;
    font-variant-numeric: tabular-nums;
}

.performance-montagem-table__head-cell--total,
.performance-montagem-table__cell--total {
    text-align: right;
    justify-self: end;
    font-weight: 700;
    color: rgb(67 56 202);
}

.performance-montagem-table__cell--segment {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgb(71 85 105);
}

.performance-montagem-table__worker--empty {
    justify-content: center;
    color: rgb(148 163 184);
    font-style: italic;
    border-style: dashed;
}

.performance-montagem-table__order {
    border-bottom: 1px solid rgb(241 245 249);
}

.performance-montagem-table__order:last-child {
    border-bottom: none;
}

.performance-montagem-table__summary {
    list-style: none;
    cursor: pointer;
    padding: 0.6rem 0.85rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: rgb(30 41 59);
    transition: background-color 0.12s ease;
}

.performance-montagem-table__summary::-webkit-details-marker {
    display: none;
}

.performance-montagem-table__summary:hover {
    background: rgb(248 250 252 / 0.9);
}

.performance-montagem-table__order[open] .performance-montagem-table__summary {
    background: rgb(238 242 255 / 0.55);
    border-bottom: 1px solid rgb(226 232 240);
}

.performance-montagem-table__chevron {
    color: rgb(99 102 241);
    font-size: 0.7rem;
    line-height: 1;
    transition: transform 0.12s ease;
}

.performance-montagem-table__order[open] .performance-montagem-table__chevron {
    transform: rotate(90deg);
}

.performance-montagem-table__cell--order {
    font-weight: 600;
    color: rgb(30 41 59);
}

.performance-montagem-table__cell--client {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.performance-montagem-table__cell--date {
    font-variant-numeric: tabular-nums;
    color: rgb(71 85 105);
}

.performance-montagem-table__workers {
    padding: 0.5rem 0.85rem 0.75rem 2.35rem;
    background: rgb(248 250 252 / 0.65);
}

.performance-montagem-table__workers-title {
    margin: 0 0 0.35rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(148 163 184);
}

.performance-montagem-table__worker-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.performance-montagem-table__worker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.5rem;
    border-radius: 0.375rem;
    background: #fff;
    border: 1px solid rgb(226 232 240);
    font-size: 0.75rem;
}

.performance-montagem-table__worker-name {
    font-weight: 500;
    color: rgb(51 65 85);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.performance-montagem-table__worker-hours,
.performance-montagem-table__worker-days {
    flex-shrink: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: rgb(79 70 229);
}

.gestao-performance-project-list__item:last-child {
    border-bottom: none;
}

@media (max-width: 640px) {
    .gestao-performance-bar-row {
        grid-template-columns: 1fr;
        gap: 0.375rem;
    }

    .gestao-performance-bar-value {
        text-align: left;
    }
}

.pendencias-overview-card {
    cursor: pointer;
}

.pendencias-overview-card:focus-visible {
    outline: 2px solid rgb(124 58 237);
    outline-offset: 2px;
}

.pendencias-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.pendencias-sidebar-section {
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    overflow: hidden;
    background: rgb(248 250 252 / 0.7);
}

.pendencias-sidebar-section.is-active {
    border-color: rgb(196 181 253);
    background: rgb(245 243 255 / 0.55);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.pendencias-section-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    padding: 0.625rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(71 85 105);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.pendencias-sidebar-section.is-active .pendencias-section-btn {
    color: rgb(76 29 149);
}

.pendencias-section-btn:hover {
    background: rgb(255 255 255 / 0.65);
}

.pendencias-section-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    font-size: 0.625rem;
    line-height: 1;
    color: rgb(100 116 139);
    transition: transform 0.15s ease, color 0.15s ease;
}

.pendencias-sidebar-section.is-expanded .pendencias-section-chevron {
    transform: rotate(90deg);
    color: rgb(109 40 217);
}

.pendencias-section-label {
    flex: 1;
    min-width: 0;
}

.pendencias-section-items {
    display: none;
    border-top: 1px solid rgb(226 232 240);
    background: rgb(255 255 255);
    padding: 0.375rem;
}

.pendencias-sidebar-section.is-expanded .pendencias-section-items {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.pendencias-subitem-btn {
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.625rem 0.5rem 1.75rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(71 85 105);
    background: transparent;
    cursor: pointer;
}

.pendencias-subitem-btn:hover {
    background: rgb(248 250 252);
    border-color: rgb(241 245 249);
}

.pendencias-subitem-btn.is-selected {
    background: rgb(255 255 255);
    color: rgb(91 33 182);
    border-color: rgb(221 214 254);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.order-detail-tabs-shell {
    background: rgb(241 245 249);
    padding: 0.625rem 0.75rem 0;
    border-bottom: 1px solid rgb(226 232 240);
}

.order-detail-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.25rem;
}

.order-detail-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 0.5rem 0.5rem 0 0;
    border: 1px solid rgb(203 213 225);
    border-bottom: none;
    background: rgb(226 232 240 / 0.55);
    color: rgb(100 116 139);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.order-detail-tab:hover:not(.is-active) {
    background: rgb(248 250 252);
    color: rgb(51 65 85);
}

.order-detail-tab.is-active {
    background: rgb(255 255 255);
    border-color: rgb(226 232 240);
    box-shadow: 0 -1px 2px rgb(15 23 42 / 0.04);
    z-index: 1;
    margin-bottom: -1px;
    padding-bottom: calc(0.5rem + 1px);
}

.order-detail-tab-count {
    font-weight: 500;
    opacity: 0.75;
}

.order-detail-tab--emerald.is-active { color: rgb(6 95 70); border-top: 2px solid rgb(5 150 105); }
.order-detail-tab--amber.is-active { color: rgb(146 64 14); border-top: 2px solid rgb(217 119 6); }
.order-detail-tab--sky.is-active { color: rgb(3 105 161); border-top: 2px solid rgb(14 165 233); }
.order-detail-tab--teal.is-active { color: rgb(15 118 110); border-top: 2px solid rgb(20 184 166); }
.order-detail-tab--indigo.is-active { color: rgb(67 56 202); border-top: 2px solid rgb(99 102 241); }
.order-detail-tab--purple.is-active { color: rgb(107 33 168); border-top: 2px solid rgb(147 51 234); }
.order-detail-tab--violet.is-active { color: rgb(91 33 182); border-top: 2px solid rgb(124 58 237); }
.order-detail-tab--orange.is-active { color: rgb(154 52 18); border-top: 2px solid rgb(234 88 12); }
.order-detail-tab--rose.is-active { color: rgb(159 18 57); border-top: 2px solid rgb(244 63 94); }

.order-detail-tab-panel {
    background: rgb(255 255 255);
}

.order-tab-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.order-tab-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.order-tab-action-btn__icon {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
}

.order-tab-readonly-notice {
    margin: 0.75rem 1rem 0;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(254 215 170);
    background: rgb(255 251 235);
    font-size: 0.6875rem;
    line-height: 1.45;
    color: rgb(146 64 14);
}

.order-tab-content--readonly input:not([type="hidden"]),
.order-tab-content--readonly select,
.order-tab-content--readonly textarea,
.order-tab-content--readonly button {
    pointer-events: none;
}

.order-tab-content--readonly input:not([type="hidden"]),
.order-tab-content--readonly select,
.order-tab-content--readonly textarea {
    opacity: 0.72;
}

@media (max-width: 768px) {
    .order-detail-tabs-shell {
        padding: 0.5rem 0.5rem 0;
    }

    .order-detail-tab {
        padding: 0.4375rem 0.625rem;
        font-size: 0.625rem;
    }
}


.gestao-dashboard-clients-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.375rem;
    align-items: start;
}

.gestao-dashboard-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem 0.75rem;
    padding: 0.5rem 0.625rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.5rem;
    background: rgb(255 255 255);
}

.gestao-dashboard-legend__title {
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(100 116 139);
    flex-shrink: 0;
}

.gestao-dashboard-legend__items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.625rem;
    min-width: 0;
}

.gestao-dashboard-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}

.gestao-dashboard-legend__label {
    font-size: 0.5625rem;
    font-weight: 500;
    color: rgb(71 85 105);
    white-space: nowrap;
}

.gestao-dashboard-status-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgb(15 23 42 / 0.06);
}

.gestao-dashboard-client-section {
    border: 1px solid rgb(226 232 240);
    border-radius: 0.5rem;
    background: rgb(255 255 255);
    overflow: hidden;
    min-width: 0;
    height: 100%;
}

.gestao-dashboard-client-section--done {
    border-color: rgb(167 243 208);
    background: rgb(236 253 245 / 0.65);
}

.gestao-dashboard-client-section--done .gestao-dashboard-client-header {
    background: rgb(209 250 229 / 0.75);
    border-bottom-color: rgb(167 243 208);
}

.gestao-dashboard-client-section--done .gestao-dashboard-client-header__count {
    background: rgb(167 243 208 / 0.6);
    color: rgb(5 150 105);
}

.gestao-dashboard-client-section--done .gestao-dashboard-project-row {
    background: transparent;
    border-bottom-color: rgb(167 243 208 / 0.5);
}

.gestao-dashboard-client-section--done .gestao-dashboard-project-row--done {
    background: transparent;
}

.gestao-dashboard-client-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    padding: 0.375rem 0.5rem;
    background: rgb(248 250 252 / 0.9);
    border-bottom: 1px solid rgb(241 245 249);
}

.gestao-dashboard-client-header__title {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
    min-width: 0;
    flex: 1;
}

.gestao-dashboard-client-header__name {
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.2;
    color: rgb(15 23 42);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.gestao-dashboard-client-header__date {
    font-size: 0.5625rem;
    font-weight: 600;
    color: rgb(100 116 139);
    white-space: nowrap;
    flex-shrink: 0;
}

.gestao-dashboard-client-header__count {
    font-size: 0.5625rem;
    font-weight: 600;
    color: rgb(148 163 184);
    background: rgb(241 245 249);
    border-radius: 9999px;
    padding: 0.0625rem 0.375rem;
    flex-shrink: 0;
}

.gestao-dashboard-projects-list {
    display: flex;
    flex-direction: column;
}

.gestao-dashboard-project-row {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.375rem 0.5rem;
    border-bottom: 1px solid rgb(241 245 249);
    font-size: 0.5625rem;
    line-height: 1.2;
    min-width: 0;
    background: rgb(255 255 255);
}

.gestao-dashboard-project-row:last-child {
    border-bottom: none;
}

.gestao-dashboard-project-row--done {
    background: rgb(236 253 245 / 0.65);
}

.gestao-dashboard-project-row__title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

.gestao-dashboard-project-row__details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.125rem 0.5rem;
    padding-left: 0.875rem;
    min-width: 0;
}

.gestao-dashboard-project-row__name {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    color: rgb(30 41 59);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gestao-dashboard-project-row__field {
    flex-shrink: 0;
    color: rgb(51 65 85);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.gestao-dashboard-project-row__field-label {
    color: rgb(148 163 184);
    font-weight: 600;
    margin-right: 0.125rem;
}

body.gestao-dashboard-fullscreen-active {
    overflow: hidden;
}

.gestao-dashboard-panel--fullscreen {
    position: fixed;
    inset: 0;
    z-index: 80;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.gestao-dashboard-panel--fullscreen > .p-4.border-b h3 {
    font-size: 1rem;
}

.gestao-dashboard-panel--fullscreen > .p-4.border-b p {
    font-size: 0.8125rem;
}

.gestao-dashboard-panel--fullscreen #gestao-dashboard-content {
    padding: 1rem 1.25rem;
}

.gestao-dashboard-panel--fullscreen .gestao-dashboard-clients-grid {
    gap: 0.625rem;
}

.gestao-dashboard-panel--fullscreen .gestao-dashboard-legend {
    padding: 0.625rem 0.75rem;
    gap: 0.5rem 0.875rem;
}

.gestao-dashboard-panel--fullscreen .gestao-dashboard-legend__title,
.gestao-dashboard-panel--fullscreen .gestao-dashboard-legend__label {
    font-size: 0.6875rem;
}

.gestao-dashboard-panel--fullscreen .gestao-dashboard-status-dot {
    width: 0.625rem;
    height: 0.625rem;
}

.gestao-dashboard-panel--fullscreen .gestao-dashboard-client-header {
    padding: 0.5rem 0.625rem;
}

.gestao-dashboard-panel--fullscreen .gestao-dashboard-client-header__name {
    font-size: 0.75rem;
}

.gestao-dashboard-panel--fullscreen .gestao-dashboard-client-header__date,
.gestao-dashboard-panel--fullscreen .gestao-dashboard-client-header__count {
    font-size: 0.6875rem;
}

.gestao-dashboard-panel--fullscreen .gestao-dashboard-project-row {
    font-size: 0.6875rem;
    padding: 0.5rem 0.625rem;
    gap: 0.1875rem;
}

.gestao-dashboard-panel--fullscreen .gestao-dashboard-project-row__details {
    padding-left: 1rem;
    gap: 0.1875rem 0.625rem;
}

.gestao-dashboard-panel--fullscreen .gestao-dashboard-summary {
    font-size: 0.75rem;
}

body.gestao-kanban-fullscreen-active {
    overflow: hidden;
}

#gestao-view.hidden #gestao-kanban-panel,
#gestao-view.hidden .gestao-kanban-panel--fullscreen {
    display: none !important;
}

.gestao-kanban-column {
    max-height: var(--gestao-kanban-column-max-height, calc(100vh - 15rem));
}

#gestao-kanban-panel {
    --gestao-kanban-column-max-height: calc(100vh - 15rem);
}

.gestao-kanban-panel--fullscreen {
    position: fixed;
    inset: 0;
    z-index: 80;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.gestao-kanban-panel--fullscreen .gestao-kanban-panel__header h3 {
    font-size: 1rem;
}

.gestao-kanban-panel--fullscreen .gestao-kanban-panel__description {
    font-size: 0.8125rem;
}

.gestao-kanban-panel--fullscreen #gestao-kanban-board {
    padding: 1rem 1.25rem;
}

.gestao-kanban-panel--fullscreen {
    --gestao-kanban-column-max-height: calc(100vh - 5.5rem);
}

#gestao-cronograma-pedido-content {
    min-height: 0;
}

.gestao-cronograma-pedido__phase {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
}

.gestao-cronograma-pedido__phase-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.gestao-cronograma-pedido__phase-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgb(15 23 42);
}

.gestao-cronograma-pedido__rows {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    overflow-x: auto;
}

.gestao-cronograma-pedido__row--axis {
    margin-bottom: 0.125rem;
}

.gestao-cronograma-pedido__row-label--axis {
    display: flex;
    align-items: flex-end;
    padding-bottom: 0.25rem;
}

.gestao-cronograma-pedido__axis-caption {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(148 163 184);
}

.gestao-cronograma-pedido__track--axis {
    padding: 0;
}

.gestao-cronograma-pedido__day-axis {
    position: relative;
    height: 1.75rem;
    background: rgb(248 250 252);
    border: 1px solid rgb(226 232 240);
    border-radius: 0.375rem;
}

.gestao-cronograma-pedido__day-cell {
    position: absolute;
    top: 0;
    bottom: 0;
    box-sizing: border-box;
    border-right: 1px solid rgb(226 232 240);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.gestao-cronograma-pedido__day-cell.is-weekend {
    background: rgb(241 245 249);
}

.gestao-cronograma-pedido__day-cell.is-today {
    background: rgb(254 243 199);
    border-color: rgb(252 211 77);
    z-index: 1;
}

.gestao-cronograma-pedido__day-cell.is-today .gestao-cronograma-pedido__day-cell-label {
    color: rgb(180 83 9);
    font-weight: 700;
}

.gestao-cronograma-pedido__day-cell-label {
    font-size: 0.5625rem;
    font-weight: 600;
    color: rgb(100 116 139);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.gestao-cronograma-pedido__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgb(241 245 249);
}

.gestao-cronograma-pedido__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: rgb(71 85 105);
}

.gestao-cronograma-pedido__legend-swatch {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 0.125rem;
    border: 1px solid rgb(203 213 225);
}

.gestao-cronograma-pedido__legend-marker {
    width: 0;
    height: 0.875rem;
    border-left: 2px solid rgb(34 197 94);
}

.gestao-cronograma-pedido__legend-marker--today {
    border-left-color: rgb(245 158 11);
}

.gestao-cronograma-pedido__today-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: rgb(245 158 11);
    z-index: 1;
    pointer-events: none;
}

.gestao-cronograma-pedido__row {
    display: grid;
    grid-template-columns: minmax(10rem, 14rem) auto;
    gap: 0.75rem;
    align-items: center;
    width: max-content;
    min-width: 100%;
}

.gestao-cronograma-pedido__row--invalid {
    opacity: 0.85;
}

.gestao-cronograma-pedido__row-label {
    min-width: 0;
}

.gestao-cronograma-pedido__project-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(30 41 59);
    line-height: 1.3;
}

.gestao-cronograma-pedido__project-status {
    font-size: 0.625rem;
    color: rgb(79 70 229);
    font-weight: 600;
    margin-top: 0.125rem;
}

.gestao-cronograma-pedido__sem-previsao {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: rgb(148 163 184);
}

.gestao-cronograma-pedido__row-message {
    font-size: 0.6875rem;
    color: rgb(239 68 68);
    padding: 0.5rem 0.75rem;
    background: rgb(254 242 242);
    border: 1px solid rgb(254 226 226);
    border-radius: 0.5rem;
}

.gestao-cronograma-pedido__track {
    min-width: 0;
    padding: 0.375rem 0;
}

.gestao-cronograma-pedido__track-inner {
    position: relative;
    height: 2rem;
    background: rgb(248 250 252);
    border: 1px solid rgb(226 232 240);
    border-radius: 0.375rem;
    overflow: hidden;
}

.gestao-cronograma-pedido__track-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    color: rgb(148 163 184);
}

.gestao-cronograma-pedido__segment {
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    border-radius: 0.25rem;
    min-width: 2px;
    overflow: hidden;
}

.gestao-cronograma-pedido__segment-label {
    display: block;
    padding: 0 0.25rem;
    font-size: 0.5625rem;
    font-weight: 700;
    color: rgba(255 255 255 / 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5rem;
}

.gestao-cronograma-pedido__delivery-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: rgb(34 197 94);
    z-index: 2;
    pointer-events: none;
}

.gestao-cronograma-pedido__delivery-marker.is-ended {
    background: rgb(22 163 74);
}

.gestao-cronograma-pedido__delivery-marker-label {
    position: absolute;
    top: -1.125rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.5rem;
    font-weight: 700;
    color: rgb(22 163 74);
    white-space: nowrap;
}

@media (max-width: 720px) {
    .gestao-cronograma-pedido__row {
        grid-template-columns: minmax(0, 1fr);
    }
}

#gestao-relatorios-content {
    min-height: 0;
}

#gestao-performance-content {
    min-height: 0;
}

#gestao-relatorios-panel,
#gestao-performance-panel,
#gestao-comercial-financeiro-panel,
#gestao-relatorios-content > section,
#gestao-performance-content > section,
#gestao-commercial-finance-content > section {
    width: 100%;
    max-width: none;
}

#gestao-relatorios-content .gestao-relatorios-table th,
#gestao-relatorios-content .gestao-relatorios-table td {
    padding: 0.5rem 0.625rem;
}

#gestao-relatorios-content .gestao-relatorios-table thead {
    background: rgb(248 250 252);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(148 163 184);
}

@media (max-width: 960px) {
    .gestao-dashboard-clients-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .gestao-dashboard-clients-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.project-status-history-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgb(226 232 240);
}

.project-status-history-toolbar__label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(100 116 139);
}

.project-status-history-toolbar__buttons {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.125rem;
    border-radius: 0.5rem;
    background: rgb(241 245 249);
    border: 1px solid rgb(226 232 240);
}

.project-status-history-view-btn {
    font-size: 0.625rem;
    font-weight: 600;
    color: rgb(100 116 139);
    padding: 0.3125rem 0.625rem;
    border-radius: 0.375rem;
    transition: background-color 0.15s, color 0.15s;
}

.project-status-history-view-btn:hover {
    color: rgb(51 65 85);
}

.project-status-history-view-btn.is-active {
    background: rgb(255 255 255);
    color: rgb(67 56 202);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}

.project-status-history-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.25rem 0;
}

.project-status-history-calendar__scroll {
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.project-status-history-calendar__grid {
    display: grid;
    width: max-content;
    column-gap: 0;
    row-gap: 0.35rem;
    align-items: start;
}

.project-status-history-calendar__axis {
    align-self: center;
    padding-right: 0.45rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgb(51 65 85);
}

.project-status-history-calendar__day {
    border: 1px solid rgb(203 213 225);
    border-left: none;
    background: rgb(255 255 255);
    text-align: center;
    font-size: 0.625rem;
    font-weight: 700;
    color: rgb(51 65 85);
    padding: 0.2rem 0.05rem;
    line-height: 1.2;
}

.project-status-history-calendar__day:nth-child(2) {
    border-left: 1px solid rgb(203 213 225);
}

.project-status-history-calendar__span {
    position: relative;
    min-width: 0;
    height: 1.7rem;
    overflow: visible;
    padding: 0 1px;
}

.project-status-history-calendar__span--group {
    margin-top: 0.15rem;
}

.project-status-history-calendar__bracket {
    display: block;
    width: 100%;
    height: 0.45rem;
    box-sizing: border-box;
    border: 1.5px solid var(--status-color, rgb(51 65 85));
    border-bottom: none;
    border-radius: 0.25rem 0.25rem 0 0;
}

.project-status-history-calendar__caption {
    position: absolute;
    left: 50%;
    top: 0.5rem;
    z-index: 1;
    transform: translateX(-50%);
    white-space: nowrap;
    text-align: center;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.2;
    color: rgb(30 41 59);
    pointer-events: none;
}

.project-status-history-calendar__span--group .project-status-history-calendar__caption {
    font-weight: 600;
    color: rgb(51 65 85);
}

.project-status-history-timeline__legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.project-status-history-timeline__legend-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.5rem;
    background: rgb(255 255 255);
}

.project-status-history-timeline__legend-swatch {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 9999px;
    flex-shrink: 0;
    margin-top: 0.1875rem;
}

.project-status-history-timeline__legend-title {
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgb(30 41 59);
}

.project-status-history-timeline__legend-meta {
    font-size: 0.5625rem;
    color: rgb(100 116 139);
    margin-top: 0.125rem;
    line-height: 1.35;
}

#system-settings-layout.max-w-none .settings-content {
    width: 100%;
}

#settings-activity-log-panel:not(.hidden) {
    min-height: min(100%, calc(100vh - 11rem));
}

.order-projects-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.5fr)
        5rem
        minmax(6.25rem, 1fr)
        7.75rem;
    column-gap: 0.5rem;
    row-gap: 0.375rem;
    align-items: center;
    padding: 0 0.625rem;
}

.order-projects-grid--with-phases {
    grid-template-columns:
        minmax(0, 1.5fr)
        5rem
        4.5rem
        minmax(6.25rem, 1fr)
        7.75rem;
}

.order-projects-grid__header {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    padding: 0.25rem 0 0.375rem;
    border-bottom: 1px solid rgb(237 233 254);
}

.order-projects-grid__head {
    font-size: 0.5625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: rgb(148 163 184);
    min-width: 0;
}

.order-projects-grid__head--project {
    min-width: 0;
}

.order-projects-grid__head--actions {
    text-align: right;
    padding-right: 0.125rem;
}

.order-projects-grid__item {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    row-gap: 0.25rem;
    align-items: center;
}

.order-projects-grid__row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    align-items: center;
    padding: 0.375rem 0;
    border: 1px solid rgb(237 233 254);
    border-radius: 0.375rem;
    background: rgb(245 243 255 / 0.4);
}

.order-projects-grid__row--nested {
    margin-left: 0.75rem;
    border-left: 2px solid rgb(221 214 254);
    background: rgb(248 250 252 / 0.9);
}

.order-projects-grid__cell--project-nested {
    padding-left: 0.5rem;
}

.order-projects-grid__children:not(.is-collapsed) {
    display: contents;
}

.order-projects-grid__children.is-collapsed {
    display: none;
}

.order-projects-characteristics-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.order-project-characteristic-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: rgb(238 242 255);
    border: 1px solid rgb(199 210 254);
    color: rgb(67 56 202);
    font-size: 0.625rem;
    font-weight: 600;
}

.order-projects-characteristics-empty {
    margin: 0;
    font-size: 0.625rem;
    color: rgb(148 163 184);
    font-style: italic;
}

.project-view-characteristics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-view-modal__code {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 0.375rem;
    background: rgb(15 23 42);
    color: rgb(251 191 36);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.project-view-modal__status {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
}

.project-view-modal__body {
    background: rgb(248 250 252 / 0.65);
}

.project-view-section__title {
    margin: 0 0 0.75rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(100 116 139);
}

.project-view-section--boxed {
    padding: 1rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    background: rgb(255 255 255);
}

.project-view-section--boxed.project-view-section--amber {
    border-color: rgb(253 230 138);
    background: rgb(255 251 235 / 0.65);
}

.project-view-section--boxed.project-view-section--rose {
    border-color: rgb(254 205 211);
    background: rgb(255 241 242 / 0.65);
}

.project-view-section--boxed.project-view-section--sky {
    border-color: rgb(186 230 253);
    background: rgb(240 249 255 / 0.65);
}

.project-view-section--boxed.project-view-section--indigo {
    border-color: rgb(199 210 254);
    background: rgb(238 242 255 / 0.75);
}

.project-status-history-detailing-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 42rem;
    margin: 0.25rem auto 0.5rem;
}

.project-status-history-detailing-branch__connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.15rem 0;
}

.project-status-history-detailing-branch__connector-line {
    width: 0.125rem;
    height: 0.85rem;
    background: rgb(129 140 248);
}

.project-status-history-detailing-branch__row {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    flex-wrap: wrap;
}

.project-status-history-detailing-step {
    flex: 1 1 7.5rem;
    min-width: 6.5rem;
    max-width: 11rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(226 232 240);
    background: rgb(248 250 252);
    padding: 0.65rem 0.55rem;
    text-align: center;
}

.project-status-history-detailing-step.is-current {
    border-color: rgb(99 102 241);
    background: rgb(238 242 255);
    box-shadow: 0 0 0 1px rgb(199 210 254);
}

.project-status-history-detailing-step.is-done {
    border-color: rgb(167 243 208);
    background: rgb(236 253 245);
}

.project-status-history-detailing-step.is-pending {
    opacity: 0.55;
}

.project-status-history-detailing-step__title {
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgb(30 41 59);
    line-height: 1.25;
}

.project-status-history-detailing-step__meta {
    font-size: 0.5625rem;
    color: rgb(100 116 139);
    margin-top: 0.25rem;
    line-height: 1.35;
}

.project-status-history-detailing-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(129 140 248);
    font-size: 0.75rem;
    padding: 0 0.1rem;
    align-self: center;
}

.project-view-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
}

.project-view-fields--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-view-fields--stack {
    grid-template-columns: 1fr;
}

.project-view-field {
    margin: 0;
    padding: 0.75rem 0.875rem;
    border-radius: 0.625rem;
    border: 1px solid rgb(241 245 249);
    background: rgb(255 255 255);
}

.project-view-section--boxed .project-view-field {
    border-color: rgb(226 232 240 / 0.8);
    background: rgb(255 255 255 / 0.9);
}

.project-view-field--full {
    padding: 0;
    border: none;
    background: transparent;
}

.project-view-field dt,
.project-view-field__label {
    margin: 0 0 0.35rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgb(148 163 184);
}

.project-view-field dd {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(30 41 59);
    line-height: 1.35;
    word-break: break-word;
}

.project-view-path {
    margin: 0;
    padding: 0.75rem 0.875rem;
    border-radius: 0.625rem;
    border: 1px solid rgb(226 232 240);
    background: rgb(255 255 255);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: rgb(51 65 85);
    word-break: break-all;
}

.project-view-related-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-view-related-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(253 230 138);
    background: rgb(255 255 255);
}

.project-view-related-item__code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgb(30 41 59);
}

.project-view-related-item__name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgb(51 65 85);
}

.project-view-path--empty {
    color: rgb(148 163 184);
    font-style: italic;
    font-family: inherit;
    font-weight: 500;
}

@media (max-width: 767px) {
    .project-view-fields,
    .project-view-fields--three {
        grid-template-columns: 1fr;
    }
}

.project-view-characteristic-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgb(226 232 240);
    background: rgb(255 255 255);
    color: rgb(100 116 139);
    font-size: 0.75rem;
    font-weight: 600;
}

.project-view-characteristic-chip.is-selected {
    background: rgb(238 242 255);
    border-color: rgb(129 140 248);
    color: rgb(67 56 202);
    box-shadow: inset 0 0 0 1px rgb(199 210 254);
}

.project-view-characteristic-chip--none {
    font-style: italic;
}

.project-view-characteristic-chip--none.is-selected {
    background: rgb(241 245 249);
    border-color: rgb(148 163 184);
    color: rgb(71 85 105);
    box-shadow: inset 0 0 0 1px rgb(203 213 225);
}

.pendencias-sem-projetista-table th,
.pendencias-sem-projetista-table td {
    vertical-align: middle;
}

.interactive-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgb(241 245 249);
    background: rgb(248 250 252 / 0.5);
}

.interactive-table-count {
    font-size: 0.75rem;
    color: rgb(100 116 139);
}

.interactive-table-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.interactive-table-clear {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(91 33 182);
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.interactive-table-clear:hover {
    text-decoration: underline;
}

.interactive-table-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.interactive-table-sort-btn:hover {
    color: rgb(51 65 85);
}

.interactive-table-sort-icon {
    font-size: 0.7rem;
    line-height: 1;
    opacity: 0.35;
    font-weight: 700;
}

.interactive-table-sort-icon.is-active {
    opacity: 1;
}

.interactive-table-sort-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.interactive-table-sort-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0.9rem;
    height: 0.9rem;
    padding: 0 0.2rem;
    border-radius: 999px;
    background: rgb(237 233 254);
    color: rgb(91 33 182);
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    text-transform: none;
}

.interactive-table-filter-row th {
    padding: 0 0.75rem 0.7rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    vertical-align: top;
}

.interactive-table-filter-input {
    width: 100%;
    min-width: 4.5rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.5rem;
    background: #fff;
    color: rgb(51 65 85);
    font-size: 0.6875rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

.interactive-table-filter-input:focus {
    outline: none;
    border-color: rgb(124 58 237);
    box-shadow: 0 0 0 3px rgb(124 58 237 / 0.12);
}

.interactive-table-filter-input--compact {
    min-width: 0;
    width: 100%;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
}

.interactive-table-filter-input--locked,
.interactive-table-filter-input:disabled,
.interactive-table-filter-input[readonly] {
    background: rgb(248 250 252);
    color: rgb(71 85 105);
    cursor: not-allowed;
}

/* Programações → Projetos: lista em cartões (preview mobile) */
.programacoes-projects-mobile__preview-hint {
    display: none;
}

@media (max-width: 767px), (max-height: 520px) and (max-width: 1024px) and ((hover: none) or (pointer: coarse)) {
    .programacoes-projects-mobile__preview-hint {
        display: block;
    }
}

.programacoes-projects-mobile__search-wrap {
    display: block;
    width: 100%;
}

.programacoes-projects-mobile__search {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.625rem;
    background: #fff;
    font-size: 16px;
    color: rgb(30 41 59);
}

.programacoes-projects-mobile__search:focus {
    outline: none;
    border-color: rgb(79 70 229);
    box-shadow: 0 0 0 3px rgb(79 70 229 / 0.12);
}

.programacoes-projects-mobile__count {
    margin: 0;
    font-size: 0.75rem;
    color: rgb(100 116 139);
}

.programacoes-projects-mobile__list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.75rem;
    background: rgb(248 250 252 / 0.35);
}

.programacoes-projects-mobile__card {
    background: #fff;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    padding: 0.75rem 0.85rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.programacoes-projects-mobile__card-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.5rem 0.65rem;
    align-items: start;
}

.programacoes-projects-mobile__seq-wrap .programacoes-seq-input {
    width: 3rem;
    min-height: 2.5rem;
    font-size: 1rem;
}

.programacoes-projects-mobile__seq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: 0 0.35rem;
    border-radius: 0.5rem;
    background: rgb(238 242 255);
    color: rgb(67 56 202);
    font-size: 0.8125rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.programacoes-projects-mobile__headline {
    min-width: 0;
}

.programacoes-projects-mobile__order {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.35;
    word-break: break-word;
}

.programacoes-projects-mobile__client {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: rgb(100 116 139);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.programacoes-projects-mobile__details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgb(241 245 249);
}

.programacoes-projects-mobile__detail-line {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgb(71 85 105);
    word-break: break-word;
}

.programacoes-projects-mobile__detail-label {
    font-weight: 700;
    color: rgb(51 65 85);
    margin-right: 0.35rem;
}

.programacoes-projects-mobile__detail-value {
    font-weight: 400;
    color: rgb(71 85 105);
}

.programacoes-projects-mobile__status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.programacoes-projects-mobile__chips {
    margin-top: 0.5rem;
    font-size: 0.6875rem;
}

.programacoes-deliveries-mobile__card .programacoes-deliveries-mobile__headline {
    margin-bottom: 0.15rem;
}

.requisicoes-assistance-mobile__description {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.requisicoes-assistance-mobile__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgb(241 245 249);
}

.view3d-mobile__actions {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgb(241 245 249);
}

.programacoes-projects-mobile__chips .programacoes-project-characteristics-chips {
    flex-wrap: wrap;
}

.programacoes-col-seq {
    width: 3.5rem;
    max-width: 4.25rem;
}

.programacoes-col-order {
    width: 4.25rem;
    max-width: 5rem;
}

.programacoes-col-client {
    max-width: 20rem;
    width: 20rem;
    min-width: 0;
}

.programacoes-col-client-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.programacoes-seq-input {
    width: 2.85rem;
    padding: 0.2rem 0.15rem;
    border: 1px solid rgb(199 210 254);
    border-radius: 0.375rem;
    background: #fff;
    color: rgb(30 41 59);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

.programacoes-seq-input:focus {
    outline: none;
    border-color: rgb(79 70 229);
    box-shadow: 0 0 0 3px rgb(79 70 229 / 0.15);
}

.programacoes-seq-input::-webkit-outer-spin-button,
.programacoes-seq-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.programacoes-seq-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

body.programacoes-fullscreen-active {
    overflow: hidden;
}

#programacoes-view.programacoes-view--fullscreen {
    position: fixed;
    inset: 0;
    z-index: 80;
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    padding: 1rem;
    overflow: hidden;
    background: rgb(248 250 252);
}

#programacoes-view.programacoes-view--fullscreen .fm-programacoes-sidebar {
    display: none;
}

#programacoes-view.programacoes-view--fullscreen > div {
    min-height: 0;
    height: 100%;
}

#programacoes-view.programacoes-view--fullscreen .fm-programacoes-main {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#programacoes-view.programacoes-view--fullscreen #programacoes-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#programacoes-view.programacoes-view--fullscreen #programacoes-content > div {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 0;
}

#programacoes-view.programacoes-view--fullscreen #programacoes-projects-mount {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.pendencias-sem-projetista-previsao {
    min-width: 9.5rem;
}

.pendencias-sem-projetista-designer {
    min-width: 11rem;
}

.programacoes-col-characteristics {
    max-width: 10.5rem;
    width: 10.5rem;
    min-width: 0;
}

.programacoes-project-characteristics {
    min-width: 0;
    max-width: 100%;
}

.programacoes-project-characteristics-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.2rem;
    overflow: hidden;
    min-width: 0;
}

.programacoes-project-characteristic-chip {
    display: inline-block;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 4.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.05rem 0.3rem;
    border-radius: 999px;
    background: rgb(238 242 255);
    border: 1px solid rgb(199 210 254);
    color: rgb(67 56 202);
    font-size: 0.5625rem;
    font-weight: 600;
    line-height: 1.35;
}

.programacoes-project-characteristic-none {
    font-size: 0.625rem;
    color: rgb(148 163 184);
}

.pendencias-project-characteristics-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.pendencias-project-characteristic-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.45rem;
    border-radius: 999px;
    background: rgb(238 242 255);
    border: 1px solid rgb(199 210 254);
    color: rgb(67 56 202);
    font-size: 0.625rem;
    font-weight: 600;
    white-space: nowrap;
}

.pendencias-project-characteristic-none {
    font-size: 0.6875rem;
    color: rgb(148 163 184);
    font-style: italic;
}

.order-projects-grid__cell {
    min-width: 0;
}

.order-projects-grid__cell--project {
    overflow: hidden;
}

.order-projects-grid__cell--project .flex {
    min-width: 0;
}

.order-projects-grid__cell--status {
    overflow: hidden;
}

.order-projects-grid__cell--actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.25rem;
    min-width: 0;
}

/* ── Layout responsivo (mobile) ─────────────────────────────────────────── */

.app-panel-height {
    height: calc(100vh - 7.5rem);
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
}

.app-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
}

.app-header-brand {
    flex: 1;
    min-width: 0;
}

.app-header-menu-btn {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.25;
    color: rgb(255 255 255);
    background: rgb(51 65 85);
    border: 1px solid rgb(71 85 105);
    border-radius: 0.5rem;
    cursor: pointer;
}

.app-header-menu-btn:hover {
    background: rgb(71 85 105);
}

body.installer-only-nav #app-header-nav button:not(#btn-view3d):not(#btn-logout) {
    display: none !important;
}

body.installer-only-nav #btn-view3d,
body.installer-only-nav #btn-logout {
    display: inline-flex !important;
}

.app-header-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    padding: 0 1rem 0.75rem;
}

.app-header-nav button {
    flex-shrink: 0;
}

@media (max-width: 767px), (max-height: 520px) and (max-width: 1024px) and ((hover: none) or (pointer: coarse)) {
    body {
        -webkit-text-size-adjust: 100%;
    }

    .interactive-table-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        padding: 0.5rem 0.65rem;
    }

    .interactive-table-toolbar-actions {
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .interactive-table-sort-row th {
        padding: 0.45rem 0.5rem;
        font-size: 0.625rem;
    }

    .interactive-table-filter-row th {
        padding: 0.25rem 0.35rem;
    }

    .interactive-table-filter-input {
        min-height: 2.25rem;
        font-size: 16px;
    }

    .interactive-table-sort-btn {
        font-size: 0.625rem;
    }

    .app-panel-height {
        height: auto;
        max-height: none;
    }

    #dashboard-view.fm-dashboard {
        gap: 0.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    #dashboard-view.fm-dashboard--mobile-detail .fm-orders-panel {
        display: none;
    }

    #dashboard-view:not(.fm-dashboard--mobile-detail) #detail-section {
        display: none;
    }

    #dashboard-view:not(.fm-dashboard--mobile-detail) .fm-orders-panel {
        min-height: calc(100dvh - 9rem);
    }

    #dashboard-view:not(.fm-dashboard--mobile-detail) #orders-list {
        max-height: none;
        flex: 1;
    }

    #dashboard-view.fm-dashboard--mobile-detail #detail-section {
        min-height: auto;
        max-height: none;
        display: flex;
    }

    .order-detail-tabs-shell {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .order-detail-tabs-bar {
        flex-wrap: nowrap;
        width: max-content;
        min-width: 100%;
        padding-bottom: 0.125rem;
    }

    .order-detail-tab {
        flex-shrink: 0;
    }

    .order-projects-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .order-projects-grid__header {
        display: none;
    }

    .order-projects-grid__item {
        grid-template-columns: 1fr;
    }

    .order-projects-grid__row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 0.625rem;
    }

    .order-projects-grid__cell--actions {
        justify-content: flex-start;
        padding-top: 0.25rem;
    }

    #gestao-view > div,
    #pendencias-view > div,
    #calendar-view > div {
        min-height: auto;
    }

    #gestao-dashboard-panel,
    #gestao-kanban-panel .gestao-kanban-panel__description,
    #gestao-kanban-panel .gestao-kanban-panel__toolbar,
    #gestao-kanban-panel .gestao-kanban-panel__filters {
        display: none;
    }

    #gestao-kanban-panel .gestao-kanban-panel__header {
        padding: 0.35rem 0.75rem;
        border-bottom-width: 0;
        background: transparent;
    }

    #gestao-kanban-panel .gestao-kanban-panel__intro h3 {
        font-size: 0.75rem;
        margin: 0;
    }

    #gestao-kanban-panel #gestao-kanban-board {
        padding: 0.5rem;
        flex: 1;
        min-height: 0;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    #gestao-view:has(#gestao-kanban-panel:not(.hidden)) {
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
        padding: 0.5rem;
    }

    #gestao-view:has(#gestao-kanban-panel:not(.hidden)) #gestao-view-layout,
    #gestao-view:has(#gestao-kanban-panel:not(.hidden)) #gestao-view-layout > .flex-1 {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    #gestao-kanban-panel:not(.hidden) {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        height: calc(100dvh - 3.25rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        max-height: calc(100dvh - 3.25rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        --gestao-kanban-column-max-height: calc(100dvh - 4.75rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }

    @media (orientation: landscape) {
        #gestao-kanban-panel .gestao-kanban-panel__header {
            display: none;
        }

        #gestao-kanban-panel:not(.hidden) {
            height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
            max-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
            --gestao-kanban-column-max-height: calc(100dvh - 2.25rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        }

        #gestao-view:has(#gestao-kanban-panel:not(.hidden)) {
            padding: 0.25rem 0.5rem;
        }
    }

    #gestao-kanban-panel,
    #gestao-cronograma-pedido-panel,
    #gestao-project-scheduling-panel,
    #gestao-relatorios-panel,
    #gestao-performance-panel,
    #gestao-comercial-financeiro-panel,
    #gestao-project-history-panel,
    #performance-projeto-panel,
    #performance-view > div {
        min-height: auto;
    }

    .app-panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .app-panel-header__actions {
        width: 100%;
    }

    .app-panel-header__actions .order-tab-action-btn,
    .app-panel-header__actions button[type="submit"] {
        min-height: 2.5rem;
    }

    .calendar-layout {
        flex-direction: column;
    }

    .calendar-day-panel {
        width: 100%;
        max-height: 40vh;
    }

    #conversations-query-results-panel,
    #approvals-query-results-panel {
        max-height: none;
    }

    #app-root .fixed.inset-0 {
        align-items: flex-end;
        padding: 0.5rem;
    }

    #app-root .fixed.inset-0 > div {
        padding: 1rem;
        border-radius: 1rem 1rem 0 0;
        max-height: 92vh;
    }

    .revision-activities-table,
    .revision-history-table {
        font-size: 0.625rem;
    }

    .gestao-dashboard-clients-grid {
        grid-template-columns: 1fr;
    }

    .pendencias-sidebar-nav {
        max-height: none;
    }

    #order-content .p-5 {
        padding: 1rem;
    }

    #empty-state {
        padding: 2rem 1rem;
    }
}

@media (min-width: 768px) {
    .app-header {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        justify-content: space-between;
        gap: 0.5rem 1rem;
        padding: 0.625rem 1rem 0.75rem;
    }

    .app-header-top {
        padding: 0;
        flex: 0 1 auto;
    }

    .app-header-nav {
        padding: 0;
        flex: 1 1 auto;
        justify-content: flex-end;
    }
}

/* ── Calendário local ───────────────────────────────────────────────────── */

.calendar-layout {
    display: flex;
    min-height: 0;
}

.calendar-month-wrap {
    flex: 1.4;
}

.calendar-day-panel {
    width: 18rem;
}

.calendar-weekdays,
.calendar-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.375rem;
}

.calendar-weekdays {
    margin-bottom: 0.375rem;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(100 116 139);
    padding: 0.25rem 0;
}

.calendar-day-cell {
    min-height: 5.5rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.5rem;
    background: rgb(255 255 255);
    padding: 0.375rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.calendar-day-cell:hover {
    border-color: rgb(251 191 36);
    background: rgb(255 251 235 / 0.35);
}

.calendar-day-cell--empty {
    border-color: transparent;
    background: transparent;
    cursor: default;
    min-height: 0;
    padding: 0;
}

.calendar-day-cell--today .calendar-day-cell__number {
    background: rgb(15 23 42);
    color: rgb(251 191 36);
}

.calendar-day-cell.is-selected {
    border-color: rgb(217 119 6);
    box-shadow: 0 0 0 1px rgb(217 119 6 / 0.35);
    background: rgb(255 251 235 / 0.55);
}

.calendar-day-cell__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(51 65 85);
}

.calendar-day-cell__events {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.calendar-day-cell__more {
    font-size: 0.5625rem;
    color: rgb(100 116 139);
    padding-left: 0.125rem;
}

.calendar-event-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    width: 100%;
    min-width: 0;
    border-radius: 0.25rem;
    border: 1px solid var(--cal-resp-border, rgb(226 232 240));
    background: var(--cal-resp-bg, rgb(248 250 252));
    color: var(--cal-resp-fg, rgb(51 65 85));
    padding: 0.125rem 0.25rem;
    font-size: 0.5625rem;
    line-height: 1.2;
    cursor: pointer;
    text-align: left;
}

.calendar-event-chip .calendar-event-type {
    flex: 1;
    min-width: 0;
}

.calendar-event-chip__head {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    min-width: 0;
}

.calendar-event-chip__time {
    font-weight: 700;
    flex-shrink: 0;
    margin-left: auto;
}

.calendar-event-chip__lines {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    line-height: 1.25;
}

.calendar-event-chip__line {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    opacity: 0.92;
}

.calendar-event-type {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 0.25rem;
    border: 1px solid rgb(226 232 240);
    background: rgb(241 245 249);
    color: rgb(51 65 85);
    padding: 0.05rem 0.3rem;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.25;
}

.calendar-event-type--medicao {
    background: rgb(204 251 241);
    color: rgb(15 118 110);
    border-color: rgb(153 246 228);
}

.calendar-event-type--atendimento {
    background: rgb(254 243 199);
    color: rgb(146 64 14);
    border-color: rgb(253 230 138);
}

.calendar-event-type--reuniao,
.calendar-event-type--montagem {
    background: rgb(224 231 255);
    color: rgb(67 56 202);
    border-color: rgb(199 210 254);
}

.calendar-event-type--vistoria-obra {
    background: rgb(219 234 254);
    color: rgb(29 78 216);
    border-color: rgb(191 219 254);
}

.calendar-event-type--venda {
    background: rgb(255 237 213);
    color: rgb(154 52 18);
    border-color: rgb(253 186 116);
}

.calendar-event-floating-tooltip {
    position: fixed;
    z-index: 80;
    pointer-events: none;
    max-width: min(18rem, calc(100vw - 1.5rem));
}

.calendar-event-floating-tooltip.hidden {
    display: none;
}

.calendar-event-tooltip {
    border-radius: 0.625rem;
    background: rgb(15 23 42);
    color: rgb(248 250 252);
    box-shadow: 0 10px 28px rgb(15 23 42 / 0.22);
    overflow: hidden;
    border: 1px solid rgb(51 65 85);
}

.calendar-event-tooltip__badge {
    padding: 0.5rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-bottom: 1px solid rgb(51 65 85);
}

.calendar-event-tooltip--medicao .calendar-event-tooltip__badge {
    background: rgb(19 78 74);
    color: rgb(153 246 228);
}

.calendar-event-tooltip--atendimento .calendar-event-tooltip__badge {
    background: rgb(120 53 15);
    color: rgb(253 230 138);
}

.calendar-event-tooltip--reuniao .calendar-event-tooltip__badge {
    background: rgb(49 46 129);
    color: rgb(199 210 254);
}

.calendar-event-tooltip--vistoria-obra .calendar-event-tooltip__badge {
    background: rgb(30 64 175);
    color: rgb(191 219 254);
}

.calendar-event-tooltip--montagem .calendar-event-tooltip__badge {
    background: rgb(49 46 129);
    color: rgb(199 210 254);
}

.calendar-event-tooltip--venda .calendar-event-tooltip__badge {
    background: rgb(154 52 18);
    color: rgb(254 215 170);
}

.calendar-event-tooltip__rows {
    margin: 0;
    padding: 0.5rem 0.75rem 0.625rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.calendar-event-tooltip__row {
    display: grid;
    grid-template-columns: 5.25rem minmax(0, 1fr);
    gap: 0.5rem;
    align-items: start;
}

.calendar-event-tooltip__row dt {
    margin: 0;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(148 163 184);
}

.calendar-event-tooltip__row dd {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    color: rgb(248 250 252);
    word-break: break-word;
}

.calendar-day-event-card {
    width: 100%;
    text-align: left;
    border-radius: 0.625rem;
    border: 1px solid var(--cal-resp-border, rgb(226 232 240));
    background: var(--cal-resp-bg, rgb(255 255 255));
    color: var(--cal-resp-fg, rgb(30 41 59));
    padding: 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.calendar-day-event-card:hover {
    border-color: var(--cal-resp-border, rgb(203 213 225));
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
}

.calendar-day-event-card .calendar-event-type {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    flex-shrink: 0;
}

.calendar-day-event-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.calendar-day-event-card__time {
    font-size: 0.75rem;
    font-weight: 700;
    color: inherit;
}

.calendar-day-event-card__lines {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    margin: 0 0 0.25rem;
}

.calendar-day-event-card__line {
    font-size: 0.75rem;
    font-weight: 600;
    color: inherit;
    line-height: 1.35;
}

.calendar-day-event-card__description {
    font-size: 0.75rem;
    color: inherit;
    opacity: 0.88;
    line-height: 1.4;
    margin-bottom: 0.375rem;
}

.calendar-zoom-toggle {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.5rem;
    overflow: hidden;
    background: rgb(255 255 255);
}

.calendar-zoom-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgb(100 116 139);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.calendar-zoom-btn:hover {
    color: rgb(51 65 85);
    background: rgb(248 250 252);
}

.calendar-zoom-btn.is-active {
    color: rgb(146 64 14);
    background: rgb(255 251 235);
}

.calendar-month-grid--week .calendar-day-cell {
    min-height: 9rem;
}

.calendar-month-grid--week .calendar-day-cell__number {
    font-size: 0.8125rem;
}

.calendar-month-grid--week .calendar-day-cell__date {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    color: rgb(100 116 139);
    margin-top: 0.125rem;
}

/* ── Anexos de imagem — requisições ─────────────────────────────────────── */

.conv-attachments-grid,
.conv-attachments-card__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
    gap: 0.5rem;
}

.conv-attachment-item {
    position: relative;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.625rem;
    background: rgb(248 250 252);
    padding: 0.375rem;
    min-width: 0;
}

.conv-attachment-item__preview-wrap {
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    background: rgb(255 255 255);
    border: 1px solid rgb(241 245 249);
}

.conv-attachment-item__preview-wrap--openable {
    cursor: zoom-in;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.conv-attachment-item__preview-wrap--openable:hover {
    border-color: rgb(148 163 184);
    box-shadow: 0 0 0 2px rgb(199 210 254 / 0.5);
}

.conv-attachment-item__preview-wrap--openable:focus-visible {
    outline: 2px solid rgb(99 102 241);
    outline-offset: 2px;
}

.conv-attachment-item__preview,
.conv-attachment-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conv-attachment-item__name {
    margin: 0.375rem 0 0;
    font-size: 0.5625rem;
    color: rgb(100 116 139);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conv-attachment-item__remove {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    border: none;
    background: rgb(15 23 42 / 0.72);
    color: rgb(255 255 255);
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
}

.conv-attachment-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgb(226 232 240);
    background: rgb(255 255 255);
    padding: 0;
    cursor: zoom-in;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.conv-attachment-thumb:hover {
    border-color: rgb(251 191 36);
    box-shadow: 0 2px 8px rgb(15 23 42 / 0.08);
}

.conv-attachments-card {
    background: rgb(255 255 255 / 0.7);
    border: 1px solid rgb(241 245 249);
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.conv-attachment-lightbox {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgb(15 23 42 / 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.conv-attachment-lightbox__image {
    max-width: min(92vw, 56rem);
    max-height: 88vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 20px 50px rgb(0 0 0 / 0.35);
}

.conv-attachment-lightbox__close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: none;
    background: rgb(255 255 255 / 0.15);
    color: rgb(255 255 255);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.montagem-prog-layout {
    min-height: 20rem;
}

.montagem-prog-palette-section-label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(100 116 139);
}

.montagem-prog-palette-item--marceneiro {
    border-color: rgb(251 191 36);
    color: rgb(146 64 14);
}

.montagem-prog-palette-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.625rem;
    border: 1px solid rgb(199 210 254);
    background: rgb(255 255 255);
    color: rgb(49 46 129);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: element;
}

.montagem-prog-palette-item > * {
    pointer-events: none;
}

.montagem-prog-palette-item.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
}

.montagem-prog-palette-item--filtered {
    border-color: rgb(79 70 229);
    background: rgb(238 242 255);
    box-shadow: 0 0 0 1px rgb(199 210 254);
}

.montagem-prog-montador-filter {
    max-width: 7rem;
}

.montagem-prog-conflicts-list {
    margin: 0.375rem 0 0;
    padding-left: 1rem;
    list-style: disc;
}

.montagem-prog-conflicts-list li + li {
    margin-top: 0.125rem;
}

.montagem-prog-empty-filter {
    margin-top: 0.75rem;
}

.montagem-prog-print-header {
    display: none;
}

.montagem-prog-palette-item__color {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 999px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--montagem-prog-bar-from), var(--montagem-prog-bar-to));
}

.montagem-prog-palette-item__grip {
    color: rgb(129 140 248);
    font-size: 0.875rem;
    line-height: 1;
}

.montagem-prog-week-grid {
    min-width: 44rem;
}

.montagem-prog-month-headers,
.montagem-prog-day-headers,
.montagem-prog-lane {
    display: grid;
    grid-template-columns: repeat(7, minmax(5.5rem, 1fr));
    gap: 0.375rem;
}

.montagem-prog-month-headers {
    margin-bottom: 0.125rem;
}

.montagem-prog-month-header--grouped {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.5rem;
    margin-bottom: 0.125rem;
    border-radius: 0.625rem;
    background: rgb(238 242 255);
    border: 1px solid rgb(199 210 254);
}

.montagem-prog-month-header--grouped.montagem-prog-month-header--weekend {
    background: rgb(241 245 249);
    border-color: rgb(226 232 240);
    color: rgb(100 116 139);
}

.montagem-prog-month-header {
    text-align: center;
    padding: 0.25rem 0.25rem 0;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(79 70 229);
}

.montagem-prog-month-header--weekend {
    color: rgb(100 116 139);
}

.montagem-prog-day-header {
    text-align: center;
    padding: 0.5rem 0.25rem;
    border-radius: 0.625rem;
    background: rgb(248 250 252);
    border: 1px solid rgb(226 232 240);
}

.montagem-prog-day-header--weekend {
    background: rgb(241 245 249);
    color: rgb(100 116 139);
}

.montagem-prog-day-header__weekday {
    display: block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgb(100 116 139);
}

.montagem-prog-day-header__date {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(15 23 42);
}

.montagem-prog-lanes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.montagem-prog-lane {
    position: relative;
    min-height: 3.75rem;
    grid-template-rows: minmax(3.5rem, auto);
}

.montagem-prog-day-slot,
.montagem-prog-bar {
    grid-row: 1;
}

.montagem-prog-day-slot {
    position: relative;
    z-index: 1;
    min-height: 3.5rem;
    border-radius: 0.625rem;
    border: 1px dashed rgb(226 232 240);
    background: rgb(248 250 252 / 0.7);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.montagem-prog-day-slot--weekend {
    background: rgb(241 245 249 / 0.8);
}

.montagem-prog-day-slot.is-drop-target,
.montagem-prog-bar.is-drop-target,
.montagem-prog-lane.is-drop-target {
    border-color: rgb(99 102 241);
    background: rgb(238 242 255);
}

body.montagem-prog-dragging .montagem-prog-day-slot {
    border-color: rgb(199 210 254);
}

.montagem-prog-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: stretch;
    min-height: 3.25rem;
    margin-top: 0.125rem;
    border-radius: 0.625rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}

.montagem-prog-bar--crew {
    background: linear-gradient(135deg, var(--montagem-prog-bar-from), var(--montagem-prog-bar-to));
    color: rgb(255 255 255);
}

.montagem-prog-bar--conflict {
    box-shadow: 0 0 0 2px rgb(245 158 11), 0 2px 8px rgb(245 158 11 / 0.25);
}

.montagem-prog-bar-body {
    flex: 1;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.125rem;
    padding: 0.375rem 0.5rem;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: grab;
}

.montagem-prog-resizing,
.montagem-prog-resizing * {
    cursor: grabbing !important;
    user-select: none !important;
}

.montagem-prog-bar-montadores {
    font-size: 0.6875rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
}

.montagem-prog-bar-meta {
    font-size: 0.625rem;
    opacity: 0.92;
    white-space: nowrap;
    overflow: hidden;
}

.montagem-prog-bar-resize {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0.5rem;
    z-index: 3;
    border: none;
    padding: 0;
    cursor: ew-resize;
    opacity: 0;
    background: rgb(255 255 255 / 0.35);
    transition: opacity 0.15s ease;
}

.montagem-prog-bar-resize--start {
    left: 0;
}

.montagem-prog-bar-resize--end {
    right: 0;
}

.montagem-prog-bar:hover .montagem-prog-bar-resize,
.montagem-prog-bar-resize:hover,
body.montagem-prog-resizing .montagem-prog-bar-resize {
    opacity: 1;
}

body.montagem-prog-resizing {
    cursor: ew-resize;
    user-select: none;
}

.project-characteristics-modal-content {
    max-height: min(28rem, calc(90vh - 10rem));
}

.project-characteristics-project {
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: rgb(248 250 252 / 0.6);
}

.project-characteristics-project__title {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgb(15 23 42);
}

.project-characteristics-project__options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.project-characteristic-option {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: rgb(51 65 85);
    cursor: pointer;
    user-select: none;
}

.project-characteristic-option--none span {
    color: rgb(100 116 139);
    font-style: italic;
}

.project-characteristic-third-party-marker {
    margin-left: 0.125rem;
    color: rgb(220 38 38);
    font-weight: 700;
}

@media print {
    body.montagem-prog-printing * {
        visibility: hidden;
    }

    body.montagem-prog-printing #gestao-montagem-programacao-panel,
    body.montagem-prog-printing #gestao-montagem-programacao-panel * {
        visibility: visible;
    }

    body.montagem-prog-printing #gestao-montagem-programacao-panel {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none;
        box-shadow: none;
        min-height: auto;
        overflow: visible;
    }

    body.montagem-prog-printing #gestao-montagem-programacao-panel > div:first-child,
    body.montagem-prog-printing #montagem-prog-conflicts,
    body.montagem-prog-printing .montagem-prog-palette,
    body.montagem-prog-printing .montagem-prog-bar-resize,
    body.montagem-prog-printing #montagem-prog-empty-filter {
        display: none !important;
        visibility: hidden !important;
    }

    body.montagem-prog-printing .montagem-prog-print-header {
        display: block;
        padding: 0 0 0.75rem;
        border-bottom: 1px solid #cbd5e1;
        margin-bottom: 0.75rem;
    }

    body.montagem-prog-printing .montagem-prog-print-header h2 {
        margin: 0;
        font-size: 1rem;
        color: #0f172a;
    }

    body.montagem-prog-printing .montagem-prog-print-header p {
        margin: 0.25rem 0 0;
        font-size: 0.75rem;
        color: #475569;
    }

    body.montagem-prog-printing .montagem-prog-layout {
        display: block;
        overflow: visible;
    }

    body.montagem-prog-printing .montagem-prog-calendar {
        overflow: visible;
        padding: 0;
    }

    body.montagem-prog-printing .montagem-prog-week-grid {
        min-width: 0;
        width: 100%;
    }

    body.montagem-prog-printing .montagem-prog-bar--crew {
        background: linear-gradient(135deg, var(--montagem-prog-bar-from), var(--montagem-prog-bar-to));
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body.montagem-prog-printing .montagem-prog-bar {
        box-shadow: none;
    }

    body.montagem-prog-printing .montagem-prog-bar--conflict {
        box-shadow: inset 0 0 0 2px #f59e0b;
    }
}

.order-export-print-root {
    display: none;
}

.order-export-document {
    color: #0f172a;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 11px;
    line-height: 1.45;
}

.order-export-header {
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #0f172a;
}

.order-export-header__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.order-export-header__meta {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    font-weight: 600;
}

.order-export-header__meta--muted {
    font-weight: 400;
    color: #64748b;
    font-size: 0.75rem;
}

.order-export-section {
    margin-bottom: 1.25rem;
    break-inside: avoid-page;
}

.order-export-section__title {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #334155;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 0.25rem;
}

.order-export-subheading {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
}

.order-export-fields {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.order-export-fields--grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1rem;
}

.order-export-field__label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.order-export-field__value {
    font-size: 0.8rem;
    color: #0f172a;
    word-break: break-word;
}

.order-export-card {
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.35rem;
    background: #fff;
}

.order-export-card--nested {
    margin-top: 0.5rem;
    background: #f8fafc;
}

.order-export-note,
.order-export-meta {
    margin: 0.35rem 0 0.5rem;
    font-size: 0.78rem;
    color: #334155;
    white-space: pre-wrap;
}

.order-export-meta {
    color: #64748b;
}

.order-export-empty {
    margin: 0;
    font-size: 0.78rem;
    color: #94a3b8;
    font-style: italic;
}

.order-export-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.35rem;
    font-size: 0.75rem;
}

.order-export-table th,
.order-export-table td {
    border: 1px solid #e2e8f0;
    padding: 0.35rem 0.45rem;
    text-align: left;
    vertical-align: top;
}

.order-export-table th {
    background: #f1f5f9;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
}

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

    body.order-export-printing * {
        visibility: hidden;
    }

    body.order-export-printing #order-export-print-root,
    body.order-export-printing #order-export-print-root * {
        visibility: visible;
    }

    body.order-export-printing #order-export-print-root {
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        background: #fff;
    }

    body.order-export-printing .order-export-section--page-break {
        break-before: page;
        page-break-before: always;
    }

    body.order-export-printing .order-export-card {
        break-inside: avoid-page;
        page-break-inside: avoid;
    }
}

.order-code-field {
    display: flex;
    align-items: stretch;
}

.order-code-field__input {
    flex: 1;
    min-width: 0;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: 0;
}

.order-code-field__picker-btn {
    flex-shrink: 0;
    min-width: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 0 0.5rem 0.5rem 0;
    background: rgb(248 250 252);
    color: rgb(71 85 105);
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1;
}

.order-code-field__picker-btn:hover {
    background: rgb(241 245 249);
}

.order-code-field__picker-btn--amber:focus-visible {
    outline: 2px solid rgb(217 119 6);
    outline-offset: 1px;
}

.order-code-field__picker-btn--indigo:focus-visible {
    outline: 2px solid rgb(79 70 229);
    outline-offset: 1px;
}

.order-code-picker-result {
    display: grid;
    grid-template-columns: minmax(4.5rem, auto) 1fr;
    gap: 0.25rem 0.75rem;
    width: 100%;
    text-align: left;
    padding: 0.625rem 0.75rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.625rem;
    background: rgb(255 255 255);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.order-code-picker-result:hover {
    background: rgb(248 250 252);
    border-color: rgb(203 213 225);
}

.order-code-picker-result__code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(51 65 85);
}

.order-code-picker-result__client {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(15 23 42);
}

.order-code-picker-result__consultant {
    grid-column: 1 / -1;
    font-size: 0.6875rem;
    color: rgb(100 116 139);
}

.gestao-project-scheduling-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gestao-project-scheduling-table-panel {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    overflow: visible;
    background: rgb(255 255 255);
    border-top: 1px solid rgb(226 232 240);
}

.gestao-project-scheduling-table-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgb(241 245 249);
    background: rgb(248 250 252 / 0.8);
    flex-shrink: 0;
}

.gestao-project-scheduling-table-panel__title {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(15 23 42);
}

.gestao-project-scheduling-table-panel__count {
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgb(79 70 229);
    background: rgb(238 242 255);
    border: 1px solid rgb(199 210 254);
    border-radius: 9999px;
    padding: 0.125rem 0.5rem;
}

.gestao-project-scheduling-hide-forecast-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 1.875rem;
    padding: 0 0.25rem;
    font-size: 0.75rem;
    color: rgb(71 85 105);
    white-space: nowrap;
    user-select: none;
}

.gestao-project-scheduling-hide-forecast-filter {
    flex: 0 0 auto;
}

.gestao-project-scheduling-table-panel__filters {
    padding: 0;
    border-bottom: 0;
    background: transparent;
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
    margin-left: auto;
}

.gestao-project-scheduling-table-panel__header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgb(241 245 249);
    background: rgb(248 250 252 / 0.8);
    flex-shrink: 0;
}

.gestao-project-scheduling-table-scroll {
    overflow: visible;
}

.gestao-project-scheduling-table-row--dirty {
    background: rgb(255 251 235 / 0.7);
}

.gestao-project-scheduling-projects-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 50%;
    max-height: 50%;
    overflow: hidden;
    background: rgb(255 255 255);
    border-bottom: 1px solid rgb(226 232 240);
}

@media (min-width: 1024px) {
    .gestao-project-scheduling-projects-panel {
        width: 20rem;
        flex: 0 0 20rem;
        max-height: 100%;
        height: 100%;
        border-bottom: 0;
        border-right: 1px solid rgb(226 232 240);
    }
}

.gestao-project-scheduling-projects-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgb(241 245 249);
    background: rgb(248 250 252 / 0.8);
    flex-shrink: 0;
}

.gestao-project-scheduling-projects-panel__title {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(15 23 42);
}

.gestao-project-scheduling-projects-panel__count {
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgb(79 70 229);
    background: rgb(238 242 255);
    border: 1px solid rgb(199 210 254);
    border-radius: 9999px;
    padding: 0.125rem 0.5rem;
}

.gestao-project-scheduling-projects-panel__filters {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid rgb(241 245 249);
    background: rgb(255 255 255);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gestao-project-scheduling-projects-panel__filter,
.gestao-project-scheduling-panel__filter {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.gestao-project-scheduling-projects-panel__filter-label,
.gestao-project-scheduling-panel__filter-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: rgb(100 116 139);
}

.gestao-project-scheduling-calendar-panel__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgb(241 245 249);
}

.gestao-project-scheduling-calendar-panel__filters .gestao-project-scheduling-panel__filter {
    flex: 1 1 8rem;
    min-width: 8rem;
}

@media (max-width: 767px) {
    .gestao-project-scheduling-calendar-panel__filters {
        flex-wrap: wrap;
    }

    .gestao-project-scheduling-calendar-panel__filters .gestao-project-scheduling-panel__filter {
        flex: 1 1 100%;
    }
}

.gestao-project-scheduling-project-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.gestao-project-scheduling-project-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(226 232 240);
    background: rgb(255 255 255);
}

.gestao-project-scheduling-project-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.gestao-project-scheduling-project-card__open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    text-align: left;
    min-width: 0;
}

.gestao-project-scheduling-project-card__open:hover .gestao-project-scheduling-project-card__name {
    color: rgb(79 70 229);
}

.gestao-project-scheduling-project-card__codes {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.625rem;
    font-weight: 700;
    color: rgb(79 70 229);
}

.gestao-project-scheduling-project-card__name {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(15 23 42);
    line-height: 1.2;
}

.gestao-project-scheduling-project-card__status {
    flex-shrink: 0;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgb(100 116 139);
    background: rgb(241 245 249);
    border-radius: 9999px;
    padding: 0.125rem 0.375rem;
}

.gestao-project-scheduling-project-card__client {
    font-size: 0.6875rem;
    color: rgb(100 116 139);
}

.gestao-project-scheduling-project-card__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.gestao-project-scheduling-project-card__label {
    font-size: 0.625rem;
    font-weight: 600;
    color: rgb(100 116 139);
}

.gestao-project-scheduling-project-card__dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.gestao-project-scheduling-project-card--dirty {
    border-color: rgb(199 210 254);
    box-shadow: 0 0 0 1px rgb(199 210 254);
}

.gestao-project-scheduling-project-card__save:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.gestao-project-scheduling-project-card__value {
    font-size: 0.75rem;
    color: rgb(15 23 42);
}

.gestao-project-scheduling-project-card__dates--readonly {
    grid-template-columns: 1fr;
}

.gestao-view-layout--full > :not(#gestao-sidebar) {
    width: 100%;
}

.montagem-prog-readonly .montagem-prog-layout {
    display: block;
}

.montagem-prog-readonly #montagem-prog-palette {
    display: none !important;
}

.montagem-prog-readonly #montagem-prog-palette-label {
    display: none;
}

.montagem-prog-readonly #montagem-prog-palette-aside {
    display: block;
    width: 100%;
    max-width: none;
    border-right: 0;
    border-bottom: 1px solid rgb(241 245 249);
    padding: 0.5rem 1rem;
    background: rgb(248 250 252 / 0.8);
}

.montagem-prog-readonly #montagem-prog-palette-filter-wrap {
    margin-bottom: 0;
    justify-content: flex-end;
}

.montagem-prog-readonly #montagem-prog-montador-filter {
    max-width: 12rem;
}

.montagem-prog-readonly .montagem-prog-calendar {
    width: 100%;
}

.montagem-prog-readonly .montagem-prog-bar-resize,
.montagem-prog-readonly .montagem-prog-bar-body {
    pointer-events: none;
    cursor: default;
}

.montagem-prog-readonly .montagem-prog-day-slot {
    cursor: default;
}

.gestao-project-scheduling-layout--calendar-only .gestao-project-scheduling-table-panel {
    display: none;
}

.gestao-project-scheduling-layout--calendar-only .gestao-project-scheduling-calendar-panel {
    flex: 1 1 auto;
    min-height: 32rem;
}

.gestao-project-scheduling-layout--calendar-only .gestao-project-scheduling-calendar-scroll {
    min-height: 26rem;
}

.gestao-project-scheduling-calendar-panel {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 28rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    overflow: visible;
    background: rgb(248 250 252 / 0.35);
    border-bottom: 1px solid rgb(226 232 240);
}

.gestao-project-scheduling-calendar-scroll {
    flex: 1 1 auto;
    min-height: 22rem;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    background: rgb(255 255 255);
}

.gestao-project-scheduling-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    font-size: 0.6875rem;
    color: rgb(100 116 139);
    flex-shrink: 0;
}

.gestao-project-scheduling-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.gestao-project-scheduling-legend-swatch {
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 0.25rem;
    border: 1px solid rgb(226 232 240);
}

.gestao-project-scheduling-legend-swatch--bar {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
}

.gestao-project-scheduling-legend-swatch--today {
    background: rgb(254 243 199);
    border-color: rgb(252 211 77);
}

.gestao-project-scheduling-legend-swatch--measurement {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.gestao-project-scheduling-view-toggle {
    display: inline-flex;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.5rem;
    overflow: hidden;
    background: rgb(255 255 255);
}

.gestao-project-scheduling-view-toggle__btn {
    border: 0;
    background: transparent;
    color: rgb(71 85 105);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.4375rem 0.75rem;
    cursor: pointer;
}

.gestao-project-scheduling-view-toggle__btn:hover {
    background: rgb(248 250 252);
}

.gestao-project-scheduling-view-toggle__btn--active {
    background: rgb(238 242 255);
    color: rgb(67 56 202);
}

.gestao-project-scheduling-view-toggle__btn + .gestao-project-scheduling-view-toggle__btn {
    border-left: 1px solid rgb(226 232 240);
}

.gestao-project-scheduling-month-grid {
    padding: 0.75rem;
}

.gestao-project-scheduling-weeks--single {
    min-height: 12rem;
}

.gestao-project-scheduling-month-range-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgb(79 70 229);
    padding: 0 0.125rem 0.5rem;
    border-bottom: 1px solid rgb(226 232 240);
    margin-bottom: 0.5rem;
}

.gestao-project-scheduling-weekday-headers {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 3;
    background: rgb(255 255 255 / 0.96);
    backdrop-filter: blur(4px);
    padding-bottom: 0.25rem;
}

.gestao-project-scheduling-weekday-header {
    text-align: center;
    padding: 0.375rem 0.125rem;
    border-radius: 0.5rem;
    background: rgb(238 242 255);
    border: 1px solid rgb(199 210 254);
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: rgb(79 70 229);
    line-height: 1.2;
}

.gestao-project-scheduling-weeks {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gestao-project-scheduling-week-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gestao-project-scheduling-week-block__title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(79 70 229);
    padding: 0 0.125rem;
}

.gestao-project-scheduling-week-empty {
    padding: 0.25rem 0;
}

.gestao-project-scheduling-calendar-table {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gestao-project-scheduling-day-headers,
.gestao-project-scheduling-lane {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
    width: 100%;
}

.gestao-project-scheduling-week-lanes {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.gestao-project-scheduling-day-headers {
    margin-bottom: 0.25rem;
}

.gestao-project-scheduling-day-header {
    text-align: center;
    padding: 0.375rem 0.125rem;
    border-radius: 0.5rem;
    background: rgb(248 250 252);
    border: 1px solid rgb(226 232 240);
}

.gestao-project-scheduling-day-header--outside {
    opacity: 0.45;
    background: rgb(248 250 252 / 0.5);
}

.gestao-project-scheduling-day-header--weekend {
    background: rgb(241 245 249);
    color: rgb(100 116 139);
}

.gestao-project-scheduling-day-header--today {
    background: rgb(254 243 199);
    border-color: rgb(252 211 77);
}

.gestao-project-scheduling-day-header__date {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(15 23 42);
}

.gestao-project-scheduling-lane {
    position: relative;
    min-height: 2.75rem;
    grid-template-rows: minmax(2.5rem, auto);
}

.gestao-project-scheduling-day-slot,
.gestao-project-scheduling-bar {
    grid-row: 1;
}

.gestao-project-scheduling-day-slot {
    min-height: 2.75rem;
    border-radius: 0.5rem;
    border: 1px dashed rgb(226 232 240);
    background: rgb(248 250 252 / 0.7);
}

.gestao-project-scheduling-day-slot--outside {
    opacity: 0.35;
    border-style: dotted;
    background: rgb(248 250 252 / 0.35);
}

.gestao-project-scheduling-day-slot--weekend {
    background: rgb(241 245 249 / 0.8);
}

.gestao-project-scheduling-day-slot--today {
    border-color: rgb(252 211 77);
    background: rgb(254 243 199 / 0.45);
}

.gestao-project-scheduling-bar {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.0625rem;
    min-height: 2.25rem;
    margin: 0.125rem 0;
    padding: 0.2rem 0.3rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--gestao-project-scheduling-bar-from), var(--gestao-project-scheduling-bar-to));
    color: rgb(255 255 255);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.12);
    overflow: hidden;
    text-align: left;
}

.gestao-project-scheduling-bar:hover {
    filter: brightness(1.05);
}

.gestao-project-scheduling-bar--measurement {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.gestao-project-scheduling-bar__title {
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gestao-project-scheduling-bar__meta {
    font-size: 0.5625rem;
    line-height: 1.2;
    opacity: 0.92;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gestao-project-scheduling-empty-row {
    padding: 1rem 0;
}

#gestao-project-scheduling-panel {
    min-height: calc(100vh - 180px);
}

#gestao-project-scheduling-content {
    min-height: 0;
}

.user-calendar-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    max-width: 22rem;
}

.user-calendar-color-swatch {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    border: 2px solid rgb(255 255 255);
    box-shadow: 0 0 0 1px rgb(203 213 225);
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.user-calendar-color-swatch:hover:not(:disabled) {
    transform: scale(1.12);
}

.user-calendar-color-swatch.is-selected {
    box-shadow: 0 0 0 2px rgb(255 255 255), 0 0 0 4px rgb(15 23 42);
}

.user-calendar-color-swatch:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.user-calendar-color-swatch.is-taken {
    position: relative;
    opacity: 0.38;
}

.user-calendar-color-swatch--none {
    background-color: #fff;
    position: relative;
}

.user-calendar-color-swatch--none::after {
    content: '';
    position: absolute;
    left: 3px;
    right: 3px;
    top: 50%;
    height: 2px;
    background: #94a3b8;
    transform: rotate(-45deg);
    border-radius: 1px;
}

.calendar-colors-user {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    background: rgb(255 255 255);
}

.calendar-colors-user.is-self {
    border-color: rgb(253 230 138);
    background: rgb(255 251 235);
}

.calendar-colors-user__swatch {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    border: 2px solid rgb(255 255 255);
    box-shadow: 0 0 0 1px rgb(203 213 225);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.calendar-colors-user .user-calendar-color-field {
    margin-top: 0.5rem;
}

.calendar-colors-user .user-calendar-color-picker {
    max-width: none;
}

/* Funil comercial */
.comercial-board {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    min-height: 28rem;
}

.comercial-column {
    flex: 0 0 17.5rem;
    background: rgb(248 250 252);
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 16rem);
}

.comercial-column__head {
    padding: 0.75rem 0.85rem 0.5rem;
    border-bottom: 1px solid rgb(226 232 240);
}

.comercial-column__cards {
    padding: 0.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 8rem;
}

.comercial-card {
    background: #fff;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.65rem;
    padding: 0.7rem 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.comercial-card:hover {
    border-color: rgb(196 92 62 / 0.45);
}

.comercial-card.is-dragging {
    opacity: 0.45;
}

.comercial-card--overdue {
    border-color: rgb(252 165 165);
    background: rgb(254 242 242);
}

.comercial-card--no-next {
    border-style: dashed;
}

.comercial-card__fields {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.comercial-card__field {
    display: flex;
    gap: 0.35rem;
    font-size: 10px;
    line-height: 1.35;
}

.comercial-card__label {
    color: rgb(100 116 139);
    flex-shrink: 0;
}

.comercial-card__value {
    color: rgb(51 65 85);
    min-width: 0;
    word-break: break-word;
}

.comercial-card__value--alert {
    color: rgb(185 28 28);
    font-weight: 600;
}

.comercial-temp {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-radius: 9999px;
    padding: 0.15rem 0.5rem;
    line-height: 1.2;
}

.comercial-temp--hot {
    background: rgb(220 38 38);
    color: #fff;
}

.comercial-temp--warm {
    background: rgb(250 204 21);
    color: rgb(113 63 18);
}

.comercial-temp--cold {
    background: rgb(37 99 235);
    color: #fff;
}

.comercial-deal-overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    background: rgb(15 23 42 / 0.35);
    display: flex;
    justify-content: flex-end;
}

.comercial-deal-overlay.hidden {
    display: none;
}

.comercial-deal-panel {
    width: min(34rem, 100%);
    height: 100%;
    background: #fff;
    border-left: 1px solid rgb(226 232 240);
    overflow: auto;
    box-shadow: -8px 0 24px rgb(15 23 42 / 0.12);
}

.comercial-filters--panel .comercial-filter-board-only {
    display: none;
}

.comercial-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.comercial-panel-card {
    background: #fff;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    overflow: hidden;
    min-width: 0;
}

.comercial-panel-card--wide,
.comercial-panel-bottom {
    grid-column: 1 / -1;
}

.comercial-panel-bottom {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 0.75rem;
    min-width: 0;
}

.comercial-panel-card__head {
    padding: 0.85rem 1rem 0.65rem;
    border-bottom: 1px solid rgb(241 245 249);
    background: rgb(248 250 252 / 0.7);
}

.comercial-panel-card__head h3 {
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgb(15 23 42);
}

.comercial-panel-card__period {
    margin-top: 0.15rem;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(148 163 184);
}

.comercial-panel-card__body {
    padding: 1rem;
}

.comercial-panel-bars {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.comercial-panel-bar-row {
    display: grid;
    grid-template-columns: minmax(6rem, 8.5rem) minmax(0, 1fr) 2.25rem;
    gap: 0.6rem;
    align-items: center;
}

.comercial-panel-bar-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(51 65 85);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comercial-panel-bar-track {
    height: 0.7rem;
    border-radius: 9999px;
    background: rgb(241 245 249);
    border: 1px solid rgb(226 232 240);
    overflow: hidden;
}

.comercial-panel-bar-fill {
    height: 100%;
    border-radius: 9999px;
}

.comercial-panel-bar-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(51 65 85);
    text-align: right;
}

.comercial-panel-open-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(71 85 105);
}

.comercial-panel-open-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.comercial-panel-open-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.comercial-panel-open-row {
    display: grid;
    grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr);
    gap: 0.65rem 1rem;
    align-items: center;
}

.comercial-panel-open-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.comercial-panel-open-metric {
    display: grid;
    grid-template-columns: 2.6rem minmax(0, 1fr) minmax(5.5rem, 7.5rem);
    gap: 0.5rem;
    align-items: center;
}

.comercial-panel-open-metric-name {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(148 163 184);
}

.comercial-panel-open-metric-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(51 65 85);
    text-align: right;
}

.comercial-panel-open-total {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgb(241 245 249);
    font-size: 0.75rem;
    color: rgb(71 85 105);
}

.comercial-panel-axis {
    margin-top: 0.75rem;
    font-size: 0.625rem;
    color: rgb(148 163 184);
}

.comercial-panel-axis--y {
    margin: 0 0 0.5rem;
}

.comercial-panel-donut-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comercial-panel-donut {
    position: relative;
    width: 10.5rem;
    height: 10.5rem;
    margin: 0 auto;
    border-radius: 9999px;
    border: 1px solid rgb(226 232 240);
}

.comercial-panel-donut-center {
    position: absolute;
    inset: 1.7rem;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid rgb(241 245 249);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.comercial-panel-donut-center strong {
    font-size: 1.25rem;
    line-height: 1;
    color: rgb(15 23 42);
}

.comercial-panel-donut-center span {
    margin-top: 0.2rem;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(148 163 184);
}

.comercial-panel-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: rgb(51 65 85);
}

.comercial-panel-legend li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.comercial-panel-legend--row {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    gap: 0.65rem 1rem;
}

.comercial-panel-swatch {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 9999px;
    flex-shrink: 0;
    display: inline-block;
}

.comercial-panel-won-chart {
    min-width: 0;
}

.comercial-panel-months {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.35rem;
    align-items: end;
    min-height: 12rem;
}

.comercial-panel-month {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.comercial-panel-month-chart {
    width: 100%;
    height: 11rem;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(to top, transparent 0, transparent calc(100% - 1px), rgb(241 245 249) calc(100% - 1px));
}

.comercial-panel-month-stack {
    width: 70%;
    margin: 0 auto;
    display: flex;
    flex-direction: column-reverse;
    border-radius: 0.2rem 0.2rem 0 0;
    overflow: hidden;
    min-height: 0;
}

.comercial-panel-stack-seg {
    width: 100%;
    min-height: 2px;
}

.comercial-panel-month-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: rgb(100 116 139);
    text-transform: lowercase;
}

.comercial-panel-month-total {
    font-size: 0.5625rem;
    color: rgb(148 163 184);
    min-height: 0.85rem;
    text-align: center;
}

.comercial-panel-funnel {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.comercial-panel-funnel-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comercial-panel-funnel-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    border-radius: 0.35rem;
    background: #e8c547;
    color: rgb(15 23 42);
    font-size: 0.75rem;
}

.comercial-panel-funnel-bar.is-won {
    background: #7cb342;
    color: #fff;
}

.comercial-panel-funnel-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comercial-panel-funnel-rate {
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgb(100 116 139);
}

.comercial-panel-kpi {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.15;
    color: rgb(15 23 42);
}

.comercial-panel-delta {
    margin-top: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.comercial-panel-delta.is-up {
    color: rgb(22 163 74);
}

.comercial-panel-delta.is-down {
    color: rgb(220 38 38);
}

.comercial-panel-kpi-foot {
    margin-top: 0.85rem;
    font-size: 0.75rem;
    color: rgb(100 116 139);
}

@media (min-width: 1100px) {
    .comercial-panel-grid {
        grid-template-columns: 1.15fr 1fr;
    }

    .comercial-panel-card--kpi {
        min-height: 100%;
    }

    .comercial-panel-donut-wrap {
        flex-direction: row;
        align-items: flex-start;
    }

    .comercial-panel-donut {
        margin: 0;
        flex-shrink: 0;
    }
}

@media (max-width: 799px) {
    .comercial-panel-grid {
        grid-template-columns: 1fr;
    }

    .comercial-panel-card--wide,
    .comercial-panel-bottom {
        grid-column: auto;
    }

    .comercial-panel-bottom {
        grid-template-columns: 1fr;
    }

    .comercial-panel-months {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        min-height: 16rem;
    }

    .comercial-panel-bar-row {
        grid-template-columns: minmax(5rem, 7rem) minmax(0, 1fr) 2rem;
    }

    .comercial-panel-open-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .comercial-panel-open-metric {
        grid-template-columns: 2.4rem minmax(0, 1fr) minmax(4.5rem, 6.5rem);
    }
}

/* Visualizador 3D (Three.js) */
.view3d-viewer-dialog {
    padding-top: env(safe-area-inset-top, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-left: env(safe-area-inset-left, 0);
}

@supports (height: 100dvh) {
    .view3d-viewer-dialog {
        height: 100dvh;
        max-height: 100dvh;
    }
}

@supports (-webkit-touch-callout: none) {
    .view3d-viewer-dialog {
        min-height: -webkit-fill-available;
    }
}

.view3d-viewer-toolbar {
    top: max(0.5rem, env(safe-area-inset-top, 0));
    right: max(0.5rem, env(safe-area-inset-right, 0));
    max-height: calc(
        100% - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0) - 0.75rem
    );
}

.view3d-viewer-toolbar {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    min-width: 2.75rem;
}

.view3d-viewer-toolbar button {
    flex-shrink: 0;
    white-space: nowrap;
}

.view3d-viewer-toolbar-btn--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    touch-action: manipulation;
}

.view3d-toolbar-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .view3d-viewer-toolbar-btn--icon {
        min-width: 2.75rem;
        min-height: 2.125rem;
    }

    .view3d-toolbar-icon {
        width: 1.125rem;
        height: 1.125rem;
    }
}

.view3d-toolbar-separator {
    display: block;
    height: 1px;
    width: 100%;
    background: rgb(71 85 105 / 0.9);
    margin: 0.125rem 0;
}

body.view3d-viewer-modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}

#view3d-three-canvas-host {
    touch-action: none;
}

#view3d-three-canvas-host canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.view3d-section-cut-panel {
    bottom: max(0.5rem, env(safe-area-inset-bottom, 0));
    left: max(0.5rem, env(safe-area-inset-left, 0));
}

.view3d-section-cut-panel--collapsed {
    padding: 0.375rem 0.5rem;
}

.view3d-section-cut-panel--collapsed .view3d-section-cut-panel__header {
    margin-bottom: 0;
}

.view3d-section-cut-panel--collapsed .view3d-section-cut-panel__body {
    display: none;
}

.view3d-section-cut-panel--collapsed .view3d-section-cut-panel-toggle-icon {
    transform: rotate(180deg);
}

.view3d-section-cut-panel-toggle {
    width: 2.75rem;
    height: 2.75rem;
    touch-action: manipulation;
}

.view3d-section-cut-panel-toggle-icon {
    transition: transform 0.15s ease;
}

.view3d-section-cut-slider {
    height: 1.25rem;
    touch-action: pan-y;
}

/* Celebração — negócio ganho (funil comercial) */
.deal-won-celebration {
    position: fixed;
    inset: 0;
    z-index: 8500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
        max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    pointer-events: auto;
}

.deal-won-celebration.hidden {
    display: none;
}

.deal-won-celebration__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgb(15 23 42 / 0.55);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.deal-won-celebration__lottie {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.deal-won-celebration__lottie svg {
    width: 100% !important;
    height: 100% !important;
}

.deal-won-celebration__card {
    position: relative;
    z-index: 1;
    width: min(92vw, 26rem);
    text-align: center;
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: 1rem;
    background: linear-gradient(165deg, #fffef9 0%, #f4f6f1 55%, #ebe8df 100%);
    border: 1px solid var(--fm-border, #c8d0c0);
    box-shadow:
        0 24px 48px rgb(31 42 30 / 0.22),
        0 0 0 1px rgb(255 255 255 / 0.6) inset;
    animation: deal-won-celebration-card-in 0.45s ease-out both;
}

.deal-won-celebration__kicker {
    margin: 0 0 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #b45309;
}

.deal-won-celebration__title {
    margin: 0 0 1.25rem;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.35rem, 4.5vw, 1.75rem);
    font-weight: 700;
    line-height: 1.25;
    color: #1f2a1e;
    word-break: break-word;
}

.deal-won-celebration__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 0.625rem;
    border: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 2px 8px rgb(180 83 9 / 0.35);
    cursor: pointer;
}

.deal-won-celebration__close:hover {
    filter: brightness(1.05);
}

.deal-won-celebration__close:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

@keyframes deal-won-celebration-card-in {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

body.deal-won-celebration-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .deal-won-celebration__card {
        animation: none;
    }
}
