html,
body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #102033;
    color: #e7edf6;
}

body.animations-disabled *,
body.animations-disabled *::before,
body.animations-disabled *::after {
    animation: none !important;
    transition: none !important;
}

body.animations-enabled .sidebar-section {
    animation: truckazeSoftFade 0.2s ease both;
}

body.animations-enabled .sidebar-section:nth-of-type(2) {
    animation-delay: 0.04s;
}

body.animations-enabled .sidebar-section:nth-of-type(3) {
    animation-delay: 0.08s;
}

body.animations-enabled .live-feed-panel,
body.animations-enabled .floating-panel {
    animation: truckazeSoftFade 0.24s ease both;
}

body.animations-enabled .floating-dropdown:not(.hidden),
body.animations-enabled .modal-overlay:not(.hidden) .modal-window,
body.animations-enabled .job-detail-panel:not(.hidden),
body.animations-enabled .live-truck-info-panel:not(.hidden) {
    animation: truckazeSoftFade 0.18s ease both;
}

body.animations-enabled .live-feed-trigger,
body.animations-enabled .floating-trigger,
body.animations-enabled .settings-launch-button,
body.animations-enabled .unit-toggle,
body.animations-enabled #toggle-all-filters,
body.animations-enabled .follow-truck-btn,
body.animations-enabled .show-route-btn,
body.animations-enabled .stop-live-truck-info-btn,
body.animations-enabled .search-result,
body.animations-enabled .live-feed-item,
body.animations-enabled .tester-card,
body.animations-enabled .tester-hero,
body.animations-enabled .job-history-item {
    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease;
}

body.animations-enabled .tester-card:hover,
body.animations-enabled .tester-hero:hover,
body.animations-enabled .job-history-item:hover {
    transform: translateY(-1px);
}

