@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --global-color: #bc3132;
    --global-color-dark: #8e2425;
    --global-color-soft: #fdecec;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --surface: #ffffff;
    --canvas: #eef1f4;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    --font: Inter, "Segoe UI", sans-serif;
}

html, body, .x-body, .x-panel, .x-grid, .x-btn, .x-form-item, .x-window, .x-menu, .x-tab {
    font-family: var(--font) !important;
}

body.x-border-layout-ct,
div.x-border-layout-ct {
    background-color: var(--canvas) !important;
}

.x-panel-body-default,
.x-grid-view,
.x-grid-body,
.x-panel-body-default-framed {
    background: var(--surface) !important;
    border-color: var(--line) !important;
}

.x-splitter-vertical,
.x-splitter-horizontal {
    background-color: var(--line) !important;
}
.x-splitter-vertical {
    width: 6px !important;
}
.x-splitter-horizontal {
    cursor: row-resize;
    height: 6px !important;
}
.x-collapse-el {
    color: #fff !important;
    background-color: var(--global-color) !important;
    border-radius: 999px !important;
}

.toolbar-header-style,
.x-panel-header-default,
.x-panel-header-default-vertical,
.x-toolbar-default,
.x-window-header-default,
.x-window-header-default-top {
    background: linear-gradient(180deg, #c7383a 0%, #bc3132 100%) !important;
    border: none !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset !important;
}
.x-panel-header-default .x-tool-tool-el,
.x-window-header-default .x-tool-img {
    background-color: transparent !important;
}
.x-panel-header-title-default,
.x-window-header-title-default,
.x-panel-header-title-default-vertical,
.x-toolbar-text-default,
.x-btn-inner-default-toolbar-small {
    color: #fff !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
}
.x-window-header-title-default {
    font-size: 14px !important;
}

.x-toolbar-default {
    padding: 6px 10px !important;
    min-height: 52px !important;
}
.x-toolbar .x-btn {
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 0 !important;
    text-decoration: none !important;
    transition: background 0.15s ease, transform 0.15s ease !important;
}
.x-toolbar .x-btn:hover,
.x-btn-over.x-btn-default-toolbar-small {
    background: rgba(255, 255, 255, 0.22) !important;
}
.x-btn.x-btn-pressed.x-btn-default-toolbar-small {
    background: rgba(0, 0, 0, 0.22) !important;
}
.x-btn-default-toolbar-small,
.x-btn-focus.x-btn-default-toolbar-small,
.x-btn-focus.x-btn-over.x-btn-default-toolbar-small {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}
.x-btn-icon-el-default-toolbar-small,
.x-btn-wrap-default-toolbar-small.x-btn-arrow-right:after {
    color: #fff !important;
}

.x-window-default,
.modern-window {
    border: 0 !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
}
.x-window-header-default {
    border-radius: var(--radius) var(--radius) 0 0 !important;
    padding: 10px 14px !important;
    min-height: 44px !important;
}
.x-window-header-default .x-title-text {
    color: #fff !important;
    font-size: 14px !important;
    line-height: 22px !important;
}
.x-window-body-default {
    background: var(--surface) !important;
    border: 0 !important;
}
.x-btn-default-small,
.x-btn-default-medium,
.x-btn-default-large {
    background-color: var(--global-color) !important;
    border: 0 !important;
    border-radius: 10px !important;
    padding: 6px 14px !important;
}
.x-btn-default-small .x-btn-inner,
.x-btn-default-medium .x-btn-inner,
.x-btn-default-large .x-btn-inner {
    color: #fff !important;
    font-weight: 600 !important;
}
.x-btn-over.x-btn-default-small,
.x-btn-over.x-btn-default-medium {
    background-color: var(--global-color-dark) !important;
}

.x-tab-bar-default {
    background: #f8fafc !important;
    border: 0 !important;
    padding: 6px 8px 0 !important;
}
.x-tab-bar-strip-default,
.contract-tabs .x-tab-bar-strip {
    background: var(--global-color) !important;
    border-color: var(--global-color) !important;
    height: 2px !important;
}
.x-tab-default-top,
.x-tab-default {
    background: transparent !important;
    border: 0 !important;
    border-radius: 8px 8px 0 0 !important;
}
.x-tab-default .x-tab-inner {
    color: var(--muted) !important;
    font-weight: 600 !important;
}
.x-tab-default-top.x-tab-active,
.x-tab.x-tab-active.x-tab-default {
    background: var(--surface) !important;
}
.x-tab-default-top.x-tab-active .x-tab-inner,
.x-tab.x-tab-active.x-tab-default .x-tab-inner {
    color: var(--global-color) !important;
}
.contract-tabs .x-tab-bar {
    background: #f8fafc !important;
}

.x-column-header,
.x-column-header-inner {
    background: #f8fafc !important;
    border-color: var(--line) !important;
    color: #374151 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em;
}
.x-column-header-over,
.x-column-header-open {
    background-color: var(--global-color-soft) !important;
}
.x-grid-item {
    border-color: #f3f4f6 !important;
}
.x-grid-cell-inner {
    padding: 10px 12px !important;
    font-size: 13px !important;
    color: var(--ink);
}
.x-grid-item-over .x-grid-cell {
    background-color: #f9fafb !important;
}
.x-grid-item-selected {
    background-color: var(--global-color-soft) !important;
    box-shadow: inset 3px 0 0 var(--global-color);
}
.x-grid-item-selected .x-grid-cell,
.x-grid-item-selected .x-grid-rowwrap {
    background-color: transparent !important;
}
.x-grid-item-focused .x-grid-cell-inner:before {
    border: 0 !important;
}

.view-color-green {
    background-color: rgba(74, 222, 128, 0.22) !important;
}
.view-color-yellow {
    background-color: rgba(250, 204, 21, 0.24) !important;
}
.view-color-red {
    background-color: rgba(239, 68, 68, 0.20) !important;
}
.view-color-blue { background-color: rgba(188, 49, 50, 0.10) !important; }
.view-item-disabled { opacity: 0.45; }
.x-grid-item.x-grid-item-selected,
.x-grid-item.x-grid-item-selected.view-color-green,
.x-grid-item.x-grid-item-selected.view-color-yellow,
.x-grid-item.x-grid-item-selected.view-color-red,
.x-grid-item.x-grid-item-selected.view-color-blue {
    background-color: #bfdbfe !important;
    box-shadow: inset 4px 0 0 #2563eb;
}
.x-grid-item.x-grid-item-selected .x-grid-cell-inner {
    color: #1e3a8a;
    font-weight: 600;
}
html.theme-dark .x-grid-item.x-grid-item-selected,
html.theme-dark .x-grid-item.x-grid-item-selected[class*="view-color-"] {
    background-color: rgba(37, 99, 235, 0.42) !important;
}
html.theme-dark .x-grid-item.x-grid-item-selected .x-grid-cell-inner {
    color: #ffffff;
}

.x-form-text,
.x-form-text-default,
.x-form-textarea,
.x-form-trigger-wrap,
.x-form-item-body {
    border-radius: 10px !important;
    font-family: var(--font) !important;
}
.x-form-text-default {
    padding: 8px 10px !important;
    min-height: 34px !important;
    color: var(--ink) !important;
}
.x-form-trigger,
.x-form-trigger-default,
.x-form-arrow-trigger,
.x-form-date-trigger,
.x-form-spinner-up,
.x-form-spinner-down {
    background-color: #f8fafc !important;
    background-image: none !important;
    color: var(--global-color) !important;
    border-left: 1px solid var(--line) !important;
    width: 28px !important;
}
.x-form-arrow-trigger,
.x-form-date-trigger {
    border-radius: 0 10px 10px 0 !important;
}
.x-form-clear-trigger {
    background: transparent !important;
    color: #94a3b8 !important;
    border: 0 !important;
    border-radius: 0 !important;
    width: 22px !important;
}
.x-form-focus,
.x-form-text-wrap-default.x-form-text-wrap-focus,
.x-form-trigger-wrap-focus,
.x-field-form-focus {
    border-color: var(--global-color) !important;
    box-shadow: 0 0 0 3px rgba(188, 49, 50, 0.15) !important;
}

.device-search-bar {
    background: var(--surface) !important;
    border-top: 1px solid var(--line) !important;
    padding: 8px 10px !important;
    min-height: 48px !important;
}
.device-search-bar .x-form-text {
    background: #f8fafc !important;
    border: 1px solid var(--line) !important;
}

.x-menu {
    border: 0 !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow) !important;
    padding: 6px !important;
}
.x-menu-item-text {
    font-family: var(--font) !important;
}
.x-menu-item-active,
.x-menu-item-active > .x-menu-item-text {
    background-color: var(--global-color) !important;
    color: #fff !important;
    border-radius: 8px !important;
}
.x-menu-item-active .x-menu-item-icon-default,
.x-menu-item-active .x-menu-item-icon-glyph {
    color: #fff !important;
}
.x-boundlist {
    border-radius: 10px !important;
    border-color: var(--line) !important;
    box-shadow: var(--shadow) !important;
}
.x-boundlist-item-over,
.x-boundlist-selected {
    background-color: var(--global-color) !important;
    color: #fff !important;
    border-color: var(--global-color) !important;
}

