:root {
    --xmoto-bg: #f5f7fb;
    --xmoto-bg-soft: #fafbfd;
    --xmoto-surface: #ffffff;
    --xmoto-surface-soft: #f8fafc;
    --xmoto-surface-muted: #f1f4f8;
    --xmoto-border: #e4e9f1;
    --xmoto-border-strong: #d5dce7;
    --xmoto-text: #1b2432;
    --xmoto-text-strong: #111827;
    --xmoto-muted: #667085;
    --xmoto-brand: #f2a51a;
    --xmoto-brand-strong: #d98f09;
    --xmoto-brand-soft: #fff4dd;
    --xmoto-brand-soft-strong: #ffe9b6;
    --xmoto-ink: #222b38;
    --xmoto-success: #198754;
    --xmoto-danger: #dc3545;
    --xmoto-info: #3b82f6;
    --xmoto-warning: #9a6700;
    --xmoto-shadow-sm: 0 10px 24px rgba(15, 23, 42, .05);
    --xmoto-shadow-md: 0 16px 36px rgba(15, 23, 42, .08);
    --xmoto-shadow-lg: 0 22px 48px rgba(15, 23, 42, .12);
    --xmoto-radius-sm: 12px;
    --xmoto-radius-md: 16px;
    --xmoto-radius-lg: 20px;
}

body.xmoto-theme-light {
    background: linear-gradient(180deg, #fafbfd 0%, var(--xmoto-bg) 100%);
    color: var(--xmoto-text);
}

body.xmoto-theme-light .content {
    padding: 24px 28px 28px;
}

body.xmoto-theme-light .xmoto-main {
    display: grid;
    gap: 18px;
}

body.xmoto-theme-light .sidebar {
    background: rgba(255, 255, 255, 0.96);
    border-right: 1px solid var(--xmoto-border);
    box-shadow: 18px 0 40px rgba(15, 23, 42, .04);
    padding: 18px 14px 24px;
    backdrop-filter: blur(10px);
}

body.xmoto-theme-light .sidebar::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 112px;
    background: linear-gradient(180deg, rgba(255, 244, 221, .95) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

body.xmoto-theme-light .xmoto-brand-wrap,
body.xmoto-theme-light .sidebar > * {
    position: relative;
    z-index: 1;
}

body.xmoto-theme-light .xmoto-brand-card {
    border: 1px solid rgba(242, 165, 26, .22);
    border-radius: 18px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #ffffff 0%, #fff8ea 100%);
    box-shadow: var(--xmoto-shadow-sm);
}

body.xmoto-theme-light .xmoto-brand-logo {
    display: block;
    margin-bottom: 8px;
}

body.xmoto-theme-light .xmoto-brand-kicker {
    font-size: .70rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--xmoto-brand-strong);
    margin-bottom: 4px;
}

body.xmoto-theme-light .xmoto-brand-subtitle {
    font-size: .78rem;
    line-height: 1.35;
    color: var(--xmoto-muted);
}

body.xmoto-theme-light .sidebar .small.text-muted {
    color: var(--xmoto-muted) !important;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 800;
    font-size: .67rem;
    padding-left: 11px;
    margin-top: 1.25rem;
    margin-bottom: .45rem;
    position: relative;
}

body.xmoto-theme-light .sidebar .small.text-muted::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: var(--xmoto-brand);
    transform: translateY(-50%);
    box-shadow: 0 0 0 4px rgba(242, 165, 26, .16);
}

body.xmoto-theme-light .sidebar a {
    color: var(--xmoto-text);
    font-weight: 600;
    padding: .62rem .78rem;
    border-radius: 13px;
    margin-bottom: .24rem;
    border: 1px solid transparent;
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease, color .16s ease;
}

body.xmoto-theme-light .sidebar a:hover {
    color: var(--xmoto-ink);
    background: #fff;
    border-color: var(--xmoto-border);
    box-shadow: 0 10px 18px rgba(15, 23, 42, .05);
    transform: translateY(-1px);
}

