/* Stark — complemento ao financas-compact.css */

:root {
    --stark-bg: #f8fafc;
    --stark-surface: #ffffff;
    --stark-border: #e2e8f0;
    --stark-muted: #64748b;
    --stark-text: #0f172a;
    --stark-accent: #c2410c;
    --stark-accent-dark: #9a3412;
    --stark-accent-soft: #fff7ed;
    --stark-accent-line: #fdba74;
    --stark-slate: #334155;
    --stark-radius: 12px;
    --stark-radius-sm: 8px;
    --stark-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
    --stark-shadow-hover: 0 8px 24px rgba(180, 83, 9, 0.12);
    --stark-transition: 160ms ease;
}

/* Largura útil maior (antes 1180px); margem lateral leve — sem full-bleed */
.container.stark-page,
.stark-page {
    max-width: min(1600px, calc(100% - 1.5rem));
    width: 100%;
    margin: 0 auto;
    padding: 1rem 0.85rem 2.5rem;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container.stark-page,
    .stark-page {
        max-width: min(1600px, calc(100% - 1rem));
        padding: 0.85rem 0.65rem 2rem;
    }
}

.stark-page .page-header {
    margin: 0 0 1.25rem;
}

.stark-page .page-header h1 {
    color: var(--stark-accent-dark);
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
}

.stark-page .page-header .subtitle {
    color: var(--stark-muted);
    font-size: 1rem;
    margin: 0;
}

/* Ficha OS: header em duas colunas (equip/cliente | OS/status/defeito/datas) */
.stark-page .page-header.stark-os-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem 2rem;
    margin-bottom: 0.55rem;
}

.stark-os-page-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    flex: 1 1 16rem;
}

/* Título + tipo colados; evita o gap visual do h1 grande */
.stark-os-page-header-equip-block {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
}

.stark-os-page-header-right {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.45rem 1.15rem;
    justify-content: end;
    align-items: start;
    justify-items: end;
    flex: 0 1 22rem;
    max-width: 100%;
    text-align: right;
    min-width: 0;
}

.stark-os-page-header-os-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.12rem;
}

.stark-page .page-header.stark-os-page-header .stark-os-page-header-equip-h1,
.stark-page .page-header.stark-os-page-header h1 {
    margin: 0;
    padding: 0;
    line-height: 1.12;
    font-size: 1.65rem;
}

.stark-os-page-header-os,
.stark-os-page-header-status,
.stark-os-page-header-defeito,
.stark-os-page-header-data {
    margin: 0;
    line-height: 1.35;
}

.stark-os-page-header-os {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--stark-slate, #334155);
    letter-spacing: 0.02em;
}

.stark-os-page-header-status {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--stark-muted);
}

.stark-os-page-header-defeito {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.08rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--stark-text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.stark-os-page-header-data {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.04rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--stark-muted);
}

/* Rótulos sutis (defeito / datas) */
.stark-os-page-header-k {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--stark-muted);
    line-height: 1.2;
}

.stark-os-page-header-v {
    display: block;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    line-height: 1.35;
}

.stark-os-page-header-defeito .stark-os-page-header-v {
    font-weight: 650;
    color: var(--stark-text);
}

.stark-os-page-header-data .stark-os-page-header-v {
    font-weight: 550;
    color: var(--stark-slate, #475569);
}

.stark-os-page-header-tipo {
    display: block;
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--stark-muted);
    letter-spacing: 0.02em;
    line-height: 1.25;
}

.stark-os-page-header-tipo[hidden] {
    display: none !important;
}

.stark-os-page-header-cliente {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--stark-text);
}

.stark-os-page-header-cli-nome {
    font-weight: 650;
    color: var(--stark-slate);
}

.stark-os-page-header-cli-tel {
    font-weight: 500;
    color: var(--stark-accent);
}

.stark-os-page-header-cliente .stark-ficha-link.stark-os-page-header-cli-tel {
    color: var(--stark-accent);
}

.stark-os-page-header-cliente .stark-ficha-link.stark-os-page-header-cli-tel:hover {
    color: var(--stark-accent-dark);
}

.stark-os-page-header-cliente .stark-os-page-header-wa {
    vertical-align: middle;
    margin-left: 0.1rem;
    width: 1.55rem;
    height: 1.55rem;
}

.stark-os-page-header-cliente .stark-os-page-header-wa svg {
    width: 0.95rem;
    height: 0.95rem;
}


@media (max-width: 640px) {
    .stark-os-page-header-right {
        text-align: left;
        justify-content: start;
        justify-items: start;
        flex-basis: 100%;
        gap: 0.4rem 0.9rem;
    }

    .stark-os-page-header-os-status,
    .stark-os-page-header-defeito,
    .stark-os-page-header-data {
        align-items: flex-start;
    }
}

/* legado (cards / outros) */
.stark-os-page-header-equip {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--stark-accent-dark);
    line-height: 1.3;
}

.stark-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin: 0 0 1rem;
}

.stark-nav-links a {
    color: #b45309;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--stark-transition);
}

.stark-nav-links a:hover {
    text-decoration: underline;
    color: var(--stark-accent-dark);
}

.stark-fluxos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.25rem 0 1.75rem;
}

@media (max-width: 800px) {
    .stark-fluxos {
        grid-template-columns: 1fr;
    }
}

.stark-fluxo {
    border-radius: var(--stark-radius);
    padding: 1rem 1.15rem;
    border: 1px solid var(--stark-border);
}

.stark-fluxo.negocio {
    background: linear-gradient(180deg, var(--stark-accent-soft) 0%, #fff 100%);
}

.stark-fluxo.manutencao {
    background: linear-gradient(180deg, #f1f5f9 0%, #fff 100%);
}

.stark-fluxo h2 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    color: var(--stark-accent-dark);
}

.stark-fluxo.manutencao h2 {
    color: var(--stark-slate);
}

.stark-fluxo p {
    margin: 0 0 0.75rem;
    color: var(--stark-muted);
    font-size: 0.9rem;
}

.stark-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.stark-steps li {
    font-size: 0.92rem;
    color: var(--stark-slate);
    padding-left: 1.1rem;
    position: relative;
}

.stark-steps li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #f59e0b;
}

.stark-fluxo.manutencao .stark-steps li::before {
    background: #475569;
}

.stark-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* —— Hub KPI —— */
.stark-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin: 0 0 1.25rem;
}

@media (max-width: 900px) {
    .stark-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stark-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.stark-kpi {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1.15rem;
    border-radius: var(--stark-radius);
    border: 1px solid var(--stark-border);
    background: var(--stark-surface);
    box-shadow: var(--stark-shadow);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--stark-transition), box-shadow var(--stark-transition), transform var(--stark-transition);
}

a.stark-kpi:hover {
    border-color: var(--stark-accent-line);
    box-shadow: var(--stark-shadow-hover);
    transform: translateY(-1px);
}

.stark-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.stark-kpi-icon {
    width: 1.35rem;
    height: 1.35rem;
    color: var(--stark-muted);
    flex-shrink: 0;
    opacity: 0.75;
}

.stark-kpi-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--stark-text);
    letter-spacing: -0.02em;
}

.stark-kpi-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--stark-muted);
}

.stark-cta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin: 0 0 1rem;
}