body.animations-enabled .live-feed-more-details,
body.animations-enabled .live-truck-more-details {
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

body.animations-enabled .live-feed-body {
    transition:
        opacity 0.2s ease,
        max-height 0.24s ease,
        border-top-color 0.2s ease;
}

body.animations-enabled .floating-trigger-caret {
    transition: transform 0.2s ease;
}

body.animations-enabled .live-feed-preview,
body.animations-enabled .live-feed-trigger-label,
body.animations-enabled .floating-dropdown,
body.animations-enabled .modal-overlay,
body.animations-enabled .modal-window,
body.animations-enabled .live-truck-more-details summary,
body.animations-enabled .auth-status-badge,
body.animations-enabled .sidebar-tester-button {
    transition:
        opacity 0.2s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        color 0.18s ease;
}

@keyframes truckazeFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes truckazeFadeDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes truckazeSoftFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    position: relative;
    z-index: 10;
    width: 320px;
    flex: 0 0 320px;
    height: 100vh;
    box-sizing: border-box;
    padding: 24px 18px;
    background: linear-gradient(180deg, #13263b 0%, #0d1724 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(77, 150, 255, 0.55) rgba(15, 28, 45, 0.85);
}

.sidebar::-webkit-scrollbar,
.search-results::-webkit-scrollbar {
    width: 10px;
}

.sidebar::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track {
    background: rgba(15, 28, 45, 0.85);
    border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb {
    background: rgba(77, 150, 255, 0.55);
    border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(77, 150, 255, 0.75);
}

.sidebar-section + .sidebar-section {
    margin-top: 24px;
}

.sidebar-section {
    position: relative;
    z-index: 0;
}

.sidebar-search-section {
    z-index: 40;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

.brand-logo img {
    max-width: 220px;
    height: auto;
    display: block;
}

.sidebar h1,
.sidebar h2 {
    margin: 0;
}

.sidebar h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.sidebar h2 {
    font-size: 1rem;
    font-weight: 600;
}

.sidebar-copy {
    margin: 8px 0 0;
    color: #aec0d4;
    line-height: 1.45;
}

.sidebar-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.search-shell {
    position: relative;
    z-index: 100;
    isolation: isolate;
}

.search-shell:focus-within {
    z-index: 200;
}

#poi-search {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(7, 14, 23, 0.9);
    color: #f6f8fb;
    font-size: 0.95rem;
}

#poi-search:focus {
    outline: 2px solid #4d96ff;
    outline-offset: 2px;
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 250;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding: 12px;
    border-radius: 16px;
    background: rgba(7, 14, 23, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
    opacity: 1;
    pointer-events: auto;
}

.search-results-hidden {
    display: none;
}

.search-result,
.search-empty {
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
}

.search-result {
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    text-align: left;
    color: inherit;
}

.search-result:hover,
.search-result:focus {
    background: rgba(77, 150, 255, 0.14);
    border-color: rgba(77, 150, 255, 0.45);
    box-shadow: 0 10px 20px rgba(4, 10, 18, 0.14);
    outline: none;
}

.search-result-name {
    display: block;
    font-weight: 600;
}

.search-result-meta,
.search-empty {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: #aec0d4;
}

.sidebar-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.auth-panel {
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: #d8e4f3;
}

.auth-status-badge.is-authenticated {
    background: rgba(87, 231, 164, 0.14);
    color: #9ff1c8;
}

.auth-status-badge.is-anonymous {
    background: rgba(255, 196, 61, 0.14);
    color: #ffd97d;
}

.auth-status-badge.auth-status-hidden {
    display: none;
}

.auth-status-badge.auth-status-action {
    border: 0;
    border-radius: 10px;
    padding: 9px 12px;
    background: linear-gradient(135deg, #1b6cff 0%, #1e9fff 100%);
    color: #f8fbff;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.auth-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
}

.auth-user-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.auth-user-copy strong {
    display: block;
    font-size: 0.94rem;
    line-height: 1.2;
}

.auth-user-copy .sidebar-copy {
    margin-top: 2px;
    font-size: 0.78rem;
    line-height: 1.3;
}

.auth-action:hover,
.auth-action:focus {
    filter: brightness(1.05);
    outline: none;
}

#toggle-all-filters {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #f0f5fb;
    cursor: pointer;
}

#toggle-all-filters:hover,
#toggle-all-filters:focus {
    background: rgba(77, 150, 255, 0.18);
    outline: none;
}

body.animations-enabled #toggle-all-filters:hover,
body.animations-enabled #toggle-all-filters:focus,
body.animations-enabled .unit-toggle:hover,
body.animations-enabled .unit-toggle:focus,
body.animations-enabled .live-feed-trigger:hover,
body.animations-enabled .live-feed-trigger:focus,
body.animations-enabled .floating-trigger:hover,
body.animations-enabled .floating-trigger:focus,
body.animations-enabled .settings-launch-button:hover,
body.animations-enabled .settings-launch-button:focus,
body.animations-enabled .sidebar-tester-button:hover,
body.animations-enabled .sidebar-tester-button:focus,
body.animations-enabled .follow-truck-btn:hover,
body.animations-enabled .show-route-btn:hover,
body.animations-enabled .stop-live-truck-info-btn:hover,
body.animations-enabled .stop-live-truck-info-btn:focus {
    transform: translateY(-1px);
}

body.animations-enabled #toggle-all-filters:active,
body.animations-enabled .unit-toggle:active,
body.animations-enabled .live-feed-trigger:active,
body.animations-enabled .floating-trigger:active,
body.animations-enabled .settings-launch-button:active,
body.animations-enabled .sidebar-tester-button:active,
body.animations-enabled .follow-truck-btn:active,
body.animations-enabled .show-route-btn:active,
body.animations-enabled .stop-live-truck-info-btn:active {
    transform: translateY(0);
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.filter-item input {
    margin: 0;
}

.filter-swatch {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    flex: 0 0 12px;
}

.filter-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    font-size: 0.92rem;
}

.filter-count {
    color: #aec0d4;
    font-size: 0.82rem;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

#admin-poi-settings {
    align-items: flex-start;
    flex-direction: column;
}

.admin-poi-tools {
    display: grid;
    gap: 12px;
    width: 100%;
}

.admin-poi-tools label,
.poi-editor-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.unit-toggle {
    border: 0;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #f0f5fb;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s ease;
}

.unit-toggle:hover,
.unit-toggle:focus {
    background: rgba(77, 150, 255, 0.18);
    outline: none;
}

.hidden {
    display: none !important;
}

.live-feed-panel {
    position: fixed;
    top: 18px;
    left: calc(320px + ((100vw - 320px) / 2));
    z-index: 1350;
    width: min(440px, calc(100vw - 380px));
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-radius: 18px;
    background: rgba(7, 14, 23, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.live-feed-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    color: #f6f8fb;
    cursor: pointer;
    font-weight: 700;
}

.live-feed-trigger-label {
    flex: 0 1 auto;
}

.live-feed-preview {
    flex: 1 1 auto;
    min-width: 0;
    color: #d7e8fb;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-feed-panel.live-feed-showing-preview .live-feed-trigger-label {
    display: none;
}

.live-feed-trigger:hover,
.live-feed-trigger:focus {
    background: rgba(77, 150, 255, 0.12);
    outline: none;
}

.live-feed-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(77, 150, 255, 0.2);
    color: #b9dcff;
    font-size: 0.78rem;
}

.live-feed-count.live-feed-count-hidden {
    display: none;
}

.live-feed-body {
    max-height: 280px;
    overflow: hidden;
    opacity: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.live-feed-collapsed .live-feed-body {
    max-height: 0;
    opacity: 0;
    border-top-color: rgba(255, 255, 255, 0);
    pointer-events: none;
}

.live-feed-collapsed .floating-trigger-caret {
    transform: rotate(-90deg);
}

.live-feed-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(77, 150, 255, 0.55) rgba(15, 28, 45, 0.85);
}

.live-feed-item,
.live-feed-empty {
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.live-feed-item {
    display: grid;
    gap: 4px;
}

.live-feed-item-crash_detected {
    border-color: rgba(255, 95, 95, 0.34);
    background: rgba(255, 95, 95, 0.1);
}

.live-feed-item-speed_limit_change {
    border-color: rgba(255, 214, 10, 0.34);
    background: rgba(255, 214, 10, 0.08);
}

.live-feed-item-job_started {
    border-color: rgba(90, 188, 255, 0.32);
    background: rgba(90, 188, 255, 0.08);
}

.live-feed-item-job_completed {
    border-color: rgba(64, 214, 140, 0.32);
    background: rgba(64, 214, 140, 0.08);
}

.live-feed-item-job_abandoned {
    border-color: rgba(255, 153, 102, 0.34);
    background: rgba(255, 153, 102, 0.08);
}

.live-feed-item-fuel_empty {
    border-color: rgba(255, 80, 80, 0.38);
    background: rgba(255, 80, 80, 0.12);
}

.live-feed-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #f8fbff;
    font-size: 0.88rem;
    font-weight: 700;
}

.live-feed-time {
    flex: 0 0 auto;
    color: #aec0d4;
    font-size: 0.76rem;
    font-weight: 600;
}

.live-feed-message,
.live-feed-empty {
    color: #c4d6f2;
    font-size: 0.82rem;
    line-height: 1.35;
}

.floating-panel {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1400;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.floating-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(7, 14, 23, 0.96);
    color: #f6f8fb;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

.floating-trigger:hover,
.floating-trigger:focus {
    background: rgba(7, 14, 23, 1);
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.28);
    outline: none;
}

.floating-trigger-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.floating-trigger-caret {
    display: inline-flex;
    font-size: 0.9rem;
    transform: translateY(1px);
}

.floating-dropdown {
    width: 310px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(12, 22, 34, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(10px);
    transform-origin: top right;
}

.auth-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
}

.settings-launch-button,
.modal-close,
.auth-status-badge.auth-status-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border: 0;
    border-radius: 999px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #1b6cff 0%, #1e9fff 100%);
    color: #f8fbff;
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
}