/* Janela de ediÃ§Ã£o do veÃ­culo */
.device-edit .x-window-body { background: var(--surface); }
.dev-hero {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px;
    background: linear-gradient(135deg, rgba(188, 49, 50, 0.09), rgba(188, 49, 50, 0.02));
    border-bottom: 1px solid var(--line);
}
.dev-hero-icon {
    flex: none; width: 78px; height: 78px; border-radius: 18px; background: var(--surface);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12); display: flex; align-items: center; justify-content: center;
}
.dev-hero-icon img { width: 68px; height: 68px; object-fit: contain; }
.dev-hero-text { min-width: 0; flex: 1; }
.dev-hero-text > b { display: block; font-size: 17px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dev-plate {
    display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 5px; border: 1.5px solid #1e3a8a;
    border-top-width: 5px; background: #fff; color: #111827; font: 800 11.5px/18px "Segoe UI", sans-serif; letter-spacing: 1.5px;
}
.dev-chip {
    display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
    background: var(--canvas); color: var(--muted); font-size: 11.5px; line-height: 18px;
}
.dev-chip i { font-size: 10px; }
.dev-chip.is-online { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.dev-chip.is-offline { background: rgba(220, 38, 38, 0.1); color: #b91c1c; }
.dev-chip.is-unknown { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.dev-chip.is-online i, .dev-chip.is-offline i, .dev-chip.is-unknown i { font-size: 7px; }

.dev-tabs .x-tab-bar { background: var(--surface) !important; border-bottom: 1px solid var(--line) !important; padding: 0 12px !important; }
.dev-tabs .x-tab-bar-body { padding: 0 !important; }
.dev-tabs .x-tab-bar-strip { display: none !important; }
.dev-tabs .x-tab {
    background: transparent !important; border: 0 !important; border-radius: 0 !important;
    border-bottom: 3px solid transparent !important; padding: 11px 12px 9px !important; margin: 0 2px !important;
}
.dev-tabs .x-tab .x-tab-inner { color: var(--muted) !important; font-size: 13px !important; font-weight: 600 !important; }
.dev-tabs .x-tab .x-tab-inner i { margin-right: 4px; }
.dev-tabs .x-tab-over .x-tab-inner { color: var(--ink) !important; }
.dev-tabs .x-tab-active { border-bottom-color: var(--global-color) !important; }
.dev-tabs .x-tab-active .x-tab-inner { color: var(--global-color) !important; }
.dev-tabs .x-panel-body { background: var(--surface) !important; border: 0 !important; }

.device-edit .x-form-item-label-top { padding-bottom: 5px !important; }
.device-edit .x-form-item-label-inner { font-size: 12px !important; font-weight: 600 !important; color: var(--ink) !important; }
.device-edit .x-form-item { margin-bottom: 12px !important; }
.device-edit .x-form-text-wrap, .device-edit .x-form-trigger-wrap { border-radius: 10px !important; }
.device-edit .x-form-text { padding-left: 11px !important; }
.dev-row { margin-bottom: 0; }
.dev-disabled { padding: 10px 12px; border-radius: 10px; background: var(--canvas); }
.dev-label { font-size: 12px; font-weight: 600; color: var(--ink); margin: 2px 0 8px; }

.dev-categories { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-bottom: 16px; }
.dev-cat {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 7px;
    border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer;
    transition: border-color 0.12s, background 0.12s, transform 0.12s;
}
.dev-cat-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.dev-cat-icon img { width: 42px; height: 42px; }
.dev-cat-name { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-cat.is-over { border-color: #cbd5e1; background: var(--canvas); }
.dev-cat.is-selected { border-color: var(--global-color); background: rgba(188, 49, 50, 0.07); box-shadow: 0 0 0 3px rgba(188, 49, 50, 0.12); }
.dev-cat.is-selected .dev-cat-name { color: var(--global-color); font-weight: 700; }
.dev-fleet { max-height: 280px; overflow: auto; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.dev-fleet .dev-cat { padding: 4px; }
.dev-fleet .dev-cat-icon, .dev-fleet .dev-cat-icon img { width: 40px; height: 40px; object-fit: contain; }

.dev-photo-row { margin-bottom: 10px; }
.dev-photo {
    width: 96px; height: 72px; border-radius: 12px; border: 1.5px dashed #cbd5e1; background: var(--canvas);
    display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 22px; overflow: hidden;
}
.dev-photo img { width: 100%; height: 100%; object-fit: cover; }
.device-edit .x-btn.dev-photo-btn { background: var(--canvas) !important; box-shadow: inset 0 0 0 1px var(--line); border-radius: 10px !important; }
.device-edit .x-btn.dev-photo-btn .x-btn-inner { color: var(--ink) !important; font-weight: 600 !important; }
.dev-days .x-form-cb-label { font-size: 12px !important; }
.dev-cam-hint {
    display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; padding: 10px 12px; border-radius: 12px;
    background: #eff6ff; color: #1e3a8a; font-size: 12px; line-height: 1.45;
}
.dev-cam-hint i { margin-top: 2px; color: #2563eb; }
.device-edit .x-btn.dev-cam-fill { background: var(--canvas) !important; box-shadow: inset 0 0 0 1px var(--line); border-radius: 10px !important; }
.device-edit .x-btn.dev-cam-fill .x-btn-inner { color: var(--global-color) !important; font-weight: 600 !important; }
.device-edit .x-btn.dev-cam-fill .x-btn-inner i { margin-right: 6px; }
html.theme-dark .dev-cam-hint { background: rgba(37, 99, 235, 0.14); color: #bfdbfe; }

.wa-alerts-window .x-window-header .x-title-text i { margin-right: 6px; color: #25d366; }
.wa-alerts-status {
    margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; font-size: 12px; line-height: 1.45;
}
.wa-alerts-status i { margin-right: 6px; }
.wa-alerts-status code { font-size: 11px; }
.wa-alerts-status.is-ok { background: #ecfdf5; color: #065f46; }
.wa-alerts-status.is-ok i { color: #16a34a; }
.wa-alerts-status.is-off { background: #fffbeb; color: #92400e; }
.wa-alerts-status.is-off i { color: #d97706; }
.wa-alerts-active .x-form-cb-label { font-weight: 700 !important; }
.wa-alerts-hint { margin: 2px 0 12px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.wa-alerts-groups { margin-bottom: 6px; }
.wa-alerts-group, .wa-alerts-alarms { padding: 10px 12px; border-radius: 12px; background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line); }
.wa-alerts-group .x-form-item-label-text, .wa-alerts-alarms .x-form-item-label-text { font-weight: 700; }
.wa-alerts-group .x-form-cb-label, .wa-alerts-alarms .x-form-cb-label { font-size: 12px !important; }
.wa-alerts-customers { margin-top: 10px; font-size: 12px; color: var(--muted); }
.wa-cust-row { display: flex; flex-wrap: wrap; gap: 8px; }
.wa-cust { padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.wa-cust.ok { background: #dcfce7; color: #166534; }
.wa-cust.warn { background: #fef3c7; color: #92400e; }
.wa-cust.off { background: #e2e8f0; color: #334155; }
.wa-cust-missing { margin-top: 6px; line-height: 1.45; }
.wa-alerts-window .x-btn.wa-alerts-save { background: #16a34a !important; }
.wa-alerts-window .x-btn.wa-alerts-save .x-btn-inner { color: #fff !important; }
html.theme-dark .wa-alerts-status.is-ok { background: rgba(22, 163, 74, 0.15); color: #bbf7d0; }
html.theme-dark .wa-alerts-status.is-off { background: rgba(217, 119, 6, 0.15); color: #fde68a; }
html.theme-dark .wa-cust.ok { background: rgba(22, 163, 74, 0.2); color: #bbf7d0; }
html.theme-dark .wa-cust.warn { background: rgba(217, 119, 6, 0.2); color: #fde68a; }
html.theme-dark .wa-cust.off { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
@media (max-width: 600px) {
    .wa-alerts-groups { flex-direction: column; }
    .wa-alerts-groups > * { width: 100% !important; }
}

.sl-window .x-window-header .x-title-text i { margin-right: 6px; color: #fff; opacity: 0.9; }
.sl-body { padding: 16px 18px 6px; }
.sl-vehicle { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sl-vehicle-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, #1e293b, #334155); color: #fff; font-size: 17px; }
.sl-vehicle b { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.sl-vehicle small { display: inline-block; margin-top: 3px; padding: 1px 7px; border: 1.5px solid #1e293b; border-top: 4px solid #1e3a8a; border-radius: 4px; background: #fff; color: #0f172a; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; }
.sl-label { margin-bottom: 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.sl-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.sl-chip { height: 38px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); font: 600 13px var(--font); cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.sl-chip:hover { border-color: var(--global-color); }
.sl-chip.is-active { background: var(--global-color); border-color: var(--global-color); color: #fff; }
.sl-toggle { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 10px 12px; border-radius: 12px; background: var(--canvas); cursor: pointer; }
.sl-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.sl-switch { position: relative; flex: none; width: 40px; height: 23px; border-radius: 12px; background: #cbd5e1; transition: background 0.2s; }
.sl-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s; }
.sl-toggle input:checked + .sl-switch { background: #16a34a; }
.sl-toggle input:checked + .sl-switch::after { transform: translateX(17px); }
.sl-toggle-text b { display: block; font-size: 13px; color: var(--ink); }
.sl-toggle-text small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.sl-generate { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #d0393a, var(--global-color-dark)); color: #fff; font: 700 14px var(--font); cursor: pointer; box-shadow: 0 6px 16px rgba(188, 49, 50, 0.3); }
.sl-generate:hover { filter: brightness(1.06); }
.sl-generate:disabled { opacity: 0.6; cursor: wait; }
.sl-result { margin-top: 14px; padding: 12px; border-radius: 14px; background: #ecfdf5; box-shadow: inset 0 0 0 1px #bbf7d0; }
.sl-result-head { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 12.5px; color: #065f46; }
.sl-result-head i { color: #16a34a; }
.sl-url { display: flex; gap: 6px; margin-bottom: 8px; }
.sl-input { flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid #bbf7d0; border-radius: 10px; background: #fff; color: #0f172a; font: 500 12px var(--font); }
.sl-copy, .sl-open { flex: none; width: 40px; height: 38px; border: 1px solid #bbf7d0; border-radius: 10px; background: #fff; color: #0f172a; font-size: 14px; cursor: pointer; }
.sl-share { display: flex; gap: 6px; }
.sl-wa { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; height: 40px; border: 0; border-radius: 10px; background: #16a34a; color: #fff; font: 700 13.5px var(--font); cursor: pointer; }
.sl-wa i { font-size: 17px; }
.sl-note { display: flex; gap: 8px; margin: 14px 0 10px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.sl-note i { margin-top: 2px; color: #16a34a; }
.sl-footer { padding: 10px 18px 14px; border-top: 1px solid var(--line); text-align: center; }
.sl-revoke { border: 0; background: none; color: #dc2626; font: 600 12.5px var(--font); cursor: pointer; }
.sl-revoke i { margin-right: 6px; }
.sl-revoke:hover { text-decoration: underline; }
html.theme-dark .sl-result { background: rgba(22, 163, 74, 0.12); box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.35); }
html.theme-dark .sl-result-head { color: #bbf7d0; }
html.theme-dark .sl-input, html.theme-dark .sl-copy, html.theme-dark .sl-open { background: var(--surface); color: var(--ink); border-color: rgba(22, 163, 74, 0.35); }
html.theme-dark .sl-switch { background: #475569; }

.dashcam-window { border: none !important; border-radius: 16px !important; overflow: hidden; background: #0b0f14 !important; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55) !important; }
.dashcam-window .x-window-header { background: #0b0f14 !important; border: none !important; border-bottom: 1px solid #1e293b !important; padding: 10px 14px !important; }
.dashcam-window .x-window-header .x-title-text { color: #e2e8f0 !important; font: 600 14px var(--font) !important; }
.dashcam-window .x-tool-img { color: #cbd5e1 !important; opacity: 0.8; }
.dashcam-window .x-tool-over .x-tool-img { opacity: 1; }
.dashcam-window .x-window-body { background: #000 !important; border: none !important; }
.dc-title-icon { margin-right: 10px; color: #ef4444; }
.dc-live {
    margin-left: 10px; padding: 2px 8px; border-radius: 999px; background: #dc2626; color: #fff;
    font-size: 10px; font-weight: 700; letter-spacing: 0.06em; vertical-align: middle;
}
.dc-live::before {
    content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%;
    background: #fff; vertical-align: middle; animation: dc-pulse 1.4s ease-in-out infinite;
}
.dc-shell { display: flex; flex-direction: column; height: 100%; background: #000; font-family: var(--font); }
.dc-stage { position: relative; flex: 1; min-height: 0; display: flex; gap: 4px; background: #000; }
.dc-cam { position: relative; flex: 1; min-width: 0; overflow: hidden; background: #05070a; }
.dc-cam.is-hidden { display: none; }
.dc-frame, .dc-video {
    position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important;
    max-width: none !important; border: 0; object-fit: cover; background: #000;
}
.dc-ctrl {
    position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 5;
    display: flex; gap: 8px; transition: opacity 0.2s;
}
.dc-ctrl .dc-mute { margin-left: auto; }
.dc-vol {
    width: 90px; align-self: center; margin: 0; accent-color: #16a34a; cursor: pointer;
    padding: 6px 8px; border-radius: 999px; background: rgba(15, 23, 42, 0.78); box-sizing: content-box;
}
.dc-stage.mode-focus .dc-cam.is-thumb .dc-vol { display: none; }
.dc-cbtn {
    width: 32px; height: 32px; border: 0; border-radius: 50%;
    background: rgba(15, 23, 42, 0.78); color: #fff; font-size: 13px; cursor: pointer;
}
.dc-cbtn:hover { background: #dc2626; }
.dc-cbtn.dc-mute.is-on { background: #16a34a; }
.dc-label, .dc-expand { transition: opacity 0.2s; }
.dc-cam.is-playing:not(.show-ctrl) .dc-ctrl,
.dc-cam.is-playing:not(.show-ctrl) .dc-label,
.dc-cam.is-playing:not(.show-ctrl) .dc-expand {
    opacity: 0 !important;
    pointer-events: none;
}
.dc-label {
    position: absolute; top: 10px; left: 10px; z-index: 3; padding: 3px 9px; border-radius: 6px; pointer-events: none;
    background: rgba(15, 23, 42, 0.72); color: #e2e8f0; font-size: 11px; font-weight: 600;
}
.dc-vivo {
    position: absolute; right: 8px; top: 8px; z-index: 4; pointer-events: none;
    display: flex; padding: 2px 3px; border-radius: 7px; background: rgba(255,255,255,.92);
    box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.dc-vivo svg { width: 18px; height: 18px; fill: #E10600; animation: dc-pulse 1.4s ease-in-out infinite; }
.dc-loading {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2; padding: 20px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
    background: radial-gradient(circle at center, #111827, #000); color: #94a3b8; font-size: 13px;
}
.dc-cam.is-ready .dc-loading { display: none; }
.dc-spinner { width: 34px; height: 34px; border: 3px solid rgba(148, 163, 184, 0.25); border-top-color: #ef4444; border-radius: 50%; animation: dc-spin 0.9s linear infinite; }
.dc-cam.is-failed .dc-spinner { animation: none; border-color: #f59e0b; }
.dc-hit, .dc-expand { display: none; }
.dc-stage.mode-grid { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; height: 100%; }
.dc-stage.mode-grid .dc-expand {
    display: flex; align-items: center; justify-content: center; position: absolute; top: 7px; left: 8px; z-index: 4;
    width: 26px; height: 24px; border: 0; border-radius: 6px; cursor: pointer; opacity: 0.8;
    background: rgba(15, 23, 42, 0.72); color: #e2e8f0; font-size: 12px; transition: opacity 0.15s, background 0.15s;
}
.dc-stage.mode-grid .dc-label { left: 40px; top: 8px; }
.dc-stage.mode-grid .dc-cam:hover .dc-expand { opacity: 1; }
.dc-stage.mode-grid .dc-expand:hover { background: #dc2626; }
.dc-stage.mode-focus.count-2 .dc-cam.is-thumb {
    position: absolute; right: 14px; bottom: 14px; z-index: 5; flex: none;
    width: 30%; min-width: 150px; max-width: 260px; aspect-ratio: 16 / 9;
    border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 10px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}
.dc-stage.mode-focus.count-3, .dc-stage.mode-focus.count-4 { display: grid; grid-template-columns: 3fr 1fr; }
.dc-stage.mode-focus.count-3 { grid-template-rows: repeat(2, 1fr); }
.dc-stage.mode-focus.count-4 { grid-template-rows: repeat(3, 1fr); }
.dc-stage.mode-focus .dc-cam.is-main { grid-column: 1; grid-row: 1 / -1; }
.dc-stage.mode-focus .dc-cam.is-thumb { grid-column: 2; }
.dc-stage.mode-focus .dc-cam.is-thumb .dc-hit { display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 4; cursor: pointer; }
.dc-stage.mode-focus .dc-cam.is-thumb:hover { outline: 2px solid #dc2626; outline-offset: -2px; }
.dc-stage.mode-focus .dc-cam.is-thumb .dc-label { top: 6px; left: 6px; font-size: 10px; }
.dc-stage.mode-focus .dc-cam.is-thumb .dc-loading-text { display: none; }
.dc-count { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #1e293b; color: #94a3b8; font-size: 10px; font-weight: 600; vertical-align: middle; }
.dc-mode.is-compact { padding: 7px 10px; }
.dc-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: #0b0f14; border-top: 1px solid #1e293b; }
.dc-modes { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #111827; border: 1px solid #1f2937; }
.dc-mode, .dc-action { font-family: var(--font); cursor: pointer; transition: background 0.15s, color 0.15s; }
.dc-mode { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 8px; background: transparent; color: #94a3b8; font-size: 12px; font-weight: 600; }
.dc-mode:hover { color: #fff; }
.dc-mode.is-active { background: #dc2626; color: #fff; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35); }
.dc-mode.is-on { color: #fff; background: #1f2937; box-shadow: inset 0 0 0 1px #dc2626; }
.dc-single { display: inline-flex; align-items: center; gap: 8px; color: #cbd5e1; font-size: 12px; font-weight: 600; }
.dc-single i { color: #ef4444; }
.dc-actions { display: inline-flex; gap: 6px; margin-left: auto; }
.dc-action { width: 34px; height: 34px; border-radius: 9px; border: 1px solid #1f2937; background: #111827; color: #cbd5e1; font-size: 13px; }
.dc-action-text { width: auto; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; }
.dc-action-text span { font-size: 12px; font-weight: 700; }
.dc-action:hover { background: #1f2937; color: #fff; }
.dc-action[hidden] { display: none; }
@keyframes dc-spin { to { transform: rotate(360deg); } }
@keyframes dc-pulse { 50% { opacity: 0.3; } }
@media (max-width: 600px) {
    .dc-mode:not(.is-compact) span { display: none; }
    .dc-mode { padding: 8px 10px; }
    .dc-stage.mode-grid.count-2 { grid-template-columns: 1fr; }
    .dc-stage.mode-focus.count-3, .dc-stage.mode-focus.count-4 { grid-template-rows: 3fr 1fr; }
    .dc-stage.mode-focus.count-3 { grid-template-columns: repeat(2, 1fr); }
    .dc-stage.mode-focus.count-4 { grid-template-columns: repeat(3, 1fr); }
    .dc-stage.mode-focus .dc-cam.is-main { grid-column: 1 / -1; grid-row: 1; }
    .dc-stage.mode-focus .dc-cam.is-thumb { grid-column: auto; grid-row: 2; }
}

.x-window.device-edit .x-toolbar .x-btn.dlg-secondary { background: var(--canvas) !important; box-shadow: inset 0 0 0 1px var(--line); }
.x-window.device-edit .x-toolbar .x-btn.dlg-secondary .x-btn-inner { color: var(--ink) !important; font-weight: 600 !important; }
.x-window.device-edit .x-toolbar .x-btn.dlg-primary { padding-left: 18px !important; padding-right: 18px !important; }
.x-window.device-edit .x-toolbar .x-btn.dlg-primary .x-btn-inner { font-weight: 700 !important; }
html.theme-dark .dev-plate { background: #f8fafc; }
html.theme-dark .dev-hero-icon { background: #0f172a; }

/* Bootstrap deixa tudo border-box e o Ext para de esticar o formulário:
   o conteúdo fica numa coluna à esquerda e o resto da janela branco. */
.x-window.device-edit > .x-window-body {
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    box-sizing: border-box !important;
}
.x-window.device-edit .x-form-item,
.x-window.device-edit .x-form-item-body,
.x-window.device-edit .x-form-trigger-wrap,
.x-window.device-edit .x-form-text-wrap,
.x-window.device-edit .x-fieldcontainer {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.x-window.device-edit .x-form-trigger-wrap {
    display: table !important;
    table-layout: fixed !important;
}
.x-window.device-edit .x-form-trigger-wrap .x-form-text {
    width: 100% !important;
    box-sizing: border-box !important;
}
.x-window.device-edit .x-box-item.x-form-item,
.x-window.device-edit .x-form-checkboxgroup .x-form-item,
.x-window.device-edit .x-form-cb-wrap {
    width: auto !important;
    max-width: none !important;
}
.x-window.device-edit .x-form-checkboxgroup,
.x-window.device-edit .x-form-checkboxgroup table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
}
.x-window.device-edit {
    width: min(540px, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px) !important;
}
.x-window.device-edit > .x-window-body > .x-panel,
.x-window.device-edit form.x-form,
.x-window.device-edit .dev-hero,
.x-window.device-edit .dev-tabs,
.x-window.device-edit .dev-tabs > .x-panel-body,
.x-window.device-edit .dev-row,
.x-window.device-edit .x-tabpanel-child,
.x-window.device-edit .x-tabpanel-child > .x-panel-body {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.x-window.device-edit .dev-tabs > .x-tab-bar {
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    min-height: 44px !important;
    display: block !important;
}
.x-window.device-edit .dev-tabs .x-tab-bar .x-box-inner,
.x-window.device-edit .dev-tabs .x-tab-bar .x-box-target {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-end;
    width: 100% !important;
    position: relative !important;
}
.x-window.device-edit .dev-tabs .x-tab {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    flex: 0 0 auto !important;
}
.x-window.device-edit .dev-tabs > .x-panel-body {
    top: 46px !important;
}
@media (max-width: 600px) {
    .x-window.device-edit .dev-tabs > .x-tab-bar,
    .x-window.device-edit .dev-tabs .x-tab-bar .x-box-inner,
    .x-window.device-edit .dev-tabs .x-tab-bar .x-box-target {
        height: auto !important;
        min-height: 84px !important;
        overflow: visible !important;
    }
    .x-window.device-edit .dev-tabs .x-box-scroller,
    .x-window.device-edit .dev-tabs .x-tab-bar-scroller {
        display: none !important;
    }
    .x-window.device-edit .dev-tabs .x-tab {
        flex: 1 1 46% !important;
        margin: 0 !important;
        text-align: center;
    }
    .x-window.device-edit .dev-tabs > .x-panel-body {
        top: 88px !important;
    }
}
.x-window.device-edit .dev-row > .x-box-inner,
.x-window.device-edit .dev-row > .x-box-inner > .x-box-target,
.x-window.device-edit .x-fieldcontainer > .x-box-inner,
.x-window.device-edit .x-fieldcontainer > .x-box-inner > .x-box-target {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    width: 100% !important;
    position: relative !important;
    height: auto !important;
}
.x-window.device-edit .dev-row .x-box-item,
.x-window.device-edit .x-fieldcontainer .x-box-item {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
}
.x-window.device-edit > .x-toolbar-docked-bottom {
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 5 !important;
    display: block !important;
    min-height: 52px !important;
}
.x-window.device-edit > .x-toolbar-docked-bottom > .x-box-inner,
.x-window.device-edit > .x-toolbar-docked-bottom > .x-box-inner > .x-box-target {
    display: flex !important;
    align-items: center;
    width: 100% !important;
    position: relative !important;
    height: auto !important;
    min-height: 36px !important;
}
.x-window.device-edit > .x-toolbar-docked-bottom .x-box-item {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    flex: 0 0 auto !important;
}
.x-window.device-edit > .x-toolbar-docked-bottom .x-toolbar-spacer {
    flex: 1 1 auto !important;
}
.ol-viewport canvas,
.x-window canvas {
    max-width: none !important;
}

.x-datepicker {
    border-radius: 12px !important;
    overflow: hidden !important;
}
.x-datepicker-header,
.x-monthpicker-yearnav-button,
.x-datepicker-footer {
    background-color: var(--global-color) !important;
}
.x-datepicker-selected,
.x-datepicker-date:hover {
    background-color: var(--global-color-soft) !important;
    color: var(--global-color) !important;
}

.x-progress-default { background-color: var(--global-color-soft) !important; }
.x-progress-bar-default { background-color: var(--global-color) !important; }
.x-fieldset { overflow: visible !important; border-color: var(--line) !important; border-radius: 10px !important; }
.x-form-cb-checked .x-form-checkbox { color: var(--global-color) !important; }

.sp-10 { margin-bottom: 10px; }
.sp-20 { margin-bottom: 20px; }

#attribution {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 11px;
    color: var(--muted);
}

.street-view {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 325px;
    height: 260px;
    background: transparent;
    border-radius: 12px 0 0 12px;
    text-align: center;
    color: #fff;
    z-index: 999999;
    display: none;
}
@media (max-width: 420px) {
    .street-view {
        left: 20px;
        bottom: 120px;
        width: 290px;
        height: 200px;
    }
}

.popover-body {
    font-weight: 600;
    text-transform: uppercase;
    font-family: var(--font);
}

.ol-zoom { top: 7em !important; left: 10px !important; }
.ol-zoom:not(.ol-logo-int) {
    top: 12px !important; padding: 0 !important; background: #fff !important; border-radius: 12px !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14) !important; overflow: hidden;
}
.ol-zoom .ol-zoom-in, .ol-zoom .ol-zoom-out {
    width: 36px !important; height: 36px !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important;
    background: #fff !important; color: var(--global-color) !important; font: 600 20px/36px "Segoe UI", sans-serif !important;
}
.ol-zoom .ol-zoom-in { border-bottom: 1px solid var(--line) !important; }
.ol-zoom .ol-zoom-in:hover, .ol-zoom .ol-zoom-out:hover { background: #fef2f2 !important; }
html.theme-dark .ol-zoom:not(.ol-logo-int), html.theme-dark .ol-zoom .ol-zoom-in, html.theme-dark .ol-zoom .ol-zoom-out { background: #1b1f27 !important; }

#logam { width: 150px; opacity: 0.7; }
code {
    font-size: 1em !important;
    margin-left: 5px !important;
    color: var(--global-color) !important;
}
.img-car {
    width: 88px;
    height: 88px;
    display: block;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(188, 49, 50, 0.28);
}
.duo-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.ol-popup {
    position: absolute;
    filter: drop-shadow(0 12px 28px rgba(15, 23, 42, 0.18));
    padding: 16px !important;
    bottom: 12px;
    left: -50px;
    min-width: 280px;
    display: none;
    border-radius: 16px !important;
    background: #fff !important;
    z-index: 110 !important;
}
.pop-up-just { position: relative; left: -15px; top: -5px; }
.ol-popup:after, .ol-popup:before {
    top: 100%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}
.ol-popup:after { border-top-color: #fff !important; border-width: 10px; left: 48px; margin-left: -10px; }
.ol-popup:before { border-top-color: #fff !important; border-width: 11px; left: 48px; margin-left: -11px; }
.ol-popup-closer {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 90% !important;
    padding: 2px 7px !important;
    color: var(--global-color) !important;
    text-decoration: none;
}
.ol-popup-closer:after { content: "\2716"; }
.nome {
    color: var(--ink);
    font-size: 18px;
    padding-top: 3px;
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-family: var(--font);
    font-weight: 700;
    letter-spacing: 0.04em;
}
.img-int { width: 122px; height: auto; max-height: 42px; object-fit: contain; }
.usd { color: #fff; padding: 5px !important; }

#spinner-new {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: var(--canvas);
}
#spinner-new.x-hidden,
#spinner-new.x-hidden-display,
#spinner-new.x-hide-display,
#spinner-new.x-hidden-offsets,
#spinner-new.x-hide-offsets {
    display: none !important;
}
#spinner-new img { width: 72px !important; }

.avsl-load {
    --avsl-load-cor: var(--global-color, #c40000);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Inter, system-ui, sans-serif;
    user-select: none;
}
.avsl-load-cena {
    width: 260px;
    height: 260px;
    overflow: visible;
    filter: drop-shadow(0 18px 30px rgba(15, 23, 42, 0.12));
}
.avsl-load-disco { stroke: rgba(15, 23, 42, 0.06); stroke-width: 1; }
.avsl-load-ruas path {
    fill: none;
    stroke: #dfe4ea;
    stroke-width: 7;
    stroke-linecap: round;
}
.avsl-load-ruas path.fina { stroke-width: 2.5; stroke: #e8ecf1; }
.avsl-load-rota {
    fill: none;
    stroke: rgba(196, 0, 0, 0.16);
    stroke-width: 5;
    stroke-linecap: round;
}
.avsl-load-rota-viva {
    fill: none;
    stroke: var(--avsl-load-cor);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 26 420;
    animation: avsl-load-rota 5.5s linear infinite;
    opacity: 0.85;
}
@keyframes avsl-load-rota { to { stroke-dashoffset: -446; } }

.avsl-load-radar circle {
    fill: none;
    stroke: var(--avsl-load-cor);
    stroke-width: 2;
    transform-origin: 120px 128px;
    transform-box: view-box;
    opacity: 0;
    animation: avsl-load-radar 2.4s ease-out infinite;
}
.avsl-load-radar circle:nth-child(2) { animation-delay: 0.8s; }
.avsl-load-radar circle:nth-child(3) { animation-delay: 1.6s; }
@keyframes avsl-load-radar {
    0% { transform: scale(0.6); opacity: 0.55; }
    100% { transform: scale(6.2); opacity: 0; }
}

.avsl-load-carro .lataria { fill: #1f2937; }
.avsl-load-carro .vidro { fill: #93c5fd; }
.avsl-load-carro .farol { fill: #fde68a; }

.avsl-load-pino {
    transform-origin: 120px 148px;
    transform-box: view-box;
    animation: avsl-load-pino 1.6s ease-in-out infinite;
}
.avsl-load-pino path { fill: var(--avsl-load-cor); }
.avsl-load-pino .miolo { fill: #ffffff; }
@keyframes avsl-load-pino {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.avsl-load-satelite {
    transform: translate(196px, 36px) rotate(-35deg);
    animation: avsl-load-satelite 4s ease-in-out infinite;
}
.avsl-load-satelite .painel { fill: #3b82f6; stroke: #1d4ed8; stroke-width: 1; }
.avsl-load-satelite .corpo { fill: #64748b; }
.avsl-load-satelite .antena { stroke: #64748b; stroke-width: 1.6; fill: none; }
@keyframes avsl-load-satelite {
    0%, 100% { transform: translate(196px, 36px) rotate(-35deg); }
    50% { transform: translate(200px, 30px) rotate(-28deg); }
}
.avsl-load-sinal path {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-dasharray: 4 5;
    opacity: 0;
    animation: avsl-load-sinal 1.6s ease-in-out infinite;
}
.avsl-load-sinal path:nth-child(2) { animation-delay: 0.3s; }
@keyframes avsl-load-sinal {
    0%, 100% { opacity: 0; stroke-dashoffset: 0; }
    40% { opacity: 0.9; }
    80% { opacity: 0; stroke-dashoffset: -18; }
}

.avsl-load-marca {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--avsl-load-cor);
}
.avsl-load-marca span { color: #374151; font-weight: 600; }
.avsl-load-texto {
    position: relative;
    height: 18px;
    width: 240px;
    margin-top: 6px;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}
.avsl-load-texto span {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: avsl-load-texto 7.5s ease-in-out infinite;
}
.avsl-load-texto span:nth-child(2) { animation-delay: 2.5s; }
.avsl-load-texto span:nth-child(3) { animation-delay: 5s; }
@keyframes avsl-load-texto {
    0% { opacity: 0; transform: translateY(6px); }
    6%, 28% { opacity: 1; transform: translateY(0); }
    34%, 100% { opacity: 0; transform: translateY(-6px); }
}
.avsl-load-barra {
    position: relative;
    width: 160px;
    height: 4px;
    margin-top: 14px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(196, 0, 0, 0.12);
}
.avsl-load-barra i {
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    border-radius: 4px;
    background: var(--avsl-load-cor);
    animation: avsl-load-barra 1.4s ease-in-out infinite;
}
@keyframes avsl-load-barra {
    0% { left: -40%; }
    100% { left: 100%; }
}
html.theme-dark .avsl-load-disco { fill: #1f2937; stroke: rgba(255, 255, 255, 0.06); }
html.theme-dark .avsl-load-ruas path { stroke: #2b3442; }
html.theme-dark .avsl-load-ruas path.fina { stroke: #252d39; }
html.theme-dark .avsl-load-carro .lataria { fill: #e5e7eb; }
html.theme-dark .avsl-load-marca span { color: #e5e7eb; }
html.theme-dark .avsl-load-texto { color: #9ca3af; }
@media (prefers-reduced-motion: reduce) {
    .avsl-load *, .avsl-load *::before { animation: none !important; }
}

.ol-scale-line {
    background: rgba(17, 24, 39, 0.72) !important;
    border-radius: 8px !important;
}
.ol-logo-int { position: absolute; border-radius: 8px; padding: 2px; margin-top: -80px !important; }

.layer-switcher { top: 5.1em !important; z-index: 100 !important; }
.layer-switcher .panel {
    border: 0 !important;
    background: #fff !important;
    color: var(--ink) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow) !important;
}

.btns, .btnsC { width: 36px !important; height: 36px !important; }
.btnsC { background: #16a34a !important; }
button:focus { outline: 0 !important; }

.ol-control { padding: 0 !important; background: none !important; }
.ol-viewport .ol-control.map-lote {
    top: 96px !important;
    left: 10px !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    z-index: 40;
    display: flex !important;
    flex-direction: column;
    width: 36px;
    padding: 0 !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14) !important;
    overflow: hidden;
}
.ol-viewport .ol-control.map-lote button.map-lote-btn {
    position: static;
    width: 36px !important;
    height: 36px !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: var(--global-color, #c40000) !important;
    font: 400 11px/36px "Segoe UI", sans-serif !important;
    cursor: pointer;
}
.ol-viewport .ol-control.map-lote button.map-lote-mais {
    border-bottom: 1px solid var(--line, #e4e4e7) !important;
}
.ol-viewport .ol-control.map-lote button.map-lote-btn:hover {
    background: #fef2f2 !important;
}
.ol-viewport .ol-control.map-lote button.map-lote-off {
    opacity: 0.35;
    pointer-events: none;
}
.ol-viewport .map-lote-info {
    display: block;
    width: 36px;
    padding: 3px 0 4px;
    border-top: 1px solid var(--line, #e4e4e7);
    font: 700 9px/1.15 "Segoe UI", sans-serif;
    color: #111;
    text-align: center;
    white-space: normal;
}
html.theme-dark .ol-viewport .ol-control.map-lote,
html.theme-dark .ol-viewport .ol-control.map-lote button.map-lote-btn {
    background: #1b1f27 !important;
}
html.theme-dark .ol-viewport .map-lote-info { color: #fff; }
.layer-menu button,
.menu-btns button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background-color: #fff !important;
    background-image: none !important;
    color: var(--global-color) !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14) !important;
    height: 36px !important;
    width: 36px !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    border: 0 !important;
    line-height: 1 !important;
    font-size: 16px !important;
    overflow: hidden;
}
.menu-btns button i,
.layer-menu > button i {
    font-size: 15px;
    line-height: 1;
    pointer-events: none;
}
.layer-switcher button {
    background-image: none !important;
    background-color: #fff !important;
    color: var(--global-color) !important;
    font-size: 16px !important;
}
.layer-switcher button::before {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome;
    font-weight: 900;
    content: "\f279";
}
.layer-menu button:hover,
.menu-btns button:hover,
.layer-switcher button:hover {
    background-color: var(--global-color) !important;
    color: #fff !important;
}

@media (max-width: 768px) {
    .menu-btns {
        top: 7.6em;
        right: 8px;
        max-height: calc(100vh - 9em - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        scrollbar-width: none;
    }
    .menu-btns::-webkit-scrollbar { width: 0; height: 0; }
    .menu-btns button { margin-bottom: 6px !important; }
    .layer-menu { right: 8px; top: 4.6em; }
    .layer-menu .panel {
        max-width: calc(100vw - 64px);
        max-height: 70vh;
        overflow: auto;
    }
    .ol-popup:has(.vcard) { width: calc(100vw - 20px); }
    .fleet-toggle {
        position: fixed;
        z-index: 10000;
        left: 12px;
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        width: 48px;
        height: 48px;
        border: 0;
        border-radius: 14px;
        background: #fff;
        color: var(--global-color);
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
        font-size: 18px;
    }
    .fleet-toggle.is-open { background: var(--global-color); color: #fff; }
}

.layer-menu {
    position: absolute;
    top: 8em;
    right: 0.5em;
    text-align: left;
    background: transparent;
    z-index: 2;
}
.menu-btns button.active {
    background-color: var(--global-color) !important;
    color: #fff !important;
}
.map-overlays-panel {
    position: absolute;
    top: 10.4em;
    right: 3.2em;
    display: none;
    z-index: 5;
}
.map-overlays-panel.show {
    display: block !important;
}
.map-overlays-card {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16) !important;
    padding: 10px 12px !important;
    min-width: 180px;
}
.map-overlays-tit {
    font-weight: 800;
    font-size: 13px;
    color: #111827;
    margin: 0 0 8px;
}
.map-overlays-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 6px;
    cursor: pointer;
}
.map-overlays-row input {
    margin: 0;
}
.map-overlays-row[hidden] {
    display: none;
}
.map-overlays-sub {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}
.map-overlays-card button.map-overlays-waze {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: auto;
    margin: 4px 0 0;
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    background: #33ccff;
    color: #0b2533;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}
.map-overlays-card button.map-overlays-waze:hover,
.map-overlays-card button.map-overlays-waze:focus {
    background: #1fb8ec;
    color: #0b2533;
    outline: none;
}
.map-overlays-card button.map-overlays-waze i {
    font-size: 15px;
}
.waze-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}
.ol-popup:has(.tcard) {
    min-width: 250px;
    max-width: 300px;
}
.tcard-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 16px;
}
.tcard-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 15px;
}
.tcard-icon.is-danger {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}
.tcard-icon.is-warn {
    background: rgba(217, 119, 6, 0.14);
    color: #d97706;
}
.tcard-icon.is-info {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}
.tcard-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--ink, #111827);
}
.tcard-sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted, #6b7280);
}
.tcard-desc {
    margin-top: 8px;
    font-size: 12px;
    color: var(--ink, #111827);
}
.tcard-route {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted, #6b7280);
}
.tcard-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink, #111827);
}
.tcard-meta i {
    margin-right: 4px;
    color: var(--muted, #6b7280);
}
.tcard-source {
    margin-top: 10px;
    font-size: 10px;
    color: var(--muted, #6b7280);
}
.measure-tooltip {
    position: relative;
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
}
.measure-tooltip-static {
    background: #c40000;
}
html.theme-dark .map-overlays-card {
    background: #1f2937 !important;
}
html.theme-dark .map-overlays-tit,
html.theme-dark .map-overlays-row {
    color: #e5e7eb !important;
}
html.theme-dark .map-overlays-sub {
    border-top-color: #374151;
}
.menu-btns {
    position: absolute;
    top: 10.4em;
    right: 0.3em;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    width: 36px;
    z-index: 1;
}
.layer-menu .panel {
    padding: 8px 12px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: var(--shadow) !important;
    display: none;
    max-height: 100% !important;
    z-index: 99999 !important;
}
.layer-menu .show { display: block !important; }
.layer-menu .hidden { display: none !important; }
.layer-menu li.layer label, .layer-menu li.layer input { display: table-cell; vertical-align: sub; }
.layer-menu ul { padding-left: 1em; list-style: none; }
.layer-menu li.layer { display: table; padding-top: 10px; margin-left: 5px; }
.panel label { max-width: 100%; margin-bottom: 5px; font-weight: 600; }
.panel ul li label:hover { cursor: pointer; color: var(--global-color); }

.ul-payment { list-style: none; }
.ul-payment li { margin-top: 15px; }
.btn-payment { margin-left: 6px; }
.swal-footer { text-align: center !important; margin-top: 0 !important; }
.btn-danger:not([disabled]):hover { background-color: var(--global-color); border-color: var(--global-color); }
.btn-secondary {
    background-color: #374151 !important;
    border-color: #374151 !important;
    color: #fff !important;
    border-radius: 10px !important;
}

.ol-popup:has(.vcard) {
    width: 320px;
    max-width: calc(100vw - 32px);
    padding: 11px !important;
}
.ol-popup:has(.vcard):not(.is-wide) > div {
    max-height: calc(100vh - 72px);
    overflow: auto;
}
.ol-popup.is-wide {
    width: min(720px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
}
.ol-popup.is-wide #popup-content { max-height: none; overflow: visible; }
.vcard-layout {
    flex: none; width: 32px; height: 32px; border: 0; border-radius: 10px; cursor: pointer;
    background: var(--canvas); color: var(--muted);
}
.vcard-layout:hover { color: var(--global-color); }
.vcard-wide {
    display: grid;
    grid-template-columns: minmax(180px, 0.9fr) minmax(240px, 1.2fr);
    gap: 0 18px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}
.vcard-wide-facts, .vcard-wide-sensors { min-width: 0; }
.vcard-wide-sensors {
    display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; align-content: start;
    border-left: 1px solid var(--line); padding-left: 18px;
}
.vcard-wide-facts > div, .vcard-wide-sensors > div {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px;
    align-items: center; min-height: 28px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.vcard-wide-facts span, .vcard-wide-sensors span { color: var(--muted); white-space: nowrap; }
.vcard-wide-sensors span { display: inline-flex; align-items: center; gap: 6px; }
.vcard-wide-sensors span i { width: 14px; text-align: center; color: var(--global-color); font-size: 12px; }
.vcard-wide-facts b, .vcard-wide-sensors b {
    font-weight: 700; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vcard-wide-sensors b.is-on { color: #16a34a; }
.vcard-wide-sensors b.is-good { color: #0284c7; }
.vcard-wide-sensors b.is-off { color: var(--muted); }
.vcard-wide-sensors b.is-weak { color: #d97706; }
.vcard-wide-sensors b.is-bad { color: #dc2626; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-avatar { width: 48px; height: 48px; font-size: 18px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-name { font-size: 15px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-tabs { margin: 8px 0; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-tab { padding: 5px 0; font-size: 12px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-speed { margin-bottom: 8px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-speed-num { font-size: 28px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-chip { font-size: 11px; padding: 3px 8px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-grid { gap: 6px; margin-bottom: 6px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-tile { padding: 6px 8px; gap: 6px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-line { padding: 2px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-day { margin-top: 6px; padding-top: 0; border-top: 0; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-day-stats { margin-bottom: 6px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-day-body { display: none; margin-top: 6px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-day-body.is-open { display: block; }
.ol-popup:has(.vcard):not(.is-wide) #commands-buttons { margin-top: 8px; padding-top: 8px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-cmd,
.ol-popup:has(.vcard):not(.is-wide) .vcard-protect { padding: 8px 2px 6px; margin: 0; }
.vcard-fold { display: none; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-fold {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 2px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--canvas);
    color: var(--ink);
    font: 700 13px var(--font);
    cursor: pointer;
}
.ol-popup:has(.vcard):not(.is-wide) .vcard-fold .fa-chevron-down { margin-left: auto; font-size: 11px; color: var(--muted); transition: transform 0.15s; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-fold.is-open .fa-chevron-down { transform: rotate(180deg); }
.ol-popup:has(.vcard):not(.is-wide) .vcard-cmds,
.ol-popup:has(.vcard):not(.is-wide) .vcard-grid,
.ol-popup:has(.vcard):not(.is-wide) .vcard-actions { display: none; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-cmds.is-open,
.ol-popup:has(.vcard):not(.is-wide) .vcard-grid.is-open { display: grid; margin-top: 6px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-actions.is-open { display: grid; margin-top: 4px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-actions button { padding: 5px 1px 3px; gap: 3px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-actions button i { width: 30px; height: 30px; font-size: 13px; }
.ol-popup:has(.vcard):not(.is-wide) #popup-content { max-height: none; overflow: visible; }
.ol-popup.is-wide .vcard-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ol-popup.is-wide #commands-buttons { margin-top: 8px; padding-top: 8px; }
.ol-popup.is-wide .vcard-cmd,
.ol-popup.is-wide .vcard-cmds .vcard-protect {
    flex-direction: row;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 13px;
    gap: 8px;
}
.ol-popup.is-wide .vcard-cmds .vcard-protect > i { width: 22px; height: 22px; font-size: 12px; }
.ol-popup.is-wide .vcard-cmds .vcard-protect-text b { font-size: 13px; }
@media (max-width: 900px) {
    .vcard-wide { grid-template-columns: 1fr; }
    .vcard-wide-sensors { border-left: 0; padding-left: 0; }
}
.vcard { font-family: var(--font); color: var(--ink); }
.vcard-head { display: flex; align-items: center; gap: 12px; padding-right: 22px; }
.vcard-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    background: #9ca3af;
}
.vcard-avatar.is-online { background: linear-gradient(135deg, #22c55e, #15803d); }
.vcard-avatar.is-offline { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.vcard-avatar.has-photo {
    overflow: hidden;
    box-sizing: border-box;
    margin: 3px;
    padding: 1px;
    background: #f8fafc;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #9ca3af;
}
.vcard-avatar.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    transform: scale(1.28);
}
.vcard-avatar.has-photo.is-online { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #22c55e; }
.vcard-avatar.has-photo.is-offline { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ef4444; }
html.theme-dark .vcard-avatar.has-photo { box-shadow: 0 0 0 2px #1b1f27, 0 0 0 4px #9ca3af; }
html.theme-dark .vcard-avatar.has-photo.is-online { box-shadow: 0 0 0 2px #1b1f27, 0 0 0 4px #22c55e; }
html.theme-dark .vcard-avatar.has-photo.is-offline { box-shadow: 0 0 0 2px #1b1f27, 0 0 0 4px #ef4444; }
.vcard-title { min-width: 0; flex: 1; }
.vcard-live {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 0; border-radius: 999px;
    background: #fee2e2; color: #b91c1c; font: 700 12px var(--font); cursor: pointer; transition: background 0.15s, color 0.15s;
}
.vcard-live:hover { background: #dc2626; color: #fff; }
html.theme-dark .vcard-live { background: rgba(220, 38, 38, 0.18); color: #fca5a5; }
.vcard-name {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vcard-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.vcard-status, .vcard-ago { white-space: nowrap; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-head { align-items: flex-start; gap: 8px; padding-right: 18px; }
.ol-popup:has(.vcard):not(.is-wide) .vcard-live {
    width: 32px; height: 32px; padding: 0; justify-content: center; font-size: 0; gap: 0;
}
.ol-popup:has(.vcard):not(.is-wide) .vcard-live i { font-size: 13px; }
.vcard-plate {
    display: inline-flex;
    align-items: center;
    height: 16px;
    padding: 0 6px;
    border-radius: 4px;
    background: #1d4ed8;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
}
.vcard-hazard {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12.5px;
    line-height: 1.35;
}
.vcard-hazard i { margin-top: 2px; }
html.theme-dark .vcard-hazard { background: rgba(220, 38, 38, 0.16); color: #fca5a5; }
.hz-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.hz-kind {
    border: 1px solid var(--line, #e5e7eb);
    background: #fff;
    color: #111827;
    border-radius: 999px;
    padding: 6px 12px;
    font: 700 12px Inter, sans-serif;
    cursor: pointer;
}
.hz-kind.is-active { background: var(--hz, #d60b0b); border-color: var(--hz, #d60b0b); color: #fff; }
.menu-btns .hazard.active { background: #d60b0b; color: #fff; }
.menu-btns .minha-loc i { color: #4285F4 !important; }
.menu-btns .minha-loc.active { background: #4285F4 !important; }
.menu-btns .minha-loc.active i { color: #fff !important; }
.fence-hint { margin: 8px 0 0; }
.vcard-course { display: inline-block; color: var(--global-color); }
.vcard-dot { margin: 0 5px; }
.vcard-status { font-weight: 600; }
.vcard-status::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: 1px;
    background: #9ca3af;
}
.vcard-status.is-online { color: #16a34a; }
.vcard-status.is-online::before { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.vcard-status.is-offline { color: #dc2626; }
.vcard-status.is-offline::before { background: #ef4444; }

.vcard-tabs {
    display: flex;
    gap: 4px;
    margin: 14px 0 12px;
    padding: 4px;
    border-radius: 10px;
    background: var(--canvas);
}
.vcard-tab {
    flex: 1;
    border: 0;
    border-radius: 8px;
    padding: 6px 0;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.vcard-tab.active { background: var(--surface); color: var(--global-color); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }

.vcard-speed { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; }
.vcard-speed-num { font-size: 34px; font-weight: 800; line-height: 1; }
.vcard-speed-unit { font-size: 13px; color: var(--muted); font-weight: 600; }
.vcard-chip {
    margin-left: auto;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.vcard-chip.is-moving { background: rgba(34, 197, 94, 0.14); color: #15803d; }
.vcard-chip.is-stopped { background: var(--canvas); color: var(--muted); }
.vcard-protect {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -2px 0 10px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.vcard-protect > i {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--canvas);
    color: var(--muted);
    font-size: 14px;
}
.vcard-protect-text { flex: 1; min-width: 0; }
.vcard-protect-text b { display: block; font-size: 12.5px; }
.vcard-protect-text small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard-protect-switch {
    flex: none;
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.15s;
}
.vcard-protect-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s;
}
.vcard-protect:hover { border-color: #dc2626; }
.vcard-protect.is-active { border-color: rgba(220, 38, 38, 0.45); background: rgba(220, 38, 38, 0.06); }
.vcard-protect.is-active > i { background: #dc2626; color: #fff; }
.vcard-protect.is-active .vcard-protect-switch { background: #dc2626; }
.vcard-protect.is-active .vcard-protect-switch::after { transform: translateX(14px); }
.vcard-protect.is-alert > i { animation: protect-pulse 1.2s ease-in-out infinite; }
.vcard-protect.is-alert b { color: #dc2626; }
@keyframes protect-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55); }
    50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}
.protect-hint {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.07);
    color: var(--ink);
    font-size: 13px;
    line-height: 1.45;
}
.protect-hint > i { color: #dc2626; font-size: 22px; margin-top: 2px; }
.protect-warning { margin-top: 2px; font-size: 11.5px; line-height: 1.4; color: #b45309; }
html.theme-dark .protect-warning { color: #fbbf24; }
.x-btn.protect-confirm, .x-btn.protect-block { background: #dc2626 !important; border-color: #dc2626 !important; }
.x-btn.protect-confirm .x-btn-inner, .x-btn.protect-block .x-btn-inner { color: #fff !important; }
.x-window .x-toolbar .x-btn.protect-secondary { background: #f1f5f9 !important; box-shadow: inset 0 0 0 1px #cbd5e1; }
.x-window .x-toolbar .x-btn.protect-secondary .x-btn-inner { color: #334155 !important; }
html.theme-dark .x-window .x-toolbar .x-btn.protect-secondary { background: #1e293b !important; box-shadow: inset 0 0 0 1px #334155; }
html.theme-dark .x-window .x-toolbar .x-btn.protect-secondary .x-btn-inner { color: #e2e8f0 !important; }

/* Sem energia: avisar cliente pelo WhatsApp */
.vcard-powerloss {
    width: 100%; display: flex; align-items: center; gap: 10px; margin: -2px 0 8px; padding: 9px 12px;
    border: 1px solid rgba(220, 38, 38, 0.45); border-radius: 12px; background: rgba(220, 38, 38, 0.07);
    color: var(--ink); text-align: left; cursor: pointer;
}
.vcard-powerloss[hidden] { display: none; }
.vcard-powerloss > i {
    flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; background: #dc2626; color: #fff; font-size: 14px;
    animation: protect-pulse 1.2s ease-in-out infinite;
}
.vcard-powerloss-text { flex: 1; min-width: 0; }
.vcard-powerloss-text b { display: block; font-size: 12.5px; color: #dc2626; }
.vcard-powerloss-text small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard-powerloss-go {
    flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px;
    background: #16a34a; color: #fff; font-size: 11.5px; font-weight: 700;
}
.vcard-powerloss.is-done { border-color: var(--line); background: var(--surface); }
.vcard-powerloss.is-done > i { animation: none; background: #64748b; }
.vcard-powerloss.is-done b { color: var(--ink); }
.vcard-powerloss.is-done .vcard-powerloss-go { background: var(--canvas); color: #16a34a; }

.powerloss-window .x-window-body { background: var(--canvas); }
.pl-intro { font-size: 12px; color: var(--muted); margin: 0 2px 10px; line-height: 1.45; }
.pl-empty { padding: 28px 10px; text-align: center; color: var(--muted); font-size: 13px; }
.pl-empty i { display: block; font-size: 28px; color: #16a34a; margin-bottom: 8px; }
.pl-item { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid #dc2626; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.pl-item.is-done { border-left-color: #16a34a; }
.pl-head { display: flex; align-items: flex-start; gap: 10px; }
.pl-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgba(220, 38, 38, 0.1); color: #dc2626; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.pl-item.is-done .pl-icon { background: rgba(22, 163, 74, 0.1); color: #16a34a; }
.pl-title { flex: 1; min-width: 0; }
.pl-title > b { display: block; font-size: 13.5px; color: var(--ink); }
.pl-title em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; margin-left: 4px; border-radius: 4px; background: var(--canvas); color: var(--muted); letter-spacing: 0.5px; }
.pl-title small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pl-title small b { color: #dc2626; }
.pl-map { flex: none; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; }
.pl-map:hover { color: var(--global-color); border-color: var(--global-color); }
.pl-clients { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0 44px; }
.pl-wa { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border: 0; border-radius: 10px; background: #16a34a; color: #fff; cursor: pointer; text-align: left; }
.pl-wa:hover { background: #15803d; }
.pl-wa > i { font-size: 18px; }
.pl-wa span { font-size: 12px; font-weight: 700; line-height: 1.2; }
.pl-wa small { display: block; font-weight: 400; font-size: 10.5px; opacity: 0.9; }
.pl-wa.no-phone { background: var(--canvas); color: #16a34a; box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.45); }
.pl-wa.no-phone small { color: var(--muted); }
.pl-done { margin: 8px 0 0 44px; font-size: 11.5px; color: #16a34a; font-weight: 600; }
.pl-done i { margin-right: 5px; }
.powerloss-phone-hint { font-size: 11px; color: var(--muted); margin: -4px 0 8px; }
.powerloss-phone-hint:empty { display: none; }
.x-window .x-toolbar .x-btn.powerloss-send { background: #16a34a !important; }
.x-window .x-toolbar .x-btn.powerloss-send .x-btn-inner { color: #fff !important; }
.protect-alert { display: flex; gap: 16px; padding: 20px 20px 8px; }
.protect-alert-icon {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dc2626;
    color: #fff;
    font-size: 24px;
    animation: protect-pulse 1.2s ease-in-out infinite;
}
.protect-alert-title { font-size: 17px; font-weight: 800; color: var(--ink); }
.protect-alert-text { margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--ink); }
.protect-alert-block { margin-top: 8px; font-size: 13px; font-weight: 700; color: #dc2626; }
.protect-alert-time { margin-top: 6px; font-size: 12px; color: var(--muted); }
.protect-alert-window .x-window-header { background: #dc2626 !important; }
.security-alert-window .x-window-header .x-title-text i { margin-right: 6px; }
.security-alert-kind {
    display: inline-block; margin-bottom: 4px; padding: 2px 9px; border-radius: 999px;
    background: rgba(220, 38, 38, 0.1); color: #b91c1c; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.security-alert-plate { font-weight: 600; color: var(--muted); font-size: 14px; }
html.theme-dark .security-alert-kind { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.dev-tow .x-form-cb-label i { color: #ea580c; margin-right: 4px; }
.vcard-chip.is-stale { background: rgba(217, 119, 6, 0.12); color: #b45309; }
.vcard-speed.is-stale .vcard-speed-num, .vcard-speed.is-stale .vcard-speed-unit { opacity: 0.45; }
html.theme-dark .vcard-chip.is-stale { color: #fbbf24; }

.device-status { font-weight: 600; }
.device-status.is-online { color: #16a34a; }
.device-status.is-offline { color: #dc2626; }
.device-status.is-unknown { color: #d97706; }
html.theme-dark .device-status.is-unknown { color: #fbbf24; }

.vcard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.vcard-tile {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--canvas);
    min-width: 0;
}
.vcard-tile > i { color: var(--global-color); width: 16px; text-align: center; }
.vcard-tile > div { min-width: 0; }
.vcard-tile-label { font-size: 11px; color: var(--muted); }
.vcard-tile-value { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard-tile.is-detail, .vcard-wide-sensors .is-detail { cursor: pointer; }
.vcard-detail {
    grid-column: 1 / -1;
    margin-top: 2px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}
.vcard-detail b { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 600; color: var(--muted); }
.vcard-detail span { display: block; white-space: normal; word-break: break-word; color: inherit; font-weight: 700; }
.vcard-wide-sensors > .vcard-detail {
    display: block;
    grid-column: 1 / -1;
    margin-top: 8px;
    overflow: visible;
    white-space: normal;
    text-align: left;
}
.vcard-tile-value.is-on { color: #16a34a; }
.vcard-tile-value.is-good { color: #0284c7; }
.vcard-tile-value.is-off { color: var(--muted); }
.vcard-tile-value.is-weak { color: #d97706; }
.vcard-tile-value.is-bad { color: #dc2626; }

.vcard-day { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.vcard-day-title { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.vcard-day-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.vcard-day-stats div { background: var(--canvas); border-radius: 8px; padding: 6px 4px; text-align: center; min-width: 0; }
.vcard-day-stats b { display: block; font-size: 13px; color: var(--ink); white-space: nowrap; }
.vcard-day-stats span { font-size: 10px; color: var(--muted); }
.vcard-day-stats .is-fast b { color: #d97706; }
.vcard-day-empty { font-size: 12px; color: var(--muted); padding: 2px 0 4px; }
.vcard-day-item { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: 12.5px; }
.vcard-day-item i { width: 14px; text-align: center; color: var(--muted); }
.vcard-day-item b { flex: none; width: 38px; font-size: 12px; color: var(--muted); }
.vcard-day-item span { min-width: 0; font-weight: 600; color: var(--ink); }
.vcard-day-item.is-on i { color: #16a34a; }
.vcard-day-item.is-go i { color: #0d9488; }
.vcard-day-item.is-stop i { color: #2563eb; }
.vcard-day-item.is-fast i, .vcard-day-item.is-fast span { color: #d97706; }
.ol-popup:has(.vcard) #popup-content { max-height: min(58vh, 520px); overflow-y: auto; }
.vcard-line { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; padding: 4px 2px; line-height: 1.4; }
.vcard-line > i { color: var(--muted); width: 16px; text-align: center; margin-top: 2px; }
.vcard-muted { color: var(--muted); }
.vcard-photo { display: block; max-width: 100%; max-height: 220px; margin: 0 auto; border-radius: 10px; }

#commands-buttons { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.vcard-cmds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; align-items: stretch; min-width: 0; max-width: 100%; }
.vcard-cmd {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    min-height: 52px;
    padding: 8px 2px 6px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
    cursor: pointer;
    transition: filter 0.15s, transform 0.15s;
}
.vcard-cmds .vcard-protect {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 8px 2px 6px;
    border-radius: 10px;
    gap: 3px;
    text-align: center;
    overflow: hidden;
}
.vcard-cmds .vcard-protect > i { width: 22px; height: 22px; font-size: 11px; }
.vcard-cmds .vcard-protect-text { flex: none; min-width: 0; max-width: 100%; }
.vcard-cmds .vcard-protect-text b { display: block; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard-cmds .vcard-protect-text small { display: none; }
.vcard-cmds .vcard-protect-switch { width: 26px; height: 14px; }
.vcard-cmds .vcard-protect-switch::after { top: 2px; left: 2px; width: 10px; height: 10px; }
.vcard-cmds .vcard-protect.is-active .vcard-protect-switch::after { transform: translateX(12px); }
.vcard-cmd:hover { filter: brightness(1.08); transform: translateY(-1px); }
.vcard-cmd.is-block { background: var(--global-color); }
.vcard-cmd.is-unblock { background: #374151; }
.vcard-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.vcard-actions button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 2px 6px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.15s;
}
.vcard-actions button i {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: var(--canvas);
    color: var(--global-color);
}
.vcard-actions button span { font-size: 10px; font-weight: 600; line-height: 1.15; text-align: center; color: var(--muted); }
.vcard-actions button:hover { background: var(--canvas); }
.vcard-actions button:hover i { background: var(--global-color); color: #fff; }
.vcard-actions #irWaze i { color: #1ca9e0; }
.vcard-actions #irWaze:hover i { background: #1ca9e0; color: #fff; }
.vcard-actions button.is-highlight i { background: var(--global-color); color: #fff; }
.vcard-actions button.is-highlight span { color: var(--global-color); }
.vcard-actions button.is-active i { background: #16a34a; color: #fff; }
.vcard-actions button.is-active span { color: #16a34a; }
.vcard-actions #paymentsOpen i { color: #15803d; }
.vcard-actions #paymentsOpen:hover i { background: #15803d; color: #fff; }
.pay-customer { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.pay-empty { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.pay-invoice {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 0; border-top: 1px solid var(--line, #e5e7eb);
}
.pay-invoice small { display: block; color: var(--muted); font-weight: 600; }
.pay-invoice.is-late small { color: #b91c1c; }
.pay-invoice.is-paid small, .pay-paid { color: #15803d; }
.pay-paid { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700; }
.pay-invoice-side { text-align: right; }
.pay-invoice-side strong { display: block; }
.pay-go, .pay-method {
    border: 0; border-radius: 999px; padding: 6px 12px; margin-top: 6px;
    background: #15803d; color: #fff; font: 700 12px Inter, sans-serif; cursor: pointer;
}
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pay-method { background: #fff; color: #111827; border: 1px solid var(--line, #e5e7eb); margin-top: 0; }
.pay-method.is-active { background: #15803d; border-color: #15803d; color: #fff; }
.ops-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line, #e5e7eb); }
.ops-row b { font-size: 12px; }
.ops-row span, .ops-row small { display: block; color: var(--muted); font-size: 12px; }
.ops-row.is-done { opacity: 0.55; }
.ops-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.ops-actions button { border: 0; border-radius: 999px; padding: 6px 10px; background: #15803d; color: #fff; font: 700 12px Inter, sans-serif; cursor: pointer; }
.ops-actions em { font-size: 12px; color: var(--muted); font-style: normal; }

.dash-window .x-window-body { background: #f3f5f8 !important; padding: 0 !important; }
.dash-shell { display: flex; height: 100%; min-height: 560px; font-family: var(--font); }
.dash-side { width: 230px; flex: none; background: #1e293b; color: #e2e8f0; overflow: auto; padding: 16px 10px; }
.dash-brand { font-size: 18px; font-weight: 800; padding: 6px 12px 14px; }
.dash-nav { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: #cbd5e1; text-align: left; border-radius: 10px; padding: 9px 12px; font: 600 13px var(--font); cursor: pointer; }
.dash-nav i { width: 16px; text-align: center; }
.dash-nav:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.dash-nav.is-active { background: #2563eb; color: #fff; }
.dash-main { flex: 1; min-width: 0; overflow: auto; padding: 18px; }
.dash-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.dash-table tr.is-shared td { background: #fef2f2; color: #991b1b; font-weight: 700; }
.dash-kpi { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06); }
.dash-kpi-icon { width: 46px; height: 46px; border-radius: 10px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.dash-kpi small, .dash-kpi em { display: block; color: #64748b; font-style: normal; font-size: 12px; }
.dash-kpi strong { display: block; font-size: 26px; line-height: 1.1; color: #0f172a; }
.dash-charts { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 12px; margin-top: 12px; }
.dash-card { background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06); }
.dash-card h3 { margin: 0 0 12px; text-align: center; font-size: 15px; color: #334155; }
.dash-bars { display: flex; align-items: flex-end; justify-content: space-around; height: 210px; gap: 12px; }
.dash-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; color: #64748b; font-size: 12px; font-weight: 700; }
.dash-bar i { display: block; width: 54px; border-radius: 6px 6px 0 0; }
.dash-pie-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.dash-pie { width: 180px; height: 180px; border-radius: 50%; }
.dash-legend { display: flex; gap: 16px; font-size: 13px; color: #334155; }
.dash-legend i { display: inline-block; width: 22px; height: 12px; border-radius: 2px; margin-right: 6px; }
.dash-table-card { margin-top: 12px; overflow: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table th { text-align: left; color: #64748b; font-weight: 700; padding: 8px; border-bottom: 1px solid #e5e7eb; }
.dash-table td { padding: 10px 8px; border-bottom: 1px solid #f1f5f9; color: #0f172a; }
.dash-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #e2e8f0; color: #334155; font-size: 12px; }
.dash-pill.is-online { background: #dcfce7; color: #166534; }
.dash-pill.is-offline { background: #ffe4e6; color: #be123c; }
.dash-pill.is-unknown { background: #fef3c7; color: #92400e; }
.frota-atalho { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 12px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06); padding: 14px 16px; text-align: left; cursor: pointer; font: 600 14px var(--font); color: #0f172a; }
.frota-atalho i { width: 42px; height: 42px; border-radius: 10px; background: #c40000; color: #fff; display: flex; align-items: center; justify-content: center; }
.frota-atalho small { display: block; color: #64748b; font-weight: 600; font-size: 12px; }
.frota-topo, .frota-stats { display: flex; gap: 16px; align-items: center; }
.frota-anel { width: 124px; height: 124px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.frota-miolo { width: 82px; height: 82px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.frota-miolo b { font-size: 22px; }
.frota-miolo span { font-size: 12px; color: #64748b; }
.frota-legenda { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.frota-legenda div { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.frota-legenda i { width: 9px; height: 9px; border-radius: 50%; }
.frota-legenda b { margin-left: auto; }
.frota-stats { margin-top: 14px; }
.frota-caixa { flex: 1; border: 1px solid #e8e8e8; border-radius: 12px; padding: 12px 8px; text-align: center; }
.frota-caixa b { display: block; font-size: 22px; }
.frota-caixa span { color: #64748b; font-size: 12px; }
.frota-kicker { margin: 16px 0 8px; font-size: 11px; letter-spacing: 0.4px; font-weight: 800; color: #64748b; }
.frota-linha { width: 100%; height: 52px; display: block; }
.frota-horas { display: flex; justify-content: space-between; color: #94a3b8; font-size: 11px; }
.frota-rapido, .frota-parado { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; padding: 6px 0; cursor: pointer; font: 800 14px var(--font); color: #0f172a; text-align: left; }
.frota-rapido em { margin-left: auto; color: #16a34a; font-style: normal; }
.frota-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.frota-selo { display: flex; align-items: center; gap: 10px; border: 1px solid #e8e8e8; border-radius: 12px; padding: 12px; background: #fff; }
.frota-selo i { width: 4px; height: 28px; border-radius: 4px; }
.frota-selo b { display: block; font-size: 20px; line-height: 1; }
.frota-selo span { color: #64748b; font-size: 12px; }
.frota-parado { border: 1px solid #e8e8e8; border-radius: 12px; padding: 12px; margin-top: 8px; background: #fff; }
.frota-parado span { margin-left: auto; color: #64748b; font-size: 12px; font-weight: 700; }
@media (max-width: 900px) {
    .dash-shell { flex-direction: column; }
    .dash-side { width: 100%; display: flex; gap: 6px; overflow-x: auto; }
    .dash-brand { display: none; }
    .dash-nav { width: auto; white-space: nowrap; }
    .dash-kpis, .dash-charts { grid-template-columns: 1fr 1fr; }
}
.vcard-actions button.is-active span { color: #16a34a; }

/* VisÃ£o 3D (estilo GPS) */
.n3d-window .x-window-body { background: #0b1220; }
.n3d-stage { position: relative; }
.n3d-stage .n3d-map { position: absolute; inset: 0; }
.n3d-puck { position: relative; width: 150px; height: 150px; pointer-events: none; }
.n3d-puck img { position: relative; z-index: 1; width: 100%; height: 100%; display: block; }
.n3d-puck.is-arrow { width: 96px; height: 96px; }
.n3d-puck.is-arrow::before {
    content: "";
    position: absolute;
    inset: -30%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--n3d-color) 0%, transparent 70%);
    opacity: 0.35;
    animation: n3d-pulse 2s ease-out infinite;
}
.n3d-puck.is-vehicle img { filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35)); }
@keyframes n3d-pulse {
    0% { transform: scale(0.55); opacity: 0.45; }
    100% { transform: scale(1.15); opacity: 0; }
}
.n3d-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--canvas);
    color: var(--muted);
    font-size: 14px;
    z-index: 3;
}
.n3d-hud {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px 10px 10px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.86);
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
}
.n3d-speed {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.n3d-speed b { font-size: 24px; font-weight: 800; }
.n3d-speed span { margin-top: 2px; font-size: 10px; font-weight: 600; opacity: 0.75; }
.n3d-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.n3d-status.is-moving { background: #16a34a; }
.n3d-status.is-stopped { background: #2563eb; }
.n3d-status.is-offline { background: #dc2626; }
.n3d-status.is-unknown { background: #d97706; }
.n3d-meta {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.85;
}
.n3d-meta i { margin-right: 3px; }
.n3d-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.n3d-limit {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 5px solid #dc2626;
    background: #fff;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin-left: -6px;
}
.n3d-limit b { font-size: 17px; font-weight: 800; }
.n3d-stage.is-overspeed .n3d-speed { border-color: #ef4444; background: #dc2626; animation: n3d-alert 1s ease-in-out infinite; }
@keyframes n3d-alert {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}
.n3d-street {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 2;
    max-width: 64%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px 10px 12px;
    border-radius: 14px;
    background: #15803d;
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}
.n3d-street > i {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    font-size: 15px;
    transform: rotate(-45deg);
}
.n3d-street > div { min-width: 0; }
.n3d-street b, .n3d-street span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n3d-street b { font-size: 16px; font-weight: 800; }
.n3d-street span { font-size: 12px; opacity: 0.85; }
.n3d-street span:empty { display: none; }
.n3d-recenter {
    position: absolute;
    left: 16px;
    bottom: 22px;
    z-index: 2;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font: 700 13px "Segoe UI", sans-serif;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}
.n3d-recenter i { color: var(--global-color); }
.n3d-recenter.is-visible { display: flex; }
html.theme-dark .n3d-recenter { background: #1e293b; color: #e2e8f0; }
.n3d-controls {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.n3d-controls button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    font: 700 12px "Segoe UI", sans-serif;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    cursor: pointer;
}
.n3d-controls button i { color: var(--global-color); font-size: 14px; }
.n3d-controls button.is-active { background: var(--global-color); color: #fff; }
.n3d-controls button.is-active i { color: #fff; }
html.theme-dark .n3d-controls button:not(.is-active) { background: #1e293b; color: #e2e8f0; }
html.theme-dark .n3d-controls button:not(.is-active) i { color: #f87171; }
.n3d-replay {
    display: none;
    position: absolute;
    left: 14px;
    right: 64px;
    bottom: 14px;
    z-index: 4;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.n3d-stage.is-replay .n3d-replay { display: flex; }
.n3d-stage.is-replay .n3d-street { bottom: 108px; }
.n3d-stage.is-replay .n3d-recenter { bottom: 112px; }
.n3d-replay button {
    flex: none;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    font: 700 12px "Segoe UI", sans-serif;
}
.n3d-replay-play {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--global-color);
    font-size: 14px;
}
.n3d-replay-live { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.n3d-replay-live i { color: #ef4444; font-size: 8px; }
.n3d-replay-track { flex: 1; min-width: 0; }
.n3d-replay-time { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 2px; }
.n3d-replay-time b { font-size: 13px; font-weight: 800; }
.n3d-replay-time span { opacity: 0.8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n3d-replay input[type="range"] { width: 100%; margin: 0; accent-color: #fff; cursor: pointer; }
.n3d-replay-ends { display: flex; justify-content: space-between; font-size: 11px; opacity: 0.7; }
.n3d-replay-days, .n3d-replay-rates { display: flex; gap: 4px; }
.n3d-replay-days button, .n3d-replay-rates button { padding: 6px 8px; }
.n3d-replay-days button.is-active, .n3d-replay-rates button.is-active { background: #fff; color: #111827; }

.event-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 14px;
}
.event-type-icon i {
    line-height: 1;
}
.x-grid-cell-inner .event-type-icon {
    margin: -4px 8px -4px 0;
    vertical-align: middle;
}

.contract-hint {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
}
.contract-list {
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 8px;
    background: var(--canvas);
    transition: border-color 0.15s, background 0.15s;
}
.contract-list.is-dragover {
    border-color: var(--global-color);
    background: var(--global-color-soft);
}
.contract-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.contract-card:last-child { margin-bottom: 0; }
.contract-card:hover {
    border-color: var(--global-color);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}
.contract-card-icon {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    background: #64748b;
}
.contract-card.is-pdf .contract-card-icon { background: #dc2626; }
.contract-card.is-image .contract-card-icon { background: #2563eb; }
.contract-card-info { flex: 1; min-width: 0; }
.contract-card-name {
    color: var(--ink);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.contract-card-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.contract-new { color: #15803d; font-weight: 600; }
.contract-card-actions { display: flex; gap: 6px; }
.contract-card-actions button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
}
.contract-card-actions .contract-open:hover { color: var(--global-color); border-color: var(--global-color); }
.contract-card-actions .contract-remove:hover { color: #fff; background: #dc2626; border-color: #dc2626; }
.contract-empty {
    height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--muted);
    text-align: center;
}
.contract-empty i { font-size: 36px; opacity: 0.5; margin-bottom: 4px; }
.invoice-status-paid { color: #15803d !important; font-weight: 600; }
.invoice-status-unpaid { color: #b45309 !important; font-weight: 600; }
.invoice-status-overdue { color: #b91c1c !important; font-weight: 600; }

#commands-buttons .btn {
    border-radius: 10px !important;
    min-width: 42px;
    box-shadow: none !important;
}

.x-toolbar-footer,
.x-window .x-docked-bottom.x-toolbar-default {
    background: #f8fafc !important;
    box-shadow: none !important;
    border-top: 1px solid var(--line) !important;
    min-height: 56px !important;
}
.x-toolbar-footer .x-btn,
.x-window .x-docked-bottom .x-btn,
.x-toolbar-footer .x-btn:hover,
.x-toolbar-footer .x-btn.x-btn-over,
.x-toolbar-footer .x-btn.x-btn-focus,
.x-toolbar-footer .x-btn.x-btn-focus.x-btn-over,
.x-window .x-docked-bottom .x-btn:hover,
.x-window .x-docked-bottom .x-btn.x-btn-over,
.x-window .x-docked-bottom .x-btn.x-btn-focus,
.x-window .x-docked-bottom .x-btn.x-btn-focus.x-btn-over {
    background: var(--global-color) !important;
    border: 0 !important;
    border-radius: 10px !important;
    opacity: 1 !important;
}
.x-toolbar-footer .x-btn:hover,
.x-toolbar-footer .x-btn.x-btn-over,
.x-window .x-docked-bottom .x-btn:hover,
.x-window .x-docked-bottom .x-btn.x-btn-over {
    background: var(--global-color-dark) !important;
}
.x-toolbar-footer .x-btn .x-btn-inner,
.x-toolbar-footer .x-btn .x-btn-icon-el,
.x-toolbar-footer .x-btn .x-btn-glyph,
.x-window .x-docked-bottom .x-btn .x-btn-inner,
.x-window .x-docked-bottom .x-btn .x-btn-icon-el,
.x-window .x-docked-bottom .x-btn .x-btn-glyph {
    color: #fff !important;
    opacity: 1 !important;
}

.x-btn-glyph {
    font-size: 15px !important;
}
.x-mask {
    background: rgba(17, 24, 39, 0.35) !important;
}

html.theme-dark {
    --ink: #e5e7eb;
    --muted: #9ca3af;
    --line: #2d3340;
    --surface: #1b1f27;
    --canvas: #101218;
    --global-color-soft: rgba(188, 49, 50, 0.28);
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
html.theme-dark body,
html.theme-dark body.x-border-layout-ct,
html.theme-dark div.x-border-layout-ct,
html.theme-dark .x-panel-body-default,
html.theme-dark .x-grid-view,
html.theme-dark .x-grid-body,
html.theme-dark .x-panel-body-default-framed,
html.theme-dark .x-window-body-default,
html.theme-dark .x-fieldset {
    background-color: var(--surface) !important;
    color: var(--ink) !important;
    border-color: var(--line) !important;
}
html.theme-dark .x-column-header,
html.theme-dark .x-column-header-inner {
    background: #151922 !important;
    color: #d1d5db !important;
    border-color: var(--line) !important;
}
html.theme-dark .x-grid-item {
    background: var(--surface) !important;
    border-color: #252a34 !important;
    color: var(--ink) !important;
}
html.theme-dark .x-grid-cell-inner {
    color: var(--ink) !important;
}
html.theme-dark .x-grid-item-over .x-grid-cell {
    background-color: #252a34 !important;
}
html.theme-dark .x-form-text,
html.theme-dark .x-form-text-default,
html.theme-dark .x-form-textarea,
html.theme-dark .device-search-bar .x-form-text {
    background: #151922 !important;
    color: var(--ink) !important;
    border-color: var(--line) !important;
}
html.theme-dark .device-search-bar {
    background: #151922 !important;
    border-top-color: var(--line) !important;
}
html.theme-dark .x-menu,
html.theme-dark .x-boundlist {
    background: #1b1f27 !important;
    color: var(--ink) !important;
    border-color: var(--line) !important;
}
html.theme-dark .x-menu-item-text {
    color: var(--ink) !important;
}
html.theme-dark .x-tab-bar-default,
html.theme-dark .contract-tabs .x-tab-bar {
    background: #151922 !important;
}
html.theme-dark .x-tab-default .x-tab-inner {
    color: #9ca3af !important;
}
html.theme-dark .x-tab.x-tab-active.x-tab-default {
    background: var(--surface) !important;
}
html.theme-dark .x-toolbar-footer,
html.theme-dark .x-window .x-docked-bottom.x-toolbar-default {
    background: #151922 !important;
    border-top-color: var(--line) !important;
}
html.theme-dark .layer-menu button,
html.theme-dark .menu-btns button,
html.theme-dark .layer-switcher button {
    background-color: #1b1f27 !important;
    color: #f3f4f6 !important;
}
html.theme-dark .layer-switcher .panel,
html.theme-dark .layer-menu .panel {
    background: #1b1f27 !important;
    color: var(--ink) !important;
}
html.theme-dark .ol-popup {
    background: #1b1f27 !important;
}
html.theme-dark .nome {
    color: #f3f4f6;
}
html.theme-dark #spinner-new {
    background: var(--canvas);
}

#theme-float-btn {
    margin-top: 0 !important;
}
.x-message-box .x-window-body {
    font-family: var(--font) !important;
}

.address-search {
    display: none;
    width: 340px;
    max-width: calc(100% - 80px);
    background: transparent !important;
    padding: 0 !important;
    z-index: 6;
}
.address-search.is-open {
    display: block;
}
.address-search-form > i {
    color: var(--muted);
    margin-left: 6px;
}
.address-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 6px;
    box-sizing: border-box;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.address-search-form input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font: 500 13px var(--font);
}
.address-search-form input::-webkit-search-cancel-button {
    display: none;
}
.ol-control .address-search-clear {
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: var(--muted) !important;
}
.address-search-results:empty {
    display: none;
}
.address-search-results {
    margin-top: 6px;
    padding: 6px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    color: var(--ink);
    font: 13px var(--font);
}
.address-search-item,
.address-search-place {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    line-height: 1.35;
}
.address-search-item {
    cursor: pointer;
}
.address-search-item:hover {
    background: var(--global-color-soft);
}
.address-search-item i,
.address-search-place i {
    margin-top: 2px;
    color: var(--global-color);
}
.address-search-place {
    font-weight: 600;
}
.address-search-device span {
    flex: 1;
}
.address-search-device b {
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}
.address-search-title {
    padding: 6px 8px 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.address-search-status {
    padding: 8px;
    color: var(--muted);
}

.field-hint {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    margin-top: 2px;
}

.fleet-summary {
    display: flex;
    gap: 6px;
    padding: 8px;
    box-sizing: border-box;
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
}
.fleet-card {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 4px 2px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.fleet-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.10);
}
.fleet-card i {
    font-size: 13px;
    line-height: 15px;
    color: var(--fleet-accent, var(--muted));
}
.fleet-card .fleet-count {
    font-size: 17px;
    font-weight: 700;
    line-height: 20px;
    color: var(--ink);
}
.fleet-card .fleet-label {
    font-size: 10px;
    line-height: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.fleet-card.is-active {
    border-color: var(--fleet-accent, var(--global-color));
    box-shadow: inset 0 0 0 1px var(--fleet-accent, var(--global-color));
}
.fleet-total { --fleet-accent: var(--global-color); }
.fleet-online { --fleet-accent: #16a34a; }
.fleet-moving { --fleet-accent: #0d9488; }
.fleet-stopped { --fleet-accent: #2563eb; }
.fleet-offline { --fleet-accent: #6b7280; }
.fleet-alarm { --fleet-accent: #d97706; }
.fleet-blocked { --fleet-accent: #dc2626; }

.audit-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
}
.sweet-overlay { z-index: 99990 !important; }
.sweet-alert { z-index: 99999 !important; }
.sweet-alert .form-group .sa-input-error.show {
    display: block;
    margin-top: 6px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}
.sweet-alert .sa-input-error .glyphicon { display: none; }
.sweet-alert .form-group.has-error input { border-color: #dc2626; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15); }

/* Painel com grÃ¡ficos (relatÃ³rios) */
.ri-panel {
    background: var(--canvas);
}
.ri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    align-items: start;
    gap: 12px;
    padding: 12px;
    color: var(--ink);
}
@media (max-width: 520px) {
    .ri-grid {
        grid-template-columns: 1fr;
    }
}
.ri-kpis {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.ri-kpi {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}
.ri-kpi i {
    color: var(--global-color);
    font-size: 14px;
}
.ri-kpi span {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
}
.ri-kpi b {
    font-size: 18px;
    font-weight: 800;
}
.ri-card {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}
.ri-card-tit {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 800;
}
.ri-chart {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
}
.ri-gridline {
    stroke: var(--line);
    stroke-width: 1;
}
.ri-axis {
    fill: var(--muted);
    font-size: 11px;
    font-weight: 600;
}
.ri-chart rect[data-tip]:hover,
.ri-donut path:hover,
.ri-donut circle:hover {
    opacity: 0.8;
}
.ri-legend {
    display: flex;
    gap: 14px;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
}
.ri-legend i,
.ri-donut li i {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    border-radius: 3px;
    vertical-align: -1px;
}
.ri-rank {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}
.ri-rank-row {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.ri-rank-name {
    overflow: hidden;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ri-rank-bar {
    height: 10px;
    border-radius: 5px;
    background: var(--canvas);
    overflow: hidden;
}
.ri-rank-bar i {
    display: block;
    height: 100%;
    border-radius: 5px;
}
.ri-rank-value {
    font-weight: 700;
    color: var(--muted);
}
.ri-donut {
    display: flex;
    align-items: center;
    gap: 14px;
}
.ri-donut svg {
    flex: 0 0 150px;
    width: 150px;
    height: 150px;
}
.ri-donut-total {
    fill: var(--ink);
    font-size: 26px;
    font-weight: 800;
}
.ri-donut ul {
    flex: 1;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
}
.ri-donut li {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 0;
}
.ri-donut li span {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ri-card-empty {
    padding: 40px 10px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}
.ri-empty {
    padding: 40px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}
.ri-empty i {
    display: block;
    margin-bottom: 10px;
    font-size: 26px;
    opacity: 0.6;
}
.ri-tip {
    position: fixed;
    z-index: 100000;
    display: none;
    padding: 6px 9px;
    border-radius: 8px;
    background: rgba(17, 24, 39, 0.94);
    color: #fff;
    font-size: 12px;
    line-height: 1.45;
    pointer-events: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.ri-tip i {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-radius: 2px;
}

/* HistÃ³rico de rota (replay) */
.pb-controls-wrap {
    background: var(--surface);
    border-top: 1px solid var(--line);
}
.pb-controls {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 100%;
    padding: 0 18px;
    box-sizing: border-box;
}
.pb-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
}
.pb-btn:hover {
    background: var(--canvas);
}
.pb-btn.pb-play {
    width: 50px;
    height: 50px;
    border: 0;
    background: var(--global-color);
    color: #fff;
    font-size: 18px;
    box-shadow: 0 6px 16px rgba(188, 49, 50, 0.35);
}
.pb-btn.pb-play:hover {
    background: var(--global-color-dark);
}
.pb-btn.pb-play .fa-play {
    margin-left: 3px;
}
.pb-track {
    flex: 1;
    min-width: 0;
}
.pb-now {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
}
.pb-now-time {
    font-size: 14px;
    font-weight: 800;
    color: var(--ink);
}
.pb-now-info {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
}
.pb-timeline {
    position: relative;
    height: 30px;
    border-radius: 8px;
    background: var(--canvas);
    overflow: hidden;
}
.pb-timeline canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.pb-progress {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    background: rgba(188, 49, 50, 0.12);
    border-right: 2px solid var(--global-color);
    pointer-events: none;
}
.pb-timeline input[type=range] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.pb-timeline input[type=range]::-webkit-slider-runnable-track {
    height: 100%;
    background: transparent;
}
.pb-timeline input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 30px;
    border-radius: 7px;
    background: transparent;
}
.pb-timeline input[type=range]::-moz-range-track {
    background: transparent;
}
.pb-timeline input[type=range]::-moz-range-thumb {
    width: 14px;
    height: 30px;
    border: 0;
    background: transparent;
}
.pb-ends {
    display: flex;
    justify-content: space-between;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
}
.pb-side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}
.pb-rates {
    display: flex;
    padding: 3px;
    border-radius: 9px;
    background: var(--canvas);
}
.pb-rates button {
    padding: 4px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.pb-rates button.active {
    background: var(--surface);
    color: var(--global-color);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}
.pb-follow {
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.pb-follow.active {
    border-color: var(--global-color);
    background: var(--global-color-soft);
    color: var(--global-color);
}
.pb-controls.is-empty .pb-buttons,
.pb-controls.is-empty .pb-side {
    opacity: 0.45;
    pointer-events: none;
}
.pb-summary {
    padding: 14px;
    color: var(--ink);
}
.pb-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.pb-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--canvas);
}
.pb-stat i {
    color: var(--global-color);
    font-size: 13px;
}
.pb-stat span {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
}
.pb-stat b {
    font-size: 14px;
    font-weight: 800;
}
.pb-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 12px 0 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
}
.pb-legend i {
    display: inline-block;
    width: 14px;
    height: 4px;
    margin-right: 5px;
    border-radius: 2px;
    vertical-align: middle;
}
.pb-stops-tit {
    margin: 14px 0 8px;
    font-size: 13px;
    font-weight: 800;
}
.pb-stops-tit span {
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    font-size: 11px;
}
.pb-stops {
    margin: 0;
    padding: 0;
    list-style: none;
}
.pb-stops li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}
.pb-stops li:hover {
    background: var(--canvas);
}
.pb-stops b {
    display: block;
    font-size: 12px;
}
.pb-stops small {
    font-size: 11px;
    color: var(--muted);
}
.pb-stop-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    height: 22px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}
.pb-empty {
    padding: 40px 10px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}
.pb-empty i {
    display: block;
    margin-bottom: 10px;
    font-size: 28px;
    opacity: 0.5;
}
.pb-empty-small {
    font-size: 12px;
    color: var(--muted);
}
.pb-toolbar .pb-search {
    background: var(--global-color) !important;
    border-color: var(--global-color) !important;
}
.pb-toolbar .pb-search .x-btn-inner {
    color: #fff !important;
}
.pb-map {
    position: relative;
}
.pb-hybrid {
    position: absolute;
    z-index: 3;
    top: 96px;
    left: 10px;
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: var(--global-color);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
    font: 600 12px/36px "Segoe UI", sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.pb-hybrid i {
    font-size: 13px;
}
.pb-hybrid:hover {
    background: #fef2f2;
}
.pb-hybrid.is-active,
.pb-hybrid.is-active:hover {
    background: var(--global-color);
    color: #fff;
}
html.theme-dark .pb-hybrid {
    background: #1b1f27;
    color: #fff;
}
html.theme-dark .pb-hybrid.is-active,
html.theme-dark .pb-hybrid.is-active:hover {
    background: var(--global-color);
    color: #fff;
}

/* Janela de eventos */
.events-toolbar {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--line) !important;
    padding: 6px 10px !important;
}
.events-toolbar .x-btn {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}
.events-toolbar .x-btn .x-btn-inner,
.events-toolbar .x-btn .x-btn-glyph {
    color: var(--ink) !important;
    font-weight: 600 !important;
}
.events-toolbar .x-btn .x-btn-glyph {
    color: var(--global-color) !important;
}
.events-toolbar .x-btn.x-btn-pressed {
    background: var(--global-color-soft) !important;
    border-color: var(--global-color) !important;
}
.events-toolbar .x-btn.x-btn-disabled {
    opacity: 0.45;
}
.events-in-window .x-grid-cell-inner {
    padding-top: 9px;
    padding-bottom: 9px;
}
.ev-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 70px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
}
.ev-empty i {
    font-size: 30px;
    opacity: 0.45;
    margin-bottom: 4px;
}
.ev-empty b {
    color: var(--ink);
    font-size: 14px;
}

/* ManutenÃ§Ã£o preventiva */
.menu-btns button.maint-btn {
    position: relative;
    overflow: visible !important;
}
.menu-btns button.ops-btn,
.menu-btns button.powerloss-btn {
    display: none !important;
}
.menu-btns button.ops-btn.is-on,
.menu-btns button.powerloss-btn.is-on {
    display: flex !important;
}
.maint-badge {
    display: none;
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 9px;
    font: 800 10px/13px "Segoe UI", sans-serif;
    color: #fff;
    box-sizing: border-box;
}
.maint-badge.is-overdue,
.maint-badge.is-soon {
    display: block;
}
html.theme-dark .maint-badge {
    border-color: #1b1f27;
}
.maint-badge.is-overdue {
    background: #dc2626;
}
.maint-badge.is-soon {
    background: #f59e0b;
}
.mt-toolbar .mt-add,
.mt-primary-btn {
    background: var(--global-color) !important;
    border-color: var(--global-color) !important;
}
.mt-toolbar .mt-add .x-btn-inner,
.mt-toolbar .mt-add .x-btn-glyph,
.mt-primary-btn .x-btn-inner {
    color: #fff !important;
}
.mt-body {
    background: var(--canvas);
    color: var(--ink);
}
.mt-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px 4px;
}
.mt-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: 600 12px "Segoe UI", sans-serif;
    cursor: pointer;
}
.mt-chip b {
    min-width: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--canvas);
    font-size: 11px;
    text-align: center;
}
.mt-chip-overdue i { color: #dc2626; }
.mt-chip-soon i { color: #f59e0b; }
.mt-chip-ok i { color: #16a34a; }
.mt-chip-unknown i,
.mt-chip-all i { color: var(--muted); }
.mt-chip.is-active {
    border-color: var(--global-color);
    box-shadow: 0 0 0 2px var(--global-color-soft);
}
.mt-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 14px 0;
    padding: 10px 12px;
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.1);
    font-size: 12.5px;
}
.mt-banner i {
    color: #d97706;
}
.mt-banner span {
    flex: 1;
}
.mt-banner button,
.mt-device-meta button,
.mt-actions button,
.mt-empty .mt-primary {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font: 600 12px "Segoe UI", sans-serif;
    white-space: nowrap;
    cursor: pointer;
}
.mt-banner button,
.mt-empty .mt-primary {
    border-color: var(--global-color);
    background: var(--global-color);
    color: #fff;
}
.mt-empty .mt-primary {
    margin-top: 12px;
    padding: 8px 16px;
}
.mt-device {
    margin: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
}
.mt-device header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}
.mt-device-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
}
.mt-device-name i {
    color: var(--global-color);
}
.mt-device-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}
.mt-device-meta span i {
    margin-right: 5px;
}
.mt-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-left: 4px solid transparent;
}
.mt-row + .mt-row {
    border-top: 1px solid var(--line);
}
.mt-icon {
    flex: 0 0 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: var(--canvas);
    color: var(--muted);
}
.mt-main {
    flex: 1;
    min-width: 0;
}
.mt-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
}
.mt-every {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
}
.mt-tag {
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--canvas);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--muted);
}
.mt-bar {
    height: 6px;
    margin: 7px 0 6px;
    border-radius: 3px;
    background: var(--canvas);
    overflow: hidden;
}
.mt-bar i {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: #16a34a;
}
.mt-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 12px;
    color: var(--muted);
}
.mt-sub b {
    color: var(--ink);
}
.mt-overdue { border-left-color: #dc2626; }
.mt-overdue .mt-icon { background: rgba(220, 38, 38, 0.12); color: #dc2626; }
.mt-overdue .mt-bar i { background: #dc2626; }
.mt-overdue .mt-sub b { color: #dc2626; }
.mt-soon { border-left-color: #f59e0b; }
.mt-soon .mt-icon { background: rgba(245, 158, 11, 0.14); color: #d97706; }
.mt-soon .mt-bar i { background: #f59e0b; }
.mt-soon .mt-sub b { color: #d97706; }
.mt-ok .mt-icon { background: rgba(22, 163, 74, 0.12); color: #16a34a; }
.mt-actions {
    display: flex;
    gap: 6px;
}
.mt-actions .mt-done {
    border-color: #16a34a;
    color: #16a34a;
}
.mt-actions .mt-done:hover {
    background: #16a34a;
    color: #fff;
}
.mt-actions button:not(.mt-done):hover,
.mt-device-meta button:hover {
    border-color: var(--global-color);
    color: var(--global-color);
}
.mt-empty {
    padding: 48px 20px;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}
.mt-empty > i {
    display: block;
    margin-bottom: 10px;
    font-size: 30px;
    opacity: 0.5;
}
.mt-hint {
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
}
@media (max-width: 640px) {
    .mt-row {
        flex-wrap: wrap;
    }
    .mt-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Coluna direita do mapa em px: em mudava de tamanho no iPhone e a engrenagem cobria a lupa. */
.layer-switcher { top: 66px !important; }
.layer-menu { top: 110px !important; }
.menu-btns { top: 154px !important; }
@media (max-width: 768px) {
    .menu-btns,
    .layer-switcher,
    .layer-menu {
        position: fixed !important;
        right: max(12px, env(safe-area-inset-right, 0px)) !important;
        left: auto !important;
    }
    .menu-btns {
        top: 154px !important;
        width: 44px !important;
        max-height: calc(100dvh - 168px - env(safe-area-inset-bottom, 0px)) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 16px;
        z-index: 8;
        scrollbar-width: thin;
    }
    body.state-open .menu-btns,
    body.state-open .layer-switcher,
    body.state-open .layer-menu {
        display: none !important;
    }
    .menu-btns::-webkit-scrollbar { width: 3px; height: 0; }
    .x-splitter-vertical { width: 18px !important; }
    .x-splitter-vertical .x-collapse-el {
        width: 18px !important;
        height: 56px !important;
    }
}