.stark-cta-bar .btn-stark.btn-cta {
    font-size: 1.05rem;
    padding: 0.75rem 1.35rem;
    border-radius: var(--stark-radius);
    box-shadow: 0 4px 14px rgba(194, 65, 12, 0.28);
}

.stark-cta-bar .btn-stark.btn-cta:hover {
    filter: brightness(1.05);
}

.stark-cta-bar a.btn-link {
    color: #b45309;
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 0.25rem;
}

.stark-cta-bar a.btn-link:hover {
    text-decoration: underline;
}

.stark-card-link {
    display: block;
    padding: 1.15rem 1.35rem;
    border-radius: var(--stark-radius);
    border: 1px solid var(--stark-border);
    background: var(--stark-surface);
    text-decoration: none;
    color: inherit;
    flex: 1 1 220px;
    max-width: 360px;
    box-shadow: var(--stark-shadow);
    transition: border-color var(--stark-transition), box-shadow var(--stark-transition);
}

.stark-card-link:hover {
    border-color: var(--stark-accent-line);
    box-shadow: var(--stark-shadow-hover);
}

.stark-card-link h2 {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    color: var(--stark-accent-dark);
}

.stark-card-link p {
    margin: 0;
    color: #475569;
    font-size: 0.92rem;
}

.stark-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 900px) {
    .stark-split {
        grid-template-columns: 1fr;
    }
}

.stark-col-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

/* Quadro reutilizável: uma seção = um card (borda, fundo, cantos, faixa superior) */
.stark-quadro,
.stark-col {
    border: 1px solid var(--stark-border);
    border-radius: var(--stark-radius);
    padding: 1rem 1.1rem;
    background: var(--stark-surface);
    box-shadow: var(--stark-shadow);
}

.stark-quadro > h3,
.stark-col h3 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    color: var(--stark-slate);
}

.stark-quadro--negocio,
.stark-col.negocio {
    border-top: 4px solid #f59e0b;
}

.stark-quadro--manutencao,
.stark-col.manutencao {
    border-top: 4px solid #475569;
}

.stark-quadro--tecnica,
.stark-quadro--custos {
    border-top: 4px solid #f59e0b;
}

.stark-ficha {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-bottom: 0.85rem;
}

.stark-ficha-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.stark-ficha-ico {
    flex-shrink: 0;
    width: 1.85rem;
    height: 1.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.45rem;
    background: #fff7ed;
    color: var(--stark-accent-dark);
    border: 1px solid var(--stark-accent-line);
}

.stark-ficha-ico svg {
    width: 1rem;
    height: 1rem;
    display: block;
}

.stark-ficha-body {
    min-width: 0;
    flex: 1;
}

.stark-ficha-nome {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--stark-ink, #1e293b);
    line-height: 1.25;
}

.stark-ficha-equip {
    display: block;
    font-size: 0.98rem;
    font-weight: 650;
    color: var(--stark-accent-dark);
    line-height: 1.3;
}

.stark-ficha-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--stark-muted);
    margin-bottom: 0.1rem;
}

.stark-ficha-valor {
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.4;
    word-break: break-word;
}

.stark-ficha-meta {
    margin-top: 0.15rem;
    font-size: 0.82rem;
    color: var(--stark-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.35rem;
}

.stark-ficha-sep {
    opacity: 0.55;
}

.stark-ficha-link {
    color: var(--stark-accent-dark);
    text-decoration: none;
}

.stark-ficha-link:hover {
    text-decoration: underline;
}

.stark-ficha-datas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}

.stark-kanban-wrap {
    position: relative;
}

.stark-kanban {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding: 0.15rem 0.1rem 0.35rem;
    /* Scroll nativo oculto: navegação horizontal fica nas setas laterais */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stark-kanban::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.stark-kanban:focus-visible {
    outline: 2px solid var(--stark-accent-line);
    outline-offset: 2px;
}

.stark-col-kanban {
    flex: 0 0 240px;
    width: 240px;
    max-width: 85vw;
    scroll-snap-align: start;
    background: var(--stark-bg);
    border-radius: 10px;
    padding: 0.65rem;
    min-height: 140px;
    border: 1px solid var(--stark-border);
    transition: border-color var(--stark-transition), background var(--stark-transition), box-shadow var(--stark-transition);
}

.stark-kanban-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: 1px solid var(--stark-border);
    border-radius: 999px;
    background: var(--stark-surface);
    color: var(--stark-slate);
    box-shadow: var(--stark-shadow);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--stark-transition), border-color var(--stark-transition), color var(--stark-transition), opacity var(--stark-transition);
}

.stark-kanban-arrow:hover {
    background: var(--stark-accent-soft);
    border-color: var(--stark-accent-line);
    color: var(--stark-accent-dark);
}

.stark-kanban-arrow:focus-visible {
    outline: 2px solid var(--stark-accent-line);
    outline-offset: 2px;
}

.stark-kanban-arrow--prev {
    left: 0.2rem;
}

.stark-kanban-arrow--next {
    right: 0.2rem;
}

.stark-kanban-arrow-icon {
    font-size: 1.55rem;
    line-height: 1;
    font-weight: 600;
    margin-top: -0.1rem;
}

.stark-kanban-arrow-badge {
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: var(--stark-accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1.15rem;
    text-align: center;
    box-shadow: 0 0 0 2px var(--stark-surface);
    pointer-events: none;
}

.stark-col-kanban.drop-hover {
    border-color: var(--stark-accent-line);
    background: var(--stark-accent-soft);
    box-shadow: inset 0 0 0 1px var(--stark-accent-line);
}

.stark-col-kanban h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.82rem;
    margin: 0 0 0.5rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stark-col-cards {
    min-height: 2rem;
}

.stark-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: var(--stark-slate);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.stark-os-card {
    display: block;
    box-sizing: border-box;
    width: 100%;
    background: var(--stark-surface);
    border: 1px solid var(--stark-border);
    border-radius: var(--stark-radius-sm);
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.5rem;
    color: inherit;
    cursor: grab;
    transition: border-color var(--stark-transition), box-shadow var(--stark-transition), opacity var(--stark-transition);
}

.stark-os-card:active {
    cursor: grabbing;
}

.stark-os-card.dragging {
    opacity: 0.45;
    box-shadow: var(--stark-shadow-hover);
}

.stark-os-card:hover {
    border-color: var(--stark-accent-line);
    box-shadow: var(--stark-shadow);
}

.stark-os-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.stark-os-card-equip {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    flex: 1;
}

.stark-os-card-equip-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    min-width: 0;
    flex: 1;
}

.stark-os-device-icon {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.1rem;
    color: var(--stark-accent-dark);
}

.stark-os-device-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.stark-os-equip-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    font-size: 0.875rem;
    line-height: 1.25;
    /* Reserva sempre 2 linhas → altura uniforme entre cards */
    min-height: calc(1.25em * 2);
    color: var(--stark-accent-dark);
}

.stark-os-card-equip:hover .stark-os-equip-name {
    text-decoration: underline;
}

.stark-os-card-actions {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    flex-shrink: 0;
}

.stark-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 0.4rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    text-decoration: none;
    transition: color var(--stark-transition), background var(--stark-transition), border-color var(--stark-transition);
}