.settings-launch-button {
    width: 100%;
    text-decoration: none;
    appearance: none;
}

.auth-status-badge.auth-status-action {
    width: 100%;
    appearance: none;
}

.settings-launch-button + .settings-launch-button {
    margin-top: 8px;
}

.settings-launch-button + .auth-status-badge.auth-status-action {
    margin-top: 8px;
}

.sidebar-tester-button {
    width: 100%;
    margin: 12px 0 4px;
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #ff934f 0%, #ffb347 100%);
    color: #1d150b;
    font-weight: 800;
    cursor: pointer;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 12, 25, 0.72);
    z-index: 1500;
    padding: 20px;
}

.modal-window {
    width: min(540px, 100%);
    background: #0f1b2d;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.32);
    overflow: hidden;
    transform-origin: center top;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
}

.modal-body {
    padding: 20px 24px 24px;
}

.job-history-window {
    width: min(920px, 100%);
}

.tester-window {
    width: min(980px, 100%);
}

.tester-modal-body {
    display: grid;
    gap: 16px;
    max-height: min(82vh, 920px);
    overflow-y: auto;
}

.tester-hero,
.tester-card {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
}

.tester-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.9fr);
    gap: 16px;
    padding: 18px;
}

.tester-kicker {
    margin: 0 0 8px;
    color: #7cc7ff;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.74rem;
}

