/* ── Design tokens (Flux-inspired) ─────────────────────────────────────── */
:root {
    --lv-primary:       #6366f1;
    --lv-primary-dark:  #4f46e5;
    --lv-primary-light: #818cf8;
    --lv-accent:        #8b5cf6;
    --lv-gradient:      linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #3b82f6 100%);
    --lv-sidebar-bg:    #f8fafc;
    --lv-sidebar-w:     260px;
    --lv-header-h:      64px;
    --lv-body-bg:       #f8fafc; /* branco gelo — fundo global */
    --lv-card-bg:       #ffffff;
    --lv-border:        #e2e8f0;
    --lv-text:          #0f172a;
    --lv-text-muted:    #64748b;
    --lv-radius:        14px;
    --lv-radius-sm:     10px;
    --lv-shadow:        0 1px 3px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .04);
    --lv-shadow-lg:     0 8px 32px rgba(99, 102, 241, .12);
    --bs-primary:       var(--lv-primary);
    --bs-primary-rgb:   99, 102, 241;
    --bs-link-color:    var(--lv-primary);
    --bs-link-hover-color: var(--lv-primary-dark);
}

/* ── Base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body.app-body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--lv-body-bg);
    color: var(--lv-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Sidebar ───────────────────────────────────────────────────────────── */
.app-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--lv-sidebar-w);
    background: var(--lv-sidebar-bg);
    border-right: 1px solid var(--lv-border);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    overflow-y: auto;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1.25rem 1.25rem 1rem;
    text-decoration: none;
    color: var(--lv-text);
    font-weight: 700;
    font-size: 1.05rem;
}

.app-brand-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--lv-gradient);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.app-nav-section {
    padding: .35rem 1rem .25rem;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--lv-text-muted);
    margin-top: .5rem;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .85rem;
    margin: 2px .75rem;
    border-radius: var(--lv-radius-sm);
    color: var(--lv-text-muted);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
}

.app-nav-link i { font-size: 1.05rem; width: 1.25rem; text-align: center; }

.app-nav-link:hover {
    background: rgba(99, 102, 241, .07);
    color: var(--lv-primary);
}

.app-nav-link.active {
    background: rgba(99, 102, 241, .1);
    color: var(--lv-primary-dark);
    font-weight: 600;
    border-left-color: var(--lv-primary);
}

.app-sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--lv-border);
}

.app-user {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.app-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--lv-gradient);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

.app-user-name { font-size: .8rem; font-weight: 600; line-height: 1.2; }
.app-user-role { font-size: .7rem; color: var(--lv-text-muted); }

/* ── Shell (sem header global) ───────────────────────────────────────────── */
.app-shell {
    margin-left: var(--lv-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--lv-body-bg);
}

.app-header { display: none !important; }

.app-mobile-menu {
    position: fixed;
    top: .85rem;
    left: .85rem;
    z-index: 1040;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--lv-border);
    background: var(--lv-card-bg);
    color: var(--lv-text);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
    cursor: pointer;
}
.app-mobile-menu:hover { color: var(--lv-primary); }

@media (min-width: 992px) {
    .app-mobile-menu { display: none !important; }
}

.app-header-search {
    flex: 1;
    max-width: 420px;
    position: relative;
}

.app-header-search input {
    width: 100%;
    padding: .5rem 1rem .5rem 2.35rem;
    border: 1px solid var(--lv-border);
    border-radius: 999px;
    background: var(--lv-body-bg);
    font-size: .875rem;
    color: var(--lv-text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.app-header-search input:focus {
    border-color: var(--lv-primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.app-header-search i {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lv-text-muted);
    font-size: .9rem;
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
}

.app-icon-btn {
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--lv-border);
    background: var(--lv-card-bg);
    color: var(--lv-text-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .15s, color .15s;
    text-decoration: none;
}

.app-icon-btn:hover {
    background: var(--lv-body-bg);
    color: var(--lv-primary);
}

.app-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.1rem;
    background: var(--lv-gradient);
    color: #fff !important;
    border: none;
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .35);
    transition: transform .15s, box-shadow .15s;
    white-space: nowrap;
}

.app-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, .4);
    color: #fff;
}

/* ── Main content ────────────────────────────────────────────────────────── */
.app-main {
    flex: 1;
    padding: 1.75rem;
    background: var(--lv-body-bg);
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.app-alert {
    border: none;
    border-radius: var(--lv-radius-sm);
    padding: .85rem 1.1rem;
    margin-bottom: 1.25rem;
    font-size: .875rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.app-alert-success { background: #ecfdf5; color: #065f46; }
.app-alert-danger  { background: #fef2f2; color: #991b1b; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius);
    box-shadow: var(--lv-shadow);
    background: var(--lv-card-bg);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--lv-border);
    padding: .9rem 1.25rem;
    font-weight: 600;
    font-size: .9rem;
}

.card-body { padding: 1.25rem; }

/* ── Dashboard banner ────────────────────────────────────────────────────── */
.dash-banner {
    background: var(--lv-gradient);
    border-radius: var(--lv-radius);
    padding: 1.75rem 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    box-shadow: var(--lv-shadow-lg);
}

.dash-banner h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 .25rem;
    color: #fff;
}

.dash-banner p { margin: 0; opacity: .85; font-size: .9rem; }

.dash-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.dash-metric {
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(8px);
    border-radius: var(--lv-radius-sm);
    padding: 1rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, .2);
}

.dash-metric-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .8;
    margin-bottom: .25rem;
}

.dash-metric-value {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.1;
}

.dash-metric-sub {
    font-size: .75rem;
    opacity: .75;
    margin-top: .2rem;
}

/* ── Stat cards (inner pages) ────────────────────────────────────────────── */
.stat-card {
    background: var(--lv-card-bg);
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius);
    padding: 1.25rem;
    box-shadow: var(--lv-shadow);
}

.stat-card-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    margin-bottom: .75rem;
}

.stat-card-icon.purple { background: rgba(99, 102, 241, .12); color: var(--lv-primary); }
.stat-card-icon.green  { background: rgba(16, 185, 129, .12); color: #059669; }
.stat-card-icon.blue   { background: rgba(59, 130, 246, .12); color: #2563eb; }
.stat-card-icon.orange { background: rgba(249, 115, 22, .12); color: #ea580c; }

/* ── Quick links grid ──────────────────────────────────────────────────────── */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.quick-card {
    background: var(--lv-card-bg);
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius);
    padding: 1.25rem;
    text-decoration: none;
    color: var(--lv-text);
    box-shadow: var(--lv-shadow);
    transition: transform .15s, box-shadow .15s, border-color .15s;
    display: block;
}

.quick-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--lv-shadow-lg);
    border-color: var(--lv-primary-light);
    color: var(--lv-text);
}

.quick-card-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: rgba(99, 102, 241, .1);
    color: var(--lv-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    margin-bottom: .85rem;
}

.quick-card h6 { font-weight: 600; margin: 0 0 .35rem; font-size: .95rem; }
.quick-card p  { margin: 0; font-size: .8rem; color: var(--lv-text-muted); line-height: 1.45; }

/* ── Page header (inner pages) ───────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0;
    color: var(--lv-text);
}

.page-header .breadcrumb-text {
    font-size: .8rem;
    color: var(--lv-text-muted);
    margin-top: .15rem;
}

/* ── Tables ───────────────────────────────────────────────────────────────── */
.table {
    --bs-table-bg: transparent;
    font-size: .875rem;
}

.table thead th {
    background: var(--lv-body-bg);
    border-bottom: 1px solid var(--lv-border);
    color: var(--lv-text-muted);
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .75rem 1rem;
}

.table tbody td {
    padding: .85rem 1rem;
    vertical-align: middle;
    border-color: var(--lv-border);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background: rgba(241, 245, 249, .5);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn-primary {
    background: var(--lv-gradient);
    border: none;
    border-radius: var(--lv-radius-sm);
    font-weight: 600;
    font-size: .875rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, .25);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--lv-primary-dark);
    box-shadow: 0 4px 12px rgba(99, 102, 241, .35);
}

.btn-outline-primary {
    border-color: var(--lv-primary);
    color: var(--lv-primary);
    border-radius: var(--lv-radius-sm);
    font-weight: 500;
    font-size: .875rem;
}

.btn-outline-primary:hover {
    background: rgba(99, 102, 241, .08);
    color: var(--lv-primary-dark);
    border-color: var(--lv-primary-dark);
}

.btn-outline-secondary, .btn-secondary {
    border-radius: var(--lv-radius-sm);
    font-size: .875rem;
}

.btn-sm { border-radius: 8px; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-control, .form-select {
    border-color: var(--lv-border);
    border-radius: var(--lv-radius-sm);
    font-size: .875rem;
    padding: .5rem .85rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--lv-primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.form-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--lv-text);
    margin-bottom: .35rem;
}

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
    font-weight: 600;
    font-size: .72rem;
    padding: .35em .65em;
    border-radius: 6px;
}

.bg-primary { background: var(--lv-primary) !important; }

/* ── Activity list (dashboard) ─────────────────────────────────────────────── */
.activity-list { list-style: none; padding: 0; margin: 0; }

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--lv-border);
    font-size: .85rem;
}

.activity-item:last-child { border-bottom: none; }

.activity-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.activity-time { font-size: .75rem; color: var(--lv-text-muted); white-space: nowrap; }

/* ── Data card (tables) ────────────────────────────────────────────────────── */
.data-card {
    overflow: hidden;
}

.data-card .table { margin-bottom: 0; }

.data-card .table thead th:first-child { padding-left: 1.25rem; }
.data-card .table tbody td:first-child { padding-left: 1.25rem; }
.data-card .table thead th:last-child,
.data-card .table tbody td:last-child { padding-right: 1.25rem; }

.page-header-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Empty state ───────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--lv-text-muted);
    background: var(--lv-card-bg);
    border: 1px dashed var(--lv-border);
    border-radius: var(--lv-radius);
}

/* ── List pages (Flux-style) ───────────────────────────────────────────────── */
.list-breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: var(--lv-text-muted);
    margin-bottom: .75rem;
}

.list-breadcrumb a {
    color: var(--lv-text-muted);
    text-decoration: none;
}

.list-breadcrumb a:hover { color: var(--lv-primary); }

.list-breadcrumb i { font-size: .65rem; opacity: .5; }

.list-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.list-title {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 .25rem;
    color: var(--lv-text);
}

.list-subtitle {
    margin: 0;
    font-size: .9rem;
    color: var(--lv-text-muted);
}

.list-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1rem;
    padding-bottom: .25rem;
    border-bottom: 1px solid var(--lv-border);
}

.list-tab {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .85rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--lv-text-muted);
    text-decoration: none;
    transition: background .15s, color .15s;
}

.list-tab:hover {
    background: rgba(99, 102, 241, .06);
    color: var(--lv-primary);
}

.list-tab.active {
    background: rgba(99, 102, 241, .1);
    color: var(--lv-primary-dark);
    font-weight: 600;
}

.list-tab-count {
    font-size: .72rem;
    background: rgba(15, 23, 42, .06);
    padding: .1rem .45rem;
    border-radius: 999px;
    min-width: 1.4rem;
    text-align: center;
}

.list-tab.active .list-tab-count {
    background: rgba(99, 102, 241, .15);
}

.list-toolbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.list-search-form { flex: 1 1 12rem; min-width: 0; }

.list-search-row {
    display: flex;
    align-items: flex-end;
    gap: .75rem;
    flex-wrap: wrap;
}

.list-field-group {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    margin: 0;
}

.list-field-caption {
    font-size: .72rem;
    line-height: 1.2;
    color: var(--lv-text-muted);
    min-height: .86rem;
}

.list-field-caption[aria-hidden="true"] {
    visibility: hidden;
}

.list-search-group {
    flex: 1 1 14rem;
    min-width: 0;
}

.list-filter-btn-group {
    flex-shrink: 0;
}

.list-date-filter {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    flex-wrap: wrap;
}

.list-field-control {
    box-sizing: border-box;
    height: 2.35rem;
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius-sm);
    background: var(--lv-card-bg);
    color: var(--lv-text);
    font-size: .875rem;
}

.list-date-input {
    padding: 0 .55rem;
    min-width: 9rem;
}

.list-date-btn {
    width: auto;
    min-width: 2.35rem;
    padding: 0 .65rem;
    justify-content: center;
}

.list-clear-btn {
    padding: 0 .75rem;
    gap: .35rem;
    white-space: nowrap;
    text-decoration: none;
}

.list-clear-btn:hover {
    text-decoration: none;
}

.list-search-row .list-field-control:focus {
    border-color: var(--lv-primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
    outline: none;
}

.list-search {
    position: relative;
    max-width: 100%;
}

.list-search i {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lv-text-muted);
    font-size: .9rem;
}

.list-search input {
    width: 100%;
    padding: .55rem 1rem .55rem 2.35rem;
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius-sm);
    background: var(--lv-card-bg);
    font-size: .875rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.list-search-row .list-field-control {
    width: 100%;
    padding: 0 1rem 0 2.35rem;
}

.list-search input:focus {
    border-color: var(--lv-primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}

.list-toolbar-actions {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
}

.list-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .9rem;
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius-sm);
    background: var(--lv-card-bg);
    color: var(--lv-text);
    font-size: .82rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.list-tool-btn:hover {
    background: var(--lv-body-bg);
    border-color: #cbd5e1;
    color: var(--lv-text);
}

.list-card {
    background: var(--lv-card-bg);
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius);
    box-shadow: var(--lv-shadow);
    overflow: visible;
}

/* Rolagem só na horizontal (mobile); vertical livre para menus ⋯ */
.list-card .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
}

.list-th-actions,
.list-td-actions,
.list-th-actions .dropdown,
.list-td-actions .dropdown {
    position: static;
}

.list-th-actions .dropdown-menu,
.list-td-actions .dropdown-menu {
    z-index: 1050;
}

.list-empty {
    text-align: center;
    padding: 3.5rem 1.5rem;
    color: var(--lv-text-muted);
}

.list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.list-table thead th {
    background: var(--lv-body-bg);
    padding: .75rem 1rem;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--lv-text-muted);
    border-bottom: 1px solid var(--lv-border);
    white-space: nowrap;
}

.list-table tbody td {
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--lv-border);
    vertical-align: middle;
}

.list-table tbody tr:hover { background: rgba(241, 245, 249, .6); }
.list-table tbody tr:last-child td { border-bottom: none; }

.list-th-check { width: 40px; padding-left: 1.25rem !important; }
.list-th-actions { width: 48px; text-align: center; }

.list-sort-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.list-sort-link:hover { color: var(--lv-primary); }

.list-id-link {
    font-weight: 600;
    color: var(--lv-text);
    text-decoration: none;
}

.list-id-link:hover { color: var(--lv-primary); }

.list-customer {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 180px;
}

.list-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.list-customer-name {
    font-weight: 600;
    font-size: .875rem;
    line-height: 1.25;
}

.list-customer-sub {
    font-size: .75rem;
    color: var(--lv-text-muted);
    line-height: 1.25;
}

.list-service {
    display: block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--lv-text);
}

.list-service-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    max-width: 240px;
}

.list-service-chip {
    display: inline-block;
    padding: .2em .55em;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 600;
    background: rgba(99, 102, 241, .1);
    color: var(--lv-primary-dark);
    border: 1px solid rgba(99, 102, 241, .15);
    white-space: nowrap;
}

.list-badge {
    display: inline-block;
    padding: .3em .75em;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}