.stark-card-icon svg {
    width: 1.05rem;
    height: 1.05rem;
    display: block;
}

.stark-card-icon:hover:not(:disabled):not(.off) {
    background: #f1f5f9;
    border-color: var(--stark-border);
}

.stark-card-icon.wa:hover:not(:disabled):not(.off) {
    color: #128c7e;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.stark-card-icon.map:hover:not(:disabled):not(.off) {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.stark-card-icon.cancel:hover {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.stark-card-icon.off,
.stark-card-icon:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.stark-os-card-sub {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: var(--stark-muted);
}

.stark-os-client {
    display: block;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-weight: 500;
    color: #475569;
    line-height: 1.25;
}

.stark-os-num {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #94a3b8;
    text-align: left;
}

.stark-os-sla {
    margin: 0.4rem 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    color: #64748b;
}

.stark-os-move {
    display: none;
}

.stark-os-move select {
    width: 100%;
    font: inherit;
    font-size: 0.78rem;
    padding: 0.28rem 0.4rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: var(--stark-slate);
    cursor: pointer;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.stark-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--stark-slate);
}

.stark-badge.ok {
    background: #ecfccb;
    color: #3f6212;
}

.stark-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1rem;
}

.stark-form-grid label,
.stark-form-grid .stark-field-label,
.stark-passo .stark-field-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
}

.stark-form-grid input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.stark-form-grid select,
.stark-form-grid textarea,
.stark-col input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.stark-col select,
.stark-col textarea,
.stark-quadro input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.stark-quadro select,
.stark-quadro textarea,
.stark-passo input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.stark-passo select,
.stark-passo textarea {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--stark-radius-sm);
    font: inherit;
    transition: border-color var(--stark-transition), box-shadow var(--stark-transition);
}

.stark-form-grid input:not([type="checkbox"]):not([type="radio"]):focus,
.stark-form-grid select:focus,
.stark-form-grid textarea:focus,
.stark-passo input:not([type="checkbox"]):not([type="radio"]):focus,
.stark-passo select:focus,
.stark-passo textarea:focus,
.stark-filter-bar input:focus {
    outline: none;
    border-color: var(--stark-accent-line);
    box-shadow: 0 0 0 3px rgba(253, 186, 116, 0.35);
}

.stark-check {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: 0.5rem 0 1rem;
}

.stark-check > label {
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--stark-border);
    border-radius: 999px;
    background: var(--stark-surface);
    color: var(--stark-slate);
    cursor: pointer;
    transition: border-color var(--stark-transition), background var(--stark-transition);
}

.stark-check > label:hover {
    border-color: var(--stark-accent-line);
    background: var(--stark-accent-soft);
}

.stark-check > label:has(input:checked) {
    border-color: var(--stark-accent);
    background: var(--stark-accent-soft);
    color: var(--stark-accent-dark);
}

.stark-msg {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.75rem 0;
    padding: 0.65rem 0.8rem;
    border-radius: var(--stark-radius-sm);
    background: var(--stark-accent-soft);
    color: var(--stark-accent-dark);
}

.stark-msg[hidden] {
    display: none !important;
}

.stark-msg.erro {
    background: #fef2f2;
    color: #991b1b;
}

.stark-msg-text {
    flex: 1;
    min-width: 0;
}

.stark-msg-fechar {
    flex-shrink: 0;
    margin: -0.2rem -0.25rem -0.2rem 0;
    padding: 0.15rem 0.45rem;
    border: none;
    border-radius: var(--stark-radius-sm);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
}

.stark-msg-fechar:hover,
.stark-msg-fechar:focus-visible {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}

.stark-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.stark-timeline li {
    border-left: 3px solid var(--stark-accent-line);
    padding: 0.2rem 0 0.75rem 0.75rem;
    font-size: 0.9rem;
    position: relative;
}

.stark-timeline li::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0.35rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--stark-accent);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--stark-accent-line);
}

.stark-timeline .meta {
    color: #94a3b8;
    font-size: 0.75rem;
}

.stark-nota-status-row {
    margin: 0.55rem 0 0.75rem;
}

.stark-nota-status-row label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: var(--stark-muted, #64748b);
}

.stark-nota-status-row select {
    width: 100%;
    max-width: 22rem;
}

.stark-timeline-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.stark-timeline-body {
    flex: 1;
    min-width: 0;
}

.stark-timeline-vis {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    padding: 0;
    border: 1px solid var(--stark-border);
    border-radius: 0.35rem;
    background: #f8fafc;
    color: #94a3b8;
    cursor: pointer;
    transition: color var(--stark-transition), background var(--stark-transition), border-color var(--stark-transition);
}

.stark-timeline-vis svg {
    width: 0.85rem;
    height: 0.85rem;
    display: block;
}

.stark-timeline-vis.on {
    color: var(--stark-accent-dark);
    background: #fff7ed;
    border-color: var(--stark-accent-line);
}

.stark-timeline-vis:hover {
    border-color: var(--stark-accent-line);
    color: var(--stark-accent-dark);
}

.stark-timeline-actions {
    display: inline-flex;
    gap: 0.2rem;
    flex-shrink: 0;
}

.stark-timeline-copy,
.stark-timeline-edit {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    padding: 0;
    border: 1px solid var(--stark-border);
    border-radius: 0.35rem;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    transition: color var(--stark-transition), background var(--stark-transition), border-color var(--stark-transition);
}

.stark-timeline-edit {
    color: var(--stark-accent-dark, #1e3a5f);
    border-color: rgba(30, 58, 95, 0.25);
    background: #eff6ff;
}

.stark-timeline-copy svg,
.stark-timeline-edit svg {
    width: 0.85rem;
    height: 0.85rem;
    display: block;
}

.stark-timeline-copy:hover,
.stark-timeline-edit:hover {
    border-color: var(--stark-accent-line);
    color: var(--stark-accent-dark);
    background: #fff7ed;
}

.stark-timeline-edit:hover {
    background: #dbeafe;
}

.stark-wa-msg {
    white-space: normal;
    word-break: break-word;
    line-height: 1.45;
}

.stark-wa-msg .wa-mono,
.stark-nota-hint code,
.stark-nota-fmt code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: #f1f5f9;
    padding: 0.05em 0.3em;
    border-radius: 0.25rem;
}

.stark-nota-box {
    margin: 0.75rem 0 0.35rem;
}

.stark-nota-box--timeline {
    margin-top: 1.1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--stark-border);
}

.stark-nota-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.stark-nota-toolbar label {
    margin: 0;
    font-weight: 600;
}

.stark-nota-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.stark-nota-fmt,
.stark-nota-copy,
.stark-nota-vis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0 0.35rem;
    border: 1px solid var(--stark-border);
    border-radius: 0.4rem;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    line-height: 1;
}

.stark-nota-fmt:hover,
.stark-nota-copy:hover,
.stark-nota-vis:hover {
    border-color: var(--stark-accent-line);
    color: var(--stark-accent-dark);
    background: #fff7ed;
}

.stark-nota-vis.on {
    color: var(--stark-accent-dark);
    background: #fff7ed;
    border-color: var(--stark-accent-line);
}

.stark-nota-copy svg,
.stark-nota-vis svg {
    width: 0.95rem;
    height: 0.95rem;
    display: block;
}