.tester-hero h3,
.tester-card h3 {
    margin: 0;
    color: #f8fbff;
}

.tester-status-card {
    min-height: 100%;
    display: flex;
    align-items: center;
    padding: 14px;
    border-radius: 14px;
    background: rgba(9, 18, 30, 0.7);
    color: #c8daf2;
    line-height: 1.5;
}

.tester-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tester-card {
    padding: 18px;
}

.tester-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.tester-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tester-actions .settings-launch-button {
    width: auto;
}

.tester-secondary-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(114, 168, 255, 0.22));
}

.tester-link-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.tester-link {
    color: #8fd7ff;
    font-weight: 700;
    text-decoration: none;
}

.tester-list {
    margin: 14px 0 0;
    padding-left: 18px;
    color: #c4d6f2;
    line-height: 1.6;
}

.tester-list li + li {
    margin-top: 8px;
}

.tester-list-numbered {
    padding-left: 22px;
}

.tester-notes {
    margin-top: 14px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 6px;
    color: #dce9f7;
    line-height: 1.6;
}

.tester-notes h1,
.tester-notes h2,
.tester-notes h3,
.tester-notes h4 {
    color: #f8fbff;
}

.tester-notes a {
    color: #8fd7ff;
}

.tester-feedback-form {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.tester-feedback-form select,
.tester-feedback-form input,
.tester-feedback-form textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(7, 14, 23, 0.9);
    color: #f6f8fb;
}

.tester-feedback-form textarea {
    resize: vertical;
    min-height: 140px;
}

.admin-poi-tools select,
.poi-editor-form input,
.poi-editor-form select {
    width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(7, 14, 23, 0.9);
    color: #f6f8fb;
}

.admin-poi-tools select option,
.poi-editor-form select option {
    background: #0f1c29;
    color: #eef4fb;
}

.poi-editor-window {
    width: min(100%, 640px);
}

.poi-editor-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.poi-editor-checkbox {
    flex-direction: row !important;
    align-items: center;
    gap: 10px !important;
}

.poi-editor-checkbox input {
    width: 18px;
    min-height: 18px;
    height: 18px;
    padding: 0;
}

.poi-editor-form .tester-feedback-actions {
    grid-column: 1 / -1;
}

.tester-feedback-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.job-history-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.job-history-filters select,
.job-history-filters input {
    width: 100%;
    box-sizing: border-box;
    min-height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(7, 14, 23, 0.9);
    color: #f6f8fb;
}

.job-history-list {
    display: grid;
    gap: 10px;
    max-height: 58vh;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(77, 150, 255, 0.55) rgba(15, 28, 45, 0.85);
}

.job-history-item,
.job-history-empty {
    border-radius: 8px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.job-history-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.job-history-title {
    margin: 0 0 8px;
    color: #f8fbff;
    font-size: 0.98rem;
    font-weight: 700;
}

.job-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #c4d6f2;
    font-size: 0.82rem;
}

.job-history-meta span {
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.07);
}