body.xmoto-theme-light .sidebar a.active {
    background: linear-gradient(180deg, var(--xmoto-brand-soft) 0%, #fff8ec 100%);
    color: var(--xmoto-ink) !important;
    border-color: rgba(242, 165, 26, .34) !important;
    box-shadow: 0 10px 20px rgba(242, 165, 26, .12), inset 0 1px 0 rgba(255, 255, 255, .75);
}

body.xmoto-theme-light .sidebar a.logout-link {
    color: #b42318;
}

body.xmoto-theme-light .sidebar a.logout-link:hover {
    background: #fff4f2;
    border-color: rgba(220, 53, 69, .16);
}

body.xmoto-theme-light .sidebar-toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(217, 143, 9, .22);
    background: linear-gradient(180deg, #ffffff 0%, #fff4dd 100%);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .16);
}

body.xmoto-theme-light .sidebar-toggle-btn:hover {
    background: linear-gradient(180deg, #ffffff 0%, #ffeec6 100%);
}

body.xmoto-theme-light .sidebar-toggle-btn,
body.xmoto-theme-light .sidebar-toggle-btn:hover,
body.xmoto-theme-light .sidebar-toggle-btn:focus,
body.xmoto-theme-light .sidebar-toggle-btn:focus-visible,
body.xmoto-theme-light .sidebar-toggle-btn:active {
    transform: translate(-50%, -50%) !important;
}

body.xmoto-theme-light .sidebar-toggle-btn {
    transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease;
}

body.xmoto-theme-light .sidebar-toggle-btn,
body.xmoto-theme-light .sidebar-toggle-btn .sidebar-toggle-icon {
    color: var(--xmoto-ink) !important;
}

body.xmoto-theme-light .card,
body.xmoto-theme-light .card-page-section,
body.xmoto-theme-light .route-perspective-stage,
body.xmoto-theme-light .dashboard-panel,
body.xmoto-theme-light .dashboard-hero,
body.xmoto-theme-light .hero-chart-card,
body.xmoto-theme-light .pipeline-box,
body.xmoto-theme-light .attention-item,
body.xmoto-theme-light .presence-item,
body.xmoto-theme-light .activity-item,
body.xmoto-theme-light .presence-stat,
body.xmoto-theme-light .finance-box,
body.xmoto-theme-light .summary-card,
body.xmoto-theme-light .nfe-filters-global,
body.xmoto-theme-light .table-scroll,
body.xmoto-theme-light .dashboard-layout-toolbar {
    border-color: var(--xmoto-border) !important;
    border-radius: 18px !important;
    box-shadow: var(--xmoto-shadow-sm) !important;
}

body.xmoto-theme-light .card,
body.xmoto-theme-light .card-page-section,
body.xmoto-theme-light .dashboard-panel,
body.xmoto-theme-light .dashboard-hero,
body.xmoto-theme-light .hero-chart-card,
body.xmoto-theme-light .nfe-filters-global,
body.xmoto-theme-light .summary-card {
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%) !important;
}

body.xmoto-theme-light .card-header,
body.xmoto-theme-light .modal-header,
body.xmoto-theme-light .card-footer {
    background: transparent;
    border-color: var(--xmoto-border);
}

body.xmoto-theme-light .modal-content {
    border: 1px solid var(--xmoto-border);
    border-radius: 22px;
    box-shadow: var(--xmoto-shadow-lg);
    overflow: hidden;
}

body.xmoto-theme-light .modal-header,
body.xmoto-theme-light .modal-footer {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
}

body.xmoto-theme-light .alert {
    border-radius: 16px;
    border-color: rgba(15, 23, 42, .08);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

body.xmoto-theme-light .alert-info {
    background: linear-gradient(180deg, #fff8ea 0%, #fffdf7 100%);
    color: #7a5806;
    border-color: rgba(242, 165, 26, .18);
}

body.xmoto-theme-light .alert-light {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
}

body.xmoto-theme-light .xmoto-flash-stack {
    display: grid;
    gap: 10px;
}

body.xmoto-theme-light .btn {
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: .01em;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
}

body.xmoto-theme-light .btn:hover {
    transform: translateY(-1px);
}

body.xmoto-theme-light .btn:active {
    transform: translateY(0);
}

body.xmoto-theme-light .btn-sm {
    border-radius: 12px;
}

body.xmoto-theme-light .btn-primary,
body.xmoto-theme-light .btn.btn-primary {
    color: var(--xmoto-ink) !important;
    background: linear-gradient(180deg, #f8ba45 0%, var(--xmoto-brand) 100%) !important;
    border-color: #e59d14 !important;
    box-shadow: 0 14px 24px rgba(242, 165, 26, .18);
}

body.xmoto-theme-light .btn-primary:hover,
body.xmoto-theme-light .btn.btn-primary:hover {
    background: linear-gradient(180deg, #f6b132 0%, var(--xmoto-brand-strong) 100%) !important;
    border-color: var(--xmoto-brand-strong) !important;
}

body.xmoto-theme-light .btn-outline-primary,
body.xmoto-theme-light .btn.btn-outline-primary {
    color: var(--xmoto-ink) !important;
    background: #fff !important;
    border-color: var(--xmoto-border-strong) !important;
}

body.xmoto-theme-light .btn-outline-primary:hover,
body.xmoto-theme-light .btn.btn-outline-primary:hover {
    color: var(--xmoto-ink) !important;
    background: var(--xmoto-brand-soft) !important;
    border-color: rgba(242, 165, 26, .4) !important;
}

body.xmoto-theme-light .btn-outline-secondary,
body.xmoto-theme-light .btn.btn-outline-secondary,
body.xmoto-theme-light .btn-light {
    color: var(--xmoto-text) !important;
    background: #fff !important;
    border-color: var(--xmoto-border) !important;
}

body.xmoto-theme-light .btn-outline-secondary:hover,
body.xmoto-theme-light .btn.btn-outline-secondary:hover,
body.xmoto-theme-light .btn-light:hover {
    color: var(--xmoto-ink) !important;
    background: #f9fbff !important;
    border-color: var(--xmoto-border-strong) !important;
}

body.xmoto-theme-light .btn-success,
body.xmoto-theme-light .btn.btn-success {
    background: linear-gradient(180deg, #1e8b58 0%, #157347 100%) !important;
    border-color: #13663f !important;
    box-shadow: 0 12px 20px rgba(25, 135, 84, .16);
}

body.xmoto-theme-light .btn-outline-dark,
body.xmoto-theme-light .btn.btn-outline-dark {
    color: var(--xmoto-ink) !important;
    border-color: rgba(34, 43, 56, .18) !important;
    background: #fff !important;
}

body.xmoto-theme-light .btn-outline-dark:hover,
body.xmoto-theme-light .btn.btn-outline-dark:hover {
    background: var(--xmoto-ink) !important;
    border-color: var(--xmoto-ink) !important;
    color: #fff !important;
}

body.xmoto-theme-light .form-control,
body.xmoto-theme-light .form-select,
body.xmoto-theme-light .select2-container--default .select2-selection--single,
body.xmoto-theme-light .select2-container--default .select2-selection--multiple {
    border-color: var(--xmoto-border) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

body.xmoto-theme-light .form-control,
body.xmoto-theme-light .form-select {
    min-height: 42px;
}

body.xmoto-theme-light .form-control-sm,
body.xmoto-theme-light .form-select-sm {
    min-height: 36px;
    border-radius: 12px !important;
}

body.xmoto-theme-light .form-control:focus,
body.xmoto-theme-light .form-select:focus,
body.xmoto-theme-light .select2-container--default.select2-container--focus .select2-selection--multiple,
body.xmoto-theme-light .select2-container--default.select2-container--open .select2-selection--single {
    border-color: rgba(242, 165, 26, .72) !important;
    box-shadow: 0 0 0 4px rgba(242, 165, 26, .16) !important;
}

body.xmoto-theme-light .input-group-text {
    background: #fffaf0;
    border-color: var(--xmoto-border);
    color: var(--xmoto-muted);
}

body.xmoto-theme-light .table thead th,
body.xmoto-theme-light .table-invoice-list thead th,
body.xmoto-theme-light .table-nfe thead tr.sticky-header th {
    background: linear-gradient(180deg, #f8f9fc 0%, #eef2f6 100%) !important;
    color: var(--xmoto-ink) !important;
    border-bottom-color: var(--xmoto-border-strong) !important;
}

body.xmoto-theme-light .table tbody tr:hover,
body.xmoto-theme-light .table-hover tbody tr:hover,
body.xmoto-theme-light .table-invoice-list tbody tr:hover,
body.xmoto-theme-light .table-nfe tbody tr:hover {
    background: #fffaf0 !important;
}

body.xmoto-theme-light .table-scroll {
    background: #fff !important;
    overflow: hidden;
}

body.xmoto-theme-light .table-scroll > .table,
body.xmoto-theme-light .table-responsive > .table {
    margin-bottom: 0;
}

body.xmoto-theme-light .badge-section,
body.xmoto-theme-light .badge.badge-section {
    background: var(--xmoto-brand-soft) !important;
    color: var(--xmoto-ink) !important;
    border: 1px solid rgba(242, 165, 26, .34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

body.xmoto-theme-light .badge.text-bg-secondary,
body.xmoto-theme-light .badge.rounded-pill.text-bg-secondary {
    background: #f2f4f7 !important;
    color: var(--xmoto-ink) !important;
    border: 1px solid var(--xmoto-border);
}

body.xmoto-theme-light .page-link {
    color: var(--xmoto-ink);
    border-color: var(--xmoto-border);
    border-radius: 11px !important;
}

body.xmoto-theme-light .page-item.active .page-link {
    background: var(--xmoto-brand-soft);
    border-color: rgba(242, 165, 26, .35);
    color: var(--xmoto-ink);
}

body.xmoto-theme-light .nfe-header,
body.xmoto-theme-light .route-perspective-header__top {
    gap: 14px;
}

body.xmoto-theme-light .nfe-header h2,
body.xmoto-theme-light .route-perspective-header__title {
    letter-spacing: -.02em;
}

body.xmoto-theme-light .nfe-filters-global,
body.xmoto-theme-light .route-perspective-toolbar__form,
body.xmoto-theme-light .dashboard-layout-toolbar {
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%) !important;
}

body.xmoto-theme-light .route-perspective-toolbar__utility-btn,
body.xmoto-theme-light .route-perspective-toolbar__actions .btn,
body.xmoto-theme-light .route-perspective-toolbar__switch .btn,
body.xmoto-theme-light .tracking-invoice-toolbar__mode .btn,
body.xmoto-theme-light .nfe-quick-filters .btn,
body.xmoto-theme-light .nfe-header .btn {
    box-shadow: 0 10px 18px rgba(15, 23, 42, .05) !important;
}

body.xmoto-theme-light .nfe-summary .summary-card,
body.xmoto-theme-light .route-perspective-page .route-perspective-status-card,
body.xmoto-theme-light .route-perspective-page .route-perspective-stage,
body.xmoto-theme-light .dashboard-module-grip,
body.xmoto-theme-light .dashboard-item-grip,
body.xmoto-theme-light .donut-legend-item,
body.xmoto-theme-light .presence-stat,
body.xmoto-theme-light .finance-box {
    box-shadow: var(--xmoto-shadow-sm) !important;
}

body.xmoto-theme-light .nfe-summary .summary-card:hover,
body.xmoto-theme-light .route-perspective-page .route-perspective-status-card:hover,
body.xmoto-theme-light .pipeline-box:hover,
body.xmoto-theme-light .attention-item:hover,
body.xmoto-theme-light .activity-item:hover,
body.xmoto-theme-light .donut-legend-item:hover {
    box-shadow: var(--xmoto-shadow-md) !important;
}

body.xmoto-theme-light #xmotoAutoAssignToast,
body.xmoto-theme-light #xmotoFixedPostToast {
    border-radius: 18px !important;
    box-shadow: var(--xmoto-shadow-lg) !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%) !important;
    color: var(--xmoto-text) !important;
    border: 1px solid var(--xmoto-border) !important;
}

body.xmoto-theme-light #xmotoAutoAssignToast {
    border-left: 4px solid var(--xmoto-danger) !important;
}

body.xmoto-theme-light #xmotoFixedPostToast {
    border-left: 4px solid var(--xmoto-brand) !important;
}

body.xmoto-theme-light #xmotoAutoAssignToastOpen,
body.xmoto-theme-light #xmotoFixedPostToastOpen,
body.xmoto-theme-light #xmotoAutoAssignMuteBtn,
body.xmoto-theme-light #xmotoFixedPostMuteBtn {
    border-radius: 12px !important;
}

body.xmoto-theme-light footer hr {
    border-color: var(--xmoto-border);
    opacity: 1;
}

body.xmoto-theme-light footer {
    color: var(--xmoto-muted);
}

body.auth-body.xmoto-theme-light {
    background-color: #09111c;
}

body.auth-body.xmoto-theme-light .login-card {
    border: 1px solid rgba(242, 165, 26, .16);
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .24);
    background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.95) 100%);
}

body.auth-body.xmoto-theme-light .login-btn {
    background: linear-gradient(180deg, #f8ba45 0%, var(--xmoto-brand) 100%);
    border-color: #e59d14;
    color: var(--xmoto-ink);
    box-shadow: 0 14px 26px rgba(242, 165, 26, .18);
}

body.auth-body.xmoto-theme-light .login-btn:hover {
    filter: none;
    background: linear-gradient(180deg, #f5b133 0%, var(--xmoto-brand-strong) 100%);
}

@media (max-width: 991.98px) {
    body.xmoto-theme-light .content {
        padding: 20px 16px 24px;
    }

    body.xmoto-theme-light .sidebar {
        box-shadow: 18px 0 42px rgba(15, 23, 42, .12);
    }
}

@media (max-width: 575.98px) {
    body.xmoto-theme-light .content {
        padding: 16px 12px 20px;
    }

    body.xmoto-theme-light .route-perspective-toolbar__switch .btn,
    body.xmoto-theme-light .nfe-header .btn,
    body.xmoto-theme-light .nfe-quick-filters .btn {
        width: 100%;
    }
}

/* =========================================================
   XMOTO Light Ops — Phase 2
   Refino de headers, toolbars, listagens e formulários
   ========================================================= */

body.xmoto-theme-light .xmoto-page-hero {
    position: relative;
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(242, 165, 26, .18);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(242, 165, 26, .12), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
    box-shadow: var(--xmoto-shadow-sm);
}

body.xmoto-theme-light .xmoto-page-hero::after {
    content: "";
    position: absolute;
    inset: auto 1.2rem 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(242, 165, 26, .16), rgba(242, 165, 26, 0));
    pointer-events: none;
}

body.xmoto-theme-light .xmoto-page-hero__meta {
    align-items: flex-start !important;
}

body.xmoto-theme-light .xmoto-page-hero__meta h2,
body.xmoto-theme-light .xmoto-page-hero__meta h1,
body.xmoto-theme-light .xmoto-form-hero h1,
body.xmoto-theme-light .xmoto-form-hero h2 {
    font-weight: 800;
    color: var(--xmoto-text-strong);
    letter-spacing: -.03em;
}

body.xmoto-theme-light .xmoto-page-hero__actions,
body.xmoto-theme-light .xmoto-form-hero {
    position: relative;
    z-index: 1;
}

body.xmoto-theme-light .xmoto-page-note,
body.xmoto-theme-light .xmoto-inline-note {
    border-radius: 16px;
    border-color: rgba(242, 165, 26, .16) !important;
    border-left: 4px solid var(--xmoto-brand) !important;
    background: linear-gradient(180deg, #ffffff 0%, #fffcf6 100%) !important;
}

body.xmoto-theme-light .xmoto-inline-note {
    color: var(--xmoto-muted) !important;
}

body.xmoto-theme-light .xmoto-toolbar-card {
    padding: 14px 16px;
    background:
        linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%) !important;
    border: 1px solid var(--xmoto-border) !important;
    box-shadow: 0 16px 30px rgba(15, 23, 42, .05) !important;
}

body.xmoto-theme-light .xmoto-toolbar-card .form-label {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--xmoto-muted) !important;
}

body.xmoto-theme-light .xmoto-quick-chip-bar {
    padding-top: .2rem;
    padding-bottom: .15rem;
}

body.xmoto-theme-light .xmoto-quick-chip-bar .btn {
    border-radius: 999px !important;
    padding-left: .9rem;
    padding-right: .9rem;
    font-weight: 700;
    box-shadow: 0 10px 18px rgba(15, 23, 42, .04) !important;
}

body.xmoto-theme-light .xmoto-list-subhead {
    padding: .25rem .15rem .45rem;
}

body.xmoto-theme-light .xmoto-list-subhead .fw-semibold {
    color: var(--xmoto-text-strong);
}

body.xmoto-theme-light .xmoto-table-shell {
    border-radius: 20px !important;
    border: 1px solid var(--xmoto-border) !important;
    box-shadow: 0 16px 30px rgba(15, 23, 42, .05) !important;
}

body.xmoto-theme-light .xmoto-table-shell .table-nfe,
body.xmoto-theme-light .xmoto-table-shell .table-invoice-list {
    background: #fff;
}

body.xmoto-theme-light .xmoto-table-shell .table-nfe tbody tr,
body.xmoto-theme-light .xmoto-table-shell .table-invoice-list tbody tr {
    transition: background-color .14s ease, transform .14s ease;
}

body.xmoto-theme-light .xmoto-table-shell .table-nfe tbody tr:nth-child(even),
body.xmoto-theme-light .xmoto-table-shell .table-invoice-list tbody tr:nth-child(even) {
    background: #fcfdff;
}

body.xmoto-theme-light .xmoto-table-shell .table-nfe tbody td,
body.xmoto-theme-light .xmoto-table-shell .table-invoice-list tbody td {
    padding-top: .82rem;
    padding-bottom: .82rem;
    border-bottom-color: #eef2f6;
}

body.xmoto-theme-light .xmoto-table-shell .table-nfe tbody tr:hover,
body.xmoto-theme-light .xmoto-table-shell .table-invoice-list tbody tr:hover {
    background: linear-gradient(180deg, #fffaf0 0%, #fffdf8 100%) !important;
}

body.xmoto-theme-light .xmoto-table-shell .table-nfe thead tr.filters-row th,
body.xmoto-theme-light .xmoto-table-shell .table-invoice-list thead tr.filters-row th {
    background: linear-gradient(180deg, #fbfcfe 0%, #f5f7fb 100%) !important;
    border-bottom: 1px solid #e8edf4;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

body.xmoto-theme-light .xmoto-table-shell .table-nfe thead tr.filters-row input,
body.xmoto-theme-light .xmoto-table-shell .table-nfe thead tr.filters-row select,
body.xmoto-theme-light .xmoto-table-shell .table-invoice-list thead tr.filters-row input,
body.xmoto-theme-light .xmoto-table-shell .table-invoice-list thead tr.filters-row select {
    background: #fffef9 !important;
    border-color: #e6eaf1 !important;
    box-shadow: none !important;
}

body.xmoto-theme-light .xmoto-summary-shell .summary-card {
    padding: 12px 14px;
    border-radius: 18px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%) !important;
}

body.xmoto-theme-light .xmoto-summary-shell .summary-label {
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .68rem;
    font-weight: 800;
}

body.xmoto-theme-light .xmoto-summary-shell .summary-value {
    font-size: 1rem;
    color: var(--xmoto-text-strong);
}

body.xmoto-theme-light .xmoto-summary-shell .summary-actions-global .btn {
    width: 44px;
    height: 44px;
    border-radius: 15px !important;
    box-shadow: 0 12px 22px rgba(15, 23, 42, .08);
}

body.xmoto-theme-light .xmoto-page-card {
    overflow: hidden;
}

body.xmoto-theme-light .xmoto-tracking-page .card-header,
body.xmoto-theme-light .daily-control-invoices-page .card-header {
    padding: 1.2rem 1.2rem .75rem;
}

body.xmoto-theme-light .xmoto-tracking-page .route-perspective-header,
body.xmoto-theme-light .daily-control-invoices-page .route-perspective-header {
    gap: 1rem;
}

body.xmoto-theme-light .xmoto-tracking-page .route-perspective-header__identity,
body.xmoto-theme-light .daily-control-invoices-page .route-perspective-header__identity {
    align-items: flex-start;
}

body.xmoto-theme-light .xmoto-tracking-page .route-perspective-header__subtitle,
body.xmoto-theme-light .daily-control-invoices-page .route-perspective-header__subtitle {
    max-width: 72ch;
    line-height: 1.45;
}

body.xmoto-theme-light .xmoto-tracking-page .route-perspective-toolbar__form,
body.xmoto-theme-light .daily-control-invoices-page .route-perspective-toolbar__form {
    padding: 14px 16px;
    border: 1px solid var(--xmoto-border) !important;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, .05), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%) !important;
    box-shadow: 0 16px 28px rgba(15, 23, 42, .05);
}

body.xmoto-theme-light .xmoto-tracking-page .route-perspective-toolbar__field label,
body.xmoto-theme-light .daily-control-invoices-page .route-perspective-toolbar__field label {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--xmoto-muted) !important;
}