#nota-livre,
#modal-editar-evento-msg {
    width: 100%;
    min-height: 6.5rem;
    resize: vertical;
    line-height: 1.45;
    font: inherit;
    white-space: pre-wrap;
}

.stark-nota-hint {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: var(--stark-muted);
}

.stark-modal-evento.modal-compact {
    width: min(100% - 1.5rem, min(560px, 94vw));
    max-width: min(100% - 1.5rem, min(560px, 94vw));
}

.stark-modal-evento-body {
    padding: 1.1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stark-modal-evento-quando {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.stark-modal-evento-quando label {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--stark-accent-dark, #1e3a5f);
}

.stark-datahora-wrap {
    position: relative;
    display: block;
    width: 100%;
    max-width: 18rem;
}

.stark-input-datahora,
.stark-input-data,
.stark-modal-evento-quando .stark-input-datahora,
.stark-datahora-wrap .stark-input-datahora,
.stark-datahora-wrap .stark-input-data {
    width: 100%;
    max-width: 18rem;
    box-sizing: border-box;
    padding: 0.55rem 2.4rem 0.55rem 0.7rem;
    border: 1px solid var(--stark-border, #cbd5e1);
    border-radius: 0.5rem;
    font: inherit;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    background: #fff;
    color: inherit;
}

.stark-datahora-wrap .stark-input-datahora,
.stark-datahora-wrap .stark-input-data {
    max-width: none;
}

.stark-input-datahora:focus,
.stark-input-data:focus,
.stark-modal-evento-quando .stark-input-datahora:focus,
.stark-datahora-wrap .stark-input-datahora:focus,
.stark-datahora-wrap .stark-input-data:focus {
    outline: none;
    border-color: var(--stark-accent-line, #f59e0b);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.stark-datahora-cal {
    position: absolute;
    right: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border: none;
    border-radius: 0.35rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.stark-datahora-cal:hover {
    color: var(--stark-accent-dark, #1e3a5f);
    background: #fff7ed;
}

.stark-datahora-cal svg {
    width: 1.05rem;
    height: 1.05rem;
    display: block;
}

.stark-datahora-native {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    border: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
}

.stark-modal-evento-status {
    margin: 0;
}

.stark-modal-evento-status select {
    width: 100%;
    max-width: none;
}

.stark-modal-evento-nota #modal-editar-evento-msg {
    min-height: 8rem;
    border: 1px solid var(--stark-border, #cbd5e1);
    border-radius: 0.5rem;
    padding: 0.65rem 0.75rem;
    background: #fff;
    box-sizing: border-box;
}

.stark-modal-evento-nota #modal-editar-evento-msg:focus {
    outline: none;
    border-color: var(--stark-accent-line, #f59e0b);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.stark-modal-evento-preview-wrap {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #dbe3ee;
}

.stark-modal-evento-preview-wrap .stark-field-label {
    display: block;
    margin-bottom: 0.35rem;
}

.stark-modal-evento-preview {
    min-height: 2.5rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    background: #fff;
    border: 1px solid #e8eef5;
    color: #0f172a;
}

.stark-modal-evento .form-actions-compact {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem 1.1rem;
    border-top: 1px solid #e8eef5;
    background: #fff;
}

.stark-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.stark-table th,
.stark-table td {
    text-align: left;
    padding: 0.5rem 0.4rem;
    border-bottom: 1px solid var(--stark-border);
}

.stark-table a {
    color: #b45309;
    font-weight: 600;
}

.btn-stark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: var(--stark-accent);
    color: #fff;
    border: 0;
    border-radius: var(--stark-radius-sm);
    padding: 0.5rem 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
    transition: filter var(--stark-transition), transform var(--stark-transition), background var(--stark-transition);
}

.stark-btn-plus {
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1;
}

.btn-stark:hover:not(:disabled) {
    filter: brightness(1.06);
}

.btn-stark:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-stark.sec {
    background: var(--stark-slate);
}

.btn-stark.ghost {
    background: #fff;
    color: var(--stark-accent-dark);
    border: 1px solid var(--stark-accent-line);
}

.btn-stark.ghost.stark-btn-perigo {
    color: #b91c1c;
    border-color: #fecaca;
}

.btn-stark.ghost.stark-btn-perigo:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #f87171;
    filter: none;
}

.btn-stark:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.stark-token-box {
    background: #111827;
    color: #fde68a;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-family: ui-monospace, monospace;
    word-break: break-all;
}

.playbook-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
}

@media (max-width: 800px) {
    .playbook-grid {
        grid-template-columns: 1fr;
    }
}

.playbook-row {
    display: contents;
}

.playbook-cell {
    border: 1px solid var(--stark-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    background: var(--stark-surface);
}

.playbook-cell h3 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
}

.playbook-cell.negocio {
    background: #fffbeb;
}

.playbook-cell.manutencao {
    background: var(--stark-bg);
}

#checklist,
#checklist-os {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0.5rem 0 1rem;
}

/* Grupo único na Bancada: dados + checklist + técnico + mídia */
.stark-checklist-entrada-grupo {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0 0 0.85rem;
    padding: 0;
}

.stark-checklist-entrada-titulo {
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--stark-text);
    line-height: 1.3;
}

.stark-checklist-entrada-grupo #checklist-os,
.stark-checklist-entrada-grupo .stark-checklist-dados,
.stark-checklist-entrada-grupo .stark-checklist-inner {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0;
}

.stark-checklist-entrada-grupo .stark-tecnico-ant,
.stark-checklist-entrada-grupo #midia-entrada-wrap {
    margin: 0;
    border-top: none;
}

.stark-midia-hint {
    margin: 0.35rem 0 0;
}

/* Card uniforme: mesma largura, padding e altura mínima para todos os itens */
.stark-check-item {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.75rem;
    min-height: 3.1rem;
    border: 1px solid var(--stark-border);
    border-radius: var(--stark-radius);
    background: var(--stark-surface);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    transition: border-color var(--stark-transition), box-shadow var(--stark-transition);
}

.stark-check-item:hover {
    border-color: var(--stark-accent-line);
}

.stark-check-item:has(input[type="checkbox"]:checked),
.stark-check-item-opcoes:has(.stark-check-opcao.on),
.stark-check-item-opcoes:has(.stark-chip.on) {
    border-color: #fdba74;
    background: linear-gradient(180deg, var(--stark-accent-soft) 0%, #fff 70%);
    box-shadow: var(--stark-shadow);
}

.stark-check-item-titulo {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--stark-text);
    margin: 0;
    line-height: 1.3;
}

.stark-check-item-titulo em {
    font-style: normal;
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--stark-muted);
}

.stark-check-item-valor {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--stark-text);
    line-height: 1.35;
    word-break: break-word;
}

.stark-check-item-dado .stark-check-item-valor {
    color: var(--stark-muted);
}

/* Label acima + conteúdo abaixo — mesmo desenho para chips, dados e mídia */
.stark-check-item-linha {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    min-width: 0;
    width: 100%;
}

.stark-check-item-opcoes {
    min-width: 0;
}

.stark-check-item-opcoes .stark-check-item-titulo {
    flex: none;
    max-width: none;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
}