.job-history-actions button,
.job-detail-stop {
    border: 0;
    border-radius: 8px;
    padding: 9px 12px;
    background: linear-gradient(135deg, #1b6cff 0%, #1e9fff 100%);
    color: #f8fbff;
    font-weight: 700;
    cursor: pointer;
}

.job-detail-panel,
.live-truck-info-panel {
    position: fixed;
    bottom: 18px;
    z-index: 1450;
    width: min(380px, calc(100vw - 36px));
    max-height: min(520px, calc(100vh - 36px));
    overflow-y: auto;
    border-radius: 18px;
    padding: 18px;
    background: rgba(10, 18, 32, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.3);
    color: #f4f8ff;
}

.job-detail-panel {
    right: 18px;
}

.live-truck-info-panel {
    left: calc(320px + 18px);
    width: min(380px, calc(100vw - 356px));
}

.job-detail-panel h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.live-truck-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.live-truck-info-header h2 {
    min-width: 0;
    margin: 0;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.job-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: #c4d6f2;
    font-size: 0.86rem;
}

.job-detail-row strong {
    color: #f8fbff;
    text-align: right;
}

.live-truck-fuel-value {
    color: #f8fbff;
    max-width: 210px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.live-truck-fuel-value,
.live-truck-marker-low-fuel .live-truck-marker-ring {
    animation: truckazeFuelWarningPulse 1.15s ease-in-out infinite;
}

.live-truck-fuel-empty {
    color: #ff7b7b;
}

.live-truck-more-details {
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.live-truck-more-details summary {
    cursor: pointer;
    list-style: none;
    padding: 10px 12px;
    color: #d7e8fb;
    font-size: 0.84rem;
    font-weight: 700;
}

body.animations-enabled .live-truck-more-details summary:hover,
body.animations-enabled .live-truck-more-details summary:focus {
    background: rgba(255, 255, 255, 0.04);
}

.live-truck-more-details summary::-webkit-details-marker {
    display: none;
}

.live-truck-more-details-body {
    padding: 0 12px 10px;
}

.job-detail-stop,
.live-truck-stop {
    width: 100%;
    margin-top: 16px;
}

.job-route-tooltip.leaflet-tooltip {
    border: 0;
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(10, 18, 32, 0.94);
    color: #f8fbff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
    font-size: 0.78rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .live-feed-panel {
        top: calc(35vh + 12px);
        left: 12px;
        right: 12px;
        width: auto;
        transform: none;
    }

    .floating-panel {
        right: 12px;
        left: 12px;
        top: auto;
        bottom: 18px;
        align-items: stretch;
    }

    .floating-dropdown {
        width: 100%;
    }

    .job-history-filters,
    .job-history-item {
        grid-template-columns: 1fr;
    }

    .job-history-actions button {
        width: 100%;
    }

    .live-truck-info-panel {
        left: 12px;
        right: 12px;
        bottom: 84px;
        width: auto;
    }

    .tester-hero,
    .tester-grid {
        grid-template-columns: 1fr;
    }

    .tester-card-header,
    .tester-feedback-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tester-actions {
        width: 100%;
    }

    .tester-actions .settings-launch-button {
        width: 100%;
    }
}

.map-shell {
    flex: 1 1 auto;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

#map {
    height: 100vh;
    width: 100%;
    background-color: #484E66;
}

.leaflet-control-zoom {
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22) !important;
}

.leaflet-control-zoom a {
    width: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
    background: linear-gradient(180deg, #13263b 0%, #0d1724 100%) !important;
    color: #f2f7fd !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: background 0.15s ease, color 0.15s ease;
}

.leaflet-control-zoom a:last-child {
    border-bottom: 0 !important;
}

.leaflet-control-zoom a:hover,
.leaflet-control-zoom a:focus {
    background: rgba(77, 150, 255, 0.2) !important;
    color: #ffffff !important;
}

.leaflet-control-zoom a.leaflet-disabled {
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(231, 237, 246, 0.4) !important;
}

.city-label-icon {
    background: transparent;
    border: 0;
}

.live-truck-marker {
    position: relative;
}

.live-truck-marker-shell {
    position: relative;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-truck-marker-ring {
    position: absolute;
    inset: 1px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 rgba(255, 80, 80, 0);
    pointer-events: none;
}

.speed-limit-poi-icon,
.speed-limit-text-icon {
    background: transparent;
    border: 0;
}

.speed-limit-poi-label,
.speed-limit-text-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 214, 10, 0.92);
    color: #152238;
    border: 1px solid rgba(21, 34, 56, 0.25);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.speed-limit-poi-tooltip.leaflet-tooltip {
    border: 0;
    border-radius: 999px;
    padding: 3px 8px;
    background: rgba(255, 214, 10, 0.96);
    color: #152238;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
    font-size: 0.78rem;
    font-weight: 700;
}

.speed-limit-poi-tooltip.leaflet-tooltip::before {
    display: none;
}

.live-truck-image {
    width: 18px;
    height: 26px;
    display: block;
    transform-origin: center 60%;
    pointer-events: none;
}

.truckaze-popup.leaflet-popup {
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.truckaze-popup .leaflet-popup-content-wrapper {
    background: rgba(10, 18, 32, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 18px;
    color: #f4f8ff;
    box-shadow: none;
}

.truckaze-popup .leaflet-popup-tip-container {
    display: none;
}

.poi-popup,
.user-popup {
    display: grid;
    gap: 10px;
    min-width: 180px;
}

.poi-popup-title,
.user-popup-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #e7edf6;
}

.poi-popup-row,
.user-popup-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.87rem;
    color: #c4d6f2;
}

.poi-popup-row span,
.user-popup-row span {
    opacity: 0.8;
}

.poi-popup-row strong,
.user-popup-row strong {
    color: #f8fbff;
    font-weight: 700;
}

.user-popup-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 8px;
}

.user-popup-actions button {
    flex: 1;
    min-width: 0;
}

.live-truck-info-header .stop-live-truck-info-btn {
    flex: 0 0 36px;
    width: 36px;
    min-width: 36px;
    padding: 0;
    background: linear-gradient(135deg, #ff4444 0%, #ff6666 100%);
    font-size: 1.15rem;
    line-height: 1;
}

.live-truck-info-header .stop-live-truck-info-btn:hover,
.live-truck-info-header .stop-live-truck-info-btn:focus {
    background: linear-gradient(135deg, #ff5555 0%, #ff7777 100%);
    outline: none;
}

.follow-truck-btn,
.show-route-btn,
.stop-live-truck-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #1b6cff 0%, #1e9fff 100%);
    color: #f8fbff;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.follow-truck-btn:hover,
.show-route-btn:hover {
    background: linear-gradient(135deg, #2b7cff 0%, #2eafff 100%);
    transform: translateY(-1px);
}

.follow-truck-btn:active {
    transform: translateY(0);
}

.follow-truck-btn[data-following="true"] {
    background: linear-gradient(135deg, #ff4444 0%, #ff6666 100%);
}

.follow-truck-btn[data-following="true"]:hover {
    background: linear-gradient(135deg, #ff5555 0%, #ff7777 100%);
}

.live-truck-image.live-truck-image-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.live-truck-marker-low-fuel .live-truck-marker-ring {
    border-color: rgba(255, 90, 90, 0.95);
    box-shadow: 0 0 16px rgba(255, 70, 70, 0.55);
}

@keyframes truckazeFuelWarningPulse {
    0%,
    100% {
        color: #f8fbff;
        border-color: rgba(255, 255, 255, 0.92);
        box-shadow: 0 0 0 rgba(255, 70, 70, 0.08);
    }
    50% {
        color: #ff6868;
        border-color: rgba(255, 88, 88, 0.98);
        box-shadow: 0 0 18px rgba(255, 70, 70, 0.65);
    }
}

.live-truck-popup-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 10px;
}

.city-label {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(31, 49, 69, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f5f8fc;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.country-label {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(8, 16, 26, 0.9);
    border: 1px solid rgba(124, 199, 255, 0.28);
    color: #f5f8fc;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
}

.truck-marker-icon {
    transition: transform 0.15s linear;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.24));
}

@media (max-width: 900px) {
    .app-shell {
        flex-direction: column;
        height: 100vh;
    }

    .sidebar {
        width: 100%;
        flex-basis: auto;
        height: auto;
        max-height: 35vh;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .map-shell {
        height: 65vh;
    }

    #map {
        height: 65vh;
    }

    .search-results {
        max-height: 220px;
    }
}
