/* Retail WT GRAPHITE VIOLET: visual tokens from Documents/Projects/retail-wt/src/index.css.
   Adapted to the existing Transport DOM; navigation remains in the left sidebar. */
:root {--accent:#c58bff;--gold:#c58bff;--text:#f5f2ff;--muted:#b8b6c6;--border:rgba(196,181,222,.28)}
html body.wt,body {font-family:"Trebuchet MS",Arial,sans-serif!important;color:#f5f2ff!important;background:radial-gradient(ellipse at 95% 95%,rgba(136,67,218,.15),transparent 48%),linear-gradient(135deg,#343743,#242631)!important;color-scheme:dark}
body.wt .app,body.wt .main,body.wt main,body.wt .main-content,body.wt .content {background:transparent!important}
body.wt .sidebar {background:linear-gradient(155deg,#393946,#282632)!important;border-right:1px solid rgba(196,181,222,.28)!important;box-shadow:10px 0 35px rgba(8,7,20,.2)!important}
.sidebar::before {content:"RETAIL WT";position:absolute;top:76px;left:22px;color:#c58bff;font-size:27px;font-weight:800;font-style:italic;letter-spacing:-.8px}
body.wt .sidebar-menu {top:145px!important}
body.wt .menu-item {border:1px solid rgba(196,181,222,.28)!important;border-radius:12px!important;background:linear-gradient(155deg,rgba(255,255,255,.12),rgba(255,255,255,.045) 48%,rgba(15,16,28,.24))!important;color:#f0eaf8!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.17),0 5px 12px rgba(8,7,20,.2)!important;margin-bottom:8px!important}
body.wt .menu-item.active {background:linear-gradient(145deg,rgba(160,92,235,.30),rgba(72,46,116,.38) 60%,rgba(42,34,63,.50))!important;border-color:#bb79ff!important;box-shadow:inset 0 -3px 0 #a953f5,0 0 18px rgba(164,78,255,.2)!important}
body.wt .menu-item:hover {border-color:#bb79ff!important}
body.wt .menu-icon,body.wt .menu-chevron,body.wt .topbar svg {color:#c58bff!important}
body.wt .topbar {background:rgba(255,255,255,.035)!important;border:1px solid rgba(190,190,215,.30)!important;border-radius:22px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)!important;margin:12px 16px!important}
body.wt .primary-button,body.wt button.primary,body.wt .tab-button.active {background:linear-gradient(135deg,#9059c5,#68418f)!important;border:1px solid #bb79ff!important;color:#fff!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.18)!important}
body.wt .secondary-button,body.wt .notification,body.wt .tab-button,body.wt summary,body.wt #vt-queue {background:rgba(156,86,235,.12)!important;border:1px solid rgba(190,120,255,.35)!important;color:#eee8f6!important;border-radius:10px!important}
body.wt button:hover:not(:disabled),body.wt .notification:hover {border-color:#bb79ff!important;box-shadow:0 0 14px rgba(169,83,245,.18)!important}
body.wt button:disabled {opacity:.45!important}
body.wt input:not([type=checkbox]):not([type=radio]),body.wt select,body.wt textarea {background:#30303e!important;border:1px solid #877593!important;color:#f5f2ff!important;border-radius:10px!important}
body.wt input::placeholder {color:#b8b6c6!important}
body.wt input[type=checkbox],body.wt input[type=radio] {accent-color:#9450ce}
body.wt :focus-visible {outline:2px solid #d7a8ff!important;outline-offset:3px}
body.wt .card,body.wt .panel,body.wt .pk-card,body.wt .routes18-table-wrap,body.wt .operational-filter-bar,body.wt [data-operational-filter],body.wt .vt-kpi {background:rgba(255,255,255,.045)!important;border-color:rgba(196,181,222,.28)!important;border-radius:14px!important}
body.wt table {background:#30303e!important;color:#f5f2ff!important}
body.wt th,body.wt thead {background:#3d354a!important;color:#d8c6eb!important;border-color:rgba(196,181,222,.28)!important}
body.wt td {background:transparent!important;border-color:rgba(196,181,222,.14)!important}
body.wt tbody tr:hover {background:rgba(197,139,255,.08)!important}
body.wt .muted,body.wt small,body.wt label {color:#b8b6c6!important}
body.wt dialog,body.wt .modal-content,body.wt .modal-box,body.wt .wt-dlg,body.wt .wt-dlg-panel,body.wt .dropdown-menu,body.wt .vtx-actions-menu {background:#34303f!important;color:#f5f2ff!important;border:1px solid rgba(197,139,255,.45)!important;border-radius:16px!important;box-shadow:0 12px 28px rgba(0,0,0,.4)!important}
body.wt .avatar {background:linear-gradient(135deg,#9059c5,#68418f)!important}
body.rt-sidebar-compact .sidebar::before {content:"WT";left:17px;font-size:22px}
@media(max-width:900px){body.wt .topbar{margin:8px!important;border-radius:16px!important}}
body.wt {--wt-bg:#282b36;--wt-panel:#34303f;--wt-panel-2:#30303e;--wt-line:rgba(196,181,222,.28);--wt-line-soft:rgba(196,181,222,.14);--wt-text:#f5f2ff;--wt-muted:#b8b6c6;--wt-amber:#c58bff}
body.wt .pk-kpi,body.wt .opf,body.wt .flt-card,body.wt .routes18-panel,body.wt .routes18-panel-title,body.wt .directory-search,body.wt .search-box,body.wt .wt-sel-btn,body.wt .wt-date-btn,body.wt .wt-sel-pop,body.wt .wt-date-pop {background:#34303f!important;border-color:rgba(196,181,222,.28)!important;color:#f5f2ff!important}
body.wt #page-vt .routes18-table th {background:#3d354a!important;border-color:rgba(196,181,222,.28)!important}
body.wt .directory-search input,body.wt .search-box input {background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important;outline-offset:0!important;min-width:0!important;flex:1!important;width:100%!important;padding:0!important}
body.wt .directory-search:focus-within {border-color:#c58bff!important;box-shadow:0 0 0 2px rgba(197,139,255,.18)!important}
body.wt .topbar input {background:transparent!important;border:0!important}
body.wt .vt-import-issues {border-color:#877593!important}

/* Match the specificity of retained compact-filter controls without changing their layout. */
html body.wt #page-vt button:not(.primary-button),html body.wt #page-vt .wt-sel-btn,html body.wt #page-vt .wt-date-btn,html body.wt #page-vt .wt-sel-pop,html body.wt #page-vt select,html body.wt .topbar .global-search {background:#34303f!important;border-color:rgba(196,181,222,.28)!important;color:#f5f2ff!important}
html body.wt #page-vt .directory-search input {border:0!important;background:transparent!important;outline:none!important;box-shadow:none!important;padding:0!important}
html body.wt #page-vt .directory-search {border-color:#877593!important}
html body.wt #page-vt .directory-search:focus-within {border-color:#c58bff!important}

html body.wt #tms-tabs button {background:#34303f!important;border:1px solid rgba(196,181,222,.28)!important;color:#f5f2ff!important;box-shadow:none!important}
html body.wt #tms-tabs button.on {background:linear-gradient(135deg,#9059c5,#68418f)!important;border-color:#bb79ff!important}
/* Desktop UI kit completion: one set of controls, including retained legacy screens. */
body.wt {--rt-control:36px;--rt-radius:9px;--danger:#ffadb9;--success:#a5e5c3;--warning:#f4d299;--info:#cfb5f5}
html body.wt :is(.primary-button,.secondary-button,.danger-button,.wt-sel-btn,.wt-date-btn,.opf button,.wt-sel-actions button) {min-height:var(--rt-control)!important;height:var(--rt-control)!important;padding:0 12px!important;border-radius:var(--rt-radius)!important;font-size:13px!important;line-height:1.25!important;font-weight:600;align-items:center;justify-content:center;gap:7px;vertical-align:middle;max-width:100%}
html body.wt :is(.danger-button,button.danger,.wt-menu .danger) {background:#572d40!important;border:1px solid #bd6f87!important;color:#ffd8df!important}
html body.wt button:disabled {cursor:not-allowed!important;opacity:.5!important}
html body.wt [aria-busy=true] {cursor:progress!important}
html body.wt .sm {min-height:32px!important;height:32px!important;padding:0 9px!important}
html body.wt input[type=checkbox] {appearance:none!important;-webkit-appearance:none!important;display:inline-grid!important;place-content:center!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;flex:0 0 18px;vertical-align:middle;margin:0!important;padding:0!important;border:1px solid #a18aaf!important;border-radius:4px!important;background:#30303e!important;cursor:pointer}
html body.wt input[type=checkbox]:checked,html body.wt input[type=checkbox]:indeterminate {background:#9450ce!important;border-color:#d7a8ff!important}
html body.wt input[type=checkbox]:checked::after {content:'';width:5px;height:9px;border:solid white;border-width:0 2px 2px 0;transform:translateY(-1px) rotate(45deg)}
html body.wt input[type=checkbox]:indeterminate::after {content:'';width:10px;height:2px;border:0;background:white;transform:none}
html body.wt input[type=checkbox]:hover:not(:disabled) {border-color:#e4c5ff!important}
html body.wt input[type=checkbox]:disabled {opacity:.45;cursor:not-allowed}
html body.wt table {font-size:13px!important;border-collapse:separate;border-spacing:0;width:100%;font-variant-numeric:tabular-nums}
html body.wt :is(th,td) {padding:9px 12px!important;vertical-align:middle;line-height:1.35;overflow-wrap:anywhere}
html body.wt th {font-size:12px!important;font-weight:700!important;text-align:left}
html body.wt :is(td,th).num {text-align:right!important}
html body.wt tr.rt-row-selected {background:rgba(197,139,255,.13)!important;box-shadow:inset 3px 0 #bb79ff}
html body.wt :is(.wt-dialog,.modal-box,.modal-content,.directory-modal,.vehicle-modal,.route-modal,.route18-modal,.tt-detail-screen,.wt-pop,.wt-menu,.wt-sel-pop,.wt-date-pop,.ts-results) {background:#34303f!important;color:#f5f2ff!important;border:1px solid rgba(197,139,255,.4)!important;border-radius:16px!important;box-shadow:0 18px 50px rgba(0,0,0,.4)!important}
html body.wt :is(.wt-dlg-head,.modal-header,.vehicle-modal-head,.tt-detail-head) {padding:16px 20px!important;border-bottom:1px solid var(--wt-line)!important;background:rgba(255,255,255,.025)!important;gap:12px}
html body.wt :is(.wt-dlg-head,.modal-header) :is(h2,h3) {margin:0;font-size:20px;line-height:1.3}
html body.wt :is(.wt-dlg-body,.modal-body) {padding:18px 20px!important;overflow-wrap:anywhere}
html body.wt :is(.wt-dlg-foot,.modal-actions,.vehicle-modal-actions) {display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:14px 20px!important;border-top:1px solid var(--wt-line)!important;background:transparent!important}
html body.wt :is(.wt-field,.directory-form label,.route-form label) {gap:6px}
html body.wt :is(.wt-field input:not([type=checkbox]),.wt-sel-btn,.wt-date-btn) {min-height:36px!important;border-radius:9px!important}
html body.wt :is(.wt-err,.wt-form-error,[role=alert]) {color:#ffd2da}
html body.wt .wt-sel-opt {min-height:36px;padding:8px 12px;border-radius:6px}
html body.wt .wt-sel-opt:is(.is-on,.is-cur),html body.wt .wt-menu button:hover {background:rgba(197,139,255,.18)!important;color:#fff!important}
html body.wt .wt-check {border-color:#b099be!important;color:#fff!important;background:rgba(197,139,255,.2)!important}
html body.wt .wt-sel-pop,html body.wt .wt-menu {z-index:850000!important}
html body.wt .wt-sel-list {max-height:min(340px,50vh);overflow:auto}
html body.wt #vt-order-actions {display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0}
html body.wt #vt-order-actions .vtx-secondary {flex:0 0 auto;width:auto;min-width:0;position:relative}
html body.wt #vt-order-actions .vtx-secondary>summary {height:36px;min-height:36px;padding:0 12px;display:flex;align-items:center;cursor:pointer;white-space:nowrap}
html body.wt .vtx-actions-menu {width:260px;max-width:calc(100vw - 32px);z-index:50}
html body.wt #vt-order-actions #vt-fact-save {order:2}
html body.wt #vt-order-actions #vt-print-selected {order:3}
html body.wt #vt-order-actions #vt-plan-selected {order:4}
html body.wt #vt-order-actions .vtx-secondary {order:5}
html body.wt #vt-import-issues {padding:0!important;margin:8px 0;border:1px solid #877593!important;border-radius:10px;background:rgba(197,139,255,.04)}
html body.wt #vt-import-issues summary {padding:10px 12px;border:0!important;background:transparent!important;cursor:pointer;font-size:13px;font-weight:600}
html body.wt #vt-import-issues :is(p,ul) {margin:8px 16px 12px;font-size:13px}
html body.wt .vt-fact-editor {display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
html body.wt .vt-fact-editor .vt-fact-input {width:80px!important;height:32px!important;min-height:32px!important}
html body.wt .vt-fact-cell small {display:block!important;margin:4px 0 0;max-width:180px;white-space:normal!important}
html body.wt .rt-notice {padding:12px 14px!important;border-radius:10px;border:1px solid #877593!important;background:#34303f!important;color:#f5f2ff!important;line-height:1.5;overflow-wrap:anywhere}
html body.wt .rt-notice.error {border-left:4px solid #f098ac!important}
html body.wt .rt-notice.success {border-left:4px solid #a5e5c3!important}
html body.wt .rt-notice.warning {border-left:4px solid #f4d299!important}
html body.wt .rt-notice.info {border-left:4px solid #c58bff!important}
html body.wt .app-toast-v11 {max-width:min(560px,calc(100vw - 32px));z-index:870000;bottom:20px;right:20px;padding-right:40px!important;font-size:13px!important}
html body.wt .app-toast-v11 button {position:absolute;right:8px;top:8px;border:0;background:transparent;color:#f5f2ff;font-size:22px}
html body.wt .rt-notice-list {list-style:none;padding:0;margin:0;display:grid;gap:10px}
html body.wt .rt-notice time {float:right;font-size:12px;color:#b8b6c6}
html body.wt .rt-notice p {margin:6px 0 0}
html body.wt .rt-notification-center {width:min(640px,calc(100vw - 32px))}
html body.wt #notif-bell {position:relative}
html body.wt #notif-badge {display:none!important}
html body.wt #rt-notification-badge {position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;border-radius:12px;background:#c58bff;color:#241b2b;font-size:11px;display:grid;place-items:center}
html body.wt #rt-notification-badge[hidden] {display:none}
html body.wt .sidebar-menu {max-height:calc(100vh - 260px);overflow:auto;scrollbar-width:thin}
html body.wt .main-content,html body.wt .content,html body.wt main {min-width:0}
@media(min-width:901px) {html body.wt .wt-dialog {max-width:calc(100vw - 48px);max-height:calc(100vh - 40px);overflow:auto}html body.wt :is(.routes18-table-wrap,.table-wrap,.tt-detail-table-wrap) {max-width:100%;overflow:auto}}

html body.wt [hidden] {display:none!important}
html body.wt .app :is(.wt-sel-btn,.wt-date-btn,.directory-search,.search-box):not(#rt-theme-sentinel) {background:#30303e!important;color:#f5f2ff!important;border:1px solid #877593!important;border-radius:9px!important}
html body.wt :is(.routes18-kpi,.routes18-kpis>div,.dash-card,.dash-panel,.office-movement,.office-movement .pk-kpis>div,.vehicle-card,.route18-card,.tt-detail-info,.tt-detail-document-meta) {background:#34303f!important;border-color:var(--wt-line)!important}
html body.wt .routes18-table thead th {background:#3d354a!important}
html body.wt {--wt-field:#30303e;--wt-accent:#c58bff;--wt-red:#9059c5;--wt-red-2:#68418f}
html body.wt .topbar {flex-wrap:wrap!important;gap:12px!important;padding:12px 18px!important}
html body.wt .topbar-left {flex:1 1 210px!important;min-width:0!important;max-width:100%;overflow:hidden}
html body.wt .topbar-right {flex:1 1 640px!important;min-width:0!important;gap:10px!important;justify-content:flex-end}
html body.wt #page-title {font-size:21px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body.wt #top-search {flex:1 1 240px;min-width:160px!important;max-width:360px}
html body.wt #rt-auth-gate,body #rt-auth-gate {background:linear-gradient(135deg,#343743,#242631)!important;color:#f5f2ff!important;font-family:"Trebuchet MS",Arial,sans-serif!important}
body #rt-auth-gate .rt-auth-card {background:#34303f!important;border-color:#877593!important}
body #rt-auth-gate input {background:#30303e!important;color:#f5f2ff!important;border-color:#877593!important}
body #rt-auth-gate button {background:linear-gradient(135deg,#9059c5,#68418f)!important;color:#fff!important;border-color:#bb79ff!important}
html body.wt .page-title-wrap {flex:1 1 240px!important;min-width:0!important;max-width:100%;overflow:hidden}
html body.wt #main-page-title {font-size:21px!important;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.wt #main-page-subtitle {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body.wt .topbar-right {flex:0 1 auto!important;flex-wrap:wrap!important}
html body.wt .top-search {background:#30303e!important;border-color:#877593!important}
html body.wt .top-search kbd {background:#34303f!important;border-color:#877593!important;color:#cfb5f5}
html body.wt .routes18-kpis>* {background:#34303f!important;border-color:#877593!important}
html body.wt .office-movement .pk-kpis strong {color:#c58bff!important}
html body.wt :is(.wt-pop,.wt-dialog,.route18-modal,.vehicle-modal,.directory-modal,.tt-detail-screen) input:not([type=checkbox]):not([type=radio]) {min-height:36px!important}

/* Hidden and role-restricted controls must stay hidden regardless of themed component specificity. */
html body.wt [hidden]:not(#rt-theme-sentinel):not(#rt-theme-sentinel-2) {display:none!important}
html body.wt .directory-tab {background:#34303f!important;border:1px solid #877593!important;color:#f5f2ff!important;border-radius:12px!important}
html body.wt .directory-tab.active {background:linear-gradient(145deg,rgba(160,92,235,.3),rgba(72,46,116,.38))!important;border-color:#bb79ff!important}
html body.wt :is(.route18-step-head,.route18-steps,.route-modal-footer,.route18-mode-card,.directory-toolbar,.ttnreg-toolbar) {background:#34303f!important;border-color:#877593!important}
html body.wt .route18-mode-card.active {border-color:#c58bff!important}
html body.wt .wt-select .wt-sel-btn:not(#rt-theme-sentinel),html body.wt .wt-date .wt-date-btn:not(#rt-theme-sentinel) {background:#30303e!important;border-color:#877593!important;color:#f5f2ff!important}
body .rt-admin-dialog,body .rt-owner-console {background:#34303f!important;color:#f5f2ff!important;border-color:#877593!important;font-family:"Trebuchet MS",Arial,sans-serif!important}
body .rt-admin-dialog {border-radius:16px;padding:20px;max-width:94vw;max-height:90vh;overflow:auto}
body .rt-admin-dialog button,body .rt-owner-console button {background:#68418f;color:#fff;border:1px solid #bb79ff;border-radius:9px;min-height:36px;padding:0 12px;margin:4px}
body .rt-admin-dialog textarea {display:block;width:100%;min-height:90px;margin:12px 0;background:#30303e;color:#f5f2ff;border:1px solid #877593;border-radius:9px}
body.wt .sidebar .sidebar-menu {left:9px!important;right:9px!important;gap:4px!important}
body.wt .sidebar .sidebar-menu .menu-item {height:42px!important;min-height:42px!important;margin-bottom:4px!important}
body.wt .sidebar .menu-chevron {display:none!important}

html body.wt .excel-import-dialog {
    width:94vw!important; max-width:1800px!important; max-height:90vh!important;
    display:flex; flex-direction:column; overflow:hidden;
}
.excel-import-dialog [data-ux12-import], .excel-import-dialog .import-panel,
.excel-import-dialog .import-preview, .excel-import-dialog #import-selection {
    display:flex; flex-direction:column; min-height:0; overflow:hidden;
}
.excel-import-dialog.has-excel-preview #excel-dropzone {display:none!important}
.excel-import-dialog .import-preview-head, .excel-import-dialog .import-stats,
.excel-import-dialog .excel-review-tools, .excel-import-dialog .excel-review-summary {
    flex:none; margin:0; padding:8px; gap:8px;
}
.excel-import-dialog .import-preview-head {flex-wrap:wrap}
.excel-import-dialog .import-preview-head strong {overflow-wrap:anywhere}
.excel-import-dialog .excel-review-tools {display:flex; flex-wrap:wrap; align-items:center}
.excel-import-dialog .excel-review-list {min-height:0; overflow:auto; overscroll-behavior:contain}
.excel-import-dialog .excel-review-list th {position:sticky; top:0; z-index:1}
.excel-import-dialog .excel-doc-number {white-space:nowrap; overflow-wrap:normal}
.excel-import-dialog .excel-review-list select {display:block; max-width:100%; margin-top:4px}
.excel-import-dialog .excel-review-summary {border-top:1px solid var(--wt-line)}
.excel-import-dialog:not(.has-excel-preview) #import-replace-file {display:none}

.excel-import-dialog .import-stats {display:block}
.excel-import-dialog .excel-review-footer {
    flex:none; display:flex; justify-content:flex-end; padding:8px;
}
.excel-import-dialog .excel-doc-number details {font-size:11px}

/* Retail WT reference port. Values from src/index.css, src/modals.css and
   src/modules/wt-orders/WTOrders.tsx. Selectors adapt to the Transport DOM. */
html body.wt .sidebar .sidebar-menu .menu-item:not([hidden]) {
    position: relative !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    min-width: 0 !important;
    min-height: 76px !important;
    padding: 14px 12px !important;
    overflow: hidden !important;
    border-radius: 17px !important;
    color: #f0eaf8 !important;
    font-size: 14px !important;
    font-weight: 650 !important;
    background: linear-gradient(
    155deg,
    rgba(255,255,255,0.12),
    rgba(255,255,255,0.045) 48%,
    rgba(15,16,28,0.24)
  ) !important;
    border: 1px solid rgba(196,181,222,0.28) !important;
    box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.17),
    inset 0 -2px 5px rgba(0,0,0,0.10),
    0 9px 18px rgba(8,7,20,0.20) !important;
    backdrop-filter: blur(12px) !important;
    transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease !important;
    height:auto !important;
    margin:0 0 8px !important;
}
html body.wt .sidebar .sidebar-menu .menu-item.active {
    background: linear-gradient(
    145deg,
    rgba(160,92,235,0.30),
    rgba(72,46,116,0.38) 60%,
    rgba(42,34,63,0.50)
  ) !important;
    border-color: #bb79ff !important;
    box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.23),
    inset 0 -3px 0 #a953f5,
    0 10px 25px rgba(10,6,25,0.28),
    0 0 26px rgba(164,78,255,0.27) !important;
}
html body.wt .sidebar .sidebar-menu .menu-item:hover {
    border-color: rgba(190,120,255,0.80) !important;
    box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 12px 24px rgba(0,0,0,0.25),
    0 0 24px rgba(160,75,255,0.22) !important;
}
html body.wt .sidebar .menu-label {
    font-style: italic !important;
    letter-spacing: 0.1px !important;
}
html body.wt .sidebar .menu-icon svg {
    width: 25px !important;
    height: 25px !important;
    flex-shrink: 0 !important;
    color: #c58bff !important;
    filter: drop-shadow(
    0 0 6px rgba(181,108,255,0.30)
  ) !important;
}
html body.wt .topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    padding: 18px 30px !important;
    border: 1px solid rgba(190, 190, 215, 0.30) !important;
    border-radius: 22px !important;
    background: rgba(255,255,255,0.035) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08) !important;
    flex-wrap:wrap !important;
}
html body.wt #top-search {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 330px !important;
    padding: 13px 18px !important;
    border: 1px solid rgba(180,180,205,0.30) !important;
    border-radius: 30px !important;
    background: rgba(12,13,22,0.22) !important;
    color: #b7aacb !important;
    flex:1 1 250px !important;
}
html body.wt :is(.top-date,.top-clock) {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    border: 1px solid rgba(190, 180, 215, 0.25) !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,0.045) !important;
    color: #eee8f6 !important;
    font-size: 13px !important;
    font-variant-numeric: tabular-nums !important;
    white-space: nowrap !important;
}
html body.wt .topbar .avatar {
    display: grid !important;
    place-items: center !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #9660c9, #68418f) !important;
    font-weight: 700 !important;
}
html body.wt #main-page-title {
    margin: 0 !important;
    font-size: 35px !important;
    font-weight: 800 !important;
    font-style: italic !important;
    letter-spacing: -0.8px !important;
}
html body.wt #main-page-subtitle {
    margin: 4px 0 0 !important;
    color: #b8b6c6 !important;
    font-size: 14px !important;
}
html body.wt :is(.wt-reference-placeholder,.routes18-panel,.directory-table-wrap,.export-documents-section,.ttnreg-panel,.audit-table-wrap,.wt-reference-actions,.excel-import-dialog .import-panel) {
    border-radius: 17px !important;
    border: 1px solid rgba(196,181,222,0.28) !important;
    background: rgba(255,255,255,0.045) !important;
}
html body.wt :is(.secondary-button,.rt-admin-dialog button:not(.primary-button),.rt-owner-console button:not(.primary-button)) {
    border-radius: 10px !important;
    border: 1px solid rgba(197,139,255,0.65) !important;
    background: rgba(156,86,235,0.20) !important;
    color: #f5f2ff !important;
    font-weight: 600 !important;
}
html body.wt :is(.wt-dialog,.rt-admin-dialog,.directory-modal,.vehicle-modal,.route-modal,.tt-detail-screen) {
    border:1px solid #a47ebc !important;
    border-radius:16px !important;
    background:#34303f !important;
    color:#f5f2ff !important;
}
html body.wt :is(.wt-dialog,.rt-admin-dialog,.directory-modal,.vehicle-modal,.route-modal) :is(input:not([type=checkbox]):not([type=radio]),select:not([multiple]),textarea) {
    border:1px solid #9876ac !important;
    border-radius:9px !important;
    background:#302b3b !important;
    color:#f5f2ff !important;
}
html body.wt .wt-overlay {
    background:#101019b8 !important;
    backdrop-filter:none !important;
}
html body.wt :is(.wt-sel-btn,.wt-date-btn):not(#rt-theme-sentinel):not(#rt-theme-sentinel-2) {
    height:34px !important;
    min-height:34px !important;
    padding:7px 10px !important;
    border-radius:11px !important;
    border:1px solid rgba(196,181,222,.32) !important;
    background:rgba(255,255,255,.055) !important;
    font-size:12px !important;
}
html body.wt :is(.wt-sel-pop,.wt-date-pop) {
    padding:12px !important;
    border-radius:13px !important;
    border:1px solid rgba(197,139,255,.4) !important;
    background:#34303f !important;
    box-shadow:0 16px 35px rgba(0,0,0,.4) !important;
}
html body.wt input[type=checkbox] {
    border-color:#877593 !important;
}
html body.wt input[type=checkbox]:is(:checked,:indeterminate) {
    border-color:#c58bff !important;
}
html body.wt :is(table,.routes18-table) {
    border-collapse:collapse !important;
    background:transparent !important;
}
html body.wt :is(table,.routes18-table) :is(th,td) {
    padding:12px 14px !important;
    border-bottom:1px solid rgba(196,181,222,.12) !important;
}
html body.wt :is(table,#page-vt .routes18-table) thead th {
    color:#f5f2ff !important;
    background:rgba(255,255,255,.055) !important;
}
html body.wt .excel-import-dialog .excel-review-list thead th {
    background:#34303f !important;
}
html body.wt :is(td.num,td.nw,.excel-doc-number,.excel-review-list td:nth-last-child(2),.excel-review-list td:nth-last-child(3)) {
    white-space:nowrap !important;
    overflow-wrap:normal !important;
}
html body.wt .vt-fact-editor .vt-fact-input {
    width:76px !important;
    border-radius:9px !important;
    border:1px solid rgba(197,139,255,.75) !important;
    background:rgba(180,145,220,.20) !important;
    color:#fff !important;
    font-size:14px !important;
    font-weight:700 !important;
    text-align:center !important;
}
html body.wt .wt-reference-placeholder {padding:20px;margin:16px 0}
html body.wt #page-office > :not(.wt-reference-placeholder) {display:none!important}
html body.wt .wt-reference-placeholder h2 {margin:0 0 8px;font-size:24px}
html body.wt .wt-reference-placeholder [role=status] {color:#e2c6ff}
html body.wt #vt-import-open {display:inline-flex;align-items:center;gap:8px}
html body.wt #vt-import-open svg {width:18px;height:18px;flex:none}
html body.wt .sidebar .sidebar-menu {max-height:calc(100dvh - 190px)}
html body.wt.rt-sidebar-compact .sidebar .sidebar-menu .menu-item {justify-content:center!important;padding:12px!important;min-height:54px!important}
@media (max-width:1100px) {
    html body.wt .topbar {padding:16px 18px!important;gap:12px!important}
    html body.wt #main-page-title {font-size:25px!important}
}
@media (prefers-reduced-motion:reduce) {
    html body.wt .sidebar .sidebar-menu .menu-item {transition:none!important;transform:none!important}
}

/* The source header grows when its actions wrap on narrower Desktop windows. */
html body.wt .topbar {
    height:auto!important;
    min-height:98px!important;
}
html body.wt #page-vt .routes18-table :is(th,td):last-child {
    position:static!important;
    box-shadow:none!important;
}
html body.wt :is(.vt-tag,.vt-status,.status-badge) {
    border-radius:9px!important;
    white-space:nowrap;
}
html body.wt .topbar {gap:16px!important}
html body.wt .topbar .page-title-wrap {flex:1 1 200px!important}

html body.wt .topbar .topbar-right {margin-left:auto;max-width:100%}
html body.wt #page-vt .routes18-table :is(th,td) {padding:9px 10px!important}
html body.wt #page-vt .routes18-table th {white-space:normal}

html body.wt .topbar #main-page-title {
    font-size:clamp(22px, 1.85vw, 35px)!important;
    white-space:normal;
    overflow-wrap:normal;
}
html body.wt .app-page :is(.opf-row,.flt-card,.routes18-toolbar,.ttnreg-toolbar,.directory-table-wrap):not(#rt-theme-sentinel) {
    background:rgba(255,255,255,.045)!important;
    border-color:rgba(196,181,222,.28)!important;
}
html body.wt .directory-table tbody tr:not(.rt-row-selected) {background:transparent!important}
html body.wt .directory-table tbody tr:hover {background:rgba(197,139,255,.08)!important}
html body.wt .directory-tab strong,
html body.wt .pk-st:is(.new,.vt-ps-pending,.vt-mv-in_transit,.vt-ps-picked) {
    background:rgba(170,105,240,.13)!important;
    border-color:rgba(190,130,255,.30)!important;
    color:#e2c6ff!important;
}
html body.wt .pk-st:is(.done_ok,.vt-ps-ready,.vt-mv-delivered) {
    background:rgba(76,175,120,.13)!important;
    border-color:rgba(100,200,140,.30)!important;
    color:#b9efce!important;
}
html body.wt .pk-st {border-radius:9px!important}
html body.wt #page-vt .vt-table :is(th,.sm) {overflow-wrap:normal}
html body.wt #page-vt .vt-table .sm {white-space:nowrap}

html body.wt .excel-import-dialog [data-ux12-import] {padding:0!important;overflow:hidden!important}
html body.wt .excel-import-dialog :is(.import-panel,.import-preview) {
    margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
    background:transparent!important;box-shadow:none!important
}
.excel-import-dialog .import-status {margin:8px 12px}
.excel-import-dialog .excel-review-list table {table-layout:fixed;min-width:900px}
.excel-import-dialog .excel-review-list th:nth-child(1) {width:44px}
.excel-import-dialog .excel-review-list th:nth-child(2) {width:17%}
.excel-import-dialog .excel-review-list th:nth-child(5) {width:8%}
.excel-import-dialog .excel-review-list th:nth-child(6) {width:10%}
.excel-import-dialog .excel-review-list th:nth-child(7) {width:16%}
html body.wt .excel-import-dialog .excel-review-list :is(th,td) {
    padding:7px 10px!important;white-space:nowrap;overflow-wrap:normal!important;word-break:normal
}
.excel-import-dialog .excel-review-name {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.excel-import-dialog .excel-doc-number details summary {display:inline-block;padding:0 5px}
.excel-import-dialog .excel-doc-number small {white-space:normal}

.excel-import-dialog .excel-match-panel {flex:none;margin:4px 8px;border:1px solid var(--wt-line);border-radius:9px}
.excel-import-dialog .excel-match-panel summary {padding:7px 10px;cursor:pointer}
.excel-import-dialog .excel-match-groups {max-height:24vh;overflow:auto}
.excel-import-dialog .excel-match-group {
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:8px;align-items:center;padding:6px 10px
}
.excel-import-dialog .excel-match-group .wt-select {width:100%;min-width:0}
.excel-import-dialog .excel-match-group > button {grid-column:2;justify-self:start}
.excel-import-dialog .excel-match-group .excel-match-note {grid-column:2}
.excel-import-dialog .excel-match-group .excel-match-note:empty {display:none}
.excel-import-dialog .excel-match-group small {display:block}
.excel-import-dialog .excel-review-list [data-match-link] {display:block;font-size:11px!important}
@media(max-width:800px) {
    .excel-import-dialog .excel-match-group {grid-template-columns:minmax(0,1fr)}
    .excel-import-dialog .excel-match-group > button,
    .excel-import-dialog .excel-match-group .excel-match-note {grid-column:1}
}

/* RT-UX-EXCEL-01 */
html body.wt .excel-import-dialog {
    --excel-muted:#A9B8C8;
    --excel-line:#304356;
    --excel-blue:#438FD2;
    width:94vw;max-width:1800px;max-height:90vh;border-radius:17px;
    background:#111D2A;color:#F1F5F9;border-color:var(--excel-line);
}
html body.wt .excel-import-dialog :is(.wt-dlg-head,.import-panel,.import-preview,.excel-review-footer) {
    background:#111D2A!important;color:#F1F5F9;border-color:var(--excel-line);
}
.excel-import-dialog .wt-dlg-head small {color:var(--excel-muted)}
html body.wt .excel-import-dialog #import-stats {
    display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:8px;
}
.excel-import-dialog :is(#import-stats,.excel-review-tools nav) button {
    color:#F1F5F9;background:#182635;border:1px solid var(--excel-line);border-radius:8px;
    padding:6px 10px;cursor:pointer;
}
.excel-import-dialog #import-stats button {min-height:64px;text-align:left;color:var(--excel-muted)}
.excel-import-dialog #import-stats strong {display:block;color:#F1F5F9;font-size:22px}
.excel-import-dialog button[data-excel-filter][aria-pressed=true] {border-color:var(--excel-blue);background:#18354F}
.excel-import-dialog .excel-review-tools nav {display:flex;flex-wrap:wrap;gap:4px;margin-right:auto}
html body.wt .excel-import-dialog .excel-review-list thead th {background:#182635!important;color:#F1F5F9}
.excel-import-dialog .excel-review-list td {height:58px}
.excel-import-dialog .excel-review-list :is(td,th):nth-child(5),
.excel-import-dialog .excel-review-list :is(td,th):nth-child(6) {text-align:right;font-variant-numeric:tabular-nums}
.excel-import-dialog .excel-picked td:first-child {box-shadow:inset 2px 0 var(--excel-blue)}
.excel-import-dialog .excel-status {display:inline-block;padding:2px 6px;border-radius:5px;background:#343348;color:#D4CBE5}
.excel-import-dialog .excel-status[data-status=ready] {background:#153B36;color:#77DDBD}
.excel-import-dialog .excel-status[data-status=match] {background:#45371F;color:#F4CB79}
.excel-import-dialog .excel-status[data-status=format] {background:#482830;color:#FFA9B1}
html body.wt .excel-import-dialog #import-confirm-button:not(:disabled) {
    background:#438FD2!important;color:#0B131D!important;box-shadow:none!important
}
.excel-import-dialog :is(button,input,select,summary):focus-visible {outline:2px solid var(--excel-blue);outline-offset:2px}
@media(max-height:900px) {
    .excel-import-dialog .excel-review-list td {height:46px}
}

/* Design refinement 03.11.2026 (Claude): legacy navy/gold values in style.css were remapped to these tokens at source;
   the rules below fix layout defects found on screenshots. Presentation only — no business logic. */
html body.wt {--rt-surface:#34303f;--rt-field:#30303e;--rt-deep:#2b2836;--rt-line:rgba(196,181,222,.28);--rt-line-soft:rgba(196,181,222,.14);--rt-accent:#c58bff;--rt-focus:#d7a8ff;--rt-muted:#b8b6c6;--rt-ok:#a5e5c3}
/* Top bar: one-line title with ellipsis, flexible search, no growth to two rows. */
html body.wt .topbar {flex-wrap:nowrap!important;gap:16px!important;min-height:76px!important;padding:12px 18px!important}
html body.wt .page-title-wrap {flex:1 1 auto!important;min-width:0!important;gap:12px!important}
html body.wt .page-title {min-width:0!important}
html body.wt .page-title h1 {font-size:24px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html body.wt .page-title p {white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin-top:2px!important}
html body.wt .top-search {flex:0 1 320px!important;min-width:200px!important}
html body.wt .topbar-right {flex:0 0 auto!important;gap:12px!important}
html body.wt .top-date .date-icon {color:var(--rt-accent)!important}
html body.wt .online-dot {background:var(--rt-ok)!important;box-shadow:0 0 6px rgba(165,229,195,.55)!important}
/* Tables: compact rows, actions in one line, directory ID as a quiet accent instead of a pill. */
html body.wt :is(.directory-table,.routes18-table,.vt-table) tbody td {padding:9px 12px!important;vertical-align:middle!important}
html body.wt .dir-actions {width:auto!important;white-space:nowrap!important}
html body.wt .dir-actions > *,html body.wt td.dir-actions button {display:inline-flex!important;margin:0 0 0 6px!important;vertical-align:middle}
html body.wt .dir-edit {background:var(--rt-field)!important;border-color:var(--rt-line)!important;width:32px;height:32px}
html body.wt .dir-edit:hover {border-color:var(--rt-accent)!important;background:rgba(156,86,235,.18)!important}
html body.wt .directory-id,html body.wt .directory-id summary {color:var(--rt-focus)!important;background:transparent!important;border:0!important;font-weight:700}
html body.wt .directory-table thead th {text-transform:none!important;letter-spacing:0!important;font-size:12.5px!important;color:#d8c6eb!important}
html body.wt .directory-search {border:1px solid #877593!important;border-radius:10px!important;background:var(--rt-field)!important}
html body.wt .directory-search input:not([type="checkbox"]):not([type="radio"]) {border:0!important;background:transparent!important;box-shadow:none!important}
/* Filters: empty date placeholder reads as a placeholder; reset buttons size to content. */
html body.wt .wt-date-btn span.is-empty {color:var(--rt-muted)!important;font-weight:400!important}
html body.wt #vt-clear {width:auto!important;justify-self:start;align-self:end}
/* Section headings sit with their content (history title was pushed to the right). */
html body.wt #page-vt-history :is(h2,.vtx-history-title) {text-align:left!important;font-size:20px!important;margin:4px 0 12px!important}
/* Dialog close button and notices on the graphite surface. */
html body.wt :is(.wt-x,.wt-dialog [data-close][aria-label],.order-modal-close,.app-dialog-head button) {background:var(--rt-field)!important;border:1px solid var(--rt-line)!important;color:#f5f2ff!important;border-radius:9px!important}
html body.wt :is(.wt-x,.wt-dialog [data-close][aria-label]):hover {border-color:var(--rt-accent)!important}
html body.wt .app-toast,html body.wt #app-toast-v11 {background:var(--rt-surface)!important;border:1px solid var(--rt-line)!important;border-left:3px solid var(--rt-accent)!important;color:#f5f2ff!important}
html body.wt .directory-search {padding:0 12px!important}
html body.wt .directory-search input {outline:none!important;padding:0!important}
html body.wt #vt-order-actions > #vt-import-open {background:linear-gradient(135deg,#9059c5,#68418f)!important;border-color:#bb79ff!important;color:#fff!important}
/* Design refinement 03.11.2026 — pass 3: one primary action per surface, compact queue, full page titles. */
html body.wt .primary-button {background:linear-gradient(135deg,#9059c5,#68418f)!important;border:1px solid #bb79ff!important;border-radius:10px!important;color:#fff!important;font-weight:600!important}
html body.wt .primary-button:hover:not(:disabled) {background:linear-gradient(135deg,#a06ad6,#7a4ca5)!important}
html body.wt :is(.primary-button,.secondary-button,button):disabled {opacity:.5;cursor:not-allowed;filter:saturate(.6)}
html body.wt :is(.primary-button,.secondary-button,button,input,select,textarea):focus-visible {outline:2px solid #d7a8ff!important;outline-offset:2px}
html body.wt #page-vt .wt-field:has(#vt-queue) {max-width:340px}
html body.wt .topbar .page-title-wrap {flex:1 1 340px!important;min-width:300px!important}
html body.wt #top-search {flex:0 1 260px;max-width:300px}
html body.wt #page-vt-history .routes18-head {justify-content:flex-start!important}
html body.wt #page-vt-history .routes18-head h2 {margin:4px 0 12px!important}
html body.wt .vtx-filters {grid-template-columns:minmax(240px,480px) auto!important;justify-content:start}
html body.wt .directory-search input:not([type="checkbox"]):not([type="radio"]) {border:0!important;background:transparent!important;box-shadow:none!important;height:100%!important;min-height:0!important}
html body.wt .directory-search:focus-within {border-color:#d7a8ff!important;box-shadow:0 0 0 2px rgba(215,168,255,.25)!important}
html body.wt .topbar #top-search {
  flex: 2 1 370px !important;
  min-width: min(180px, 100%) !important;
  max-width: 390px;
}
@media (max-width: 1320px) {
  html body.wt .topbar { flex-wrap: wrap !important; height: auto !important; }
  html body.wt .topbar #top-search { order: 3; flex: 1 1 100% !important; max-width: 390px; }
}
@media (min-width: 768px) {
  html body.wt #top-search kbd { display: inline-block; }
}
html body.wt .topbar .page-title-wrap {flex:1 2 130px!important;min-width:72px!important}
/* Users, access and journals (Owner/Admin consoles) */
body .rt-owner-console {background:linear-gradient(160deg,#343743,#242631)!important;overflow:auto}
body .rt-owner-console h1 {font-size:26px;margin:0 0 6px}
body .rt-owner-console p {color:#b8b6c6;max-width:760px;margin:0 0 16px}
body .rt-users-table {width:100%;border-collapse:collapse;margin:14px 0;font-size:13px}
body .rt-users-table th {text-align:left;color:#cfb5f5;font-weight:600;padding:9px 10px;border-bottom:1px solid #877593;background:rgba(255,255,255,.04)}
body .rt-users-table td {padding:8px 10px;border-bottom:1px solid rgba(196,181,222,.18);vertical-align:top;overflow-wrap:anywhere}
body .rt-users-table td button {min-height:30px!important;height:auto!important;font-size:12px!important;margin:2px!important}
body .rt-access-dialog {width:min(860px,94vw)}
body .rt-access-dialog label {display:flex;align-items:center;gap:8px;margin:6px 0}
body .rt-access-dialog input:not([type=checkbox]) {flex:1;min-height:38px;padding:0 10px;background:#30303e;color:#f5f2ff;border:1px solid #877593;border-radius:9px}
body .rt-access-full {font-weight:600;margin:12px 0!important}
body .rt-access-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px}
body .rt-access-grid fieldset {border:1px solid rgba(196,181,222,.28);border-radius:10px;padding:8px 12px;margin:0}
body .rt-access-grid legend {color:#cfb5f5;font-weight:600;padding:0 4px}
body .rt-access-grid input:disabled + * , body .rt-access-grid label:has(input:disabled) {opacity:.7}
body .rt-journal-tabs {display:flex;gap:6px;margin:10px 0}
body .rt-journal-tabs button.active {background:linear-gradient(135deg,#9059c5,#68418f)!important;border-color:#bb79ff!important}
body .rt-journal-body h3 {margin:14px 0 4px;font-size:15px}
body .rt-users-table td:first-child {min-width:210px;overflow-wrap:normal;word-break:normal}
body .rt-users-table td:nth-child(4) {white-space:nowrap}
body .rt-admin-dialog :is(input:not([type=checkbox]):not([type=radio]),select) {min-height:38px;padding:0 10px;background:#30303e;color:#f5f2ff;border:1px solid #877593;border-radius:9px;font:inherit}
body .rt-admin-dialog form {display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start}
body .rt-admin-dialog form input[type=email] {flex:1 1 280px}
body .rt-admin-dialog :is(input,select,textarea,button):focus-visible {outline:2px solid #d7a8ff;outline-offset:2px}
body .rt-mfa-key {font-family:ui-monospace,Menlo,monospace;letter-spacing:.06em;color:#d7a8ff}
/* RT-UI-GLASS-02: approved Soft Titanium Glass tokens on the current VT shell. */
html body.wt {
  --glass-ink: #f5f4f8;
  --glass-muted: #bbb6c9;
  --glass-accent: #c4b5fd;
  --glass-border: #dcd0ff30;
  --glass-control-border: #a29ab487;
  --glass-radius: 20px;
  --glass-panel: linear-gradient(135deg, #272235e8, #191824ed 55%, #202638df);
  --glass-control: linear-gradient(145deg, #393147, #252436);
  --glass-search: linear-gradient(100deg, #453653, #30364e);
  --glass-shadow: inset 0 1px #ffffff1c, 0 10px 26px #08071170;
  --glass-ease: 180ms cubic-bezier(.16, 1, .3, 1);
  color: var(--glass-ink) !important;
  font-family: system-ui, sans-serif !important;
  background: radial-gradient(ellipse at 22% 0%, #49346766, transparent 55%),
    radial-gradient(ellipse at 87% 12%, #3a4c7260, transparent 52%),
    linear-gradient(#171521, #121118) !important;
}

html body.wt :is(.sidebar, .topbar) {
  background: var(--glass-panel) !important;
  border-color: var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
}
html body.wt .topbar { border-radius: var(--glass-radius) !important; }
html body.wt .sidebar::before {
  color: var(--glass-accent);
  font-style: normal;
}
html body.wt .sidebar .sidebar-menu .menu-item {
  position: relative;
  transform: none !important;
  background: transparent !important;
  border-color: transparent !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  transition: background-color var(--glass-ease), border-color var(--glass-ease);
}
html body.wt .sidebar .sidebar-menu .menu-item:hover { background-color: #c4b5fd1a !important; }
html body.wt .sidebar .sidebar-menu .menu-item.active {
  background: var(--glass-search) !important;
  border-color: var(--glass-border) !important;
  box-shadow: inset 0 1px #ffffff21 !important;
}
html body.wt .sidebar .sidebar-menu .menu-item::after {
  content: "";
  position: absolute;
  inset: 20% auto 20% 0;
  width: 3px;
  border-radius: 999px;
  background: var(--glass-accent);
  opacity: 0;
  transform: scaleY(.4);
  transition: opacity var(--glass-ease), transform var(--glass-ease);
  pointer-events: none;
}
html body.wt .sidebar .sidebar-menu .menu-item.active::after {
  opacity: 1;
  transform: scaleY(1);
}
html body.wt:not(.rt-sidebar-compact) .sidebar .menu-label {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}
html body.wt .sidebar .menu-icon { flex-shrink: 0; }
html body.wt :is(.menu-icon, .menu-chevron, .topbar svg) { color: var(--glass-accent) !important; }

html body.wt #top-search,
html body.wt :is(#page-vt, #page-orders, #page-logistics, #page-routes) .directory-search {
  background: var(--glass-search) !important;
  border: 1px solid var(--glass-control-border) !important;
  border-radius: 999px !important;
  box-shadow: inset 0 1px #ffffff24 !important;
}
html body.wt #top-search:focus-within,
html body.wt :is(#page-vt, #page-orders, #page-logistics, #page-routes) .directory-search:focus-within {
  outline: 2px solid var(--glass-accent);
  outline-offset: 2px;
}

html body.wt :is(#page-vt, #page-orders, #page-logistics, #page-routes)
  :is(.orders-v7-table-panel, .wt-orders-bar, .routes18-panel, .routes18-kpi, .vt-kpi, .flt-card, .routes18-table-wrap) {
  background: var(--glass-panel) !important;
  border-color: var(--glass-border) !important;
  border-radius: var(--glass-radius) !important;
  box-shadow: var(--glass-shadow) !important;
}
html body.wt :is(#page-vt, #page-orders, #page-logistics, #page-routes) table {
  background: transparent !important;
  color: var(--glass-ink) !important;
}
html body.wt :is(#page-vt, #page-orders, #page-logistics, #page-routes) :is(th, td) {
  padding-block: 7px !important;
  border-color: var(--glass-border) !important;
}
html body.wt :is(#page-vt, #page-orders, #page-logistics, #page-routes) :is(thead, thead th) {
  background: #343043 !important;
  color: var(--glass-ink) !important;
}
html body.wt :is(#page-vt, #page-orders, #page-logistics, #page-routes) tbody tr:hover {
  background-color: #c4b5fd12 !important;
}
html body.wt :is(#page-vt, #page-orders, #page-logistics, #page-routes) tbody tr.rt-row-selected {
  background-color: #a78bfa24 !important;
  box-shadow: inset 3px 0 var(--glass-accent);
}
html body.wt :is(#page-vt, #page-orders, #page-logistics, #page-routes)
  :is(.secondary-button, .wt-sel-btn, .wt-date-btn, select, input[type=date]) {
  background: var(--glass-control) !important;
  border-color: var(--glass-control-border) !important;
  border-radius: 999px !important;
}
html body.wt :is(#page-vt, #page-orders, #page-logistics, #page-routes) .primary-button {
  background: var(--glass-search) !important;
  border-color: var(--glass-accent) !important;
  border-radius: 999px !important;
}
html body.wt :is(dialog[open], .wt-sel-pop, .wt-date-pop, .vtx-actions-menu) {
  background: var(--glass-panel) !important;
  border-color: var(--glass-control-border) !important;
  border-radius: var(--glass-radius) !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: blur(16px);
  animation: glass-enter var(--glass-ease) both;
}
@keyframes glass-enter { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html body.wt :is(.sidebar .sidebar-menu .menu-item, dialog[open], .wt-sel-pop, .wt-date-pop, .vtx-actions-menu) {
    animation-duration: 0s;
    transition-duration: 0s;
  }
  html body.wt .sidebar .sidebar-menu .menu-item::after { transition-duration: 0s; }
}

/* UI-GLASS-05 · TMS WT */
html body.wt .sidebar {
  background:
    radial-gradient(ellipse 150% 24% at 110% -10%, #8049b2 0%, #4b2e71 46%, #ba82fa 49%, #563581 50%, transparent 64%),
    radial-gradient(ellipse 130% 42% at 115% 113%, #563581 0%, #33234f 65%, #8152b4 68%, transparent 70%),
    linear-gradient(155deg, #171622 34%, #241d37 76%, #191725) !important;
  border-radius: 0 16px 16px 0;
  transition: width var(--glass-ease), min-width var(--glass-ease), flex-basis var(--glass-ease);
}
html body.wt .sidebar::before { content: none; }
html body.wt .sidebar .rt-sidebar-toggle,
html body.wt .sidebar .tms-info {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0 !important;
  flex: none;
  border: 1px solid #dcd0ff30;
  border-radius: 11px !important;
  background: linear-gradient(145deg, #393449, #252235) !important;
  color: #e4d3ff !important;
  box-shadow: inset 0 1px #ffffff15;
}
.tms-brand {
  position: absolute;
  inset: 61px 12px auto 22px;
  padding-left: 11px;
  border-left: 1px solid #817096;
  white-space: nowrap;
}
.tms-brand::before {
  content: '';
  position: absolute;
  top: 0;
  left: -1px;
  height: 58%;
  width: 2px;
  border-radius: 2px;
  background: #d8b4ff;
  box-shadow: 0 0 9px #bd7af6;
}
.tms-brand strong { display: block; font-size: 26px; line-height: 1.05; color: #f7f5fb; }
.tms-brand strong span { color: #c3a3f6; }
.tms-brand > span { display: block; margin-top: 5px; color: #b8b4c6; font-size: 11px; }
html body.wt .sidebar .sidebar-menu {
  top: 126px !important;
  bottom: 83px;
  left: 14px !important;
  right: 14px !important;
  padding: 3px 3px 8px;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}
html body.wt .sidebar .sidebar-menu .menu-item:not([hidden]) {
  flex: 0 0 auto;
  min-height: 49px !important;
  padding: 7px 12px !important;
  gap: 13px !important;
  margin: 0 0 4px !important;
  border-radius: 14px !important;
  border-color: #dad0fa30 !important;
  background: linear-gradient(135deg, #ffffff0c, #a49bc312) !important;
  box-shadow: inset 0 1px #ffffff12, 0 4px 10px #09071040 !important;
  transition: background-color var(--glass-ease), border-color var(--glass-ease), box-shadow var(--glass-ease) !important;
}
html body.wt .sidebar .sidebar-menu .menu-item:hover {
  background-color: #c4a4ff19 !important;
  border-color: #d5b9fa85 !important;
}
html body.wt .sidebar .sidebar-menu .menu-item.active {
  background: radial-gradient(ellipse at 90% 115%, #8153c8b0, transparent 67%), linear-gradient(115deg, #302640, #3c3457) !important;
  border-color: #b981ef !important;
  box-shadow: inset 0 -1px #d9abf9a0, 0 4px 13px #9d6be342 !important;
}
html body.wt .sidebar .sidebar-menu .menu-item::after { content: none; }
.tms-active-marker {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 1px;
  width: 5px;
  height: var(--marker-height, 35px);
  border-radius: 6px;
  background: #e4c8ff;
  box-shadow: 0 0 9px #c184f5;
  pointer-events: none;
  transform: translateY(var(--marker-y, 0));
  transition: transform var(--glass-ease), height var(--glass-ease);
}
html body.wt .sidebar .menu-icon {
  border-radius: 9px;
  background: linear-gradient(145deg, #51455f, #302740);
  box-shadow: inset 0 1px #ffffff20;
  color: #d5aff5 !important;
}
html body.wt .sidebar .menu-item:is(:hover,.active) .menu-icon { color: #f1dcff !important; filter: drop-shadow(0 0 5px #bc81f4aa); }
html body.wt .sidebar .menu-label { line-height: 1.28; }
html body.wt .sidebar .menu-chevron { display: none; }
html body.wt .sidebar .sidebar-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  inset: auto 17px 15px;
  padding: 11px 0 0;
  background: transparent;
  border: 0;
  border-top: 1px solid #dcd0ff30;
  border-radius: 0;
}
html body.wt .sidebar-footer strong { display: block; color: #f7f5fb; font-size: 12px; }
html body.wt .sidebar-footer span { display: block; color: #b8b4c6; font-size: 10px; }
.tms-info svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
html body.wt .tms-info-dialog { padding: 20px; }
.tms-info-dialog::backdrop { background: #100e1aa8; }
html body.wt.rt-sidebar-compact .tms-brand { visibility: hidden; }
html body.wt.rt-sidebar-compact .sidebar .sidebar-menu .menu-item:not([hidden]) { justify-content: center !important; padding-inline: 4px !important; }
html body.wt.rt-sidebar-compact .tms-footer-copy { display: none; }
html body.wt.rt-sidebar-compact .sidebar .sidebar-footer { justify-content: center; }
@media (prefers-reduced-motion: reduce) {
  html body.wt .sidebar, html body.wt .sidebar .sidebar-menu .menu-item:not([hidden]), .tms-active-marker { transition: none !important; }
}

/* Route tables have a continuous header across the actions column. */
html body.wt :is(#page-logistics, #page-routes, #page-vt-route-register) .routes18-table :is(th,td):last-child {
  position: static;
  box-shadow: none;
}
html body.wt :is(#page-logistics, #page-routes, #page-vt-route-register) .routes18-table thead th { background: #343043 !important; }
#ux12-orders > .orders-table-wrap > .compact-orders-table { table-layout:fixed !important; width:100%; min-width:980px !important; }
html body.wt #ux12-orders > .orders-table-wrap > .compact-orders-table :is(th,td) {
  min-width:0 !important; padding:7px 5px !important; font-size:12px !important;
  white-space:normal; overflow-wrap:normal;
}
html body.wt #ux12-orders > .orders-table-wrap > .compact-orders-table td.ux12-metric { text-align:left !important; white-space:nowrap; }
#ux12-orders > .orders-table-wrap > .compact-orders-table thead th:nth-child(n) { width:auto !important; }
#ux12-orders > .orders-table-wrap > .compact-orders-table thead th:nth-child(1) { width:36px !important; }
#ux12-orders > .orders-table-wrap > .compact-orders-table thead th:nth-child(2) { width:112px !important; }
#ux12-orders > .orders-table-wrap > .compact-orders-table thead th:nth-child(3) { width:85px !important; }
#ux12-orders > .orders-table-wrap > .compact-orders-table thead th:nth-child(6) { width:78px !important; }
#ux12-orders > .orders-table-wrap > .compact-orders-table thead th:nth-child(7) { width:78px !important; }
#ux12-orders > .orders-table-wrap > .compact-orders-table thead th:nth-child(8) { width:94px !important; }
#ux12-orders > .orders-table-wrap > .compact-orders-table thead th:nth-child(9) { width:116px !important; }
#ux12-orders > .orders-table-wrap > .compact-orders-table thead th:nth-child(10) { width:100px !important; }
#ux12-orders > .orders-table-wrap > .compact-orders-table thead th:nth-child(11) { width:100px !important; }
#ux12-orders .ux12-delivery { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
#ux12-orders [data-pallet-edit] { width:4.5em; max-width:100%; min-width:0; }
#ux12-orders > .orders-table-wrap button { max-width:100%; height:auto !important; white-space:nowrap; }
#ux12-label-format { max-width:calc(100vw - 24px); padding:20px; }

.wt-dialog.ux12-manual-order {width:min(960px,100%)}
.ux12-manual-order .rd-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
.ux12-manual-order :is(.wt-field,.wt-select) {min-width:0}
html body.wt .ux12-manual-order .wt-sel-btn:not(#rt-theme-sentinel):not(#rt-theme-sentinel-2) {
    height:auto!important;
    text-align:left;
}
.ux12-manual-order .wt-sel-btn .wt-sel-text b {white-space:normal;overflow-wrap:anywhere}
@media (max-width:600px) {
    .ux12-manual-order .rd-grid {grid-template-columns:minmax(0,1fr)}
}

html body.wt .sidebar .rt-sidebar-toggle {align-self:flex-end;color:#e4d3ff!important}
.rt-sidebar-toggle svg {transition:transform var(--glass-ease)}
.rt-sidebar-toggle[aria-expanded="false"] svg {transform:rotate(180deg)}

#ux12-orders .ux12-labelled {color:#9ce9b3;font-size:11px;font-weight:600;line-height:1.15;margin-top:3px;white-space:normal;overflow-wrap:normal}

html body.wt #route-modal .route18-modal {width:min(1440px,calc(100vw - 32px))}
html body.wt #route-modal .route18-tt-table {width:100%;min-width:760px;table-layout:fixed}
html body.wt #route-modal .route18-tt-table th:nth-child(1) {width:42px!important}
html body.wt #route-modal .route18-tt-table th:nth-child(2) {width:90px!important}
html body.wt #route-modal .route18-tt-table th:nth-child(n+3):nth-child(-n+5) {width:auto!important}
html body.wt #route-modal .route18-tt-table th:nth-child(n+6) {width:64px!important}
html body.wt #route-modal .route18-tt-table th:nth-child(9) {width:92px!important}
html body.wt #route-modal .route18-tt-table :is(th,td):nth-child(n+6) {
  padding-inline:6px!important;white-space:nowrap!important;overflow-wrap:normal;
  font-variant-numeric:tabular-nums;
}

.ux12-archive-filters {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));
  align-items:end; gap:10px; margin-block:8px 12px;
}
.ux12-archive-filters .wt-field {min-width:0;margin:0}
.ux12-archive-filters :is(input,select,button) {box-sizing:border-box;width:100%;height:36px;min-width:0}
#ux12-archive-ttn .wt-toolbar {align-items:end}