.stark-check-item-opcoes .stark-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem;
    margin: 0;
    min-width: 0;
    overflow: visible;
}

.stark-check-item-opcoes .stark-chip {
    flex: 0 0 auto;
    padding: 0.18rem 0.55rem;
    font-size: 0.8rem;
    line-height: 1.25;
    white-space: nowrap;
}

.stark-check-item-midia .stark-check-item-titulo {
    margin-bottom: 0;
}

.stark-check-item-midia #midia-entrada-os {
    min-width: 0;
}

@media (max-width: 640px) {
    .stark-check-item {
        padding: 0.5rem 0.65rem;
        min-height: 2.9rem;
    }

    /* Toque mais confortável no mobile */
    .stark-check-item-opcoes .stark-chip {
        padding: 0.35rem 0.65rem;
        font-size: 0.875rem;
        min-height: 2rem;
    }
}

.stark-check-item-opcoes .stark-check-nota,
.stark-check-item-opcoes input[data-item-nota] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0;
    padding: 0.45rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--stark-radius-sm);
    font: inherit;
    background: #fff;
}

.stark-check-item-opcoes .stark-check-nota:focus,
.stark-check-item-opcoes input[data-item-nota]:focus {
    outline: none;
    border-color: var(--stark-accent-line);
    box-shadow: 0 0 0 3px rgba(253, 186, 116, 0.35);
}

.stark-check-item > label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--stark-text);
    cursor: pointer;
    line-height: 1.3;
}

.stark-check-item > label em {
    font-style: normal;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--stark-muted);
}

.stark-check-item input[type="checkbox"],
.stark-check input[type="checkbox"],
.stark-check-inline input[type="checkbox"],
.stark-passo input[type="checkbox"],
.stark-col input[type="checkbox"],
.stark-quadro input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.15rem;
    height: 1.15rem;
    min-width: 1.15rem;
    max-width: 1.15rem;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    border: 1.5px solid #94a3b8;
    border-radius: 0.3rem;
    background: #fff;
    cursor: pointer;
    transition: background var(--stark-transition), border-color var(--stark-transition), box-shadow var(--stark-transition);
    vertical-align: middle;
}

.stark-check-item input[type="checkbox"]:hover,
.stark-check input[type="checkbox"]:hover,
.stark-passo input[type="checkbox"]:hover {
    border-color: var(--stark-accent);
}

.stark-check-item input[type="checkbox"]:checked,
.stark-check input[type="checkbox"]:checked,
.stark-check-inline input[type="checkbox"]:checked,
.stark-passo input[type="checkbox"]:checked,
.stark-col input[type="checkbox"]:checked,
.stark-quadro input[type="checkbox"]:checked {
    background: var(--stark-accent);
    border-color: var(--stark-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5L6.5 11.5L12.5 4.5'/%3E%3C/svg%3E");
    background-size: 0.85rem 0.85rem;
    background-position: center;
    background-repeat: no-repeat;
}

.stark-check-item input[type="checkbox"]:focus-visible,
.stark-check input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(253, 186, 116, 0.45);
}

.stark-check-item input[type="text"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.55rem;
    margin-left: 1.8rem;
    max-width: calc(100% - 1.8rem);
    padding: 0.45rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--stark-radius-sm);
    font: inherit;
    background: #fff;
}

.stark-check-item input[type="text"]:focus {
    outline: none;
    border-color: var(--stark-accent-line);
    box-shadow: 0 0 0 3px rgba(253, 186, 116, 0.35);
}

@media (max-width: 480px) {
    .stark-check-item input[type="text"] {
        margin-left: 0;
        max-width: 100%;
    }
}

.stark-acessorios-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.stark-acessorios-details {
    border: 1px solid var(--stark-border);
    border-radius: var(--stark-radius);
    background: var(--stark-surface);
    overflow: hidden;
}

.stark-acessorios-details[open] {
    border-color: var(--stark-accent-line);
    box-shadow: var(--stark-shadow);
}

.stark-acessorios-summary {
    list-style: none;
    cursor: pointer;
    padding: 0.65rem 0.85rem;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--stark-text);
    user-select: none;
}

.stark-acessorios-summary::-webkit-details-marker {
    display: none;
}

.stark-acessorios-summary::before {
    content: '▸ ';
    color: var(--stark-muted);
    font-size: 0.85em;
}

.stark-acessorios-details[open] > .stark-acessorios-summary::before {
    content: '▾ ';
}

.stark-acessorios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: 0.35rem 0.75rem;
    padding: 0 0.85rem 0.75rem;
    border-top: 1px solid var(--stark-border);
}

.stark-acessorios-opt {
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.2rem 0;
}

.stark-acessorios-outros-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--stark-muted);
    margin: 0.15rem 0 0;
}

.stark-acessorios-outros {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--stark-radius-sm);
    font: inherit;
    background: #fff;
}

.stark-acessorios-outros:focus {
    outline: none;
    border-color: var(--stark-accent-line);
    box-shadow: 0 0 0 3px rgba(253, 186, 116, 0.35);
}

.stark-fotos img {
    max-width: 140px;
    max-height: 140px;
    margin: 0.25rem 0.25rem 0 0;
    border-radius: var(--stark-radius-sm);
    border: 1px solid var(--stark-border);
}

.stark-midia-lista {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0.5rem 0;
}

.stark-midia-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.5rem;
    border: 1px solid var(--stark-border);
    border-radius: var(--stark-radius-sm);
    background: var(--stark-surface, #fff);
}

.stark-midia-thumb {
    max-width: 140px;
    max-height: 140px;
    border-radius: var(--stark-radius-sm);
    border: 1px solid var(--stark-border);
    object-fit: cover;
}

.stark-midia-meta {
    flex: 1;
    min-width: 160px;
}

.stark-midia-meta .stark-midia-desc,
.stark-midia-desc-salva {
    width: 100%;
    margin: 0.35rem 0;
}

.stark-midia-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

#midia-entrada-wrap {
    margin-bottom: 1rem;
}

.stark-checklist-entrada-grupo #midia-entrada-wrap {
    margin-bottom: 0;
}

.stark-cta {
    border-color: var(--stark-accent-line);
    background: linear-gradient(180deg, var(--stark-accent-soft) 0%, #fff 100%);
    max-width: 420px;
}

.stark-links-sec {
    margin-top: 1.25rem;
}

.stark-links-sec a {
    color: #b45309;
    font-weight: 600;
}

/* —— Wizard —— */
.stark-stepper {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    padding: 0;
    margin: 0 0 1.15rem;
}

.stark-stepper li {
    font-weight: 700;
    color: #94a3b8;
    position: relative;
    transition: color var(--stark-transition);
}

.stark-stepper li.feito {
    color: #65a30d;
}

.stark-stepper li.ativo {
    color: var(--stark-accent-dark);
}

.stark-stepper li.pendente {
    color: #94a3b8;
}

.stark-passo {
    margin-bottom: 1rem;
}

.stark-passo[hidden] {
    display: none !important;
}

.stark-wizard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin: 0.25rem 0 1.5rem;
}

.stark-wizard-nav .spacer {
    flex: 1 1 auto;
}

.stark-pick-list {
    list-style: none;
    margin: 0.35rem 0 0.75rem;
    padding: 0;
    border: 1px solid var(--stark-border);
    border-radius: var(--stark-radius-sm);
    max-height: 220px;
    overflow: auto;
}