body.xmoto-theme-light .xmoto-tracking-page .route-perspective-toolbar__switch--header .btn,
body.xmoto-theme-light .daily-control-invoices-page .route-perspective-toolbar__switch--header .btn {
    min-width: 104px;
}

body.xmoto-theme-light .xmoto-tracking-page .route-perspective-toolbar__actions,
body.xmoto-theme-light .daily-control-invoices-page .route-perspective-toolbar__actions {
    align-items: flex-end;
}

body.xmoto-theme-light .daily-control-invoices-page .card-page-section,
body.xmoto-theme-light .xmoto-tracking-page .card-page-section {
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%) !important;
}

body.xmoto-theme-light .xmoto-form-page {
    max-width: 1320px;
}

body.xmoto-theme-light .xmoto-form-hero {
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(242, 165, 26, .2);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(242, 165, 26, .1), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
    box-shadow: var(--xmoto-shadow-sm);
}

body.xmoto-theme-light .xmoto-form-hero__kicker {
    font-size: .70rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--xmoto-brand-strong);
    margin-bottom: 4px;
}

body.xmoto-theme-light .xmoto-form-shell {
    display: grid;
    gap: 16px;
}

body.xmoto-theme-light .xmoto-form-panel {
    padding: 1rem 1.05rem 1.1rem;
    border: 1px solid var(--xmoto-border);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    box-shadow: var(--xmoto-shadow-sm);
}