.list-badge-success    { background: #dcfce7; color: #15803d; }
.list-badge-processing { background: #ede9fe; color: #6d28d9; }
.list-badge-washing    { background: #dbeafe; color: #1d4ed8; }
.list-badge-pending    { background: #ffedd5; color: #c2410c; }
.list-badge-ready      { background: #ede9fe; color: #6d28d9; }
.list-badge-muted      { background: #f1f5f9; color: #64748b; }

.list-date { color: var(--lv-text-muted); white-space: nowrap; }

.list-sparkline {
    width: 64px;
    height: 24px;
    display: block;
}

.list-amount {
    font-weight: 600;
    white-space: nowrap;
}

.list-table th.col-valor,
.list-table td.col-valor,
.list-table th.col-preco,
.list-table td.col-preco {
    text-align: right;
}

.list-table th.col-valor .list-sort-link,
.list-table th.col-preco .list-sort-link {
    justify-content: flex-end;
}

.list-menu-btn {
    width: 32px; height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--lv-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.list-menu-btn:hover {
    background: var(--lv-body-bg);
    color: var(--lv-text);
}

.list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: .85rem 1.25rem;
    border-top: 1px solid var(--lv-border);
    font-size: .82rem;
    color: var(--lv-text-muted);
}

.list-footer-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.list-rows-form { margin: 0; }

.list-rows-label {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    margin: 0;
}

.list-rows-select {
    border: 1px solid var(--lv-border);
    border-radius: 8px;
    padding: .25rem .5rem;
    font-size: .82rem;
    background: var(--lv-card-bg);
}

.list-pagination {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.list-page-btn {
    padding: .35rem .65rem;
    font-size: .82rem;
    color: var(--lv-text-muted);
    text-decoration: none;
    border-radius: 8px;
}

.list-page-btn:not(.disabled):hover {
    background: var(--lv-body-bg);
    color: var(--lv-primary);
}

.list-page-btn.disabled {
    opacity: .4;
    cursor: default;
}

.list-page-num {
    width: 32px; height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: .82rem;
    font-weight: 500;
    color: var(--lv-text-muted);
    text-decoration: none;
    transition: background .15s, color .15s;
}

.list-page-num:hover {
    background: var(--lv-body-bg);
    color: var(--lv-primary);
}

.list-page-num.active {
    background: var(--lv-primary);
    color: #fff;
    font-weight: 600;
}

.list-columns-menu .dropdown-item {
    cursor: pointer;
    font-size: .85rem;
}

.list-columns-menu label { margin: 0; width: 100%; }

/* ── Card header com ações (ex.: itens da ordem) ───────────────────────────── */
.card-header-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.card-header-toolbar .card-header-title {
    font-weight: 600;
    flex: 1 1 auto;
    min-width: 0;
}

.card-header-toolbar .card-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: .5rem;
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
}

@media (min-width: 576px) {
    .card-header-toolbar .card-header-actions {
        flex: 1 1 auto;
        justify-content: flex-end;
        max-width: min(100%, 28rem);
    }
}

.card-header-select {
    flex: 1 1 12rem;
    min-width: 0;
    max-width: 100%;
}

.card-header-actions .combo-busca.card-header-select {
    flex: 1 1 12rem;
}

/* Combobox pesquisável (select + digitação) */
.combo-busca-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.combo-busca-list {
    z-index: 1060;
    max-height: 240px;
    overflow-y: auto;
    top: 100%;
    margin-top: 2px;
    border-radius: var(--bs-border-radius, .375rem);
}

.combo-busca-group {
    pointer-events: none;
    font-size: .6875rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* Tabelas de formulário — rolagem horizontal contida */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.table-scroll .table { margin-bottom: 0; }

.os-itens-table { min-width: 36rem; }

/* Compra — itens da nota (colunas legíveis; scroll horizontal no card) */
.compra-itens-table {
    min-width: 78rem;
    table-layout: auto;
}

.compra-itens-table thead th,
.compra-itens-table tbody td {
    padding: 0.65rem 0.5rem;
    vertical-align: middle;
}

.compra-itens-table .compra-col-produto,
.compra-itens-table td:first-child { min-width: 17rem; }

.compra-itens-table .compra-col-qtd,
.compra-itens-table td:nth-child(2) {
    min-width: 8.5rem;
    width: 8.5rem;
}

.compra-itens-table .compra-col-valor,
.compra-itens-table td:nth-child(3) {
    min-width: 8rem;
    width: 8rem;
}

.compra-itens-table .compra-col-tipo,
.compra-itens-table td:nth-child(4) {
    min-width: 9rem;
    width: 9rem;
}

.compra-itens-table .compra-col-conteudo,
.compra-itens-table td:nth-child(5) {
    min-width: 8rem;
    width: 8rem;
}

.compra-itens-table .compra-col-un,
.compra-itens-table td:nth-child(6) {
    min-width: 6.75rem;
    width: 6.75rem;
}

.compra-itens-table .compra-col-calc,
.compra-itens-table td:nth-child(7),
.compra-itens-table td:nth-child(8),
.compra-itens-table td:nth-child(9) {
    min-width: 8.75rem;
    white-space: nowrap;
    font-size: 0.9rem;
}

.compra-itens-table .form-control,
.compra-itens-table .form-select {
    min-width: 0;
    width: 100%;
    font-size: 0.9375rem;
}

.compra-itens-table .compra-col-qtd .form-control {
    min-width: 6.5rem;
    padding-left: 0.65rem;
    padding-right: 0.5rem;
}

.compra-itens-table .inp-embalagens,
.compra-itens-table .inp-valor,
.compra-itens-table .inp-conteudo {
    min-width: 5.5rem;
}

.compra-itens-table .sel-unidade {
    min-width: 5.5rem;
    padding-left: 0.55rem;
    padding-right: 2rem;
    text-align: left;
    background-position: right 0.5rem center;
    background-size: 12px 10px;
}

.compra-itens-table input[type="number"] {
    font-variant-numeric: tabular-nums;
}

.compra-produto-sugestoes {
    position: fixed;
    z-index: 1080;
    max-height: 19rem;
    overflow-y: auto;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.16);
}

.compra-produto-sugestoes .list-group-item {
    padding: 0.65rem 0.75rem;
}

.detail-itens-body {
    padding: 1.25rem;
}

.detail-servicos-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.detail-servico-bloco {
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius-sm);
    overflow: hidden;
    background: #fff;
}

.detail-servico-bloco--plano .detail-bloco-header {
    background: rgba(99, 102, 241, .07);
    border-bottom: 1px solid var(--lv-border);
}

.detail-servico-bloco--avulso .detail-bloco-header {
    background: rgba(13, 202, 240, .1);
    border-bottom: 1px solid var(--lv-border);
}

.detail-bloco-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem .75rem;
    padding: .85rem 1rem;
}

.detail-bloco-header .detail-bloco-titulo {
    min-width: 0;
    flex: 1 1 12rem;
    line-height: 1.35;
}

.detail-bloco-header .detail-bloco-valor {
    flex-shrink: 0;
    font-weight: 700;
    font-size: .95rem;
}

.detail-itens-total {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: var(--lv-radius-sm);
    background: var(--lv-body-bg);
    border: 1px solid var(--lv-border);
}

.os-itens-table thead th {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--lv-text-muted);
    white-space: nowrap;
    padding: .65rem .75rem;
    border-bottom: 1px solid var(--lv-border);
}

.os-itens-table tbody td {
    vertical-align: middle;
    padding: .7rem .75rem;
}

.os-itens-table tbody tr + tr td {
    border-top-color: var(--lv-border);
}

.detail-servico-bloco .os-itens-table tbody tr:last-child td {
    border-bottom: none;
}

.detail-pagamento-stack {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.detail-pagamento-item {
    padding: .85rem 1rem;
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius-sm);
    background: #fff;
}

.detail-pagamento-item--plano {
    border-left: 3px solid var(--lv-primary);
}

.detail-pagamento-item--rol {
    border-left: 3px solid #0dcaf0;
}

.detail-pagamento-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .35rem .75rem;
    margin-bottom: .35rem;
}

.detail-pagamento-titulo {
    font-weight: 600;
    font-size: .9rem;
}

.detail-pagamento-valor {
    font-size: .875rem;
}

.detail-pagamento-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .65rem;
    font-size: .8125rem;
}

/* ── OS Details (layout proposta) ───────────────────────────────────────── */
.os-details-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-bottom: 1.25rem;
}

.os-details-page-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.os-details-page-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--lv-radius-sm);
    background: rgba(99, 102, 241, .12);
    color: var(--lv-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.os-details-page-title h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
}

.os-details-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.os-details-btn-status {
    pointer-events: none;
    font-weight: 600;
}

.os-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "basics insumos"
        "logistica itens";
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: stretch;
}

.os-details-area-basics { grid-area: basics; }
.os-details-area-insumos { grid-area: insumos; min-width: 0; }
.os-details-area-logistica { grid-area: logistica; min-width: 0; }
.os-details-area-itens { grid-area: itens; min-width: 0; }

.os-details-card {
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius-sm);
    box-shadow: var(--lv-shadow);
    overflow: hidden;
    background: var(--lv-card-bg);
}

.os-details-card--itens .os-details-itens-body {
    padding: 0;
}

.os-details-plano-subhead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .5rem;
    padding: .65rem 1.15rem;
    background: rgba(99, 102, 241, .06);
    border-bottom: 1px solid var(--lv-border);
    font-size: .88rem;
}

.os-details-plano-subhead .ms-auto {
    margin-left: auto;
}

.os-details-card-footer-total .valor.text-success {
    color: #16a34a !important;
    font-size: 1rem;
    font-weight: 700;
}

.os-details-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem .75rem;
    padding: .85rem 1.15rem;
    background: #fff;
    border-bottom: 1px solid var(--lv-border);
    font-size: .92rem;
}

.os-details-head-title {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--lv-primary-dark);
    font-weight: 600;
}

.os-details-head-title i {
    font-size: 1.05rem;
    color: var(--lv-primary);
}

.os-details-section-num {
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    background: var(--lv-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    margin-right: .15rem;
}

.os-details-card-body {
    padding: 1rem 1.25rem 1.25rem;
}

.os-details-field {
    display: flex;
    gap: .65rem;
    padding: .45rem 0;
}

.os-details-field-icon {
    color: var(--lv-text-muted);
    width: 1.15rem;
    flex-shrink: 0;
    margin-top: .15rem;
    font-size: .95rem;
}

.os-details-field-body label {
    display: block;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--lv-text-muted);
    margin-bottom: .15rem;
}

.os-details-field-body a {
    color: var(--lv-primary);
}

.os-details-basics-total {
    margin-top: .5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--lv-border);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .35rem .75rem;
}

.os-details-basics-total .valor {
    font-size: 1.65rem;
    font-weight: 700;
    color: #16a34a;
    line-height: 1.1;
}

.os-details-card-footer-total {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .75rem 1.15rem;
    border-top: 1px solid var(--lv-border);
    background: #f8fafc;
    font-weight: 600;
    font-size: .9rem;
}

.os-details-card-footer-total .valor {
    font-size: 1rem;
    font-weight: 700;
}

.os-details-empty {
    padding: 1.25rem;
    color: var(--lv-text-muted);
    font-size: .9rem;
}

.os-details-badge-agendado {
    background: rgba(34, 197, 94, .14) !important;
    color: #15803d !important;
    font-weight: 600;
}

.os-details-insumo-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--lv-border);
}

.os-details-stepper-section {
    padding: 0 .25rem;
}

.os-details-stepper-wrap {
    padding: .5rem 0 0;
}

.os-details-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    max-width: 52rem;
    margin: 0 auto;
}

.os-details-step-connector {
    flex: 1 1 2rem;
    height: 3px;
    background: var(--lv-border);
    margin-top: 1.15rem;
    min-width: 1rem;
    max-width: 5rem;
    border-radius: 2px;
}

.os-details-step-connector.is-done {
    background: var(--lv-primary);
}

.os-details-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    min-width: 5.5rem;
    max-width: 7rem;
    text-align: center;
    flex-shrink: 0;
}

.os-details-step-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    border: 2px solid var(--lv-border);
    background: #fff;
    color: var(--lv-text-muted);
}

.os-details-step.is-done .os-details-step-icon {
    border-color: var(--lv-primary);
    background: var(--lv-primary);
    color: #fff;
}

.os-details-step.is-current .os-details-step-icon {
    border-color: var(--lv-primary);
    background: #fff;
    color: var(--lv-primary-dark);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .18);
}

.os-details-step-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--lv-text);
    line-height: 1.2;
}

.os-details-step.is-pending .os-details-step-label {
    color: var(--lv-text-muted);
    font-weight: 500;
}

.os-details-step-date {
    font-size: .68rem;
    color: var(--lv-text-muted);
    line-height: 1.25;
    max-width: 6.5rem;
}

.os-details-status-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin-top: 1rem;
    padding: 0;
}

.os-details-pagamento-card {
    overflow: hidden;
}

.os-details-pagamento-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    padding: 1rem 1.35rem;
}

.os-details-pagamento-header--brand {
    background: linear-gradient(135deg, var(--lv-primary-dark) 0%, var(--lv-primary) 55%, var(--lv-primary-light) 100%);
    color: #fff;
}

.os-details-pagamento-header-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    font-size: 1.02rem;
    margin: 0;
}

.os-details-pagamento-total-wrap {
    text-align: right;
}

.os-details-pagamento-total-wrap small {
    display: block;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
    opacity: .9;
}

.os-details-pagamento-header--brand .os-details-pagamento-total-wrap small {
    color: rgba(255, 255, 255, .88);
}

.os-details-pagamento-total {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.1;
}

.os-details-pagamento-header--brand .os-details-pagamento-total {
    color: #fff;
}

.os-details-pagamento-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.35rem;
}

.os-details-pagamento-body--single {
    grid-template-columns: 1fr;
}

.os-details-pagamento-col h3 {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--lv-text-muted);
    margin: 0 0 .75rem;
}

.os-details-pagamento-linha {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .75rem;
    padding: .45rem 0;
    font-size: .9rem;
}

.os-details-pagamento-linha + .os-details-pagamento-linha {
    border-top: 1px dashed var(--lv-border);
}

.os-details-pagamento-linha--total {
    margin-top: .35rem;
    padding-top: .65rem;
    border-top: 2px solid var(--lv-border) !important;
    font-weight: 600;
}

.os-details-pagamento-linha--total .valor-verde {
    font-size: 1.2rem;
    color: #16a34a;
    font-weight: 700;
}

.os-details-pagamento-form .form-select {
    max-width: 100%;
}

.os-details-pagamento-confirm {
    margin-top: 0;
    padding: .65rem 1.25rem;
    font-weight: 600;
}

.os-details-plano-sub {
    margin-bottom: 1rem;
}

@media (max-width: 991.98px) {
    .os-details-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "basics"
            "insumos"
            "logistica"
            "itens";
    }

    .os-details-stepper {
        flex-wrap: wrap;
        gap: .5rem;
    }

    .os-details-step-connector {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .os-details-pagamento-body {
        grid-template-columns: 1fr;
    }

    .os-details-pagamento-total-wrap {
        text-align: left;
        width: 100%;
    }
}

.alert-info.small {
    word-break: break-word;
}