.stark-pick-list button {
    display: block;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    font: inherit;
}

.stark-pick-list button:hover,
.stark-pick-list button.ativo,
.stark-pick-list button[aria-selected="true"] {
    background: var(--stark-accent-soft);
}

.stark-escolhido {
    background: #fffbeb;
    border-radius: var(--stark-radius-sm);
    padding: 0.55rem 0.75rem;
}

.stark-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.35rem 0 0.85rem;
}

.stark-chip {
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    font: inherit;
    cursor: pointer;
    transition: background var(--stark-transition), color var(--stark-transition), border-color var(--stark-transition);
}

.stark-chip:hover {
    border-color: var(--stark-accent-line);
}

.stark-chip.on {
    background: var(--stark-accent-dark);
    color: #fff;
    border-color: var(--stark-accent-dark);
}

.stark-chips.travado .stark-chip {
    pointer-events: none;
    opacity: 0.7;
}

/* —— Ordens / filtros —— */
.stark-toolbar,
.stark-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.stark-filter-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0.75rem 0;
    background: linear-gradient(180deg, #f5f6f8 70%, rgba(245, 246, 248, 0.85));
    border-bottom: 1px solid transparent;
}

.stark-filter-bar.is-stuck {
    border-bottom-color: var(--stark-border);
}

.stark-filter-bar input[type="search"],
.stark-filter-bar input:not([type]),
.stark-toolbar input {
    flex: 1 1 220px;
    min-width: 180px;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--stark-radius-sm);
    font: inherit;
    background: var(--stark-surface);
}

.stark-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    width: 100%;
}

.stark-filter-group-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--stark-muted);
    margin-right: 0.25rem;
}

.stark-chip-filter {
    border: 1px solid #cbd5e1;
    background: var(--stark-surface);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--stark-slate);
    transition: background var(--stark-transition), color var(--stark-transition), border-color var(--stark-transition);
}

.stark-chip-filter:hover {
    border-color: var(--stark-accent-line);
}

.stark-chip-filter.on {
    background: var(--stark-accent-dark);
    color: #fff;
    border-color: var(--stark-accent-dark);
}

.stark-check-inline {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9rem;
    cursor: pointer;
}

.stark-actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.stark-actions-inline .btn-stark,
.stark-actions-inline a.btn-stark {
    text-decoration: none;
    display: inline-block;
}

.stark-os-destaque {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--stark-accent-dark);
    margin: 0.25rem 0 0.75rem;
}

/* —— Detalhe: barra Agora —— */
.stark-agora,
.stark-agora-bar {
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem 0.7rem;
    border-radius: var(--stark-radius);
    border: 1px solid var(--stark-border);
    background: linear-gradient(180deg, var(--stark-accent-soft) 0%, var(--stark-surface) 70%);
    box-shadow: var(--stark-shadow);
    /* sem sticky: a altura do fluxo atrapalhava o scroll do restante da página */
    position: static;
    z-index: auto;
}

.stark-agora-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.stark-agora-head-main {
    min-width: 0;
    flex: 1;
}

.stark-agora-bar h3 {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--stark-muted);
}

.stark-agora-trash {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid #fecaca;
    border-radius: 0.4rem;
    background: #fff;
    color: #b91c1c;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--stark-transition), border-color var(--stark-transition);
}

.stark-agora-trash svg {
    width: 0.95rem;
    height: 0.95rem;
    display: block;
}

.stark-agora-trash:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.stark-agora-bar #agora-texto {
    margin: 0.1rem 0 0;
    font-size: 0.82rem;
    line-height: 1.3;
}

.stark-fluxo {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
}

.stark-fluxo-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 7rem;
    max-width: 11rem;
    padding: 0 0.85rem 0 0;
}

.stark-fluxo-step.is-atual {
    padding-right: 1.1rem;
    flex-shrink: 0;
}

.stark-fluxo-step.is-atual::after,
.stark-fluxo-branch::before {
    content: '';
    position: absolute;
    top: 0.45rem;
    width: 0.85rem;
    height: 2px;
    background: var(--stark-accent-line);
}

.stark-fluxo-step.is-atual::after {
    right: 0;
}

.stark-fluxo-branch {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0 0 0 0.1rem;
    display: flex;
    align-items: center;
    min-width: 0;
}

.stark-fluxo-branch::before {
    left: 0;
    width: 0.7rem;
}

.stark-fluxo-next {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
    border-left: 2px solid var(--stark-accent-line);
    padding-left: 0.7rem;
}

.stark-fluxo-dot {
    display: block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    margin-bottom: 0.2rem;
    background: #cbd5e1;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #94a3b8;
}

.stark-fluxo-step.is-atual .stark-fluxo-dot {
    background: var(--stark-accent);
    box-shadow: 0 0 0 1px var(--stark-accent-dark);
}

.stark-fluxo-step.is-fim .stark-fluxo-dot {
    background: #e2e8f0;
    box-shadow: 0 0 0 1px #cbd5e1;
}

.stark-fluxo-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--stark-ink, #1e293b);
    line-height: 1.2;
}

.stark-fluxo-hint {
    font-size: 0.68rem;
    color: var(--stark-muted);
    margin-top: 0.1rem;
    line-height: 1.25;
}

.stark-fluxo-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: auto;
    min-width: 7.5rem;
    max-width: 11rem;
    margin: 0;
    padding: 0.3rem 0.45rem 0.35rem;
    border: 1px dashed var(--stark-accent-line);
    border-radius: 0.45rem;
    background: #fff;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font: inherit;
    transition: border-color var(--stark-transition), background var(--stark-transition), box-shadow var(--stark-transition);
}

.stark-fluxo-btn:hover {
    border-style: solid;
    border-color: var(--stark-accent);
    background: var(--stark-accent-soft);
    box-shadow: var(--stark-shadow);
}

.stark-fluxo-btn .stark-fluxo-dot {
    background: #fff;
    box-shadow: 0 0 0 1.5px var(--stark-accent);
}

.stark-fluxo-btn .stark-fluxo-label {
    color: var(--stark-accent-dark);
}

.stark-agora-bar #comprovante-os:not([hidden]) {
    margin: 0.45rem 0 0;
}

.stark-agora-bar details {
    margin-top: 0.4rem;
}

.stark-agora-bar details summary {
    cursor: pointer;
    color: var(--stark-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

#check-faltam.ok {
    color: #3f6212;
}

#eq-serial-box {
    margin: 0.5rem 0 0;
}

#eq-serial-box summary {
    cursor: pointer;
    color: var(--stark-muted);
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .stark-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .stark-filter-bar .btn-stark {
        width: 100%;
        text-align: center;
    }

    .stark-wizard-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .stark-wizard-nav .spacer {
        display: none;
    }

    .stark-wizard-nav .btn-stark {
        width: 100%;
    }
}

/* —— Clientes —— */
.stark-cli-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.stark-cli-toolbar input {
    flex: 1 1 220px;
    min-width: 180px;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--stark-radius-sm);
    font: inherit;
    background: var(--stark-surface);
}

.stark-form-span {
    grid-column: 1 / -1;
}