body.xmoto-theme-light .xmoto-form-panel__title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--xmoto-text-strong);
    letter-spacing: -.02em;
    margin-bottom: .15rem;
}

body.xmoto-theme-light .xmoto-form-panel__subtitle {
    font-size: .82rem;
    color: var(--xmoto-muted);
    margin-bottom: .8rem;
}

body.xmoto-theme-light .xmoto-form-panel .form-label {
    font-weight: 700;
    color: var(--xmoto-text);
}

body.xmoto-theme-light .xmoto-form-panel .form-check {
    padding: .8rem .9rem;
    border-radius: 16px;
    background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
    border: 1px solid rgba(242, 165, 26, .14);
}

body.xmoto-theme-light .xmoto-form-panel .form-check-input:checked {
    background-color: var(--xmoto-brand);
    border-color: var(--xmoto-brand);
}

body.xmoto-theme-light .xmoto-form-panel .suggest-box {
    margin-top: 6px;
    border-color: var(--xmoto-border);
    border-radius: 16px;
    box-shadow: 0 18px 32px rgba(15, 23, 42, .12);
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(10px);
}

body.xmoto-theme-light .xmoto-form-panel .suggest-item {
    padding: .65rem .85rem;
}

body.xmoto-theme-light .xmoto-form-panel .suggest-item + .suggest-item {
    border-top: 1px solid #eef2f6;
}