/* Botões de rodapé de formulários */
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.form-actions .btn { flex-shrink: 0; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
html { overflow-x: clip; }

.app-body {
    overflow-x: clip;
}

.app-shell {
    min-width: 0;
    max-width: 100%;
}

.app-main {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.app-main form[class*="col-lg"] {
    max-width: 100%;
}

.app-header-actions {
    flex-shrink: 0;
    min-width: 0;
}

img, svg, video { max-width: 100%; height: auto; }

.page-header > div:first-child,
.list-top > div:first-child {
    min-width: 0;
    flex: 1 1 12rem;
}

.list-search-form {
    flex: 1 1 12rem;
    min-width: 0;
    max-width: 100%;
}

.list-toolbar-actions {
    flex-wrap: wrap;
    flex-shrink: 1;
    max-width: 100%;
}

.list-footer {
    align-items: flex-start;
}

.list-footer-controls {
    width: 100%;
    justify-content: space-between;
}

.list-title { font-size: clamp(1.25rem, 4vw, 1.65rem); }

.dash-banner { padding: 1.25rem 1.35rem; }

.dash-metrics {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.quick-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform .25s;
    }
    .app-sidebar.open { transform: translateX(0); }
    .app-shell { margin-left: 0; }
    .app-main { padding-top: 3.25rem; }
}

@media (max-width: 767px) {
    .app-main { padding: 1rem; }
    .app-header {
        padding: 0 .75rem;
        gap: .5rem;
    }

    .app-btn-primary {
        padding: .5rem .75rem;
        font-size: .8rem;
    }

    .list-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .list-toolbar-actions {
        width: 100%;
    }

    .list-tool-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .list-footer {
        flex-direction: column;
        gap: .75rem;
    }

    .list-pagination {
        flex-wrap: wrap;
    }

    .page-header h1 { font-size: 1.25rem; }

    .card-body.row > [class*="col-"] {
        min-width: 0;
    }
}

@media (max-width: 575px) {
    .list-top {
        flex-direction: column;
        align-items: stretch;
    }

    .list-top .app-btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ── Painel logístico (agendamentos) ───────────────────────────────────── */
.logistica-filtros .card-body {
    padding-bottom: 1rem;
}

.logistica-turno-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.logistica-turno-tab {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    border: 1px solid var(--lv-border, #e5e7eb);
    background: #fff;
    color: var(--lv-text-muted, #6b7280);
    font-size: .8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color .15s, background .15s, color .15s;
}

.logistica-turno-tab:hover {
    border-color: var(--lv-primary, #6366f1);
    color: var(--lv-primary, #6366f1);
}

.logistica-turno-tab--ativo {
    background: var(--lv-primary, #6366f1);
    border-color: var(--lv-primary, #6366f1);
    color: #fff;
}

.logistica-turno-tab-count {
    display: inline-flex;
    min-width: 1.25rem;
    justify-content: center;
    padding: 0 .35rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, .08);
    font-size: .6875rem;
    font-weight: 600;
}

.logistica-turno-tab--ativo .logistica-turno-tab-count {
    background: rgba(255, 255, 255, .25);
}

.logistica-execucao {
    border-left: 4px solid var(--lv-primary, #6366f1);
    background: linear-gradient(90deg, rgba(99, 102, 241, .06), transparent);
}

.logistica-execucao-titulo {
    font-weight: 600;
    font-size: .9375rem;
}

.logistica-secao-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
    padding-bottom: .35rem;
    border-bottom: 1px solid var(--lv-border, #e5e7eb);
}

.logistica-turno-titulo {
    color: var(--lv-text);
    font-weight: 600;
}

.logistica-card {
    border: 1px solid var(--lv-border);
    box-shadow: var(--lv-shadow);
    transition: border-color .15s ease;
}

.logistica-card--rota {
    border-left: 4px solid var(--lv-primary);
}

.logistica-card--ok {
    border-left: 4px solid #10b981;
}

.logistica-card--fail {
    border-left: 4px solid #ef4444;
}

/* ── Vistoria na recepção (OS) ─────────────────────────────────────────── */
.vistoria-item-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 100%;
    white-space: normal;
}

.vistoria-apontamento-mini,
.vistoria-apontamento-block {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-top: .35rem;
    flex-wrap: wrap;
}

.vistoria-apontamento-text {
    color: var(--lv-text-muted, #6b7280);
    font-size: .8125rem;
    line-height: 1.4;
}

.vistoria-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: .375rem;
    border: 1px solid var(--lv-border, #e5e7eb);
}

.vistoria-preview-wrap {
    min-height: 0;
}

.vistoria-preview-wrap .vistoria-thumb {
    width: 120px;
    height: 120px;
}

.vistoria-camera-panel {
    border: 1px solid var(--lv-border, #e5e7eb);
    border-radius: .5rem;
    padding: .75rem;
    background: var(--lv-surface-muted, #f9fafb);
}

.vistoria-camera-viewport {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    background: #111827;
    border-radius: .375rem;
    overflow: hidden;
}

.vistoria-camera-viewport video,
.vistoria-camera-viewport img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.vistoria-apontamento-row td {
    background: #fffbeb;
    border-top: none !important;
    padding-top: 0 !important;
}

.vistoria-apontamento {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: .5rem .75rem;
    border-left: 3px solid #f59e0b;
    border-radius: .25rem;
}

.vistoria-apontamento-label {
    flex-shrink: 0;
    font-size: .6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #b45309;
    padding-top: .15rem;
}

.vistoria-apontamento-body {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    flex: 1;
}

.vistoria-apontamento-foto img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: .375rem;
    border: 1px solid var(--lv-border, #e5e7eb);
    display: block;
}

.vistoria-apontamento-foto:hover img {
    opacity: .92;
}


.logistica-acoes .btn {
    text-align: left;
}

.logistica-rota-sequencia {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.logistica-card--parada {
    border-left: 4px solid var(--lv-border, #e5e7eb);
}

.logistica-parada-num {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--lv-primary, #6366f1);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logistica-parada-num--ativa {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .35);
    animation: logistica-pulse 2s ease-in-out infinite;
}

@keyframes logistica-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(99, 102, 241, .35); }
    50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, .15); }
}

.logistica-card--ativa {
    border-left-color: var(--lv-primary, #6366f1) !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .12);
}

.logistica-status-badge {
    font-weight: 500;
    font-size: .6875rem;
}

.logistica-status-badge--agendado { background: #f3f4f6 !important; color: #374151 !important; }
.logistica-status-badge--acaminho { background: #dbeafe !important; color: #1d4ed8 !important; }
.logistica-status-badge--proximodafila { background: #e0e7ff !important; color: #4338ca !important; }
.logistica-status-badge--concluido { background: #d1fae5 !important; color: #047857 !important; }
.logistica-status-badge--entreganaoconcluida { background: #fef3c7 !important; color: #b45309 !important; }

.logistica-card-meta {
    line-height: 1.45;
}

.logistica-acoes--ativa {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px dashed var(--lv-border, #e5e7eb);
}

.logistica-reordenar .btn {
    min-width: 2.25rem;
}

.logistica-card-contato .btn {
    font-size: .75rem;
}

.logistica-card--ok {
    opacity: .92;
}

.logistica-card--ok .logistica-parada-num {
    background: #10b981;
}

.logistica-badge-hora {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #f59e0b;
}

.logistica-hora-fixa {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: .375rem;
    padding: .35rem .65rem;
    font-size: .875rem;
    color: #92400e;
}

.logistica-card--parada.logistica-card--rota {
    border-left-color: var(--lv-primary, #6366f1);
}

.logistica-trajeto-metric {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.logistica-trajeto-metric--destaque strong {
    font-size: 1.1rem;
}

.logistica-trajeto-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--lv-border, #e5e7eb);
    padding-left: 1rem;
}

.logistica-trajeto-item {
    position: relative;
    padding: .5rem 0 .5rem .5rem;
    display: flex;
    align-items: flex-start;
    gap: .5rem;
}

.logistica-trajeto-item i {
    color: var(--lv-primary, #6366f1);
    margin-top: .15rem;
}

.logistica-trajeto-item--base i {
    color: #059669;
}

.logistica-trecho-parada {
    background: #f8fafc;
    border: 1px solid var(--lv-border, #e5e7eb);
    border-radius: .375rem;
    padding: .35rem .65rem;
}

/* ── App entregador (mobile) ───────────────────────────────────────────── */
.fin-card .card-body { padding: 1rem 1.15rem; }
.fin-stat-label { font-size: .78rem; color: var(--flux-muted); text-transform: uppercase; letter-spacing: .03em; }
.fin-stat-value { font-size: 1.35rem; font-weight: 700; }
.entregador-cobranca { border-left: 3px solid var(--bs-warning); }

.entregador-body {
    background: var(--lv-body-bg);
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
    overflow-x: hidden;
    max-width: 100vw;
}

.entregador-body .card {
    max-width: 100%;
    overflow: hidden;
}

.entregador-header {
    background: #fff;
    border-bottom: 1px solid var(--lv-border, #e5e7eb);
    padding: .75rem 1rem;
    padding-top: max(.75rem, env(safe-area-inset-top));
    position: sticky;
    top: 0;
    z-index: 100;
}

.entregador-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.entregador-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.entregador-link-admin {
    padding: .25rem .5rem;
}

.entregador-data-form {
    margin-top: .5rem;
    max-width: 11rem;
}

.entregador-resumo {
    margin-top: .35rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.entregador-gps-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--lv-primary, #6366f1);
    font-size: .75rem;
    font-weight: 500;
}

.entregador-gps-badge--ok {
    background: #ecfdf5;
    color: #059669;
}

.entregador-gps-badge--erro {
    background: #fef2f2;
    color: #dc2626;
}

.entregador-main {
    padding: .75rem;
    padding-bottom: calc(.75rem + env(safe-area-inset-bottom));
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

.entregador-cliente-nome,
.entregador-endereco,
.entregador-parada-texto {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.entregador-endereco {
    line-height: 1.4;
}

.entregador-parada-resumo-top {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    min-width: 0;
    max-width: 100%;
}

.entregador-parada-texto {
    flex: 1 1 0;
}

.entregador-badge {
    font-size: .65rem;
    font-weight: 500;
}

.entregador-contatos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}

.entregador-contatos .btn {
    font-size: .8125rem;
    font-weight: 500;
}

.entregador-acoes-stack {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-top: .75rem;
    border-top: 1px dashed var(--lv-border, #e5e7eb);
}

.entregador-acoes-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}

.entregador-acoes-row--solo {
    grid-template-columns: 1fr;
}

.entregador-form-acao {
    margin: 0;
    min-width: 0;
}

.entregador-btn-acao {
    width: 100%;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font-weight: 600;
    font-size: .875rem;
    border-radius: .5rem;
    padding: .5rem .75rem;
}

.entregador-btn-secundario {
    width: 100%;
    min-height: 2.5rem;
    font-weight: 500;
    font-size: .8125rem;
    border-radius: .5rem;
}

.entregador-proximas .list-group-item {
    border-left: 0;
    border-right: 0;
    overflow: hidden;
    max-width: 100%;
    padding: .75rem 1rem;
}

.entregador-proximas .list-group-item:first-child {
    border-top: 0;
}

.entregador-parada-resumo {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.entregador-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--lv-text-muted, #6b7280);
}

.entregador-empty i {
    font-size: 2.5rem;
    opacity: .35;
    display: block;
    margin-bottom: .75rem;
}

.entregador-empty--ok i {
    color: #059669;
    opacity: 1;
}

.entregador-parada-ativa {
    border-left: 4px solid var(--lv-primary, #6366f1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, .1);
}

.entregador-parada-ativa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    background: #f8fafc;
}

.entregador-parada-num--header {
    width: 1.75rem;
    height: 1.75rem;
    font-size: .8125rem;
    margin-bottom: 0;
}

.entregador-parada-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--lv-primary, #6366f1);
    color: #fff;
    font-weight: 700;
    font-size: .875rem;
    margin-bottom: .5rem;
}

.entregador-parada-num--sm {
    width: 1.5rem;
    height: 1.5rem;
    font-size: .75rem;
    flex-shrink: 0;
}

.entregador-hora-fixa {
    background: #fef9c3;
    border-radius: .375rem;
    padding: .35rem .65rem;
}

.entregador-toast {
    position: sticky;
    top: 0;
    z-index: 300;
}

/* Mapa rastreamento (painel logístico) */
.logistica-mapa-rastreamento {
    height: 280px;
    border-radius: .5rem;
    overflow: hidden;
    border: 1px solid var(--lv-border, #e5e7eb);
}

.logistica-mapa-legenda {
    font-size: .8125rem;
}

/* Login */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 55%, #f8fafc 100%);
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.12);
    padding: 2rem;
    border: 1px solid var(--lv-border, #e5e7eb);
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card-wide {
    max-width: 640px;
}

.login-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.5rem 0 0.25rem;
}

.login-brand .app-brand-icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: var(--lv-primary, #6366f1);
    color: #fff;
    font-size: 1.5rem;
}

/* ── Redesign v2 (Logística split, legado) ───────────────────────────────── */
.dash-v2-hero{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem;padding:1.5rem 1.75rem;margin-bottom:1.25rem;border-radius:var(--lv-radius);background:var(--lv-gradient);color:#fff;box-shadow:var(--lv-shadow-lg)}
.dash-v2-hero h1{margin:0 0 .2rem;font-size:1.55rem;font-weight:700;color:#fff}
.dash-v2-hero p{margin:0;opacity:.88;font-size:.9rem}
.dash-v2-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin-bottom:1.25rem}
.dash-v2-kpi{background:var(--lv-card-bg);border:1px solid var(--lv-border);border-radius:var(--lv-radius-sm);padding:1.1rem 1.25rem;box-shadow:var(--lv-shadow)}
.dash-v2-kpi--highlight{border-color:rgba(99,102,241,.25);background:linear-gradient(135deg,rgba(99,102,241,.06),rgba(139,92,246,.04))}
.dash-v2-kpi-label{display:block;font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--lv-text-muted);margin-bottom:.35rem}
.dash-v2-kpi-value{display:block;font-size:1.85rem;font-weight:700;line-height:1.1;color:var(--lv-text)}
.dash-v2-kpi-value--money{font-size:1.35rem;color:#059669}
.dash-v2-kpi-hint{display:block;margin-top:.25rem;font-size:.75rem;color:var(--lv-text-muted)}
.dash-v2-grid{display:grid;grid-template-columns:1fr 340px;gap:1.25rem;margin-bottom:1.25rem;align-items:start}
.dash-v2-panel{background:var(--lv-card-bg);border:1px solid var(--lv-border);border-radius:var(--lv-radius);box-shadow:var(--lv-shadow);overflow:hidden}
.dash-v2-panel-head{display:flex;align-items:center;justify-content:space-between;padding:.85rem 1.15rem;border-bottom:1px solid var(--lv-border)}
.dash-v2-panel-head h2{margin:0;font-size:.92rem;font-weight:600;display:inline-flex;align-items:center;gap:.45rem}
.dash-v2-panel-head h2 i{color:var(--lv-primary)}
.dash-v2-link{font-size:.8rem;font-weight:600;color:var(--lv-primary);text-decoration:none}
.dash-v2-link:hover{color:var(--lv-primary-dark)}
.dash-v2-table{width:100%;border-collapse:collapse;font-size:.875rem}
.dash-v2-table thead th{padding:.65rem 1.15rem;font-size:.7rem;text-transform:uppercase;letter-spacing:.04em;color:var(--lv-text-muted);font-weight:600;border-bottom:1px solid var(--lv-border);background:#fafbfc}
.dash-v2-table tbody td{padding:.75rem 1.15rem;border-bottom:1px solid var(--lv-border)}
.dash-v2-table tbody tr:last-child td{border-bottom:none}
.dash-v2-table tbody tr:hover{background:rgba(241,245,249,.7)}
.dash-v2-empty{padding:1.25rem 1.15rem;margin:0;color:var(--lv-text-muted);font-size:.875rem}
.dash-v2-sidebar{display:flex;flex-direction:column;gap:1rem}
.dash-v2-chart{display:flex;align-items:flex-end;justify-content:space-between;gap:.35rem;padding:1rem 1.15rem 1.25rem;min-height:120px}
.dash-v2-bar-wrap{flex:1;display:flex;flex-direction:column;align-items:center;gap:.35rem;height:100px;justify-content:flex-end}
.dash-v2-bar{width:100%;max-width:28px;min-height:4px;border-radius:6px 6px 2px 2px;background:var(--lv-gradient)}
.dash-v2-bar-label{font-size:.65rem;color:var(--lv-text-muted);text-transform:capitalize}
.dash-v2-quick{display:grid;grid-template-columns:1fr 1fr;gap:.65rem;padding:1rem 1.15rem}
.dash-v2-quick-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;padding:.85rem .5rem;border-radius:var(--lv-radius-sm);border:1px solid var(--lv-border);background:var(--lv-body-bg);color:var(--lv-text);text-decoration:none;font-size:.78rem;font-weight:600;transition:border-color .15s,background .15s,transform .15s}
.dash-v2-quick-btn i{font-size:1.25rem;color:var(--lv-primary)}
.dash-v2-quick-btn:hover{border-color:var(--lv-primary-light);background:rgba(99,102,241,.06);color:var(--lv-text);transform:translateY(-1px)}
.dash-v2-timeline{list-style:none;margin:0;padding:.5rem 1.15rem 1rem}
.dash-v2-timeline li{display:flex;align-items:center;gap:.75rem;padding:.55rem 0;border-bottom:1px dashed var(--lv-border)}
.dash-v2-timeline li:last-child{border-bottom:none}
.dash-v2-time{font-size:.72rem;font-weight:700;color:var(--lv-primary);min-width:3.5rem}
.dash-v2-timeline-link{font-size:.85rem;font-weight:500;color:var(--lv-text);text-decoration:none}
.dash-v2-timeline-link:hover{color:var(--lv-primary)}
.dash-v2-foot{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.dash-v2-mini-stat{display:flex;align-items:center;gap:.85rem;padding:1rem 1.15rem;background:var(--lv-card-bg);border:1px solid var(--lv-border);border-radius:var(--lv-radius-sm);box-shadow:var(--lv-shadow)}
.dash-v2-mini-stat>i{font-size:1.35rem;color:var(--lv-primary)}
.dash-v2-mini-stat strong{display:block;font-size:1.15rem;line-height:1.2}
.dash-v2-mini-stat span{font-size:.75rem;color:var(--lv-text-muted)}
.os-details-itens-split{display:grid;grid-template-columns:1fr;gap:0}
.os-details-itens-split--duo{grid-template-columns:1fr 1fr}
.os-details-item-panel{border-bottom:1px solid var(--lv-border);background:#fff}
.os-details-itens-split--duo .os-details-item-panel:first-child{border-right:1px solid var(--lv-border)}
.os-details-item-panel-head{display:flex;align-items:center;gap:.75rem;padding:.85rem 1.15rem;background:rgba(99,102,241,.04);border-bottom:1px solid var(--lv-border)}
.os-details-item-panel-head strong{display:block;font-size:.9rem}
.os-details-item-panel-head small{display:block;color:var(--lv-text-muted);font-size:.75rem}
.os-details-item-panel-icon{width:2.25rem;height:2.25rem;border-radius:10px;background:rgba(99,102,241,.12);color:var(--lv-primary);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.os-details-item-panel-icon--avulso{background:rgba(16,185,129,.12);color:#059669}
.os-details-kg-badge{margin-left:auto;font-size:.85rem;font-weight:700;color:var(--lv-primary-dark)}
.os-details-kg-progress{height:6px;background:#e2e8f0;margin:0 1.15rem}
.os-details-kg-progress-bar{height:100%;background:var(--lv-gradient);border-radius:0 3px 3px 0}
.os-details-item-panel-foot{display:flex;justify-content:space-between;align-items:center;padding:.65rem 1.15rem;font-size:.85rem;background:#fafbfc;border-top:1px solid var(--lv-border)}
.logistica-resumo-faixa{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem 1rem;padding:.85rem 1.15rem;background:var(--lv-card-bg);border:1px solid var(--lv-border);border-radius:var(--lv-radius-sm);box-shadow:var(--lv-shadow)}
.logistica-resumo-faixa-metrics{font-size:.9rem;color:var(--lv-text-muted)}
.logistica-resumo-faixa-metrics strong{color:var(--lv-text)}
.logistica-resumo-sep{margin:0 .35rem;opacity:.5}
.logistica-resumo-faixa-actions{display:flex;flex-wrap:wrap;gap:.5rem}
.logistica-split{display:block}
.logistica-split--ativo{display:grid;grid-template-columns:1fr minmax(280px,42%);gap:1rem;align-items:start}
.logistica-split-list{min-width:0}
.logistica-split-map{position:sticky;top:calc(var(--lv-header-h) + 1rem);background:var(--lv-card-bg);border:1px solid var(--lv-border);border-radius:var(--lv-radius);box-shadow:var(--lv-shadow);overflow:hidden}
.logistica-map-panel-head{display:flex;align-items:center;justify-content:space-between;padding:.65rem 1rem;border-bottom:1px solid var(--lv-border);font-size:.85rem;font-weight:600}
.logistica-mapa-painel{height:min(520px,calc(100vh - var(--lv-header-h) - 8rem));min-height:320px;width:100%}
.logistica-map-num-marker{background:transparent!important;border:none!important}
.logistica-map-num-marker span{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:var(--lv-primary);color:#fff;font-size:.72rem;font-weight:700;border:2px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.25)}
@media(max-width:575px){.dash-v2-kpis{grid-template-columns:1fr}.dash-v2-foot{grid-template-columns:1fr}.logistica-v2-header{flex-direction:column;align-items:stretch}.logistica-v2-tabs{gap:.35rem}.logistica-v2-tab{font-size:.75rem;padding:.3rem .55rem}.logistica-v2-timeline-track{overflow-x:auto;padding-bottom:.35rem}.logistica-v2-parada-grid{grid-template-columns:1fr}.logistica-v2-parada-meta{align-items:flex-start;text-align:left}.logistica-v2-parada-contato{justify-content:flex-start}.logistica-v2-parada-footer{flex-direction:column;align-items:stretch}.logistica-v2-btn-concluir{width:100%}}

/* ── Dashboard v3 (mock Flux) ─────────────────────────────────────────────── */

.app-header-search--dash { flex: 1; max-width: 520px; display: flex; align-items: center; }
.app-header-search--dash input { padding-right: 3.25rem; }
.app-header-kbd {
    position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
    font-size: .68rem; font-weight: 600; color: #94a3b8;
    background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px;
    padding: .12rem .4rem; flex-shrink: 0; z-index: 1;
}
.app-icon-btn--badge { position: relative; }
.app-header-badge {
    position: absolute; top: 2px; right: 2px;
    min-width: 1rem; height: 1rem; padding: 0 .22rem;
    border-radius: 999px; background: #6366f1; color: #fff;
    font-size: .58rem; font-weight: 700; line-height: 1rem; text-align: center;
}

.dash-v3 { max-width: 100%; }

.dash-v3-hero {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    padding: 1.5rem 1.65rem;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(105deg, #2563eb 0%, #4f46e5 38%, #6366f1 68%, #818cf8 100%);
    box-shadow: 0 10px 32px rgba(37, 99, 235, .28);
}
.dash-v3-hero::before,
.dash-v3-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
}
.dash-v3-hero::before {
    width: 220px; height: 220px;
    left: -70px; bottom: -90px;
    background: radial-gradient(circle, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 70%);
}
.dash-v3-hero::after {
    width: 300px; height: 300px;
    right: -40px; top: -130px;
    background: radial-gradient(circle, rgba(255,255,255,.1) 0%, rgba(255,255,255,0) 72%);
}

.dash-v3-greet {
    position: relative; z-index: 1;
    flex: 0 0 min(26%, 280px);
    display: flex; flex-direction: column; justify-content: center;
    padding-right: .5rem;
}
.dash-v3-greet h1 {
    margin: 0 0 .4rem;
    font-size: 1.45rem; font-weight: 700; line-height: 1.25; color: #fff;
}
.dash-v3-greet p { margin: 0; font-size: .9rem; color: rgba(255,255,255,.92); line-height: 1.45; }

.dash-v3-kpis {
    position: relative; z-index: 1;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
    min-width: 0;
}

.dash-v3-kpi {
    background: #fff;
    border-radius: 14px;
    padding: .95rem 1rem .85rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .08);
    display: flex; flex-direction: column; gap: .35rem;
    min-height: 118px;
}
.dash-v3-kpi-top {
    display: flex; align-items: center; gap: .55rem;
}
.dash-v3-kpi-icon {
    width: 2rem; height: 2rem; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.dash-v3-kpi-icon--blue   { background: rgba(59, 130, 246, .12); color: #2563eb; }
.dash-v3-kpi-icon--cyan   { background: rgba(14, 165, 233, .12); color: #0284c7; }
.dash-v3-kpi-icon--purple { background: rgba(99, 102, 241, .14); color: #6366f1; }
.dash-v3-kpi-icon--green  { background: rgba(16, 185, 129, .12); color: #059669; }
.dash-v3-kpi-label {
    font-size: .68rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .04em; color: #64748b; line-height: 1.2;
}
.dash-v3-kpi-value {
    font-size: 1.65rem; font-weight: 700; line-height: 1.1; color: #0f172a;
    margin-top: .1rem;
}
.dash-v3-kpi-value--money { font-size: 1.35rem; color: #0f172a; }

.dash-v3-trend {
    display: inline-flex; align-items: center; gap: .05rem;
    font-size: .72rem; font-weight: 600; margin-top: auto;
}
.dash-v3-trend i { font-size: 1rem; line-height: 1; }
.dash-v3-trend--up { color: #059669; }
.dash-v3-trend--down { color: #dc2626; }
.dash-v3-trend--muted { color: #94a3b8; font-weight: 500; }
.dash-v3-trend-suffix { font-weight: 500; color: #94a3b8; }

.dash-v3-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1.25rem;
    align-items: start;
}
.dash-v3-left { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.dash-v3-side { display: flex; flex-direction: column; gap: 1rem; }

.dash-v3-panel {
    background: #fff;
    border: 1px solid var(--lv-border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    overflow: hidden;
}
.dash-v3-panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .9rem 1.15rem;
    border-bottom: 1px solid var(--lv-border);
}
.dash-v3-panel-head h2 { margin: 0; font-size: .95rem; font-weight: 700; color: #0f172a; }
.dash-v3-link {
    font-size: .78rem; font-weight: 600; color: #6366f1; text-decoration: none;
    display: inline-flex; align-items: center; gap: .15rem;
}
.dash-v3-link:hover { color: #4f46e5; }
.dash-v3-select {
    border: 1px solid var(--lv-border); border-radius: 8px;
    font-size: .75rem; font-weight: 600; color: #475569;
    padding: .25rem .55rem; background: #fff;
}

.dash-v3-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.dash-v3-table thead th {
    padding: .7rem 1rem; font-size: .68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em; color: #64748b;
    background: #f8fafc; border-bottom: 1px solid var(--lv-border); white-space: nowrap;
}
.dash-v3-table tbody td {
    padding: .78rem 1rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle;
}
.dash-v3-table tbody tr:hover { background: rgba(248, 250, 252, .85); }
.dash-v3-table tbody tr:last-child td { border-bottom: none; }
.dash-v3-os-link { color: #6366f1; font-weight: 600; text-decoration: none; }
.dash-v3-os-link:hover { text-decoration: underline; }
.dash-v3-muted { color: #64748b; white-space: nowrap; }

.dash-v3-status {
    display: inline-flex; align-items: center; padding: .22em .65em;
    border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap;
}
.dash-v3-status--received { background: #f1f5f9; color: #475569; }
.dash-v3-status--washing  { background: #dbeafe; color: #1d4ed8; }
.dash-v3-status--ready    { background: #ede9fe; color: #6d28d9; }
.dash-v3-status--done     { background: #dcfce7; color: #15803d; }
.dash-v3-status--muted    { background: #f1f5f9; color: #64748b; }

.dash-v3-menu-btn {
    border: none; background: transparent; color: #94a3b8;
    padding: .2rem .35rem; border-radius: 6px; line-height: 1;
}
.dash-v3-menu-btn:hover { background: #f1f5f9; color: #64748b; }

.dash-v3-table-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .75rem 1rem; border-top: 1px solid var(--lv-border); flex-wrap: wrap;
}
.dash-v3-table-meta { font-size: .78rem; color: #64748b; }
.dash-v3-pager { display: inline-flex; align-items: center; gap: .25rem; }
.dash-v3-pager-btn, .dash-v3-pager-num {
    width: 1.85rem; height: 1.85rem; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--lv-border); background: #fff;
    color: #475569; text-decoration: none; font-size: .78rem; font-weight: 600;
}
.dash-v3-pager-num.is-active { background: #6366f1; border-color: #6366f1; color: #fff; }
.dash-v3-pager-btn.is-disabled { opacity: .45; pointer-events: none; }

.dash-v3-spark-row {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
}
.dash-v3-spark {
    background: #fff; border: 1px solid var(--lv-border); border-radius: 14px;
    padding: 1rem 1.1rem; box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    display: flex; flex-direction: column; gap: .75rem; min-height: 100%;
}
.dash-v3-spark-head { display: flex; gap: .65rem; align-items: flex-start; }
.dash-v3-spark-icon {
    width: 2rem; height: 2rem; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(99, 102, 241, .1); color: #6366f1;
}
.dash-v3-spark-icon--purple { background: rgba(139, 92, 246, .12); color: #7c3aed; }
.dash-v3-spark-icon--green  { background: rgba(16, 185, 129, .12); color: #059669; }
.dash-v3-spark-label { display: block; font-size: .72rem; font-weight: 600; color: #64748b; margin-bottom: .15rem; }
.dash-v3-spark-value { display: block; font-size: 1.05rem; font-weight: 700; color: #0f172a; line-height: 1.2; }
.dash-v3-spark-bars {
    display: flex; align-items: flex-end; gap: .22rem; height: 42px; margin-top: auto;
}
.dash-v3-spark-bar {
    flex: 1; min-height: 4px; border-radius: 4px 4px 2px 2px;
    background: #6366f1;
}
.dash-v3-spark-bars--purple .dash-v3-spark-bar { background: #8b5cf6; }
.dash-v3-spark-bars--green .dash-v3-spark-bar  { background: #10b981; }

.dash-v3-line-chart { padding: .5rem 1rem 1rem; }
.dash-v3-line-chart svg { width: 100%; height: 130px; display: block; }
.dash-v3-line-labels {
    display: flex; justify-content: space-between; gap: .25rem;
    padding: .35rem .15rem 0; font-size: .65rem; color: #94a3b8; text-transform: capitalize;
}

.dash-v3-quick {
    display: grid; grid-template-columns: 1fr 1fr; gap: .65rem;
    padding: 1rem 1.15rem;
}
.dash-v3-quick-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .4rem; padding: .95rem .5rem; border-radius: 12px;
    border: 1px solid var(--lv-border); background: #f8fafc;
    color: #334155; text-decoration: none; font-size: .78rem; font-weight: 600;
    transition: border-color .15s, background .15s, transform .15s;
}
.dash-v3-quick-btn i { font-size: 1.3rem; color: #6366f1; }
.dash-v3-quick-btn:hover { border-color: #c7d2fe; background: rgba(99, 102, 241, .06); transform: translateY(-1px); color: #334155; }

.dash-v3-deliveries { list-style: none; margin: 0; padding: .35rem 1rem 1rem; }
.dash-v3-deliveries li {
    display: grid; grid-template-columns: 3.2rem 8px minmax(0, 1fr) auto;
    gap: .55rem .65rem; align-items: center;
    padding: .65rem 0; border-bottom: 1px solid #f1f5f9;
}
.dash-v3-deliveries li:last-child { border-bottom: none; }
.dash-v3-delivery-time { font-size: .78rem; font-weight: 700; color: #334155; }
.dash-v3-delivery-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #6366f1; justify-self: center;
}
.dash-v3-delivery-body { min-width: 0; }
.dash-v3-delivery-name {
    display: block; font-size: .84rem; font-weight: 600; color: #0f172a;
    text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-v3-delivery-name:hover { color: #6366f1; }
.dash-v3-delivery-sub { display: block; font-size: .72rem; color: #94a3b8; margin-top: .05rem; }
.dash-v3-entrega-badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .22em .55em; border-radius: 999px;
    font-size: .65rem; font-weight: 600; white-space: nowrap;
}
.dash-v3-entrega-badge--done     { background: #dcfce7; color: #15803d; }
.dash-v3-entrega-badge--transit  { background: #dbeafe; color: #1d4ed8; }
.dash-v3-entrega-badge--scheduled { background: #f1f5f9; color: #64748b; }

.dash-v3-empty { padding: 1.25rem 1.15rem; margin: 0; color: #94a3b8; font-size: .875rem; }

@media (max-width: 1399px) {
    .dash-v3-hero { flex-direction: column; gap: 1.15rem; }
    .dash-v3-greet { flex: none; max-width: none; padding-right: 0; }
    .dash-v3-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
    .dash-v3-main { grid-template-columns: 1fr; }
    .dash-v3-spark-row { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .dash-v3-hero { padding: 1.15rem 1.1rem; }
    .dash-v3-kpis { grid-template-columns: 1fr; }
    .dash-v3-greet h1 { font-size: 1.25rem; }
    .dash-v3-table-foot { flex-direction: column; align-items: flex-start; }
    .dash-v3-deliveries li { grid-template-columns: 1fr; gap: .35rem; }
    .dash-v3-delivery-dot { display: none; }
    .dash-v3-entrega-badge { justify-self: start; }
}

@media(max-width:1199px){.dash-v2-grid{grid-template-columns:1fr}.dash-v2-kpis{grid-template-columns:repeat(2,1fr)}.logistica-split--ativo{grid-template-columns:1fr}.logistica-split-map{position:static}.logistica-v2-grid{grid-template-columns:1fr}.logistica-v2-map-panel{min-height:380px}.logistica-v2-paradas{max-height:none}.os-details-itens-split--duo{grid-template-columns:1fr}.os-details-itens-split--duo .os-details-item-panel:first-child{border-right:none}}
@media(max-width:575px){.dash-v2-kpis{grid-template-columns:1fr}.dash-v2-foot{grid-template-columns:1fr}.logistica-v2-header{flex-direction:column;align-items:stretch}.logistica-v2-tabs{gap:.35rem}.logistica-v2-tab{font-size:.75rem;padding:.3rem .55rem}.logistica-v2-timeline-track{overflow-x:auto;padding-bottom:.35rem}.logistica-v2-parada-grid{grid-template-columns:1fr}.logistica-v2-parada-meta{align-items:flex-start;text-align:left}.logistica-v2-parada-contato{justify-content:flex-start}.logistica-v2-parada-footer{flex-direction:column;align-items:stretch}.logistica-v2-btn-concluir{width:100%}}

/* ── Painel logístico v2 (mockup) ─────────────────────────────────────── */
.app-main:has(> .logistica-v2){display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding-bottom:1rem}
.logistica-v2{display:flex;flex-direction:column;gap:.75rem;margin:-.5rem -.25rem 0;flex:1;min-height:0;overflow:hidden}
.logistica-v2-header,.logistica-v2-tabs{flex-shrink:0}
.logistica-v2-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem}
.logistica-v2-header-main{display:flex;flex-wrap:wrap;align-items:center;gap:1rem}
.logistica-v2-header h1{margin:0;font-size:1.625rem;font-weight:700;color:var(--lv-text)}
.logistica-v2-date-form{margin:0}
.logistica-v2-date{width:auto;min-width:11rem;border-radius:8px;font-size:.875rem;padding:.45rem .85rem;border-color:var(--lv-border)}
.logistica-v2-header-actions{display:flex;align-items:center;gap:.5rem}
.logistica-v2-tabs{display:flex;flex-wrap:wrap;gap:.5rem}
.logistica-v2-tab{display:inline-flex;align-items:center;gap:.4rem;padding:.5rem 1rem;border-radius:999px;border:1px solid var(--lv-border);background:#fff;color:var(--lv-text-muted);font-size:.8125rem;font-weight:600;text-decoration:none;transition:all .15s ease}
.logistica-v2-tab:hover{border-color:var(--lv-primary);color:var(--lv-primary)}
.logistica-v2-tab--ativo{background:var(--lv-primary);border-color:var(--lv-primary);color:#fff;box-shadow:0 4px 14px rgba(99,102,241,.28)}
.logistica-v2-tab-count{display:inline-flex;min-width:1.2rem;justify-content:center;padding:0 .3rem;border-radius:999px;background:rgba(0,0,0,.08);font-size:.65rem;font-weight:700}
.logistica-v2-tab--ativo .logistica-v2-tab-count{background:rgba(255,255,255,.22)}
.logistica-v2-workspace{display:flex;flex-direction:column;gap:.75rem;flex:1;min-height:0;overflow:hidden}
.logistica-v2-grid{display:grid;grid-template-columns:minmax(0,42%) minmax(0,58%);gap:1rem;align-items:stretch;flex:1;min-height:0}
.logistica-v2-panel{display:flex;flex-direction:column;background:#fff;border:1px solid var(--lv-border);border-radius:12px;box-shadow:var(--lv-shadow);overflow:hidden;min-height:0}
.logistica-v2-resumo{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;padding:.9rem 1rem;border-bottom:1px solid var(--lv-border);background:#fafbfc}
.logistica-v2-resumo-metrics{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem;font-size:.8125rem;color:var(--lv-text-muted)}
.logistica-v2-resumo-metrics strong{color:var(--lv-text);font-weight:700}
.logistica-v2-resumo-metrics i{color:var(--lv-primary);margin-right:.15rem}
.logistica-v2-resumo-sep{opacity:.45}
.logistica-v2-resumo-actions{display:flex;flex-wrap:wrap;gap:.45rem;flex-shrink:0;align-items:center}
.logistica-v2-otimizar-form{display:inline-flex}
.logistica-v2-btn-otimizar{font-weight:600;border-width:1.5px;white-space:nowrap}
.logistica-v2-resumo-hint{margin:0;padding:.5rem 1rem;font-size:.75rem;color:var(--lv-text-muted);background:#f8fafc;border-bottom:1px solid var(--lv-border)}
.logistica-v2-paradas{display:flex;flex-direction:column;gap:0;padding:0;overflow-y:auto;flex:1;min-height:0;background:#fff}
.logistica-v2-secao{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.55rem 1.1rem;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#94a3b8;background:#f8fafc;border-bottom:1px solid var(--lv-border)}
.logistica-v2-secao-count{min-width:1.35rem;height:1.35rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:#fff;border:1px solid var(--lv-border);font-size:.65rem;color:var(--lv-text-muted)}
.logistica-v2-parada{background:#fff;border:none;border-bottom:1px solid #eef2f7;border-radius:0;padding:1rem 1.1rem;box-shadow:none;transition:background .15s,border-color .15s}
.logistica-v2-parada:last-child{border-bottom:none}
.logistica-v2-parada-row{display:flex;align-items:flex-start;gap:.75rem}
.logistica-v2-cobranca{border-radius:8px;border-color:#fde68a!important}
.logistica-v2-cobranca-form .form-label{font-size:.75rem;color:#92400e;margin-bottom:.25rem}
.logistica-v2-parada--active{background:#f5f3ff;border:1px solid var(--lv-primary);border-radius:10px;margin:.35rem .5rem;padding:1rem;box-shadow:0 2px 12px rgba(99,102,241,.08)}
.logistica-v2-parada--active .logistica-v2-cobranca{margin-left:0;margin-right:0}
.logistica-v2-parada--done{opacity:.65}
.logistica-v2-parada--fail{background:#fef2f2}
.logistica-v2-parada-grip{display:flex;align-items:center;justify-content:center;padding-top:.45rem;flex-shrink:0;width:14px}
.logistica-v2-grip-dots{display:grid;grid-template-columns:repeat(2,4px);gap:3px 4px}
.logistica-v2-grip-dots i{width:4px;height:4px;border-radius:50%;background:#cbd5e1;display:block}
.logistica-v2-parada-num{width:2.125rem;height:2.125rem;border-radius:50%;background:var(--lv-primary);color:#fff;font-weight:700;font-size:.875rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:.15rem}
.logistica-v2-parada--active .logistica-v2-parada-num{box-shadow:0 0 0 3px rgba(99,102,241,.18)}
.logistica-v2-parada--done .logistica-v2-parada-num{background:#94a3b8}
.logistica-v2-parada-main{flex:1;min-width:0}
.logistica-v2-parada-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.35rem 1.25rem;align-items:start}
.logistica-v2-parada-info{min-width:0}
.logistica-v2-parada-meta{display:flex;flex-direction:column;align-items:flex-end;gap:.45rem;text-align:right;flex-shrink:0}
.logistica-v2-parada-ativa-label{display:inline-flex;align-items:center;gap:.4rem;font-size:.75rem;font-weight:600;color:var(--lv-primary)}
.logistica-v2-parada-ativa-dot{width:.45rem;height:.45rem;border-radius:50%;background:var(--lv-primary);animation:logistica-pulse 2s ease-in-out infinite}
.logistica-v2-parada-nome{margin:0 0 .2rem;font-size:.9375rem;font-weight:700;line-height:1.25;color:var(--lv-text)}
.logistica-v2-parada-nome a{color:inherit;text-decoration:none}
.logistica-v2-parada-nome a:hover{color:var(--lv-primary)}
.logistica-v2-parada-tipo{font-size:.6875rem;font-weight:700;padding:.25rem .6rem;border-radius:999px;text-transform:uppercase;letter-spacing:.03em;line-height:1.2;white-space:nowrap}
.logistica-v2-parada-tipo--coleta{background:#dbeafe;color:#1d4ed8}
.logistica-v2-parada-tipo--entrega{background:#d1fae5;color:#047857}
.logistica-v2-parada-endereco{margin:0;font-size:.8125rem;color:#64748b;line-height:1.35}
.logistica-v2-parada-endereco--sub{margin-top:.1rem}
.logistica-v2-parada-valor{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem .65rem;margin-top:.65rem;padding:.45rem .65rem;border-radius:8px;font-size:.8125rem;line-height:1.3}
.logistica-v2-parada-valor--cobrar{background:#fffbeb;border:1px solid #fde68a;color:#92400e}
.logistica-v2-parada-valor--livre{background:#f0fdf4;border:1px solid #bbf7d0;color:#166534}
.logistica-v2-parada-valor-label{display:inline-flex;align-items:center;gap:.3rem;font-weight:600}
.logistica-v2-parada-valor-total{font-size:.9375rem;color:#78350f}
.logistica-v2-parada-valor-detalhe{display:flex;flex-wrap:wrap;gap:.35rem .5rem;width:100%;font-size:.75rem;color:#a16207;opacity:.9}
.logistica-v2-parada-contato{display:inline-flex;align-items:center;gap:.4rem;justify-content:flex-end}
.logistica-v2-parada-telefone{font-size:.8125rem;color:#64748b}
.logistica-v2-parada-wa{color:#059669;text-decoration:none;font-size:1.05rem;line-height:1}
.logistica-v2-parada-wa:hover{color:#047857}
.logistica-v2-parada-footer{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:.85rem;padding-top:.85rem;border-top:1px solid rgba(99,102,241,.12)}
.logistica-v2-parada-toggle{border:none;background:transparent;color:#94a3b8;padding:.35rem .15rem;margin-top:.1rem;flex-shrink:0;line-height:1;transition:transform .2s,color .15s}
.logistica-v2-parada-toggle:hover{color:var(--lv-primary)}
.logistica-v2-parada-toggle--open,.logistica-v2-parada-toggle[aria-expanded=true]{transform:rotate(180deg);color:var(--lv-primary)}
.logistica-v2-parada-detalhes{padding-top:.75rem;margin-top:.25rem;border-top:1px solid #f1f5f9}
.logistica-v2-parada--active .logistica-v2-parada-detalhes{border-top-color:rgba(99,102,241,.12)}
.logistica-v2-parada-hora{font-size:.75rem;color:#92400e;background:#fffbeb;border-radius:6px;padding:.25rem .55rem;display:inline-block;margin-bottom:.5rem}
.logistica-v2-parada-obs{font-size:.75rem;color:var(--lv-text-muted);margin:0 0 .5rem;border-left:2px solid var(--lv-border);padding-left:.5rem}
.logistica-v2-parada-alerta{font-size:.75rem;color:#1d4ed8;background:#eff6ff;border-radius:6px;padding:.35rem .55rem;margin-bottom:.5rem}
.logistica-v2-parada-alerta--warn{color:#b45309;background:#fffbeb}
.logistica-v2-parada-os-link{font-size:.75rem;color:var(--lv-primary);display:inline-block;margin-bottom:.5rem}
.logistica-v2-parada-reordenar{display:inline-flex;gap:.35rem;margin-bottom:.5rem}
.logistica-v2-btn-concluir{width:auto;background:#10b981;border-color:#10b981;color:#fff;font-weight:600;padding:.55rem 1.15rem;border-radius:8px;font-size:.875rem;white-space:nowrap}
.logistica-v2-btn-concluir:hover{background:#059669;border-color:#059669;color:#fff}
.logistica-v2-parada-acoes-sec{display:flex;flex-wrap:wrap;gap:.45rem;align-items:center;margin-top:.35rem}
.logistica-v2-link-falha{color:#d97706!important;text-decoration:none;font-size:.8125rem;padding:0}
.logistica-v2-map-panel{position:relative;background:#fff;border:1px solid var(--lv-border);border-radius:12px;box-shadow:var(--lv-shadow);overflow:hidden;min-height:0;display:flex;flex-direction:column}
.logistica-v2-map{flex:1;min-height:0;width:100%;z-index:1}
.logistica-v2-map-legend{position:absolute;right:.75rem;bottom:.75rem;z-index:500;display:flex;flex-direction:column;gap:.35rem;padding:.55rem .65rem;background:rgba(255,255,255,.95);border:1px solid var(--lv-border);border-radius:8px;font-size:.68rem;color:var(--lv-text-muted);box-shadow:0 4px 12px rgba(0,0,0,.08);max-width:9rem}
.logistica-v2-map-legend-title{font-weight:700;color:var(--lv-text);font-size:.7rem;margin-bottom:.15rem}
.logistica-v2-map-empty{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem;text-align:center;color:var(--lv-text-muted);background:rgba(248,250,252,.88);pointer-events:none}
.logistica-v2-map-empty i{font-size:2rem;opacity:.35}
.logistica-v2-legend-line{display:inline-block;width:1.1rem;height:3px;background:var(--lv-primary);border-radius:2px;vertical-align:middle;margin-right:.25rem}
.logistica-v2-legend-dot{display:inline-block;width:.5rem;height:.5rem;border-radius:50%;vertical-align:middle;margin-right:.25rem}
.logistica-v2-legend-dot--active{background:var(--lv-primary)}
.logistica-v2-legend-dot--stop{background:#3b82f6}
.logistica-v2-map-base,.logistica-v2-map-num,.logistica-v2-map-truck{background:transparent!important;border:none!important}
.logistica-v2-map-base span,.logistica-v2-map-truck span{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:#fff;border:2px solid #10b981;color:#059669;font-size:1rem;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.logistica-v2-map-num span{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:#6366f1;color:#fff;font-size:.72rem;font-weight:700;border:2px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.22)}
.logistica-v2-map-num--active span{background:var(--lv-primary);width:34px;height:34px;font-size:.8rem;box-shadow:0 0 0 4px rgba(99,102,241,.25)}
.logistica-v2-map-truck span{border-color:var(--lv-primary);color:var(--lv-primary)}
.logistica-v2-timeline{padding:1rem 1.15rem;background:#fff;border:1px solid var(--lv-border);border-radius:12px;box-shadow:var(--lv-shadow);flex-shrink:0}
.logistica-v2-trajeto-details{flex-shrink:0}
.logistica-v2-timeline-head{display:flex;align-items:center;gap:.5rem;font-weight:700;font-size:.9rem;margin-bottom:.75rem}
.logistica-v2-timeline-count{margin-left:auto;font-size:.8rem;font-weight:500;color:var(--lv-text-muted)}
.logistica-v2-timeline-track{display:flex;align-items:center;gap:.25rem;flex-wrap:nowrap;overflow-x:auto;padding-bottom:.25rem}
.logistica-v2-timeline-step{display:flex;align-items:center;gap:.45rem;padding:.45rem .65rem;border-radius:10px;border:1px solid var(--lv-border);background:#fff;min-width:0;flex-shrink:0}
.logistica-v2-timeline-step--done{background:#f8fafc;border-color:#e2e8f0;color:#94a3b8}
.logistica-v2-timeline-step--current{border-color:var(--lv-primary);background:rgba(99,102,241,.06)}
.logistica-v2-timeline-step-num{width:1.6rem;height:1.6rem;border-radius:50%;background:#e2e8f0;color:#64748b;font-size:.7rem;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.logistica-v2-timeline-step--done .logistica-v2-timeline-step-num{background:#d1fae5;color:#059669}
.logistica-v2-timeline-step--current .logistica-v2-timeline-step-num{background:var(--lv-primary);color:#fff}
.logistica-v2-timeline-step-body{display:flex;flex-direction:column;min-width:0}
.logistica-v2-timeline-step-name{font-size:.72rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:6.5rem}
.logistica-v2-timeline-step-time{font-size:.65rem;color:#94a3b8}
.logistica-v2-timeline-step-tag{font-size:.65rem;font-weight:700;color:var(--lv-primary)}
.logistica-v2-timeline-step-tag--muted{color:#94a3b8;font-weight:600}
.logistica-v2-timeline-arrow{color:#cbd5e1;font-size:.7rem;flex-shrink:0}
.logistica-v2-trajeto-details summary{cursor:pointer;font-weight:600;font-size:.875rem;color:var(--lv-text-muted)}
.logistica-v2-trajeto-summary{list-style:none}
.logistica-v2-trajeto-summary::-webkit-details-marker{display:none}
.logistica-v2-empty{margin-top:2rem}

/* ── Listagem Ordens (mock Flux) ─────────────────────────────────────────── */
.os-list-page { max-width: 100%; }

.os-list-header { margin-bottom: 1.25rem; }

.os-list-title {
    margin: 0 0 .35rem;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--lv-text);
    letter-spacing: -.02em;
}

.os-list-subtitle {
    margin: 0;
    font-size: .9rem;
    color: var(--lv-text-muted);
}

.os-list-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 1.15rem;
    border-bottom: 1px solid var(--lv-border);
}

.os-list-tab {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem 1rem;
    margin-bottom: -1px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--lv-text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}

.os-list-tab:hover {
    color: var(--lv-primary);
}

.os-list-tab.active {
    color: var(--lv-primary);
    font-weight: 600;
    border-bottom-color: var(--lv-primary);
}

.os-list-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    padding: .12rem .45rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.2;
}

.os-tab-count-all {
    background: rgba(99, 102, 241, .12);
    color: var(--lv-primary-dark);
}

.os-list-tab.active .os-tab-count-all {
    background: var(--lv-primary);
    color: #fff;
}

.os-tab-count-pending { background: #fef3c7; color: #b45309; }
.os-tab-count-washing { background: #dbeafe; color: #1d4ed8; }
.os-tab-count-ready   { background: #ede9fe; color: #6d28d9; }
.os-tab-count-done    { background: #dcfce7; color: #15803d; }

.os-list-toolbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.os-list-toolbar-form {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
}

.os-list-search {
    position: relative;
    flex: 1 1 14rem;
    min-width: 12rem;
}

.os-list-search i {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lv-text-muted);
    font-size: .9rem;
    pointer-events: none;
}

.os-list-search input {
    width: 100%;
    height: 2.45rem;
    padding: .55rem 1rem .55rem 2.35rem;
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius-sm);
    background: var(--lv-card-bg);
    font-size: .875rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.os-list-search input:focus {
    border-color: var(--lv-primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}

.os-list-date-range {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    height: 2.45rem;
    padding: 0 .65rem;
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius-sm);
    background: var(--lv-card-bg);
    flex-shrink: 0;
}

.os-list-date-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: var(--lv-text-muted);
    font-size: .95rem;
    flex-shrink: 0;
    cursor: pointer;
    line-height: 1;
}

.os-list-date-trigger:hover {
    color: var(--lv-primary);
}

.os-list-date-range input[type="date"] {
    border: none;
    background: transparent;
    font-size: .82rem;
    color: var(--lv-text);
    padding: 0;
    min-width: 7.5rem;
    outline: none;
    cursor: pointer;
}

.os-list-date-range input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: .65;
}

.os-list-date-sep {
    color: var(--lv-text-muted);
    font-size: .85rem;
    user-select: none;
}

.os-list-toolbar-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.os-list-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    height: 2.45rem;
    padding: 0 .9rem;
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius-sm);
    background: var(--lv-card-bg);
    color: var(--lv-text);
    font-size: .82rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.os-list-tool-btn:hover {
    background: var(--lv-body-bg);
    border-color: #cbd5e1;
    color: var(--lv-text);
}

.os-list-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    height: 2.45rem;
    padding: 0 1rem;
    border: none;
    border-radius: var(--lv-radius-sm);
    background: var(--lv-primary);
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}

.os-list-btn-primary:hover {
    background: var(--lv-primary-dark);
    color: #fff;
}

.os-list-card { overflow: hidden; }

.os-list-table thead th {
    text-transform: none;
    letter-spacing: 0;
    font-size: .8rem;
    font-weight: 600;
    color: #64748b;
}

.os-list-code-link {
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.os-list-code-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.os-list-service-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    max-width: 260px;
}

.os-list-service-chip {
    display: inline-block;
    padding: .22em .55em;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.os-list-service-chip-more {
    background: #e2e8f0;
    color: #64748b;
    font-weight: 600;
}

.os-status-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .28em .7em;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}

.os-status-dot {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.os-status-pending { background: #fef9c3; color: #a16207; }
.os-status-pending .os-status-dot { background: #eab308; }

.os-status-washing { background: #dbeafe; color: #1d4ed8; }
.os-status-washing .os-status-dot { background: #3b82f6; }

.os-status-ready { background: #ede9fe; color: #6d28d9; }
.os-status-ready .os-status-dot { background: #8b5cf6; }

.os-status-done { background: #dcfce7; color: #15803d; }
.os-status-done .os-status-dot { background: #22c55e; }

.os-status-muted { background: #f1f5f9; color: #64748b; }
.os-status-muted .os-status-dot { background: #94a3b8; }

.os-list-entrega {
    color: var(--lv-text-muted);
    white-space: nowrap;
    font-size: .875rem;
}

.os-list-table th.col-total,
.os-list-table td.col-total {
    text-align: right;
}

.os-list-table th.col-total .list-sort-link {
    justify-content: flex-end;
}

.os-list-table tbody tr:hover {
    background: rgba(99, 102, 241, .04);
}

.os-list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: .85rem 1.25rem;
    border-top: 1px solid var(--lv-border);
    font-size: .82rem;
    color: var(--lv-text-muted);
}

.os-list-pagination {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.os-list-page-arrow,
.os-list-page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--lv-text-muted);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}

.os-list-page-arrow:hover,
.os-list-page-num:hover {
    background: var(--lv-body-bg);
    color: var(--lv-primary);
}

.os-list-page-arrow.disabled {
    opacity: .35;
    cursor: default;
}

.os-list-page-num.active {
    background: var(--lv-primary);
    color: #fff;
    font-weight: 600;
}

.os-list-page-ellipsis {
    padding: 0 .15rem;
    color: var(--lv-text-muted);
}

@media (max-width: 768px) {
    .os-list-toolbar-form,
    .os-list-toolbar-actions {
        width: 100%;
    }

    .os-list-date-range {
        width: 100%;
        justify-content: flex-start;
    }

    .os-list-btn-primary {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* ── OS Details v3 (mock Flux — grid 2×3) ──────────────────────────────────── */
.os-v3 { max-width: 100%; }
.os-v3--sticky-pay { padding-bottom: 5.75rem; }

.os-v3-breadcrumb {
    display: flex; align-items: center; gap: .4rem;
    font-size: .82rem; color: #94a3b8; margin-bottom: .75rem;
}
.os-v3-breadcrumb a { color: #94a3b8; text-decoration: none; }
.os-v3-breadcrumb a:hover { color: var(--lv-primary); }
.os-v3-breadcrumb-sep { color: #cbd5e1; }

.os-v3-header {
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem;
}
.os-v3-header-main { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.os-v3-header-icon {
    width: 2.65rem; height: 2.65rem; border-radius: 10px;
    background: rgba(99, 102, 241, .12); color: var(--lv-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}
.os-v3-header-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.os-v3-header-title-row h1 { margin: 0; font-size: 1.45rem; font-weight: 700; color: #0f172a; }
.os-v3-header-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.os-v3-btn-outline {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .42rem .85rem; border-radius: 8px; background: #fff;
    font-size: .84rem; font-weight: 500; text-decoration: none;
    border: 1px solid #e2e8f0; color: #334155;
}
.os-v3-btn-outline--primary { border-color: #6366f1; color: #6366f1; }
.os-v3-btn-outline--primary:hover { background: rgba(99, 102, 241, .06); }
.os-v3-btn-outline:hover { border-color: var(--lv-primary-light); color: var(--lv-primary); }

.os-v3-status-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .25em .7em; border-radius: 999px;
    font-size: .72rem; font-weight: 600;
}
.os-v3-status--pending { background: #fef3c7; color: #b45309; }
.os-v3-status--washing { background: #3b82f6; color: #fff; }
.os-v3-status--ready   { background: #ede9fe; color: #6d28d9; }
.os-v3-status--done    { background: #dcfce7; color: #15803d; }

.os-v3-stepper-wrap {
    margin-bottom: 1.25rem;
    width: 100%;
    padding: .35rem 0 .5rem;
}
.os-v3-stepper {
    display: flex; align-items: center;
    width: 100%;
    gap: 0; flex-wrap: nowrap;
}
.os-v3-step {
    display: flex; flex-direction: row; align-items: flex-start;
    gap: .65rem; flex-shrink: 0;
}
.os-v3-step-text {
    display: flex; flex-direction: column; align-items: flex-start;
    min-width: 0;
}
.os-v3-step-num {
    width: 2.15rem; height: 2.15rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .82rem; font-weight: 700; flex-shrink: 0;
    border: 2px solid #e2e8f0; background: #fff; color: #64748b;
    margin-top: .05rem;
}
.os-v3-step.is-done .os-v3-step-num {
    border-color: #e2e8f0; background: #fff; color: #0f172a;
}
.os-v3-step.is-current .os-v3-step-num {
    background: #6366f1; border-color: #6366f1; color: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .18);
}
.os-v3-step.is-pending .os-v3-step-num {
    border-color: #e2e8f0; background: #fff; color: #cbd5e1;
}
.os-v3-step-label {
    font-size: .875rem; font-weight: 700; color: #0f172a; line-height: 1.25;
}
.os-v3-step.is-current .os-v3-step-label { color: #6366f1; }
.os-v3-step.is-pending .os-v3-step-label { color: #0f172a; font-weight: 600; }
.os-v3-step-date {
    font-size: .72rem; color: #64748b; margin-top: .1rem; white-space: nowrap;
}
.os-v3-step.is-current .os-v3-step-date { color: #6366f1; font-weight: 500; }
.os-v3-step.is-pending .os-v3-step-date { color: #94a3b8; }
.os-v3-step-line {
    flex: 1 1 0; min-width: 2.5rem;
    height: 2px; background: #e2e8f0; margin: 1.1rem .5rem 0;
    align-self: flex-start;
}
.os-v3-step-line.is-done { background: #6366f1; }
.os-v3-status-form { text-align: center; margin-top: .65rem; }

.os-v3-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
}

.os-v3-card {
    background: #fff;
    border: 1px solid var(--lv-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    overflow: hidden;
    display: flex; flex-direction: column;
}
.os-v3-card-head {
    display: flex; align-items: center; gap: .5rem;
    padding: .8rem 1.1rem;
    border-bottom: 1px solid var(--lv-border);
    background: #fff;
}
.os-v3-card-head--sub { background: #fafbfc; }
.os-v3-card-head-title { font-weight: 600; font-size: .9rem; color: #4338ca; }
.os-v3-section-num {
    width: 1.35rem; height: 1.35rem; border-radius: 6px;
    background: rgba(99, 102, 241, .12); color: var(--lv-primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .7rem; font-weight: 700; flex-shrink: 0;
}

.os-v3-info-body {
    display: grid; grid-template-columns: 1fr min(200px, 36%);
    gap: 0; flex: 1;
}
.os-v3-info-fields { padding: 1rem 1.1rem; border-right: 1px solid var(--lv-border); }
.os-v3-info-row { display: flex; gap: .6rem; padding: .38rem 0; }
.os-v3-info-icon { color: #94a3b8; width: 1rem; flex-shrink: 0; margin-top: .12rem; font-size: .9rem; }
.os-v3-info-label {
    display: block; font-size: .65rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .05em;
    color: #94a3b8; margin-bottom: .08rem;
}
.os-v3-info-value { font-size: .84rem; font-weight: 500; color: #1e293b; }
.os-v3-info-value--link { color: #2563eb; text-decoration: none; }
.os-v3-info-value--link:hover { text-decoration: underline; }
.os-v3-info-value--muted { color: #94a3b8; }

.os-v3-info-total-box {
    padding: 1.25rem 1rem; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    background: #f8fafc;
}
.os-v3-info-total-label { font-size: .72rem; font-weight: 600; color: #64748b; margin-bottom: .35rem; }
.os-v3-info-total-valor { font-size: 1.65rem; font-weight: 700; color: #16a34a; line-height: 1.1; margin-bottom: .6rem; }
.os-v3-pay-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .35em .6em; border-radius: 6px;
    font-size: .65rem; font-weight: 600; line-height: 1.3;
}
.os-v3-pay-badge--pending { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.os-v3-pay-badge--paid { background: #dbeafe; color: #1d4ed8; }

.os-v3-logistica-badge {
    margin-left: auto; display: inline-flex; align-items: center; gap: .3rem;
    padding: .22em .6em; border-radius: 999px;
    font-size: .65rem; font-weight: 600;
    background: #dbeafe; color: #1d4ed8; text-decoration: none;
}
.os-v3-logistica-badge--action { background: rgba(99, 102, 241, .1); color: var(--lv-primary); }

.os-v3-logistica-body {
    display: grid; grid-template-columns: 130px 1fr; gap: 1rem;
    padding: 1rem 1.1rem; flex: 1;
}
.os-v3-logistica-map { position: relative; border-radius: 10px; overflow: hidden; }
.os-v3-map-link { display: block; position: relative; }
.os-v3-map-img { width: 100%; height: 130px; object-fit: cover; display: block; border-radius: 10px; }
.os-v3-map-placeholder {
    height: 130px; border-radius: 10px;
    background: linear-gradient(145deg, #e2e8f0, #f1f5f9);
    position: relative;
}
.os-v3-map-pin {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 1.85rem; height: 1.85rem; border-radius: 50%;
    background: var(--lv-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem; box-shadow: 0 2px 8px rgba(99, 102, 241, .45);
}
.os-v3-logistica-row {
    display: flex; gap: .55rem; font-size: .8rem; line-height: 1.45;
    margin-bottom: .55rem; color: #334155;
}
.os-v3-logistica-row > i { color: var(--lv-primary); flex-shrink: 0; margin-top: .12rem; }
.os-v3-logistica-row strong { font-weight: 600; color: #1e293b; }

.os-v3-empty {
    padding: 1.75rem 1.1rem; text-align: center;
    color: #94a3b8; font-size: .84rem; flex: 1;
}

.os-v3-itens-section {
    grid-column: 1 / -1;
    background: #fff;
    border: 1px solid var(--lv-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    overflow: hidden;
}
.os-v3-itens-section-head { border-bottom: 1px solid var(--lv-border); }
.os-v3-itens-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    align-items: stretch;
    background: #fff;
}
.os-v3-itens-pane {
    background: #fff;
    border: 1px solid var(--lv-border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.os-v3-itens-pane .os-v3-plano-title-bar {
    background: #fff;
    border-bottom: 1px solid var(--lv-border);
}
.os-v3-itens-pane .os-v3-plano-title-bar strong {
    font-size: .9rem;
    font-weight: 700;
    color: #4338ca;
}

.os-v3-itens-pane--planos {
    border: none;
    background: transparent;
    box-shadow: none;
}
.os-v3-planos-stack {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    width: 100%;
    flex: 1;
}
.os-v3-plano-card {
    background: #fff;
    border: 1px solid var(--lv-border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.os-v3-plano-subtitulo { font-weight: 500; margin-top: .1rem; }

.os-v3-plano-title-bar {
    display: flex; align-items: center; gap: .55rem;
    padding: .65rem 1.1rem;
    background: rgba(99, 102, 241, .05);
    border-bottom: 1px solid var(--lv-border);
}
.os-v3-plano-icon {
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: rgba(99, 102, 241, .12); color: var(--lv-primary);
    display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0;
}
.os-v3-plano-icon--avulso { background: rgba(99, 102, 241, .1); color: #6366f1; }
.os-v3-plano-icon--insumo { background: rgba(59, 130, 246, .12); color: #2563eb; }

.os-v3-plano-usage { padding: .85rem 1.1rem; flex: 1; }
.os-v3-plano-usage-top {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: .75rem; font-size: .8rem; font-weight: 600; color: #334155; margin-bottom: .45rem;
}
.os-v3-plano-usage-bar { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin-bottom: .85rem; }
.os-v3-plano-usage-fill { height: 100%; background: var(--lv-primary); border-radius: 999px; }
.os-v3-plano-usage-caption { font-size: .72rem; font-weight: 500; color: #64748b; white-space: nowrap; }
.os-v3-plano-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
    font-size: .68rem; color: #64748b;
    padding-top: .85rem; border-top: 1px solid var(--lv-border);
}
.os-v3-plano-stats > div {
    padding: 0 .65rem;
    border-right: 1px solid var(--lv-border);
}
.os-v3-plano-stats > div:first-child { padding-left: 0; }
.os-v3-plano-stats > div:last-child { border-right: none; padding-right: 0; }
.os-v3-plano-stats strong { display: block; font-size: .82rem; color: #1e293b; margin-top: .1rem; }
.os-v3-plano-stats i { color: var(--lv-primary); margin-right: .15rem; }

.os-v3-table thead th {
    background: #f8fafc; font-size: .68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em; color: #64748b;
    border-bottom: 1px solid var(--lv-border); padding: .6rem 1rem;
}
.os-v3-table tbody td {
    padding: .65rem 1rem; font-size: .84rem;
    border-bottom: 1px solid #f1f5f9; vertical-align: middle;
}
.os-v3-item-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.4rem; height: 1.4rem; border-radius: 6px;
    background: #f1f5f9; color: #64748b; font-size: .7rem;
    margin-right: .3rem; vertical-align: middle;
}
.os-v3-row-muted td { background: #fafbfc; }

.os-v3-avulsos-foot { padding: 0 1.1rem .85rem; }
.os-v3-avulsos-sub {
    display: flex; justify-content: flex-end; gap: 1rem;
    font-size: .82rem; color: #64748b; padding: .55rem 0;
}
.os-v3-avulsos-total {
    display: flex; justify-content: flex-end; gap: .65rem;
    font-size: .875rem; font-weight: 600; color: #4338ca;
    padding-top: .35rem; border-top: 1px solid var(--lv-border);
}
.os-v3-avulsos-total strong { font-size: .95rem; }

.os-v3-insumo-row {
    display: grid; grid-template-columns: 1.2fr 1fr 1fr auto;
    gap: .75rem; align-items: start;
    padding: .85rem 1.1rem; border-bottom: 1px solid #f1f5f9;
    font-size: .84rem;
}
.os-v3-insumo-sub { display: block; font-size: .72rem; color: #94a3b8; margin-top: .1rem; }
.os-v3-insumo-label { display: block; font-size: .65rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .1rem; }
.os-v3-insumo-manual { padding: 0 1.1rem .85rem; font-size: .84rem; }
.os-v3-insumo-manual summary { cursor: pointer; color: var(--lv-primary); padding: .45rem 0; }
.os-v3-insumo-registrado { padding: 0 1.1rem .85rem; }

.os-v3-card--info { background: #fff; }
.os-v3-info-head-icon {
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: #dbeafe; color: #2563eb;
    display: flex; align-items: center; justify-content: center; font-size: .95rem;
}
.os-v3-info-notice {
    padding: 1.1rem; font-size: .84rem; color: #475569; line-height: 1.5; flex: 1;
}

.os-v3-sticky-bar {
    position: fixed; left: var(--lv-sidebar-w, 260px); right: 0; bottom: 0;
    z-index: 1020;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #fff; box-shadow: 0 -4px 20px rgba(79, 70, 229, .35);
}
.os-v3-sticky-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.25rem; flex-wrap: wrap; padding: .75rem 1.5rem;
}
.os-v3-sticky-left { display: flex; align-items: center; gap: .7rem; }
.os-v3-sticky-icon {
    width: 2.35rem; height: 2.35rem; border-radius: 10px;
    background: rgba(255, 255, 255, .15);
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.os-v3-sticky-label { display: block; font-size: .72rem; opacity: .9; }
.os-v3-sticky-valor { display: block; font-size: 1.3rem; font-weight: 700; }
.os-v3-sticky-center { display: flex; align-items: center; gap: .45rem; }
.os-v3-sticky-pix { font-weight: 800; font-size: .9rem; letter-spacing: .03em; }
.os-v3-sticky-pill {
    padding: .32em .7em; border-radius: 999px;
    background: rgba(255, 255, 255, .18); font-size: .68rem; font-weight: 600;
    border: none; color: #fff;
}
.os-v3-sticky-pill--btn {
    cursor: pointer; background: rgba(255, 255, 255, .22);
}
.os-v3-sticky-pill--btn:hover { background: rgba(255, 255, 255, .32); }
.os-v3-sticky-form { display: flex; align-items: center; gap: .45rem; margin: 0; }
.os-v3-sticky-select {
    border: none; border-radius: 999px; padding: .35rem .75rem;
    font-size: .78rem; background: rgba(255, 255, 255, .92); min-width: 8.5rem;
}
.os-v3-sticky-right { text-align: right; }
.os-v3-sticky-shield { display: block; font-size: .78rem; font-weight: 600; }
.os-v3-sticky-hint { display: block; font-size: .65rem; opacity: .85; }

@media (max-width: 1199px) {
    .os-v3-grid { grid-template-columns: 1fr; }
    .os-v3-itens-grid { grid-template-columns: 1fr; }
    .os-v3-info-body { grid-template-columns: 1fr; }
    .os-v3-info-fields { border-right: none; border-bottom: 1px solid var(--lv-border); }
    .os-v3-logistica-body { grid-template-columns: 1fr; }
    .os-v3-sticky-bar { left: 0; }
    .os-v3-sticky-inner { flex-direction: column; text-align: center; }
    .os-v3-sticky-left { justify-content: center; }
    .os-v3-sticky-right { text-align: center; }
    .os-v3-insumo-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .os-v3-stepper { justify-content: flex-start; }
    .os-v3-plano-stats { grid-template-columns: 1fr; }
}

/* ── Nova OS — wizard ───────────────────────────────────────────────────── */
.os-wizard { margin-bottom: 2rem; }
.os-wizard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.25rem;
    align-items: start;
}
.os-wizard-main { min-width: 0; }

.os-wizard-stepper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius-lg);
}
.os-wizard-stepper-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}
.os-wizard-stepper-dot {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
}
.os-wizard-stepper-item.is-active .os-wizard-stepper-dot {
    background: var(--lv-primary);
    border-color: var(--lv-primary);
    color: #fff;
}
.os-wizard-stepper-item.is-done .os-wizard-stepper-dot {
    background: #fff;
    border-color: var(--lv-primary);
    color: var(--lv-primary);
}
.os-wizard-stepper-label {
    font-size: .78rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}
.os-wizard-stepper-item.is-active .os-wizard-stepper-label { color: var(--lv-primary); }
.os-wizard-stepper-item.is-done .os-wizard-stepper-label { color: #334155; }
.os-wizard-stepper-line {
    flex: 1;
    min-width: 1.5rem;
    height: 2px;
    background: #e2e8f0;
    margin: 0 .65rem;
}
.os-wizard-stepper-line.is-done { background: var(--lv-primary); }

.os-wizard-card {
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius-lg);
    box-shadow: none;
}

.os-wizard-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--lv-border);
}

.os-wizard-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #64748b;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
}
.os-wizard-empty i { font-size: 1.75rem; display: block; margin-bottom: .5rem; color: #94a3b8; }

.os-wizard-rascunho {
    position: sticky;
    top: 1rem;
    background: #fff;
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius-lg);
    overflow: hidden;
}
.os-wizard-rascunho-head {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--lv-border);
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
}
.os-wizard-rascunho-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .2rem .5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    margin-bottom: .4rem;
}
.os-wizard-rascunho-badge.is-ready { background: rgba(34, 197, 94, .35); }
.os-wizard-rascunho-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}
.os-wizard-rascunho-body { padding: 1rem 1.1rem; }
.os-wizard-rascunho-label {
    display: block;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #94a3b8;
    margin-bottom: .15rem;
}
.os-wizard-rascunho-cliente { margin-bottom: 1rem; }
.os-wizard-rascunho-cliente strong { font-size: .95rem; color: #0f172a; }
.os-wizard-rascunho-dl {
    margin: 0 0 1rem;
    padding: 0;
}
.os-wizard-rascunho-dl > div {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    padding: .35rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: .84rem;
}
.os-wizard-rascunho-dl dt { margin: 0; font-weight: 500; color: #64748b; }
.os-wizard-rascunho-dl dd { margin: 0; font-weight: 600; color: #1e293b; }
.os-wizard-rascunho-total {
    padding: .85rem;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: .75rem;
}
.os-wizard-rascunho-total strong {
    display: block;
    font-size: 1.35rem;
    color: #16a34a;
    line-height: 1.2;
}
.os-wizard-rascunho-sub { display: block; margin-top: .25rem; }

@media (max-width: 992px) {
    .os-wizard-layout { grid-template-columns: 1fr; }
    .os-wizard-rascunho { position: static; order: -1; }
    .os-wizard-stepper-label { display: none; }
    .os-wizard-stepper-line { min-width: .75rem; margin: 0 .35rem; }
}

@media (max-width: 576px) {
    .os-wizard-nav .btn-link { width: 100%; text-align: center; margin-left: 0 !important; }
}

/* ── OS Details v4 — hero + sidebar + acordeão ─────────────────────────── */
.os-v4 { max-width: 100%; padding-bottom: 1rem; }
.os-v4--sticky-pay { padding-bottom: 5.75rem; }

.os-v4-topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap;
}
.os-v4-breadcrumb { font-size: .82rem; color: #64748b; }
.os-v4-breadcrumb a { color: #64748b; text-decoration: none; }
.os-v4-breadcrumb a:hover { color: var(--lv-primary); }
.os-v4-breadcrumb-sep { margin: 0 .35rem; color: #cbd5e1; }
.os-v4-topbar-actions { display: flex; gap: .65rem; flex-wrap: wrap; }
.os-v4-topbar-link {
    font-size: .84rem; font-weight: 500; color: #475569; text-decoration: none;
    display: inline-flex; align-items: center; gap: .3rem;
}
.os-v4-topbar-link:hover { color: var(--lv-primary); }

.os-v4-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.25rem;
    padding: 1.1rem 1.35rem;
    margin-bottom: 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(79, 70, 229, .22);
}
.os-v4-hero-left { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.os-v4-hero-code { margin: 0; font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.os-v4-hero-status {
    display: inline-flex; align-items: center; padding: .28rem .65rem;
    border-radius: 999px; font-size: .72rem; font-weight: 700;
}
.os-v4-hero-status.os-v3-status--pending { background: #f59e0b; color: #fff; }
.os-v4-hero-status.os-v3-status--washing { background: #3b82f6; color: #fff; }
.os-v4-hero-status.os-v3-status--ready { background: #ede9fe; color: #5b21b6; }
.os-v4-hero-status.os-v3-status--done { background: #dcfce7; color: #15803d; }

.os-v4-hero-steps {
    display: flex; align-items: flex-start; justify-content: center;
    gap: .85rem; flex-wrap: wrap;
}
.os-v4-hero-step {
    display: flex; flex-direction: column; align-items: center; gap: .35rem;
    min-width: 3.5rem;
}
.os-v4-hero-step-dot {
    width: .85rem; height: .85rem; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45); background: transparent;
}
.os-v4-hero-step.is-done .os-v4-hero-step-dot,
.os-v4-hero-step.is-current .os-v4-hero-step-dot {
    background: #fff; border-color: #fff;
}
.os-v4-hero-step-label {
    font-size: .65rem; font-weight: 600; color: rgba(255, 255, 255, .75);
    text-align: center; line-height: 1.2;
}
.os-v4-hero-step.is-current .os-v4-hero-step-label { color: #fff; }

.os-v4-hero-right { text-align: right; }
.os-v4-hero-total { display: block; font-size: 1.65rem; font-weight: 800; line-height: 1.1; }
.os-v4-hero-total-label { display: block; font-size: .68rem; opacity: .85; margin-bottom: .45rem; }
.os-v4-hero-pay {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .35rem .7rem; border-radius: 8px; font-size: .72rem; font-weight: 700;
}
.os-v4-hero-pay--pending { background: #fbbf24; color: #78350f; }
.os-v4-hero-pay--paid { background: rgba(255, 255, 255, .22); color: #fff; }

.os-v4-body {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 1.15rem;
    align-items: start;
}
.os-v4-resumo { border: 1px solid var(--lv-border); border-radius: 12px; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
.os-v4-resumo .card-body { padding: 1.15rem; }

.os-v4-cliente { display: flex; gap: .85rem; align-items: flex-start; margin-bottom: 1.15rem; }
.os-v4-avatar {
    width: 3rem; height: 3rem; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; font-weight: 800; font-size: .95rem;
    display: flex; align-items: center; justify-content: center;
}
.os-v4-cliente-nome {
    display: block; font-weight: 700; font-size: .95rem; color: #0f172a;
    text-decoration: none; line-height: 1.3;
}
.os-v4-cliente-nome:hover { color: var(--lv-primary); }
.os-v4-cliente-wa {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .78rem; color: #16a34a; text-decoration: none; margin-top: .2rem;
}
.os-v4-cliente-wa:hover { text-decoration: underline; }

.os-v4-resumo-block { padding-top: .85rem; border-top: 1px solid var(--lv-border); }
.os-v4-resumo-block--logistica { margin-top: .85rem; }
.os-v4-resumo-block-title {
    font-size: .78rem; font-weight: 700; color: #4338ca; margin-bottom: .5rem;
    display: flex; align-items: center; gap: .35rem;
}
.os-v4-resumo-row {
    display: flex; gap: .65rem; padding: .4rem 0;
}
.os-v4-resumo-row > i { color: #94a3b8; margin-top: .15rem; }
.os-v4-resumo-label { display: block; font-size: .68rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.os-v4-resumo-value { display: block; font-size: .86rem; font-weight: 600; color: #1e293b; }
.os-v4-resumo-text { font-size: .84rem; color: #475569; line-height: 1.45; }
.os-v4-resumo-link { font-size: .82rem; font-weight: 600; color: var(--lv-primary); text-decoration: none; }
.os-v4-resumo-link:hover { text-decoration: underline; }

.os-v4-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.os-v4-servicos, .os-v4-insumos {
    border: 1px solid var(--lv-border); border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05); overflow: hidden;
}
.os-v4-servicos-head {
    display: flex; align-items: center; gap: .55rem;
    background: #fff; border-bottom: 1px solid var(--lv-border); padding: .85rem 1.1rem;
}
.os-v4-servicos-icon {
    width: 1.75rem; height: 1.75rem; border-radius: 8px;
    background: rgba(99, 102, 241, .12); color: var(--lv-primary);
    display: flex; align-items: center; justify-content: center;
}
.os-v4-servicos-title { margin: 0; font-size: 1rem; font-weight: 700; color: #0f172a; }
.os-v4-empty { padding: 2rem 1rem; text-align: center; color: #94a3b8; font-size: .88rem; }

.os-v4-accordion { --bs-accordion-border-width: 0; --bs-accordion-btn-focus-box-shadow: none; }
.os-v4-acc-item { border-bottom: 1px solid var(--lv-border); }
.os-v4-acc-item:last-child { border-bottom: none; }
.os-v4-acc-btn {
    padding: .95rem 1.1rem; background: #fff !important; box-shadow: none !important;
    font-weight: 600; color: #0f172a !important;
}
.os-v4-acc-btn:not(.collapsed) { background: #fafbff !important; }
.os-v4-acc-btn::after { filter: opacity(.45); margin-left: .5rem; }
.os-v4-acc-head {
    display: flex; align-items: center; gap: .65rem; flex-wrap: wrap;
    width: 100%; padding-right: .5rem;
}
.os-v4-acc-icon {
    width: 2rem; height: 2rem; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: .9rem;
}
.os-v4-acc-icon--plano { background: rgba(99, 102, 241, .12); color: var(--lv-primary); }
.os-v4-acc-icon--avulso { background: rgba(99, 102, 241, .1); color: #6366f1; }
.os-v4-acc-title { font-size: .92rem; font-weight: 700; color: #1e293b; flex: 1; min-width: 8rem; }
.os-v4-acc-kg { font-size: .78rem; font-weight: 600; color: #64748b; white-space: nowrap; }
.os-v4-acc-meta { font-size: .78rem; font-weight: 600; color: #64748b; margin-left: auto; }
.os-v4-acc-bar {
    flex: 1 1 100%; max-width: 180px; height: 6px; background: #e2e8f0;
    border-radius: 999px; overflow: hidden; margin-left: 2.65rem;
}
.os-v4-acc-bar-fill { display: block; height: 100%; background: var(--lv-primary); border-radius: 999px; }

.os-v4-acc-body { padding: 0 1.1rem 1.1rem 1.1rem; background: #fafbff; }
.os-v4-acc-detail-label {
    font-size: .72rem; font-weight: 700; color: #64748b;
    text-transform: uppercase; letter-spacing: .04em; margin-bottom: .5rem;
}
.os-v4-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .85rem; }
.os-v4-chip {
    display: inline-block; padding: .35rem .65rem; border-radius: 8px;
    background: rgba(99, 102, 241, .1); color: #4338ca;
    font-size: .78rem; font-weight: 600;
}
.os-v4-acc-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem;
    margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--lv-border);
}
.os-v4-acc-stats > div {
    font-size: .68rem; color: #64748b; text-align: center;
}
.os-v4-acc-stats i { display: block; color: var(--lv-primary); font-size: 1rem; margin-bottom: .25rem; }
.os-v4-acc-stats strong { display: block; font-size: .88rem; color: #1e293b; margin-top: .15rem; }
.os-v4-acc-subtotal {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: .85rem; padding-top: .65rem; border-top: 1px solid var(--lv-border);
    font-size: .84rem; color: #64748b;
}
.os-v4-acc-subtotal strong { color: #16a34a; font-size: .95rem; }
.os-v4-table thead th {
    background: #f8fafc; font-size: .68rem; font-weight: 600;
    text-transform: uppercase; color: #64748b; border-bottom: 1px solid var(--lv-border);
}
.os-v4-table tbody td { font-size: .84rem; padding: .55rem .75rem; vertical-align: middle; }

.os-v4-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin-top: 1.25rem; padding: 1rem 1.15rem;
    background: #fff; border: 1px solid var(--lv-border); border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    flex-wrap: wrap;
}
.os-v4-btn-delete { font-weight: 600; }
.os-v4-btn-advance {
    font-weight: 700; padding: .65rem 1.35rem; border-radius: 10px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, .25);
}

@media (max-width: 992px) {
    .os-v4-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .os-v4-hero-left, .os-v4-hero-right { justify-content: center; }
    .os-v4-hero-right { text-align: center; }
    .os-v4-body { grid-template-columns: 1fr; }
    .os-v4-acc-bar { margin-left: 0; max-width: none; }
    .os-v4-acc-stats { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .os-v4-footer { flex-direction: column; }
    .os-v4-btn-advance, .os-v4-btn-delete { width: 100%; justify-content: center; }
}

/* ── OS Details G+D — mock alinhado ──────────────────────────────────────── */
.os-gd { max-width: 100%; padding-bottom: 1rem; }

.os-gd-topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: .65rem; flex-wrap: wrap;
}
.os-gd-breadcrumb { font-size: .8rem; color: #94a3b8; }
.os-gd-breadcrumb a { color: #64748b; text-decoration: none; }
.os-gd-breadcrumb a:hover { color: var(--lv-primary); }
.os-gd-breadcrumb-sep { margin: 0 .35rem; color: #cbd5e1; }
.os-gd-topbar-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.os-gd-topbar-link {
    font-size: .82rem; font-weight: 500; color: #64748b; text-decoration: none;
    display: inline-flex; align-items: center; gap: .3rem;
}
.os-gd-topbar-link:hover { color: var(--lv-primary); }

.os-gd-sticky-head {
    position: sticky; top: 0; z-index: 1020;
    background: #fff; border: 1px solid var(--lv-border);
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(15, 23, 42, .06);
    margin-bottom: 1rem;
}

.os-gd-header {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--lv-border); flex-wrap: wrap;
}
.os-gd-header-main {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; min-width: 0;
}
.os-gd-code { margin: 0; font-size: 1.5rem; font-weight: 800; color: #0f172a; letter-spacing: -.02em; }
.os-gd-status {
    display: inline-flex; align-items: center; padding: .3rem .7rem;
    border-radius: 999px; font-size: .75rem; font-weight: 700;
}
.os-gd-status.os-v3-status--pending { background: #ede9fe; color: #5b21b6; }
.os-gd-status.os-v3-status--washing { background: #dbeafe; color: #1d4ed8; }
.os-gd-status.os-v3-status--ready { background: #ede9fe; color: #5b21b6; }
.os-gd-status.os-v3-status--done { background: #dcfce7; color: #15803d; }
.os-gd-header-total {
    font-size: 1.15rem; font-weight: 800; color: #0f172a; margin-left: .25rem;
}
.os-gd-btn-advance {
    font-weight: 700; padding: .65rem 1.25rem; border-radius: 10px;
    display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
    box-shadow: 0 4px 14px rgba(34, 197, 94, .28);
}

.os-gd-tabs {
    display: flex; gap: 0; overflow-x: auto; background: #fff;
    padding: 0 1rem; -webkit-overflow-scrolling: touch;
}
.os-gd-tab {
    flex-shrink: 0; border: none; background: transparent;
    padding: .9rem 1.1rem; font-size: .86rem; font-weight: 600; color: #64748b;
    border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap;
    display: inline-flex; align-items: center; gap: .4rem;
}
.os-gd-tab i { font-size: 1rem; opacity: .75; }
.os-gd-tab:hover { color: var(--lv-primary); }
.os-gd-tab.is-active {
    color: var(--lv-primary); border-bottom-color: var(--lv-primary);
}
.os-gd-tab.is-active i { opacity: 1; }

.os-gd-panels { margin-top: 0; }
.os-gd-panel {
    display: none;
    background: #fff; border: 1px solid var(--lv-border); border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05); overflow: hidden;
}
.os-gd-panel.is-active { display: block; }
.os-gd-panel.card .card-body { padding: 1.25rem; }
.os-gd-panel-title {
    margin: 0 0 1rem; font-size: 1rem; font-weight: 700; color: #0f172a;
    display: flex; align-items: center; gap: .45rem;
}
.os-gd-subtitle { font-size: .88rem; font-weight: 700; color: #475569; margin: 1.25rem 0 .65rem; }
.os-gd-empty { padding: 2.5rem 1rem; text-align: center; color: #94a3b8; }

.os-gd-itens-summary {
    display: flex; align-items: center; gap: .55rem;
    padding: .75rem 1.15rem; font-size: .86rem; font-weight: 600; color: #4338ca;
    background: rgba(99, 102, 241, .07); border-bottom: 1px solid rgba(99, 102, 241, .12);
}
.os-gd-itens-summary i { font-size: 1.1rem; color: var(--lv-primary); }

.os-gd-master-detail {
    display: grid; grid-template-columns: minmax(260px, 32%) minmax(0, 1fr);
    min-height: 360px; border: none; border-radius: 0; box-shadow: none;
}
.os-gd-master {
    background: #f8fafc; border-right: 1px solid var(--lv-border);
    padding: .5rem 0 1rem; display: flex; flex-direction: column;
}
.os-gd-master-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .85rem 1rem .5rem;
}
.os-gd-master-title {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: #94a3b8;
}
.os-gd-master-item {
    display: flex; align-items: center; gap: .7rem; width: calc(100% - 1rem);
    margin: .25rem .5rem; border: none; background: transparent; text-align: left;
    padding: .8rem .85rem; cursor: pointer; border-radius: 10px;
    border-left: 4px solid transparent; transition: background .15s, border-color .15s;
}
.os-gd-master-item:hover { background: rgba(99, 102, 241, .06); }
.os-gd-master-item.is-active {
    background: rgba(99, 102, 241, .1); border-left-color: var(--lv-primary);
}
.os-gd-master-icon {
    width: 2.25rem; height: 2.25rem; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: .95rem;
    background: #fff; border: 1px solid rgba(99, 102, 241, .15); color: var(--lv-primary);
}
.os-gd-master-item.is-active .os-gd-master-icon {
    background: var(--lv-primary); color: #fff; border-color: var(--lv-primary);
}
.os-gd-master-name { display: block; font-size: .9rem; font-weight: 700; color: #1e293b; line-height: 1.25; }
.os-gd-master-meta { display: block; font-size: .76rem; color: #64748b; margin-top: .12rem; }

.os-gd-detail { padding: 1.35rem 1.5rem; background: #fff; min-width: 0; }
.os-gd-detail-pane { animation: osGdFadeIn .2s ease; }
@keyframes osGdFadeIn { from { opacity: .6; } to { opacity: 1; } }

.os-gd-detail-top { margin-bottom: 1.25rem; }
.os-gd-detail-title-lg {
    margin: 0 0 .35rem; font-size: 1.35rem; font-weight: 800;
    color: var(--lv-primary); letter-spacing: -.02em;
}
.os-gd-detail-badge {
    display: inline-block; padding: .2rem .55rem; border-radius: 6px;
    font-size: .7rem; font-weight: 700; background: #ede9fe; color: #5b21b6;
}
.os-gd-detail-badge--avulso { background: #f1f5f9; color: #475569; }
.os-gd-detail-sub { font-size: .84rem; color: #64748b; margin: 0; }

.os-gd-uso-block {
    margin-bottom: 1.25rem; padding: 1rem 1.1rem;
    background: #fafbff; border: 1px solid rgba(99, 102, 241, .12); border-radius: 12px;
}
.os-gd-uso-label {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: #64748b; margin-bottom: .65rem;
}
.os-gd-uso-row { display: flex; align-items: center; gap: .85rem; margin-bottom: .45rem; }
.os-gd-uso-pct { font-size: 1.75rem; font-weight: 800; color: var(--lv-primary); min-width: 3.5rem; }
.os-gd-uso-bar {
    flex: 1; height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden;
}
.os-gd-uso-bar-fill { display: block; height: 100%; background: var(--lv-primary); border-radius: 999px; }
.os-gd-uso-captions {
    display: flex; justify-content: space-between; gap: 1rem;
    font-size: .78rem; color: #64748b; font-weight: 500;
}

.os-gd-detail-label {
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: #64748b; margin-bottom: .55rem;
}
.os-gd-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.os-gd-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .4rem .7rem; border-radius: 8px; font-size: .8rem; font-weight: 600;
    background: #fff; border: 1px solid rgba(99, 102, 241, .25); color: #4338ca;
}
.os-gd-chip i { color: var(--lv-primary); }

.os-gd-stat-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem;
    margin: 1.25rem 0;
}
.os-gd-stat-box {
    padding: .85rem; border: 1px solid var(--lv-border); border-radius: 10px; text-align: center;
}
.os-gd-stat-label {
    display: block; font-size: .65rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .03em; color: #94a3b8; margin-bottom: .25rem;
}
.os-gd-stat-box strong { display: block; font-size: 1rem; color: #0f172a; }
.os-gd-stat-sub { display: block; font-size: .7rem; color: #94a3b8; margin-top: .1rem; }

.os-gd-detail-footer {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
    margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--lv-border);
}
.os-gd-detail-footer-label { display: block; font-size: .84rem; font-weight: 600; color: #475569; }
.os-gd-detail-footer-hint { display: block; font-size: .75rem; color: #94a3b8; margin-top: .15rem; }
.os-gd-detail-footer-valor { font-size: 1.35rem; font-weight: 800; color: #0f172a; }

.os-gd-table thead th {
    background: #f8fafc; font-size: .68rem; font-weight: 600;
    text-transform: uppercase; color: #64748b; border-bottom: 1px solid var(--lv-border);
}
.os-gd-table tbody td { font-size: .84rem; padding: .6rem .75rem; vertical-align: middle; }

.os-gd-stepper {
    display: flex; justify-content: space-between; gap: .5rem;
    padding-bottom: 1.25rem; margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--lv-border); flex-wrap: wrap;
}
.os-gd-step {
    flex: 1; min-width: 4.5rem; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: .3rem;
}
.os-gd-step-dot {
    width: .9rem; height: .9rem; border-radius: 50%;
    border: 2px solid #cbd5e1; background: #fff;
}
.os-gd-step.is-done .os-gd-step-dot,
.os-gd-step.is-current .os-gd-step-dot {
    background: var(--lv-primary); border-color: var(--lv-primary);
}
.os-gd-step-label { font-size: .72rem; font-weight: 700; color: #64748b; }
.os-gd-step.is-current .os-gd-step-label { color: var(--lv-primary); }
.os-gd-step-date { font-size: .65rem; color: #94a3b8; }

.os-gd-resumo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.os-gd-resumo-card { padding: .85rem; background: #f8fafc; border-radius: 10px; }
.os-gd-resumo-itens {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin-top: 1.15rem; padding: .75rem 1rem; background: rgba(99, 102, 241, .06);
    border-radius: 10px; font-size: .86rem; font-weight: 600; color: #4338ca; flex-wrap: wrap;
}
.os-gd-link-btn {
    border: none; background: transparent; color: var(--lv-primary);
    font-size: .84rem; font-weight: 700; cursor: pointer; padding: 0;
    display: inline-flex; align-items: center; gap: .25rem;
}
.os-gd-link-btn:hover { text-decoration: underline; }

.os-gd-dl { margin: 0; }
.os-gd-dl > div {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .55rem 0; border-bottom: 1px solid #f1f5f9; font-size: .88rem;
}
.os-gd-dl dt { margin: 0; font-weight: 500; color: #64748b; }
.os-gd-dl dd { margin: 0; font-weight: 600; color: #1e293b; text-align: right; }
.os-gd-dl--pay .os-gd-pay-total { font-size: 1.15rem; color: #16a34a; }
.os-gd-map-link {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .86rem; font-weight: 600; color: var(--lv-primary); text-decoration: none;
}
.os-gd-map-link:hover { text-decoration: underline; }
.os-gd-pay-form { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--lv-border); }
.os-gd-pay-select { max-width: 12rem; }
.os-gd-insumos-wrap { padding: 1rem; }
.os-gd-insumos-wrap .os-v3-card-head { border-radius: 0; }

@media (max-width: 992px) {
    .os-gd-header { flex-direction: column; align-items: stretch; }
    .os-gd-btn-advance { width: 100%; justify-content: center; }
    .os-gd-resumo-grid { grid-template-columns: 1fr; }
    .os-gd-master-detail { grid-template-columns: 1fr; }
    .os-gd-master { border-right: none; border-bottom: 1px solid var(--lv-border); }
    .os-gd-stat-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .os-gd-header-main { flex-direction: column; align-items: flex-start; }
}