.stark-cli-form {
    margin: 1rem 0;
}

.stark-cli-nome-full {
    display: block;
    font-size: 0.78rem;
    color: var(--stark-muted);
    margin-top: 0.15rem;
}

.stark-cli-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 0.35rem;
    background: #f1f5f9;
    color: var(--stark-slate, #475569);
    white-space: nowrap;
    vertical-align: middle;
}

.stark-cli-badge--parceiro {
    background: var(--stark-accent-soft);
    color: var(--stark-accent-dark);
    border: 1px solid var(--stark-accent-line);
}

.stark-cli-parceiro-row {
    display: flex;
    align-items: center;
    min-height: 2.4rem;
}

.stark-cli-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--stark-slate, #334155);
    cursor: pointer;
    margin: 0;
}

.stark-cli-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--stark-accent);
}

.stark-cli-row-highlight {
    animation: stark-cli-flash 2.8s ease-out;
}

@keyframes stark-cli-flash {
    0%,
    12% {
        background: rgba(14, 165, 233, 0.22);
    }
    100% {
        background: transparent;
    }
}

.stark-card-icon.os:hover:not(:disabled):not(.off) {
    color: #0d9488;
    border-color: rgba(13, 148, 136, 0.35);
    background: rgba(13, 148, 136, 0.08);
}

.stark-linkish {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--stark-accent-dark);
    cursor: pointer;
    text-align: left;
}

.stark-linkish:hover {
    text-decoration: underline;
}

.stark-table .stark-os-card-actions {
    flex-wrap: nowrap;
}

/* —— Técnico anterior / documentos OS —— */
.stark-tecnico-ant {
    margin: 0.85rem 0 1rem;
}

.stark-tecnico-ant.stark-check-item {
    margin: 0;
}

.stark-tecnico-ant .stark-field-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
}

.stark-tecnico-ant .stark-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    margin: 0;
}

.stark-tecnico-ant:not(.stark-check-item) .stark-chips {
    margin: 0 0 0.4rem;
}

.stark-tecnico-ant .stark-chip {
    padding: 0.18rem 0.55rem;
    font-size: 0.8rem;
    line-height: 1.25;
}

.stark-tecnico-ant #tecnico-anterior-detalhe-wrap-os,
.stark-tecnico-ant #tecnico-anterior-detalhe-wrap {
    margin-top: 0.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stark-tecnico-ant #tecnico-anterior-detalhe-wrap-os label,
.stark-tecnico-ant #tecnico-anterior-detalhe-wrap label {
    font-size: 0.8rem;
}

.stark-tecnico-ant #tecnico-anterior-detalhe-os,
.stark-tecnico-ant #tecnico-anterior-detalhe {
    box-sizing: border-box;
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--stark-radius-sm);
    font: inherit;
    background: #fff;
}

.stark-tecnico-ant #tecnico-anterior-detalhe-os:focus,
.stark-tecnico-ant #tecnico-anterior-detalhe:focus {
    outline: none;
    border-color: var(--stark-accent-line);
    box-shadow: 0 0 0 3px rgba(253, 186, 116, 0.35);
}

@media (max-width: 640px) {
    .stark-tecnico-ant .stark-chip {
        padding: 0.35rem 0.65rem;
        font-size: 0.875rem;
        min-height: 2rem;
    }
}

.stark-docs {
    margin: 0.5rem 0 1.25rem;
}

.stark-docs-nota {
    margin: 0.25rem 0 0.75rem;
}

.stark-docs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 720px) {
    .stark-docs-grid {
        grid-template-columns: 1fr;
    }
}

.stark-docs-col {
    min-width: 0;
}

.stark-docs-upload {
    display: inline-block;
    margin: 0.35rem 0 0.5rem;
    cursor: pointer;
}

.stark-docs-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.stark-docs-item {
    border: 1px solid #e2e8f0;
    border-radius: var(--stark-radius-sm, 8px);
    padding: 0.55rem 0.65rem;
    background: #fff;
}

.stark-docs-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.4rem;
}

.stark-docs-badge {
    display: inline-block;
    width: fit-content;
    font-size: 0.75rem;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
}

.stark-docs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.stark-docs-preview {
    margin-top: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--stark-radius-sm, 8px);
    padding: 0.65rem;
    background: #f8fafc;
}

.stark-docs-preview-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.stark-docs-iframe {
    width: 100%;
    min-height: 420px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
}

.stark-docs-texto {
    max-height: 360px;
    overflow: auto;
    margin: 0;
    padding: 0.75rem;
    font-size: 0.8rem;
    line-height: 1.4;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 6px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* BOM / componentes do esquema */
.stark-bom-wrap {
    margin-top: 1.25rem;
}
.stark-bom-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
.stark-bom-toolbar input[type="search"] {
    flex: 1 1 12rem;
    min-width: 10rem;
}
.stark-bom-table input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font: inherit;
    padding: 0.25rem 0.35rem;
}
.stark-bom-acoes {
    white-space: nowrap;
}
.stark-bom-chip {
    display: inline-block;
    margin: 0.1rem 0.15rem 0.1rem 0;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    background: #e8eef7;
    color: #1e3a5f;
    font-size: 0.8rem;
    text-decoration: none;
}
.stark-bom-chip:hover {
    text-decoration: underline;
}
.stark-bom-extrair {
    margin-bottom: 0.5rem;
}
.stark-bom-doc-ex {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.35rem;
}
.stark-docs-upload-row {
    margin-bottom: 0.75rem;
}
.stark-hr {
    border: 0;
    border-top: 1px solid #dbe3ee;
    margin: 1.25rem 0;
}
.stark-table-wrap {
    overflow-x: auto;
}

.stark-docs-preview-nota {
    margin: 0 0 0.5rem;
    padding: 0.5rem 0.65rem;
    background: #eef4fb;
    border-radius: 6px;
}

.stark-hist-os-lista {
    list-style: none;
    margin: 0;
    padding: 0;
}

.stark-hist-os-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #e8eef5;
}

.stark-hist-os-item:last-child {
    border-bottom: 0;
}