body.xmoto-theme-light .xmoto-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(242, 165, 26, .2);
    border-radius: 20px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 32px rgba(15, 23, 42, .1);
}

body.xmoto-theme-light .xmoto-form-actions .btn {
    min-width: 150px;
}

body.xmoto-theme-light .xmoto-upload-page {
    max-width: 980px;
}

body.xmoto-theme-light .xmoto-upload-shell {
    border-radius: 24px !important;
    padding: 1.15rem 1.2rem !important;
    border: 1px solid var(--xmoto-border) !important;
    box-shadow: var(--xmoto-shadow-sm) !important;
}

@media (max-width: 991.98px) {
    body.xmoto-theme-light .xmoto-page-hero,
    body.xmoto-theme-light .xmoto-form-hero,
    body.xmoto-theme-light .xmoto-toolbar-card,
    body.xmoto-theme-light .xmoto-form-panel {
        border-radius: 18px;
    }

    body.xmoto-theme-light .xmoto-page-hero__actions {
        width: 100%;
    }

    body.xmoto-theme-light .xmoto-page-hero__actions .btn-group {
        width: 100%;
    }

    body.xmoto-theme-light .xmoto-page-hero__actions .btn-group .btn,
    body.xmoto-theme-light .xmoto-page-hero__actions > .btn {
        flex: 1 1 auto;
    }

    body.xmoto-theme-light .xmoto-form-actions {
        position: static;
        padding: .85rem;
    }

    body.xmoto-theme-light .xmoto-form-actions .btn {
        min-width: 0;
        flex: 1 1 0;
    }
}

