/* ==========================================================================
   Smart pi UI — DVA product layer: trip analysis
   A second DVA-owned module beside smartpi-dva.css, split out because Trip
   Analysis is large and self-contained. Same rule applies: every selector is
   scoped to something DVA owns, so a combined UI can load each product's
   layers side by side. Shared foundations remain in SmartPi.UI.Core.
   ========================================================================== */
.trip-stop-time-editor,
.trip-stop-platform-editor,
.grid-checkbox {
    align-items: center;
    display: flex;
    justify-content: center;
}

.trip-stop-time-editor { gap: 4px; }
.trip-stop-time-editor .spin-block { display: inline-flex; min-width: 40px; }
.trip-stop-time-editor .spin-block-colon { min-width: 8px; text-align: center; }
.trip-stop-time-input { height: 30px; padding: 4px 6px; text-align: center; width: 50px; }
.trip-stop-platform-input { border: 0; min-width: 60px; text-align: center; width: 90px; }
.grid-checkbox { min-height: 40px; }
.mvc-grid-wrapper { overflow-x: auto; }
.mvc-grid td,
.mvc-grid th { min-height: 48px; vertical-align: middle !important; }
.trip-stop-action {
    border: 1px solid transparent;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    min-height: 34px;
    padding: 7px 14px;
    width: 150px;
}
.trip-stop-action--add { background: #216c43; border-color: #36a867; }
.trip-stop-action--add:hover { background: #287d4f; }
.trip-stop-action--skip { background: #762f32; border-color: #b5575c; }
.trip-stop-action--skip:hover { background: #8b383c; }

.sp-content__well > .app-breadcrumb:has(+ .trip-dashboard) {
        margin: -15px 0 0 -15px;
    }

.trip-dashboard {
        color: #f4f7fb;
        padding: 0 6px 18px 6px;
    }

    .trip-feed-summary { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:8px; }
    .trip-completion-time { text-align:right; }
    .trip-space-small { margin-bottom:4px; }
    .trip-space-medium { margin-bottom:8px; }
    .trip-results-filter { max-width:380px; }
    .trip-value-warning { color:#ffc107!important; font-weight:700; }
    .trip-action { margin:0; font-family:inherit; line-height:1; cursor:pointer; }
    .trip-run-action { min-width:170px; height:38px; }
    .trip-query-table,
    .trip-recording-table { width:100%; border-collapse:collapse; border-spacing:0; }

    .trip-board {
        background: #242424;
        border: 1px solid #343a40;
        border-radius: 10px;
        padding: 14px;
        box-shadow: 0 7px 24px rgba(0, 0, 0, .35);
    }

    .trip-panel {
        background: #292d31;
        border: 1px solid #4a5058;
        border-radius: 8px;
        overflow: hidden;
        margin-bottom: 14px;
    }

    .trip-panel-header {
        background: linear-gradient(180deg, #ff6d22 0%, #e84f10 100%);
        border-bottom: 1px solid #9b350c;
        color: #ffffff;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 9px 12px;
    }

    .trip-panel-title-wrap {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .trip-panel-icon {
        width: 36px;
        height: 36px;
        border-radius: 7px;
        background: #1d2426;
        border: 1px solid rgba(63, 219, 128, .58);
        color: #35e37b;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        flex: 0 0 36px;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 0 12px rgba(53, 227, 123, .16);
    }

    .trip-panel-icon i {
        color: #35e37b;
        line-height: 1;
    }

    .trip-panel-title {
        font-size: 1.05rem;
        font-weight: 800;
        line-height: 1.1;
        margin: 0;
        color: #ffffff;
        text-shadow: 0 1px 1px rgba(0,0,0,.45);
    }

    .trip-panel-subtitle {
        font-size: .78rem;
        color: #fff1e7;
        margin-top: 2px;
        text-shadow: 0 1px 1px rgba(0,0,0,.35);
    }

    .trip-metric-strip {
        display: flex;
        gap: 7px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .trip-metric {
        background: #1f2327;
        border: 1px solid #3e454d;
        border-radius: 7px;
        padding: 5px 10px;
        min-width: 82px;
        color: #fff;
        text-align: center;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
    }

    .trip-metric-label {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font-size: .66rem;
        color: #eaf3ef;
        text-transform: uppercase;
        letter-spacing: .03em;
        line-height: 1;
        white-space: nowrap;
    }

    .trip-metric-label i {
        color: #35e37b;
        font-size: .78rem;
        width: 13px;
        text-align: center;
        flex: 0 0 13px;
        text-shadow: 0 0 8px rgba(53, 227, 123, .25);
    }

    .trip-metric-value {
        display: block;
        font-size: 1rem;
        font-weight: 800;
        color: #ffffff;
        line-height: 1.2;
        margin-top: 2px;
    }

    .trip-panel-body {
        padding: 12px;
        background: #292d31;
    }

    .trip-filter-layout {
        display: grid;
        grid-template-columns: 1fr 1.35fr 1fr;
        gap: 12px;
        align-items: stretch;
    }

    .trip-filter-box {
        border: 1px solid #4e5660;
        background: #2f353b;
        border-radius: 7px;
        padding: 10px;
        min-height: 100%;
    }

    .trip-box-title {
        font-size: .78rem;
        color: #dce4ed;
        font-weight: 800;
        margin-bottom: 7px;
        text-transform: uppercase;
        letter-spacing: .025em;
    }

    .trip-box-title i {
        color: #35e37b;
        margin-right: 8px;
        min-width: 15px;
        text-align: center;
        text-shadow: 0 0 8px rgba(53, 227, 123, .18);
    }

    .trip-field-label {
        font-size: .78rem;
        color: #f5f8fb;
        font-weight: 700;
        margin-bottom: 4px;
        display: block;
    }

    .trip-help {
        color: #bdc6d0;
        font-size: .76rem;
        line-height: 1.35;
        margin-top: 4px;
    }

    .trip-muted {
        color: #b8c1ca;
        font-size: .78rem;
    }

    .trip-form-control,
    .trip-dashboard .form-control,
    .trip-dashboard .custom-select,
    .trip-dashboard select {
        background: #394047;
        border: 1px solid #65707b;
        color: #ffffff;
        border-radius: 5px;
        min-height: 34px;
    }

    .trip-dashboard .form-control:focus,
    .trip-dashboard .custom-select:focus {
        background: #414952;
        color: #ffffff;
        border-color: #16a2e7;
        box-shadow: 0 0 0 .15rem rgba(22,162,231,.18);
    }

    .trip-dashboard .form-control::placeholder {
        color: #9fa9b3;
    }

    .trip-dashboard select option {
        background: #394047;
        color: #ffffff;
    }

    .trip-chip-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .trip-chip,
    .trip-switch-chip,
    .trip-service-chip {
        display: flex !important;
        align-items: center !important;
        gap: 9px;
        min-height: 35px;
        padding: 7px 10px;
        border: 1px solid #56606a;
        background: #333a41;
        color: #ffffff !important;
        border-radius: 7px;
        margin: 0;
        cursor: pointer;
        line-height: 1.25;
        overflow: hidden;
    }

    .trip-chip:hover,
    .trip-switch-chip:hover,
    .trip-service-chip:hover {
        border-color: #16a2e7;
        background: #39434c;
    }

    .trip-chip input,
    .trip-switch-chip input,
    .trip-service-chip input {
        position: static !important;
        opacity: 1 !important;
        width: 15px !important;
        height: 15px !important;
        min-width: 15px !important;
        margin: 0 !important;
        appearance: auto !important;
        -webkit-appearance: auto !important;
        flex: 0 0 15px !important;
    }

    .trip-chip span,
    .trip-switch-chip span,
    .trip-service-chip span {
        min-width: 0;
        overflow-wrap: anywhere;
        white-space: normal;
        font-size: .84rem;
        font-weight: 600;
    }

    .trip-chip.trip-active,
    .trip-switch-chip.trip-active,
    .trip-service-chip.trip-active {
        background: #333a41;
        border-color: #1684ff;
        box-shadow: 0 0 0 1px rgba(22, 132, 255, .45);
    }

    .trip-switch-chip.is-disabled {
        opacity: .55;
        cursor: not-allowed;
    }

    .trip-trip-picker {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .trip-trip-select {
        min-height: 92px;
        max-height: 150px;
    }

    .trip-time-layout {
        display: grid;
        grid-template-columns: repeat(4, minmax(170px, 1fr));
        gap: 10px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #454d55;
    }

    .trip-service-layout {
        display: grid;
        grid-template-columns: repeat(4, minmax(155px, 1fr));
        gap: 8px;
    }

    .trip-run-row {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 12px;
        margin-top: 10px;
        align-items: end;
    }

    .trip-warning {
        background: #fff1c2;
        color: #5d3b00;
        border: 1px solid #e6c66b;
        border-radius: 5px;
        padding: 8px 10px;
        font-size: .82rem;
        margin-bottom: 10px;
    }

    .trip-results-toolbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        margin-bottom: 10px;
    }

    .trip-table-wrap {
        border: 1px solid #454d55;
        border-radius: 7px;
        overflow: auto;
        max-height: 55vh;
        background: #22272c;
    }

    .trip-query-table {
        margin-bottom: 0;
        font-size: .82rem;
        min-width: 1500px;
    }

    .trip-query-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #20252a;
        color: #ffffff;
        border-color: #4b535c;
        text-align: center;
        vertical-align: middle;
        white-space: nowrap;
        padding: 8px 7px;
    }

    .trip-query-table tbody td {
        text-align: center;
        vertical-align: middle;
        border-color: #3d454d;
        padding: 7px;
        color: #f3f6f9;
    }

    .trip-query-table tbody tr:hover td {
        background: rgba(255, 109, 34, .08);
    }

    .trip-badge {
        display: inline-block;
        border-radius: 999px;
        padding: 3px 8px;
        font-size: .72rem;
        font-weight: 800;
        margin: 2px;
        color: #ffffff;
        white-space: nowrap;
    }

    .trip-badge-delay { background: #be5c00; }
    .trip-badge-prior { background: #6554c0; }
    .trip-badge-ontime { background: #188a45; }
    .trip-badge-cancelled { background: #b12d2d; }
    .trip-badge-skipped { background: #8a5c00; }
    .trip-badge-rt { background: #087db9; }
    .trip-badge-fallback { background: #59636d; }
    .trip-badge-neutral { background: #4d5761; }

    .trip-small-line {
        display: block;
        color: #b8c1ca;
        font-size: .76rem;
        margin-top: 2px;
        white-space: normal;
    }


    .trip-recording-card {
        border: 1px solid #4e5660;
        background: #2f353b;
        border-radius: 7px;
        padding: 10px;
        margin-bottom: 12px;
    }

    .trip-recording-head {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        flex-wrap: wrap;
        margin-bottom: 8px;
    }

    .trip-recording-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        align-items: center;
    }

    .trip-recording-actions .trip-action i {
        margin-right: 7px;
    }

    .trip-recording-status {
        color: #d6dde5;
        font-size: .84rem;
        margin-top: 5px;
        line-height: 1.45;
    }

    .trip-recording-status strong {
        color: #ffffff;
    }

    .trip-recording-table-wrap {
        margin-top: 10px;
        max-height: 430px;
        overflow: auto;
        border: 1px solid #454d55;
        border-radius: 7px;
        background: #22272c;
    }

    .trip-recording-table {
        margin-bottom: 0;
        font-size: .78rem;
        min-width: 1700px;
    }

    .trip-recording-table thead th {
        position: sticky;
        top: 0;
        z-index: 3;
        background: #20252a;
        color: #ffffff;
        border-color: #4b535c;
        text-align: center;
        vertical-align: middle;
        white-space: nowrap;
        padding: 8px 7px;
    }

    .trip-recording-table tbody td {
        text-align: center;
        vertical-align: middle;
        border-color: #3d454d;
        padding: 7px;
        color: #f3f6f9;
        white-space: nowrap;
    }

    .trip-recording-table tbody tr:hover td {
        background: rgba(255, 109, 34, .08);
    }

    .trip-recording-change {
        color: #ffc107 !important;
        font-weight: 800;
    }

    .trip-recording-muted {
        color: #b8c1ca;
        font-size: .76rem;
    }


    .trip-chip-text-icon {
        color: #35e37b;
        min-width: 17px;
        margin-right: 7px;
        text-align: center;
        font-size: .92rem;
        text-shadow: 0 0 7px rgba(53, 227, 123, .16);
    }

    .trip-chip span,
    .trip-switch-chip span,
    .trip-service-chip span {
        display: inline-flex;
        align-items: center;
    }

    .trip-switch-chip span i,
    .trip-service-chip span i {
        color: #35e37b;
        min-width: 17px;
        margin-right: 7px;
        text-align: center;
        font-size: .9rem;
    }


    .trip-sortable-table thead th {
        cursor: pointer;
        user-select: none;
        position: sticky;
    }

    .trip-sortable-table thead th:hover {
        background: #2b3238;
        color: #ffffff;
    }

    .trip-sortable-table thead th.trip-sort-asc::after {
        content: " ▲";
        color: #35e37b;
        font-size: .72rem;
        margin-left: 5px;
    }

    .trip-sortable-table thead th.trip-sort-desc::after {
        content: " ▼";
        color: #35e37b;
        font-size: .72rem;
        margin-left: 5px;
    }

    .trip-sortable-table thead th.trip-sort-active {
        color: #ffffff;
        box-shadow: inset 0 -2px 0 #35e37b;
    }

    /* SIP config-detail alignment. The diagnostic density remains page-specific,
       while the shell, fields, controls and state colours follow the source UI. */
    .trip-dashboard {
        color: #d7d9da;
        font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
        padding: 0;
    }

    .trip-board {
        background: #292b2c;
        border: 1px solid #46494b;
        border-radius: 10px;
        box-shadow: none;
        overflow: hidden;
        padding: 0;
    }

    .trip-panel {
        background: #27292a;
        border: 0;
        border-radius: 0;
        margin: 0;
    }

    .trip-panel + .trip-panel {
        border-top: 1px solid #46494b;
        margin-top: 14px;
    }

    .trip-panel-header {
        background: linear-gradient(180deg, #f37435 0%, #df4e0e 100%);
        border-bottom: 1px solid #8f3512;
        color: #241108;
        min-height: 50px;
        padding: 6px 14px;
    }

    .trip-panel-icon {
        background: linear-gradient(180deg, #343638 0%, #202223 100%);
        border: 1px solid #111;
        border-radius: 6px;
        box-shadow: 0 1px 2px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.07);
        color: #e7e9ea;
        height: 32px;
        width: 32px;
    }

    .trip-panel-icon svg {
        fill: none;
        height: 18px;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.5;
        width: 18px;
    }

    .trip-panel-title { color: #241108; font-size: 16px; font-weight: 400; text-shadow: none; }
    .trip-panel-subtitle { color: rgba(36,17,8,.67); font-size: 10px; text-shadow: none; }
    .trip-metric { background: rgba(32,34,35,.94); border: 1px solid #111; border-radius: 5px; min-width: 70px; padding: 4px 8px; }
    .trip-metric-label { color: #aeb3b5; font-size: 9px; }
    .trip-metric-label i { color: #00c7ee; font-size: 10px; text-shadow: none; }
    .trip-metric-value { color: #f0f1f2; font-size: 13px; font-weight: 600; }

    .trip-panel-body { background: #27292a; padding: 18px; }
    .trip-filter-box,
    .trip-recording-card {
        background: #2d2f30;
        border: 1px solid #46494b;
        border-radius: 7px;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
        padding: 12px;
    }

    .trip-box-title {
        border-bottom: 1px solid #454849;
        color: #d3d6d8;
        font-size: 11px;
        font-weight: 500;
        letter-spacing: .015em;
        padding-bottom: 8px;
        text-transform: none;
    }

    .trip-box-title i,
    .trip-chip-text-icon,
    .trip-switch-chip span i,
    .trip-service-chip span i { color: #f26729; text-shadow: none; }

    .trip-field-label { color: #f5f6f7; font-size: 11px; font-weight: 400; }
    .trip-help,
    .trip-muted,
    .trip-recording-muted { color: #92979a; font-size: 10px; }

    .trip-form-control,
    .trip-dashboard .form-control,
    .trip-dashboard .custom-select,
    .trip-dashboard select {
        background: #1d1f20;
        border: 1px solid #54585b;
        border-radius: 5px;
        box-shadow: inset 0 1px 2px rgba(0,0,0,.2);
        color: #e9ebec;
        font-size: 11px;
        min-height: 34px;
    }

    .trip-dashboard .form-control:focus,
    .trip-dashboard .custom-select:focus {
        background: #202223;
        border-color: #00b9db;
        box-shadow: 0 0 0 1px rgba(0,194,230,.18);
    }

    .trip-chip,
    .trip-switch-chip,
    .trip-service-chip {
        background: #252728;
        border: 1px solid #484b4d;
        border-radius: 5px;
        color: #d7d9da !important;
        min-height: 32px;
        padding: 6px 9px;
    }

    .trip-chip:hover,
    .trip-switch-chip:hover,
    .trip-service-chip:hover { background: #303335; border-color: #5a5d60; }
    /* Selected chips are marked by their outline only — the tinted fill plus the
       solid inset bar read as a filled tile and swamped the panel. */
    .trip-chip.trip-active,
    .trip-switch-chip.trip-active,
    .trip-service-chip.trip-active {
        background: #252728;
        border-color: #00c7ee;
        box-shadow: 0 0 0 1px rgba(0,199,238,.45);
        color: #e9f8fc !important;
    }

    .trip-dashboard .trip-action--primary,
    .trip-recording-actions .trip-action--info {
        background: linear-gradient(180deg, #1ed2ef 0%, #06a8c6 100%);
        border: 1px solid #2cdbf6;
        border-radius: 5px;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 1px 2px rgba(0,0,0,.35);
        color: #092229;
        font-size: 11px;
        font-weight: 600;
    }

    .trip-recording-actions .trip-action--success { background: #216a35; border: 1px solid #31cc4b; color: #dceee0; }
    .trip-recording-actions .trip-action--danger { background: #5d2926; border: 1px solid #c9514b; color: #ffd9d6; }
    .trip-warning { background: #3c321f; border-color: #6f5a28; color: #f0d998; }
    .trip-table-wrap,
    .trip-recording-table-wrap { background: #202223; border-color: #46494b; border-radius: 6px; }
    .trip-query-table thead th,
    .trip-recording-table thead th { background: linear-gradient(180deg,#242627 0%,#1d1f20 100%); border-color: #3f4244; color: #cfd2d3; font-size: 10px; font-weight: 500; }
    .trip-query-table tbody td,
    .trip-recording-table tbody td { border-color: #3b3e40; color: #d7d9da; font-size: 10px; }
    .trip-query-table tbody tr:hover td,
    .trip-recording-table tbody tr:hover td { background: rgba(0,199,238,.06); }
    .trip-sortable-table thead th:hover { background: #2d3032; }
    .trip-sortable-table thead th.trip-sort-asc::after,
    .trip-sortable-table thead th.trip-sort-desc::after { color: #00c7ee; }
    .trip-sortable-table thead th.trip-sort-active { box-shadow: inset 0 -2px 0 #00c7ee; }
    .trip-badge { border: 1px solid rgba(255,255,255,.12); font-size: 9px; font-weight: 600; padding: 2px 7px; }
    .trip-badge-ontime { background: #216a35; border-color: #31cc4b; }
    .trip-badge-rt { background: #075d70; border-color: #00b9db; }
    .trip-badge-delay { background: #6b421c; border-color: #c47d36; }
    .trip-badge-fallback,
    .trip-badge-neutral { background: #3b3e40; border-color: #5a5d60; }

    /* Compact control-room layout: keep the complete query workspace above the
       footer at the standard appliance viewport without reducing legibility. */
    .trip-dashboard .trip-panel-body { padding: 8px 12px 9px; }
    .trip-dashboard .trip-feed-summary { margin-bottom: 4px; }
    .trip-dashboard .trip-recording-card { margin-bottom: 7px; padding: 6px 9px; }
    .trip-dashboard .trip-recording-head { align-items: center; flex-wrap: nowrap; margin-bottom: 3px; }
    .trip-dashboard .trip-recording-head .trip-box-title { border-bottom: 0; margin: 0 !important; padding: 0; }
    .trip-dashboard .trip-recording-head .trip-help { margin-top: 3px; }
    .trip-dashboard .trip-recording-actions { flex: 0 0 auto; flex-wrap: nowrap; gap: 6px; }
    .trip-dashboard .trip-recording-actions .trip-action { height: 30px; padding: 3px 9px; white-space: nowrap; }
    .trip-dashboard .trip-recording-actions .trip-action {
        align-items: center;
        background: linear-gradient(180deg,#303233 0%,#242627 100%) !important;
        border: 1px solid #4b4e50 !important;
        border-radius: 5px;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.04),0 1px 2px rgba(0,0,0,.3);
        color: #d7d9da !important;
        display: inline-flex;
        font-size: 11px;
        font-weight: 500;
        gap: 7px;
        justify-content: center;
        min-width: 112px;
    }
    .trip-dashboard .trip-recording-actions .trip-action svg { fill: none; height: 15px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 15px; }
    .trip-dashboard .trip-recording-actions .trip-action--success { border-color: rgba(49,204,75,.52) !important; }
    .trip-dashboard .trip-recording-actions .trip-action--success svg { color: #55db6b; }
    .trip-dashboard .trip-recording-actions .trip-action--info { border-color: rgba(0,199,238,.48) !important; }
    .trip-dashboard .trip-recording-actions .trip-action--info svg { color: #4bd6ef; }
    .trip-dashboard .trip-recording-actions .trip-action--danger { border-color: rgba(224,91,91,.48) !important; }
    .trip-dashboard .trip-recording-actions .trip-action--danger svg { color: #ff7773; }
    .trip-dashboard .trip-recording-actions .trip-action:hover:not(:disabled) { background: linear-gradient(180deg,#393c3e 0%,#2b2d2f 100%) !important; border-color: #676b6e !important; color: #fff !important; }
    .trip-dashboard .trip-recording-actions .trip-action:disabled { background: #262829 !important; border-color: #414446 !important; box-shadow: none; color: #73787b !important; cursor: not-allowed; opacity: 1; }
    .trip-dashboard .trip-recording-actions .trip-action:disabled svg { color: #686d70; }
    .trip-action-label-compact { display:none; }
    .trip-dashboard .trip-recording-status { font-size: 10px; line-height: 1.25; margin-top: 2px; }
    @keyframes trip-recording-pulse {
        0%,100% { box-shadow: 0 0 0 0 rgba(49,204,75,.1),inset 0 1px 0 rgba(255,255,255,.025); }
        50% { box-shadow: 0 0 15px 1px rgba(49,204,75,.24),inset 0 1px 0 rgba(255,255,255,.04); }
    }
    @keyframes trip-recording-dot {
        0%,100% { opacity: 1; transform: scale(1); }
        50% { opacity: .45; transform: scale(.75); }
    }
    .trip-dashboard .trip-recording-card { transition: border-color .2s ease,box-shadow .2s ease,background .2s ease; }
    .trip-dashboard .trip-recording-card.is-recording {
        animation: trip-recording-pulse 1.8s ease-in-out infinite;
        background: linear-gradient(90deg,rgba(49,204,75,.065),#2d2f30 32%);
        border-color: rgba(49,204,75,.62);
    }
    .trip-dashboard .trip-recording-card.is-starting { background: linear-gradient(90deg,rgba(235,171,55,.08),#2d2f30 32%); border-color: rgba(235,171,55,.58); }
    .trip-dashboard .trip-recording-card.is-recording .trip-box-title::after,
    .trip-dashboard .trip-recording-card.is-starting .trip-box-title::after {
        align-items: center;
        border: 1px solid rgba(49,204,75,.5);
        border-radius: 10px;
        color: #8ee39d;
        animation: trip-recording-dot 1.2s ease-in-out infinite;
        content: "●  LIVE";
        display: inline-flex;
        font-size: 8px;
        font-weight: 700;
        height: 17px;
        letter-spacing: .08em;
        margin-left: 9px;
        padding: 0 7px 0 14px;
        position: relative;
        vertical-align: middle;
    }
    .trip-dashboard .trip-recording-card.is-starting .trip-box-title::after { border-color: rgba(235,171,55,.5); color: #e9bd69; content: "●  STARTING"; }
    .trip-dashboard .trip-recording-card.is-recording .trip-recording-status { color: #cfead4; }
    .trip-dashboard .trip-recording-card.is-recording #StopTripRecordingBtn {
        background: linear-gradient(180deg,rgba(126,47,43,.72),rgba(80,35,32,.82)) !important;
        border-color: #df625c !important;
        box-shadow: 0 0 10px rgba(224,91,91,.15),inset 0 1px 0 rgba(255,255,255,.05);
        color: #ffe2df !important;
    }
    .trip-dashboard .trip-recording-card.is-recording #ShowTripRecordingBtn {
        background: linear-gradient(180deg,rgba(22,91,104,.68),rgba(27,58,64,.8)) !important;
        border-color: #27b9d3 !important;
        color: #dcf9fd !important;
    }
    .trip-dashboard .trip-filter-layout { gap: 9px; grid-template-columns: minmax(280px,.92fr) minmax(360px,1.2fr) minmax(300px,.98fr); }
    .trip-dashboard .trip-filter-box { padding: 7px 9px; }
    .trip-dashboard .trip-filter-box .trip-box-title { margin-bottom: 5px; padding-bottom: 5px; }
    .trip-dashboard .trip-filter-box:first-child .trip-chip-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; }
    .trip-dashboard .trip-chip,
    .trip-dashboard .trip-switch-chip,
    .trip-dashboard .trip-service-chip { gap: 7px; min-height: 27px; padding: 3px 7px; }
    .trip-dashboard .trip-chip span,
    .trip-dashboard .trip-switch-chip span,
    .trip-dashboard .trip-service-chip span { font-size: 11px; }
    .trip-dashboard .trip-trip-picker { gap: 4px; }
    .trip-dashboard .trip-trip-select {
        background: #1b1d1e;
        border-color: #4b4f52;
        max-height: 70px;
        min-height: 64px;
        overflow-x: hidden;
        padding: 4px;
    }
    .trip-dashboard .trip-trip-select option {
        background: #1b1d1e;
        border-left: 3px solid transparent;
        border-radius: 3px;
        color: #cdd1d3;
        font-size: 11px;
        line-height: 1.25;
        margin: 1px 0;
        overflow: hidden;
        padding: 5px 8px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .trip-dashboard .trip-trip-select option:hover { background: #292c2e; color: #f0f2f3; }
    .trip-dashboard .trip-trip-select option:checked {
        background: linear-gradient(90deg,rgba(0,199,238,.2),rgba(0,199,238,.08)) !important;
        border-left-color: #00c7ee;
        color: #e8fbff !important;
        font-weight: 500;
    }
    .trip-dashboard .trip-trip-select:focus option:checked { background: linear-gradient(90deg,rgba(0,199,238,.24),rgba(0,199,238,.1)) !important; }
    .trip-dashboard .trip-filter-box .form-control,
    .trip-dashboard .trip-filter-box .trip-form-control,
    .trip-dashboard .trip-time-layout .form-control { height: 32px; min-height: 32px; }
    .trip-dashboard .trip-time-layout { gap: 8px; margin-top: 7px; padding-top: 7px; }
    .trip-dashboard .trip-run-row { align-items: center; background: #202223; border: 1px solid #46494b; border-radius: 6px; margin-top: 6px; padding: 5px 8px; }
    .trip-dashboard .trip-run-row > div { align-items: center; display: grid; gap: 8px; grid-template-columns: max-content minmax(0,1fr); }
    .trip-dashboard .trip-run-row .trip-box-title { border: 0; margin: 0 !important; padding: 0; white-space: nowrap; }
    .trip-dashboard .trip-service-layout { gap: 6px; }
    .trip-dashboard .trip-run-row > .trip-action--primary { height: 32px; min-width: 132px; }
    .trip-dashboard .trip-metric {
        background: linear-gradient(180deg,#353738 0%,#292b2c 100%);
        border-color: #161718;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.08),0 1px 2px rgba(0,0,0,.35);
    }
    .trip-dashboard .trip-metric-label { color: #c3c7c9; }
    .trip-dashboard .trip-metric-value { color: #f2f3f4; }
    .trip-dashboard .trip-metric:nth-child(1) .trip-metric-label i { color: #52cbe1; }
    .trip-dashboard .trip-metric:nth-child(2) .trip-metric-label i { color: #61d775; }
    .trip-dashboard .trip-metric:nth-child(3) .trip-metric-label i { color: #66cde0; }
    .trip-dashboard .trip-metric:nth-child(4) .trip-metric-label i { color: #9ea3a6; }
    .trip-dashboard .trip-metric:nth-child(5) .trip-metric-label i { color: #efa04e; }
    .trip-dashboard .trip-metric:nth-child(6) .trip-metric-label i { color: #b69ae9; }
    .trip-dashboard .trip-metric:nth-child(7) .trip-metric-label i { color: #67db7a; }

    @media (max-width: 1250px) {
        .trip-dashboard .trip-filter-layout,
        .trip-dashboard .trip-time-layout {
            grid-template-columns: 1fr;
        }

        .trip-service-layout {
            grid-template-columns: repeat(2, minmax(160px, 1fr));
        }
    }

    @media (max-width: 650px) {
        .trip-dashboard .trip-panel-header {
            align-items:center;
            display:grid;
            gap:8px 10px;
            grid-template-columns:minmax(0,1fr) 36px;
            padding:9px 12px 10px;
        }
        .trip-dashboard .trip-panel-title-wrap { grid-column:1; min-width:0; width:100%; }
        .trip-dashboard .trip-panel-title { font-size:15px; }
        .trip-dashboard .trip-panel-subtitle {
            overflow:hidden;
            text-overflow:ellipsis;
            white-space:nowrap;
        }
        .trip-dashboard .trip-query-header-actions { display:contents; }
        .trip-dashboard .trip-query-header-actions .trip-metric-strip {
            display:grid;
            gap:5px;
            grid-column:1 / -1;
            grid-template-columns:repeat(4,minmax(0,1fr));
            width:100%;
        }
        .trip-dashboard .trip-metric {
            min-width:0;
            padding:4px 3px;
        }
        .trip-dashboard .trip-metric-label { gap:3px; font-size:8px; letter-spacing:.02em; }
        .trip-dashboard .trip-metric-label i { flex:0 0 10px; font-size:9px; width:10px; }
        .trip-dashboard .trip-metric-value { font-size:12px; margin-top:2px; }
        .trip-dashboard .trip-query-toggle {
            grid-column:2;
            grid-row:1;
            height:36px;
            padding:0;
            width:36px;
        }
        .trip-dashboard #TripQueryToggle > span {
            clip:rect(0 0 0 0);
            clip-path:inset(50%);
            height:1px;
            overflow:hidden;
            position:absolute;
            white-space:nowrap;
            width:1px;
        }
        .trip-dashboard .trip-recording-head { align-items:stretch; flex-direction:column; }
        .trip-dashboard .trip-recording-actions {
            display:grid;
            gap:6px;
            grid-template-columns:repeat(3,minmax(0,1fr));
            width:100%;
        }
        .trip-dashboard .trip-recording-actions .trip-action {
            min-width:0;
            padding-inline:6px;
            width:100%;
        }
        .trip-dashboard .trip-recording-actions .trip-action svg { flex:0 0 15px; }
        .trip-dashboard .trip-recording-actions .trip-action .trip-action-label-full { display:none; }
        .trip-dashboard .trip-recording-actions .trip-action .trip-action-label-compact { display:inline; }
        .trip-dashboard .trip-panel-body { padding:8px; }
        .trip-dashboard .trip-feed-summary { padding-inline:2px; }
        .trip-dashboard .trip-recording-card { padding:9px; }
        .trip-dashboard .trip-run-row > div { align-items:stretch; grid-template-columns:1fr; }
        .trip-service-layout,
        .trip-run-row {
            grid-template-columns: 1fr;
        }

        .trip-metric-strip { justify-content:flex-start; }
    }

    @media (max-width: 390px) {
        .trip-dashboard .trip-filter-box:first-child .trip-chip-list { grid-template-columns:1fr; }
    }

    @media (max-width: 340px) {
        .trip-dashboard .trip-metric-label { gap:1px; font-size:7.5px; }
        .trip-dashboard .trip-metric-label i { flex-basis:8px; font-size:8px; width:8px; }
    }

/* Product-specific trip-query results workspace. */
.trip-query-header-actions { align-items:center; display:flex; gap:8px; min-width:0; }
.trip-query-toggle { align-items:center; background:linear-gradient(180deg,#303233,#242627); border:1px solid #4b4e50; border-radius:5px; color:#d7d9da; cursor:pointer; display:inline-flex; flex:0 0 auto; font:inherit; font-size:10px; font-weight:600; gap:6px; height:34px; justify-content:center; padding:0 10px; }
.trip-query-toggle:hover,.trip-query-toggle:focus-visible { background:linear-gradient(180deg,#393c3e,#2b2d2f); border-color:#00b9db; color:#fff; outline:0; }
.trip-query-toggle svg { fill:none; height:15px; stroke:#58d5eb; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.7; width:15px; }
.trip-query-panel.is-collapsed { margin-bottom:8px; }
.trip-query-panel.is-collapsed #TripQueryBody { display:none; }
.trip-query-panel.is-collapsed .trip-panel-header { border-bottom:0; }
.trip-results-panel { margin-bottom:0; }
.trip-results-panel[hidden] { display:none; }
.trip-results-body { background:#252728; }
.trip-results-dismiss-row { display:flex; justify-content:flex-end; margin-bottom:7px; }
.trip-results-dismiss svg { stroke:#cfd2d3; }
.trip-results-empty { align-items:center; background:linear-gradient(180deg,#292b2c,#242627); border:1px dashed #4b4e50; border-radius:7px; color:#929799; display:flex; gap:13px; justify-content:center; min-height:116px; padding:20px; text-align:left; }
.trip-results-empty-icon { align-items:center; background:rgba(0,199,238,.08); border:1px solid rgba(0,199,238,.3); border-radius:7px; display:flex; flex:0 0 42px; height:42px; justify-content:center; }
.trip-results-empty-icon svg { fill:none; height:23px; stroke:#55d7ed; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.7; width:23px; }
.trip-results-empty strong { color:#dadddf; display:block; font-size:13px; font-weight:600; }
.trip-results-empty > div > span { display:block; font-size:11px; line-height:1.45; margin-top:4px; max-width:560px; }
.trip-results-toolbar { background:#202223; border:1px solid #45484a; border-radius:6px; margin-bottom:7px; padding:7px 8px; }
.trip-results-summary { min-width:220px; }
.trip-results-summary strong { color:#dadddf; display:block; font-size:11px; font-weight:600; }
.trip-results-summary > span { color:#8f9497; display:block; font-size:9px; margin-top:2px; }
.trip-results-search { align-items:center; background:#1b1d1e; border:1px solid #4b4f52; border-radius:5px; display:grid; grid-template-columns:18px minmax(0,1fr) 24px; margin:0; max-width:420px; min-width:280px; padding:0 6px; width:100%; }
.trip-results-search:focus-within { border-color:#00b9db; box-shadow:0 0 0 1px rgba(0,194,230,.18); }
.trip-results-search svg { fill:none; height:15px; stroke:#7f8588; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; width:15px; }
.trip-results-search input { background:transparent; border:0; color:#e9ebec; font:inherit; font-size:11px; height:32px; min-width:0; outline:0; padding:0 5px; width:100%; }
.trip-results-search input::placeholder { color:#73797c; }
.trip-results-search button { background:transparent; border:0; border-radius:3px; color:#9da2a5; cursor:pointer; font-size:18px; height:24px; line-height:1; padding:0; width:24px; }
.trip-results-search button:hover { background:#343738; color:#fff; }
.trip-results-search button[hidden] { display:none; }
.trip-table-scroll-hint { align-items:center; color:#81878a; display:flex; font-size:9px; gap:6px; justify-content:flex-end; margin:0 2px 5px; }
.trip-table-scroll-hint svg { fill:none; height:14px; stroke:#8d9396; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.7; width:14px; }
.trip-results-panel .trip-table-wrap { max-height:56vh; scrollbar-color:#5b6063 #202223; scrollbar-width:thin; }
.trip-results-panel .trip-table-wrap:focus { border-color:#00b9db; box-shadow:0 0 0 1px rgba(0,194,230,.15); outline:0; }
.trip-results-panel .trip-query-table { min-width:1820px; table-layout:fixed; }
.trip-results-panel .trip-query-table :is(th,td):nth-child(1) { left:0; width:48px; }
.trip-results-panel .trip-query-table :is(th,td):nth-child(2) { left:48px; width:110px; }
.trip-results-panel .trip-query-table :is(th,td):nth-child(3) { left:158px; width:150px; }
.trip-results-panel .trip-query-table :is(th,td):nth-child(4) { width:140px; }
.trip-results-panel .trip-query-table :is(th,td):nth-child(5) { width:180px; }
.trip-results-panel .trip-query-table :is(th,td):nth-child(6) { width:80px; }
.trip-results-panel .trip-query-table :is(th,td):nth-child(7),
.trip-results-panel .trip-query-table :is(th,td):nth-child(8),
.trip-results-panel .trip-query-table :is(th,td):nth-child(10),
.trip-results-panel .trip-query-table :is(th,td):nth-child(11) { width:135px; }
.trip-results-panel .trip-query-table :is(th,td):nth-child(9),
.trip-results-panel .trip-query-table :is(th,td):nth-child(12) { width:75px; }
.trip-results-panel .trip-query-table :is(th,td):nth-child(13) { width:115px; }
.trip-results-panel .trip-query-table :is(th,td):nth-child(14) { width:150px; }
.trip-results-panel .trip-query-table :is(th,td):nth-child(15) { width:160px; }
.trip-results-panel .trip-query-table :is(th,td):nth-child(-n+3) { position:sticky; z-index:1; }
.trip-results-panel .trip-query-table thead th:nth-child(-n+3) { background:linear-gradient(180deg,#2b2d2e,#222425); z-index:4; }
.trip-results-panel .trip-query-table tbody td:nth-child(-n+3) { background:#292b2c; }
.trip-results-panel .trip-query-table tbody tr:nth-child(even) td:nth-child(-n+3) { background:#262829; }
.trip-results-panel .trip-query-table tbody tr:hover td:nth-child(-n+3) { background:#303436; }
.trip-results-panel .trip-query-table :is(th,td):nth-child(3) { box-shadow:4px 0 7px rgba(0,0,0,.28); }
.trip-results-panel .trip-query-table tbody td:nth-child(3) { overflow-wrap:anywhere; white-space:normal; }
.trip-results-panel .trip-query-table tbody tr[hidden] { display:none; }

@media (max-width:650px) {
    .trip-results-panel .trip-panel-header {
        display:grid;
        grid-template-columns:minmax(0,1fr);
        min-height:0;
    }
    .trip-results-panel .trip-panel-title-wrap { grid-column:1; }
    .trip-results-panel .trip-results-metric-strip {
        display:grid;
        gap:5px;
        grid-column:1;
        grid-template-columns:repeat(3,minmax(0,1fr));
        width:100%;
    }
    .trip-results-panel .trip-results-metric-strip .trip-metric { min-width:0; }
    .trip-dashboard .trip-results-dismiss-row { display:block; margin-bottom:8px; }
    .trip-dashboard .trip-results-dismiss { min-height:36px; width:100%; }
    .trip-results-empty { align-items:flex-start; justify-content:flex-start; min-height:0; padding:14px; }
    .trip-results-toolbar { align-items:stretch; flex-direction:column; }
    .trip-results-search { max-width:none; min-width:0; }
    .trip-table-scroll-hint { justify-content:flex-start; }
    .trip-results-panel .trip-query-table :is(th,td):nth-child(1) { width:42px; }
    .trip-results-panel .trip-query-table :is(th,td):nth-child(2) { left:42px; width:104px; }
    .trip-results-panel .trip-query-table :is(th,td):nth-child(3) { box-shadow:none; position:static; width:110px; }
}