.stark-hist-os-item a {
    font-weight: 600;
    color: var(--stark-accent-dark, #1e3a5f);
    text-decoration: none;
}

.stark-hist-os-item a:hover {
    text-decoration: underline;
}

.stark-hist-os-status {
    color: var(--stark-muted, #64748b);
    font-size: 0.92rem;
}

.stark-hist-os-data {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--stark-muted, #94a3b8);
}

/* --- custos / técnica da OS (usam .stark-quadro) --- */
/* Faixa comercial: Orçamento | Peças | Custos — preenche a largura sem void ao lado. */
.stark-split--negocio-baixo {
    margin-top: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

@media (max-width: 1100px) {
    .stark-split--negocio-baixo {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .stark-split--negocio-baixo {
        grid-template-columns: 1fr;
    }
}

/* Inferior: técnica em largura total (BOM/tabela). */
.stark-split--inferior {
    margin-top: 1rem;
    grid-template-columns: 1fr;
}

.stark-secao-tecnica,
.stark-secao-custos {
    margin-top: 0;
}

.stark-secao-tecnica-head,
.stark-secao-custos-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    margin-bottom: 0.75rem;
}

.stark-secao-tecnica-head h3,
.stark-secao-custos-head h3 {
    margin: 0;
}

.stark-secao-tecnica-head .subtitle {
    margin: 0;
}

.stark-secao-tecnica #docs-os-wrap {
    margin-bottom: 1rem;
}

.stark-secao-custos-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.stark-custos {
    margin-top: 0.35rem;
}

.stark-custos-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.stark-custos-head .stark-custos-total {
    flex: 1;
    margin: 0;
}

.stark-custos-add {
    flex-shrink: 0;
}

.stark-custos-anexo-hint {
    margin: 0.35rem 0 0;
}

.stark-custos-anexo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.stark-custos-anexo-btn svg {
    width: 1rem;
    height: 1rem;
}

.stark-custos-detalhe {
    padding: 1rem 1.25rem;
}

.stark-custos-dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stark-custos-dl > div {
    display: grid;
    gap: 0.15rem;
}

.stark-custos-dl dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--stark-muted, #64748b);
}

.stark-custos-dl dd {
    margin: 0;
}

.stark-custos-total {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.85rem;
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--stark-border, #e2e8f0);
    border-radius: 0.5rem;
    background: #f8fafc;
}

.stark-custos-lista {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.stark-custos-item {
    border: 1px solid var(--stark-border, #e2e8f0);
    border-radius: 0.5rem;
    padding: 0.55rem 0.7rem;
    background: #fff;
}

.stark-custos-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.stark-custos-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.35rem 0.75rem;
    align-items: baseline;
    min-width: 0;
    flex: 1;
}

.stark-custos-desc {
    grid-column: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stark-custos-valor {
    grid-column: 2;
    font-weight: 600;
    color: var(--stark-accent-dark, #1e3a5f);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.stark-custos-data {
    grid-column: 3;
    white-space: nowrap;
}

.stark-custos-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.stark-custos-ico {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 0.4rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.stark-custos-ico:hover:not(:disabled) {
    color: var(--stark-accent-dark, #1e3a5f);
    background: #fff7ed;
    border-color: var(--stark-accent-line, #f59e0b);
}

.stark-custos-ico:disabled,
.stark-custos-ico.is-empty {
    opacity: 0.35;
    cursor: default;
}

.stark-custos-ico svg {
    width: 0.95rem;
    height: 0.95rem;
    display: block;
}

.stark-custos-badge {
    position: absolute;
    top: -0.15rem;
    right: -0.15rem;
    min-width: 0.95rem;
    height: 0.95rem;
    padding: 0 0.2rem;
    border-radius: 999px;
    background: var(--stark-accent-dark, #1e3a5f);
    color: #fff;
    font-size: 0.65rem;
    line-height: 0.95rem;
    text-align: center;
}

.stark-custos-obs-modal {
    margin: 0.5rem 0 0;
    white-space: pre-wrap;
    line-height: 1.45;
}

.stark-custos-anexos-modal {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
}

.stark-custos-anexos-modal li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    margin-bottom: 0.4rem;
}

@media (max-width: 640px) {
    .stark-custos-main {
        grid-template-columns: 1fr auto;
    }
    .stark-custos-data {
        grid-column: 1 / -1;
    }
}

.stark-custos-form {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--stark-border, #e2e8f0);
    border-radius: 0.55rem;
    background: #f8fafc;
}

.stark-custos-form label {
    margin-top: 0.25rem;
    font-size: 0.88rem;
}

.stark-custos-form-anexo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.stark-custos-form .stark-datahora-wrap {
    max-width: 12rem;
}

/* --- ficha cadastro vs OS --- */
.stark-ficha-cadastro {
    margin-bottom: 0.35rem;
}

/* --- tempo na OS --- */
.stark-tempo-os {
    margin: 0.85rem 0 1rem;
}

.stark-tempo-os-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--stark-border, #e2e8f0);
    border-radius: 0.5rem;
    background: #f8fafc;
}

.stark-tempo-os-clock {
    display: block;
    font-variant-numeric: tabular-nums;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}

.stark-tempo-chip {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    max-width: 100%;
    border-radius: 999px;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.stark-tempo-chip[hidden] {
    display: none !important;
}

.stark-tempo-chip.is-on {
    background: #dc2626;
    color: #fff;
}

.stark-tempo-chip.is-ack {
    background: #b45309;
    color: #fff;
    box-shadow: 0 0 0 2px #fde68a, 0 0 0 4px #b45309;
    animation: stark-tempo-ack-glow 1.4s ease-in-out infinite;
}

.stark-tempo-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.28rem 0.7rem 0.28rem 0.55rem;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: #fff;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

/* Ganha de .stark-nav-links a { color: #b45309 } (chip vive dentro da nav) */
.stark-nav-links .stark-tempo-chip a.stark-tempo-chip-btn,
.stark-nav-links .stark-tempo-chip .stark-tempo-chip-btn,
.stark-nav-links .stark-tempo-chip a.stark-tempo-chip-btn:hover,
.stark-nav-links .stark-tempo-chip a.stark-tempo-chip-btn:focus-visible {
    color: #fff;
}

a.stark-tempo-chip-btn:hover,
a.stark-tempo-chip-btn:focus-visible {
    filter: brightness(1.08);
    outline: none;
}

.stark-tempo-chip-btn strong {
    font-weight: 700;
    letter-spacing: 0.01em;
    color: inherit;
}

.stark-tempo-chip-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    min-width: 0;
    line-height: 1.15;
}

.stark-tempo-chip-equip {
    display: block;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 700;
}

.stark-tempo-chip-os {
    display: block;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0.92;
    line-height: 1.1;
    color: inherit;
}

.stark-tempo-chip-clock {
    font-weight: 600;
    opacity: 0.95;
    color: inherit;
    font-variant-numeric: tabular-nums;
}

.stark-tempo-pulse {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
    animation: stark-tempo-rec-pulse 1.25s ease-out infinite;
    flex-shrink: 0;
}

.stark-tempo-chip.is-ack .stark-tempo-pulse {
    background: #fef3c7;
    animation: stark-tempo-rec-pulse 1.6s ease-out infinite;
}

@keyframes stark-tempo-rec-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
        opacity: 1;
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 0.45rem rgba(255, 255, 255, 0);
        opacity: 0.85;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
        opacity: 1;
    }
}

@keyframes stark-tempo-ack-glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.12); }
}

@media (prefers-reduced-motion: reduce) {
    .stark-tempo-pulse,
    .stark-tempo-chip.is-ack {
        animation: none;
    }
}

/* --- orçamento / peças --- */
.stark-orcamento,
.stark-pecas {
    margin-top: 0.35rem;
}

.stark-orcamento-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.stark-orcamento-table th,
.stark-orcamento-table td {
    border-bottom: 1px solid var(--stark-border, #e2e8f0);
    padding: 0.35rem 0.25rem;
    vertical-align: middle;
}

.stark-orcamento-table input {
    width: 100%;
    min-width: 0;
}

.stark-orcamento-total {
    margin: 0.5rem 0;
}

.stark-orcamento-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
}

.stark-pecas-lista {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.stark-pecas-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
    gap: 0.35rem;
    align-items: center;
}

@media (max-width: 640px) {
    .stark-pecas-item {
        grid-template-columns: 1fr;
    }
}