@media (max-width: 767.98px) {
    body.xmoto-theme-light .xmoto-table-shell .table-nfe thead tr.filters-row th,
    body.xmoto-theme-light .xmoto-table-shell .table-invoice-list thead tr.filters-row th {
        top: 40px;
    }

    body.xmoto-theme-light .xmoto-page-hero,
    body.xmoto-theme-light .xmoto-form-hero {
        padding: 1rem;
    }

    body.xmoto-theme-light .xmoto-form-actions {
        flex-direction: column;
    }
}


/* =========================================================
   XMOTO Light Ops — Phase 4
   Controle diário > Rotas + modais operacionais
   ========================================================= */

body.xmoto-theme-light .daily-control-routes-page .card-header {
    padding: 1.2rem 1.2rem .95rem;
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-header {
    gap: 1rem;
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-header__top {
    align-items: flex-start;
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-header__subtitle {
    max-width: 68ch;
    line-height: 1.45;
}

body.xmoto-theme-light .xmoto-daily-routes-head-tools {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: end;
    align-content: start;
    gap: .55rem;
    margin-left: auto;
}

body.xmoto-theme-light .xmoto-daily-routes-head-switch-row,
body.xmoto-theme-light .xmoto-daily-routes-head-actions {
    display: flex;
    width: 100%;
    justify-content: flex-end;
}

body.xmoto-theme-light .xmoto-daily-routes-head-actions {
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
}

body.xmoto-theme-light .xmoto-daily-routes-head-actions .btn {
    height: 2.85rem;
    border-radius: 15px !important;
    padding-inline: 1rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .07) !important;
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__switch--header {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--xmoto-border);
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    box-shadow: 0 10px 18px rgba(15, 23, 42, .05);
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__switch--header .btn {
    min-width: 118px;
    height: 2.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 1.15rem;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__switch--header .btn + .btn {
    margin-left: 0;
    border-left: 1px solid var(--xmoto-border) !important;
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__switch--header .btn.btn-outline-primary {
    background: transparent;
    color: var(--xmoto-ink);
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__switch--header .btn.btn-primary {
    background: linear-gradient(180deg, #f6ba3b 0%, var(--xmoto-brand) 100%);
    color: var(--xmoto-ink);
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__form {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) auto auto;
    gap: .8rem 1rem;
    align-items: end;
    padding: .9rem 1rem;
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(242, 165, 26, .08), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%) !important;
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__cluster--filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: .75rem;
    align-items: end;
    min-width: 0;
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__field {
    min-width: 0;
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__field input,
body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__field select {
    width: 100%;
    min-width: 0;
    height: 2.7rem;
    border-radius: 14px;
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__cluster--daily-utility,
body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__actions--daily-routes {
    align-self: end;
}

body.xmoto-theme-light .daily-control-routes-page .xmoto-daily-routes-toolbar__utility,
body.xmoto-theme-light .daily-control-routes-page .xmoto-daily-routes-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

body.xmoto-theme-light .daily-control-routes-page .xmoto-daily-routes-toolbar__utility {
    justify-content: flex-start;
}

body.xmoto-theme-light .daily-control-routes-page .xmoto-daily-routes-toolbar__actions {
    justify-content: flex-end;
    padding-top: 0;
    border: 0;
    margin: 0;
}

body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__utility-btn,
body.xmoto-theme-light .daily-control-routes-page .xmoto-daily-routes-toolbar__actions .btn {
    height: 2.7rem;
    border-radius: 14px;
    padding-inline: .95rem;
}

body.xmoto-theme-light .daily-control-routes-page .card-body > .small.text-muted:first-child,
body.xmoto-theme-light .daily-control-routes-page .card-body > .alert.alert-light.border.small {
    border-radius: 18px;
    padding: .9rem 1rem;
}

body.xmoto-theme-light .xmoto-ops-modal .modal-header {
    align-items: flex-start;
    gap: .9rem;
    padding: 1rem 1.1rem .9rem;
    background:
        radial-gradient(circle at top right, rgba(242, 165, 26, .12), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
    border-bottom: 1px solid rgba(242, 165, 26, .14);
}

body.xmoto-theme-light .xmoto-ops-modal .modal-title {
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--xmoto-text-strong);
}

body.xmoto-theme-light .xmoto-ops-modal__eyebrow {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--xmoto-brand-strong);
    margin-bottom: .2rem;
}

body.xmoto-theme-light .xmoto-ops-modal .modal-body {
    padding: 1rem 1.1rem 1.15rem;
    background: linear-gradient(180deg, #fffdf9 0%, #ffffff 100%);
}

body.xmoto-theme-light .xmoto-ops-modal .modal-footer {
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

body.xmoto-theme-light .xmoto-ops-modal .form-label,
body.xmoto-theme-light .xmoto-ops-modal .form-label-sm {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--xmoto-muted);
}

body.xmoto-theme-light .xmoto-ops-modal .form-control,
body.xmoto-theme-light .xmoto-ops-modal .form-select {
    border-radius: 14px;
    border-color: var(--xmoto-border);
    background: #fff;
    min-height: 2.7rem;
}

body.xmoto-theme-light .xmoto-ops-modal .form-control.bg-light {
    background: #f8fafc !important;
    border-color: #e8edf4;
}

body.xmoto-theme-light .xmoto-ops-modal__spinner {
    padding: .85rem .95rem;
    border-radius: 16px;
    border: 1px solid var(--xmoto-border);
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

body.xmoto-theme-light .xmoto-ops-modal__note,
body.xmoto-theme-light .xmoto-ops-modal .bg-light-subtle,
body.xmoto-theme-light .xmoto-ops-modal__context {
    border-radius: 15px !important;
    border-color: rgba(242, 165, 26, .16) !important;
    background: linear-gradient(180deg, #fffef9 0%, #fffaf0 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

body.xmoto-theme-light .xmoto-ops-modal__note {
    padding: .72rem .8rem;
}

body.xmoto-theme-light .xmoto-ops-modal__table-shell {
    border-radius: 18px !important;
    border-color: var(--xmoto-border) !important;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

body.xmoto-theme-light .xmoto-ops-modal__table-shell table {
    margin-bottom: 0;
}

body.xmoto-theme-light .xmoto-ops-modal__table-shell thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, #fbfcfe 0%, #f4f7fb 100%) !important;
    border-bottom-color: #e7ebf2;
    color: var(--xmoto-text-strong);
}

body.xmoto-theme-light .xmoto-ops-modal .table tbody tr:nth-child(even) {
    background: #fcfdff;
}

body.xmoto-theme-light .xmoto-ops-modal .table tbody tr:hover {
    background: #fff9ee;
}

@media (max-width: 1499.98px) {
    body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__form {
        grid-template-columns: minmax(0, 1fr);
    }

    body.xmoto-theme-light .daily-control-routes-page .xmoto-daily-routes-toolbar__utility,
    body.xmoto-theme-light .daily-control-routes-page .xmoto-daily-routes-toolbar__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 1199.98px) {
    body.xmoto-theme-light .xmoto-daily-routes-head-tools {
        width: 100%;
        justify-items: stretch;
    }

    body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__cluster--filters {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 991.98px) {
    body.xmoto-theme-light .xmoto-daily-routes-head-tools,
    body.xmoto-theme-light .xmoto-daily-routes-head-switch-row,
    body.xmoto-theme-light .xmoto-daily-routes-head-actions,
    body.xmoto-theme-light .daily-control-routes-page .xmoto-daily-routes-toolbar__utility,
    body.xmoto-theme-light .daily-control-routes-page .xmoto-daily-routes-toolbar__actions {
        width: 100%;
    }

    body.xmoto-theme-light .xmoto-daily-routes-head-switch-row {
        justify-content: stretch;
    }

    body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__switch--header {
        width: 100%;
    }

    body.xmoto-theme-light .xmoto-daily-routes-head-actions .btn,
    body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__utility-btn,
    body.xmoto-theme-light .daily-control-routes-page .xmoto-daily-routes-toolbar__actions .btn,
    body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__switch--header .btn {
        flex: 1 1 0;
        min-width: min(220px, 100%);
    }
}

@media (max-width: 767.98px) {
    body.xmoto-theme-light .daily-control-routes-page .card-header {
        padding: 1rem 1rem .85rem;
    }

    body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__form {
        padding: .8rem;
        gap: .7rem;
    }

    body.xmoto-theme-light .xmoto-daily-routes-head-actions .btn,
    body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__utility-btn,
    body.xmoto-theme-light .daily-control-routes-page .xmoto-daily-routes-toolbar__actions .btn,
    body.xmoto-theme-light .daily-control-routes-page .route-perspective-toolbar__switch--header .btn {
        min-width: 0;
        width: 100%;
    }
}
