/* ============================================================
   modern_ui.css  —  LOAD24 modernization layer
   Loaded LAST in base.html so it overrides cleanly.
   Pure additive layer: safe to remove this <link> to revert.
   Palette inherited from unified_ui.css :root
     --primary-color #0f2844 · --topbar-bg #163b66 · --accent-color #29EAFD
   ============================================================ */

:root {
    --mui-accent: #29EAFD;
    --mui-accent-soft: rgba(41, 234, 253, 0.18);
    --mui-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --mui-shadow-btn: 0 10px 22px rgba(15, 40, 68, 0.24);
    --mui-shadow-btn-hover: 0 16px 30px rgba(15, 40, 68, 0.32);
}

/* ------------------------------------------------------------
   1. PRIMARY BUTTONS  (apply filters, confirm, generic primary)
   Gradient fill + accent top edge + shine sweep + hover lift.
   ------------------------------------------------------------ */
.btn-primary-custom,
.btn-confirm,
.advanced-search-actions .apply-filters-btn {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(41, 234, 253, 0.28);
    border-radius: 14px;
    background: linear-gradient(135deg, #1d4d82 0%, #163b66 48%, #0f2844 100%);
    color: #fff;
    box-shadow: var(--mui-shadow-btn);
    isolation: isolate;
    transition: transform 0.22s var(--mui-ease),
                box-shadow 0.22s var(--mui-ease),
                filter 0.22s var(--mui-ease),
                border-color 0.22s var(--mui-ease);
}

.btn-primary-custom::before,
.btn-confirm::before,
.advanced-search-actions .apply-filters-btn::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(41, 234, 253, 0.85), transparent);
    opacity: 0.85;
    z-index: 2;
    pointer-events: none;
}

.btn-primary-custom::after,
.btn-confirm::after,
.advanced-search-actions .apply-filters-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: skewX(-18deg);
    transition: left 0.6s var(--mui-ease);
    pointer-events: none;
}

.btn-primary-custom:hover,
.btn-confirm:hover,
.advanced-search-actions .apply-filters-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    border-color: rgba(41, 234, 253, 0.55);
    box-shadow: var(--mui-shadow-btn-hover);
    background: linear-gradient(135deg, #1d4d82 0%, #163b66 48%, #0f2844 100%);
}

.btn-primary-custom:hover::after,
.btn-confirm:hover::after,
.advanced-search-actions .apply-filters-btn:hover::after {
    left: 130%;
}

.btn-primary-custom:active,
.btn-confirm:active,
.advanced-search-actions .apply-filters-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(15, 40, 68, 0.26);
}

.btn-primary-custom:focus-visible,
.btn-confirm:focus-visible,
.advanced-search-actions .apply-filters-btn:focus-visible {
    outline: none;
    box-shadow: var(--mui-shadow-btn), 0 0 0 3px var(--mui-accent-soft);
}

.btn-primary-custom > *,
.advanced-search-actions .apply-filters-btn > * {
    position: relative;
    z-index: 2;
}

/* ------------------------------------------------------------
   2. SECONDARY / CLEAR BUTTONS  — soft, tactile, lifts on hover
   ------------------------------------------------------------ */
.advanced-search-actions .clear-filters-btn,
.btn-outline-secondary,
.btn-cancel {
    border-radius: 14px;
    transition: transform 0.2s var(--mui-ease),
                background-color 0.2s var(--mui-ease),
                border-color 0.2s var(--mui-ease),
                color 0.2s var(--mui-ease),
                box-shadow 0.2s var(--mui-ease);
}

.advanced-search-actions .clear-filters-btn:hover,
.btn-outline-secondary:hover,
.btn-cancel:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 40, 68, 0.12);
}

/* ------------------------------------------------------------
   3. TABLE  — modern sticky header, animated sort arrows,
   accent row hover, staggered entrance.
   ------------------------------------------------------------ */
.cargo-table thead {
    background: linear-gradient(180deg, #f4f8ff 0%, #e7eefaf2 100%);
}

.cargo-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 14px 12px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #41577a;
    border-bottom: 1px solid #dfe7f3;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: color 0.2s ease, background 0.2s ease;
}

.cargo-table th:hover {
    background: linear-gradient(180deg, rgba(41, 234, 253, 0.12), rgba(41, 234, 253, 0.03));
    color: var(--primary-color);
}

.cargo-table th.sortable::after {
    opacity: 0.35;
    transition: opacity 0.2s ease, transform 0.2s var(--mui-ease), color 0.2s ease;
}

.cargo-table th.sortable:hover::after {
    opacity: 0.7;
}

.cargo-table th.sorted-asc::after,
.cargo-table th.sorted-desc::after {
    opacity: 1;
    color: var(--mui-accent);
    transform: scale(1.18);
    text-shadow: 0 0 10px rgba(41, 234, 253, 0.5);
}

.cargo-table tbody tr {
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s var(--mui-ease);
}

.cargo-table tbody tr td:first-child {
    position: relative;
}

.cargo-table tbody tr td:first-child::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--mui-accent), #1b9fd6);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.22s var(--mui-ease);
}

.cargo-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(41, 234, 253, 0.1), rgba(41, 234, 253, 0.015));
}

.cargo-table tbody tr:hover td:first-child::before,
.cargo-table tbody tr.selected td:first-child::before {
    transform: scaleY(1);
}

@media (prefers-reduced-motion: no-preference) {
    .cargo-table tbody tr {
        animation: muiRowIn 0.45s var(--mui-ease) both;
    }
    .cargo-table tbody tr:nth-child(1) { animation-delay: 0.02s; }
    .cargo-table tbody tr:nth-child(2) { animation-delay: 0.05s; }
    .cargo-table tbody tr:nth-child(3) { animation-delay: 0.08s; }
    .cargo-table tbody tr:nth-child(4) { animation-delay: 0.11s; }
    .cargo-table tbody tr:nth-child(5) { animation-delay: 0.14s; }
    .cargo-table tbody tr:nth-child(6) { animation-delay: 0.17s; }
    .cargo-table tbody tr:nth-child(7) { animation-delay: 0.20s; }
    .cargo-table tbody tr:nth-child(8) { animation-delay: 0.23s; }
    .cargo-table tbody tr:nth-child(n+9) { animation-delay: 0.26s; }
}

@keyframes muiRowIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------
   4. CARDS / CONTAINERS  — gentle hover lift
   ------------------------------------------------------------ */
.table-container,
.search-toolbar,
.form-card,
.vehicle-list-card,
.profile-section {
    transition: box-shadow 0.25s var(--mui-ease), transform 0.25s var(--mui-ease);
}

.vehicle-list-card:hover,
.form-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ui-shadow-mid, 0 14px 32px rgba(15, 40, 68, 0.12));
}

/* ------------------------------------------------------------
   5. STATUS BADGES  — pill shape + soft tint
   ------------------------------------------------------------ */
.status-badge {
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ------------------------------------------------------------
   6. PAGE / CONTENT ENTRANCE
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
    .main-content > .block-content,
    .advanced-search,
    .table-container,
    .results-header-layout {
        animation: muiFadeUp 0.5s var(--mui-ease) both;
    }
}

@keyframes muiFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------
   8. SIDEBAR NAVIGATION  — animated active rail, icon pop
   ------------------------------------------------------------ */
.nav-menu a,
.nav-submenu-toggle,
.nav-submenu-list a {
    position: relative;
    overflow: hidden;
}

.nav-menu a::before,
.nav-submenu-list a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--mui-accent), #1b9fd6);
    transition: transform 0.22s var(--mui-ease);
}

.nav-menu a:hover::before,
.nav-menu a.active::before,
.nav-submenu-list a:hover::before,
.nav-submenu-list a.active::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-menu a i,
.nav-submenu-toggle i {
    transition: transform 0.22s var(--mui-ease), color 0.2s ease;
}

/* ============================================================
   Show More section  —  replaces pagination on search page
   ============================================================ */

.show-more-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px 36px;
}

/* ---- Button ---- */
.show-more-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    padding: 0 32px;
    height: 48px;
    border: 1px solid rgba(41, 234, 253, 0.28);
    border-radius: 14px;
    background: linear-gradient(135deg, #1d4d82 0%, #163b66 48%, #0f2844 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(15, 40, 68, 0.24);
    transition: transform 0.22s var(--mui-ease),
                box-shadow 0.22s var(--mui-ease),
                filter 0.22s var(--mui-ease),
                border-color 0.22s var(--mui-ease),
                opacity 0.15s ease;
    overflow: hidden;
    isolation: isolate;
}

/* top-edge accent shine */
.show-more-btn::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(41, 234, 253, 0.85), transparent);
    z-index: 2;
    pointer-events: none;
}

/* sweep shimmer */
.show-more-btn::after {
    content: "";
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    z-index: 1;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-18deg);
    transition: left 0.55s var(--mui-ease);
    pointer-events: none;
}

.show-more-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.07);
    border-color: rgba(41, 234, 253, 0.55);
    box-shadow: 0 16px 30px rgba(15, 40, 68, 0.32);
}

.show-more-btn:hover::after { left: 130%; }

.show-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(15, 40, 68, 0.26);
}

.show-more-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

.show-more-btn-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.show-more-icon {
    transition: transform 0.22s var(--mui-ease);
}

.show-more-btn:hover .show-more-icon {
    transform: translateY(3px);
}

.show-more-spinner {
    position: relative;
    z-index: 2;
    color: var(--mui-accent);
    font-size: 1.1rem;
}

/* ---- End-of-list divider ---- */
.show-more-end {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 360px;
}

.show-more-end-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(41, 234, 253, 0.25),
        transparent);
}

.show-more-end-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.38);
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* dark / light theme fallback */
@media (prefers-color-scheme: light) {
    .show-more-end-label { color: rgba(15, 40, 68, 0.38); }
    .show-more-end-line  { background: linear-gradient(90deg, transparent, rgba(15,40,68,0.15), transparent); }
}

.nav-menu a:hover i,
.nav-menu a.active i,
.nav-submenu-toggle:hover i {
    transform: scale(1.12);
    color: var(--mui-accent);
}

.nav-submenu-chevron {
    transition: transform 0.28s var(--mui-ease);
}

.nav-submenu.is-open .nav-submenu-chevron {
    transform: rotate(180deg);
}

.logo-accent {
    transition: text-shadow 0.25s ease, filter 0.25s ease;
}

.logo:hover .logo-accent {
    text-shadow: 0 0 14px rgba(41, 234, 253, 0.6);
    filter: brightness(1.1);
}

/* ------------------------------------------------------------
   9. TOP BAR  — refined chrome controls
   ------------------------------------------------------------ */
.hamburger {
    border-radius: 10px;
    transition: background-color 0.2s ease, transform 0.18s var(--mui-ease);
}

.hamburger:hover {
    background-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.profile-btn,
.top-bar .login-btn {
    transition: transform 0.18s var(--mui-ease), box-shadow 0.2s ease, background-color 0.2s ease;
}

.profile-btn:hover,
.top-bar .login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5, 18, 32, 0.28);
}

.profile-dropdown-menu .dropdown-item {
    border-radius: 8px;
    transition: background-color 0.18s ease, color 0.18s ease, padding-left 0.18s var(--mui-ease);
}

.profile-dropdown-menu .dropdown-item:hover {
    padding-left: 22px;
}

.mobile-bottom-nav-item.active {
    transform: translateY(-2px);
}

/* ------------------------------------------------------------
   10. MOBILE CARGO CARDS  — lift, accent edge, pill chip, entrance
   ------------------------------------------------------------ */
.cargo-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    transition: transform 0.22s var(--mui-ease), box-shadow 0.22s var(--mui-ease), border-color 0.22s ease;
}

.cargo-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--mui-accent), #1b9fd6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s var(--mui-ease);
}

.cargo-card:hover {
    transform: translateY(-3px);
}

.cargo-card:hover::before,
.cargo-card.selected::before {
    transform: scaleX(1);
}

.cargo-card-date-chip {
    border-radius: 999px;
    background: linear-gradient(180deg, #eef4fb 0%, #e3edf8 100%);
    color: #2f4660;
}

.cargo-card .favorite-toggle-btn.is-active i {
    animation: muiStarPop 0.32s var(--mui-ease);
}

@keyframes muiStarPop {
    0%   { transform: scale(0.6); }
    60%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
    .mobile-cargo-cards .cargo-card {
        animation: muiFadeUp 0.45s var(--mui-ease) both;
    }
    .mobile-cargo-cards .cargo-card:nth-child(1) { animation-delay: 0.03s; }
    .mobile-cargo-cards .cargo-card:nth-child(2) { animation-delay: 0.07s; }
    .mobile-cargo-cards .cargo-card:nth-child(3) { animation-delay: 0.11s; }
    .mobile-cargo-cards .cargo-card:nth-child(4) { animation-delay: 0.15s; }
    .mobile-cargo-cards .cargo-card:nth-child(n+5) { animation-delay: 0.19s; }
}

/* ------------------------------------------------------------
   11. FILTER PANEL  — smooth collapse/expand
   The JS already drives body height; this adds the easing +
   clipping so it glides instead of snapping.
   ------------------------------------------------------------ */
.advanced-search-body {
    overflow: hidden;
    transition: height 0.34s var(--mui-ease), opacity 0.26s ease;
    will-change: height;
}

.advanced-search-toggle i {
    transition: transform 0.28s var(--mui-ease);
}

.advanced-search.collapsed .advanced-search-toggle i {
    transform: rotate(-180deg);
}

/* mobile advanced fields fade + slide in when opened */
@media (prefers-reduced-motion: no-preference) {
    .advanced-search-grid.mobile-advanced-fields.is-open {
        animation: muiFadeUp 0.34s var(--mui-ease) both;
    }
}

/* ------------------------------------------------------------
   12. FORMS & PROFILE  — focus accent, staggered fields, polish
   ------------------------------------------------------------ */
.form-group {
    position: relative;
}

/* a cyan underline that grows from center on focus */
.form-group .search-input,
.form-group input,
.form-group textarea,
.form-group .select-input {
    transition: border-color 0.2s ease, box-shadow 0.22s ease, background-color 0.2s ease, transform 0.18s var(--mui-ease);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group .search-input:focus {
    transform: translateY(-1px);
}

/* form section + field entrance */
@media (prefers-reduced-motion: no-preference) {
    .cargo-form .form-group,
    .cargo-form-section {
        animation: muiFadeUp 0.42s var(--mui-ease) both;
    }
    .cargo-form .form-group:nth-child(1) { animation-delay: 0.03s; }
    .cargo-form .form-group:nth-child(2) { animation-delay: 0.06s; }
    .cargo-form .form-group:nth-child(3) { animation-delay: 0.09s; }
    .cargo-form .form-group:nth-child(n+4) { animation-delay: 0.12s; }
}

.cargo-form-section-title i {
    transition: transform 0.22s var(--mui-ease), color 0.2s ease;
}

.cargo-form-section:hover .cargo-form-section-title i {
    transform: scale(1.12);
    color: var(--mui-accent);
}

/* profile page */
.profile-section {
    transition: box-shadow 0.25s var(--mui-ease), transform 0.25s var(--mui-ease);
}

.profile-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--ui-shadow-mid, 0 14px 32px rgba(15, 40, 68, 0.12));
}

.profile-avatar {
    transition: transform 0.25s var(--mui-ease), box-shadow 0.25s ease;
}

.profile-header:hover .profile-avatar {
    transform: scale(1.04);
    box-shadow: 0 0 0 4px var(--mui-accent-soft);
}

/* ------------------------------------------------------------
   13. SKELETON LOADER  — shimmer overlay while results load
   Toggled by .mui-loading (added by modern_ui.js on submit/sort)
   ------------------------------------------------------------ */
.mui-loading {
    position: relative;
    pointer-events: none;
}

.mui-loading > * {
    opacity: 0.35;
    filter: saturate(0.6);
    transition: opacity 0.2s ease;
}

.mui-skeleton-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 56px 16px 16px;
    background: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    border-radius: inherit;
}

.mui-skeleton-row {
    height: 18px;
    border-radius: 8px;
    background: linear-gradient(90deg, #eef2f8 0%, #dde6f2 50%, #eef2f8 100%);
    background-size: 200% 100%;
    animation: muiShimmer 1.2s ease-in-out infinite;
}

.mui-skeleton-row:nth-child(even) { width: 92%; }
.mui-skeleton-row:nth-child(3n)   { width: 78%; }

@keyframes muiShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ------------------------------------------------------------
   14. RADIUS NORMALIZATION  — crisp & modern
   Buttons 10px · cards/panels 12px · inputs 10px
   ------------------------------------------------------------ */
.btn-primary-custom,
.btn-confirm,
.advanced-search-actions .apply-filters-btn,
.advanced-search-actions .clear-filters-btn,
.btn-outline-secondary,
.btn-cancel,
.btn-action,
.cargo-pagination .page-link,
.modal-footer .btn,
.btn-secondary {
    border-radius: 10px;
}

.table-container,
.advanced-search,
.search-toolbar,
.form-card,
.vehicle-list-card,
.profile-section,
.profile-header,
.cargo-card,
.cargo-detail-modal,
.cargo-route-card,
.cargo-command,
.cargo-fact,
.cargo-map-card,
.delete-card,
.support-modal-content,
.modal-content {
    border-radius: 12px;
}

.search-input,
.form-group input,
.form-group textarea,
.form-group .select-input,
.fancy-select-trigger,
.fancy-select-menu {
    border-radius: 10px;
}

/* ------------------------------------------------------------
   15. AUTH CTA FIX  — clean cyan button that pops on the navy
   card, contained shadow (no detached halo), no noisy shine.
   ------------------------------------------------------------ */
.auth-container .btn-primary-custom {
    background: linear-gradient(135deg, #3df0ff 0%, #29eafd 45%, #14c6e0 100%);
    color: #0a2238;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(41, 234, 253, 0.26);
}

.auth-container .btn-primary-custom:hover {
    color: #0a2238;
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 10px 22px rgba(41, 234, 253, 0.32);
    background: linear-gradient(135deg, #3df0ff 0%, #29eafd 45%, #14c6e0 100%);
}

.auth-container .btn-primary-custom:focus-visible {
    outline: none;
    box-shadow: 0 8px 18px rgba(41, 234, 253, 0.26), 0 0 0 3px rgba(255, 255, 255, 0.45);
}

/* kill the top hairline + shine sweep for the auth CTA only */
.auth-container .btn-primary-custom::before,
.auth-container .btn-primary-custom::after {
    display: none;
}

/* ------------------------------------------------------------
   16. CARGO DETAIL MODAL  — clean light redesign, accent route
   ------------------------------------------------------------ */
.cargo-detail-modal {
    border: 0;
    box-shadow: 0 30px 70px rgba(10, 25, 42, 0.34);
}

.cargo-detail-modal .modal-header {
    background: linear-gradient(105deg, #163b66 0%, #0f2844 100%);
    padding: 16px 20px;
}

.cargo-detail-modal .modal-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.cargo-detail-shell {
    gap: 14px;
}

/* route accent banner — single clean navy→deep gradient + cyan glow */
.cargo-route-card {
    background: linear-gradient(135deg, #1a4a7d 0%, #163b66 55%, #0f2844 100%);
    padding: 18px;
}

.cargo-route-card::after {
    display: none;
}

.cargo-route-card::before {
    content: "";
    position: absolute;
    top: -45%;
    right: -8%;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(41, 234, 253, 0.22), transparent 70%);
    pointer-events: none;
}

.route-kicker {
    color: #cdeff7;
}

.route-distance-pill {
    background: rgba(41, 234, 253, 0.14);
    border: 1px solid rgba(41, 234, 253, 0.38);
    border-radius: 10px;
}

.cargo-route-timeline {
    margin-top: 16px;
}

.route-pin {
    background: linear-gradient(135deg, #ffffff 0%, #dff7fb 100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.cargo-route-stop-destination .route-pin {
    color: #0f2844;
}

.cargo-route-connector {
    background: linear-gradient(90deg, rgba(41, 234, 253, 0.45), #29eafd, rgba(41, 234, 253, 0.45));
    box-shadow: 0 0 10px rgba(41, 234, 253, 0.4);
}

/* unify the price/phone strip + facts into one crisp tile system */
.cargo-command,
.cargo-fact {
    background: #ffffff;
    border: 1px solid #e2e9f3;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--mui-ease);
}

.cargo-command:hover,
.cargo-fact:hover {
    border-color: #c3d4e8;
    box-shadow: 0 8px 18px rgba(15, 40, 68, 0.08);
    transform: translateY(-1px);
}

.fact-label {
    color: #6a7c95;
}

.fact-label i {
    color: #2f7fb0;
}

.fact-value {
    font-weight: 650;
    color: #19304d;
}

/* price tile: cyan accent instead of the old green tint */
.cargo-command-price {
    position: relative;
    background: linear-gradient(180deg, #f3fbff 0%, #e8f6ff 100%);
    border-color: #bfe6f5;
    overflow: hidden;
}

.cargo-command-price::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #29eafd, #1b9fd6);
}

.cargo-command-price .fact-value {
    color: #0e5a8a;
}

/* map section */
.cargo-map-card {
    border-color: #e2e9f3;
}

.cargo-map-card-head {
    color: #51647e;
    padding: 13px 16px;
}

.cargo-map-route-link {
    color: var(--topbar-bg);
}

.cargo-map-route-link:hover {
    color: #1b9fd6;
}

.cargo-map-container {
    height: 300px;
    border-top-color: #eef2f8;
}

@media (max-width: 768px) {
    .cargo-route-card {
        padding: 16px;
    }
    .cargo-map-container {
        height: 240px;
    }
}

/* ------------------------------------------------------------
   17. DROPDOWNS  — "Airy dot" direction
   Roomy, calm triggers/menus · soft grey hover · selected row =
   bold text + a small cyan dot · light help tooltip.
   Covers the universal .fancy-select (language switch, every
   filter/form select) and the profile dropdown.
   ------------------------------------------------------------ */

/* trigger: roomy, very-light surface, plain chevron (no chip).
   Scoped to also beat the higher-specificity .advanced-search /
   mobile rules. */
.fancy-select-trigger,
.advanced-search .fancy-select-trigger,
.mobile-primary-filter-card .fancy-select-trigger,
.mobile-advanced-fields .fancy-select-trigger {
    min-height: 48px;
    padding: 12px 14px;
    background: #fbfcfe;
    border: 1px solid #e6ecf4;
    border-radius: 12px;
    color: #1b3656;
    font-weight: 500;
    box-shadow: none;
}

.fancy-select:hover .fancy-select-trigger,
.advanced-search .fancy-select:hover .fancy-select-trigger,
.mobile-primary-filter-card .fancy-select:hover .fancy-select-trigger {
    background: #f5f8fc;
    border-color: #d4dded;
    box-shadow: none;
    transform: none;
}

.fancy-select.is-open .fancy-select-trigger,
.fancy-select-trigger:focus-visible,
.advanced-search .fancy-select.is-open .fancy-select-trigger,
.advanced-search .fancy-select-trigger:focus-visible,
.mobile-primary-filter-card .fancy-select.is-open .fancy-select-trigger {
    background: #ffffff;
    border-color: var(--mui-accent);
    box-shadow: 0 0 0 3px var(--mui-accent-soft);
    transform: none;
}

.fancy-select-chevron {
    color: #9aa7b8;
}

.fancy-select.is-open .fancy-select-chevron {
    color: #1b9fd6;
}

/* menu: roomy, soft, animated entrance */
.fancy-select-menu {
    border-radius: 12px;
    border: 1px solid #eef1f6;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 40, 68, 0.13), 0 2px 8px rgba(15, 40, 68, 0.04);
    padding: 8px;
}

@media (prefers-reduced-motion: no-preference) {
    .fancy-select.is-open .fancy-select-menu,
    .fancy-select-menu.is-open {
        animation: muiSelectIn 0.18s var(--mui-ease);
    }
}

@keyframes muiSelectIn {
    from { opacity: 0; transform: scale(0.98); }
    to   { opacity: 1; transform: scale(1); }
}

/* options: roomy, calm grey hover, NO slide / NO accent bar */
.fancy-select-option {
    min-height: 40px;
    padding: 9px 38px 9px 12px;
    border-radius: 9px;
    font-weight: 500;
    color: #3a4a5e;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fancy-select-option:hover {
    background: #f5f7fa;
    color: #0f2844;
    padding-left: 12px;
}

.fancy-select-option.is-selected {
    background: transparent;
    color: #0f2844;
    font-weight: 600;
}

/* selected indicator = small cyan dot instead of a check */
.fancy-select-option.is-selected::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mui-accent);
    box-shadow: 0 0 8px rgba(41, 234, 253, 0.55);
    right: 14px;
}

/* slim webkit scrollbar inside the menu */
.fancy-select-menu::-webkit-scrollbar {
    width: 8px;
}

.fancy-select-menu::-webkit-scrollbar-thumb {
    background: #d3dce8;
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* compact (language switcher in the top bar) — clean light pill */
.fancy-select.fancy-select-compact .fancy-select-trigger {
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
    background: #ffffff;
    border-color: #d6e0ec;
    color: #1b3656;
}

.fancy-select.fancy-select-compact:hover .fancy-select-trigger {
    background: #ffffff;
    border-color: #aebfd4;
    box-shadow: 0 4px 12px rgba(5, 18, 32, 0.22);
    transform: translateY(-1px);
}

.fancy-select.fancy-select-compact .fancy-select-chevron {
    color: #7f93ab;
}

/* profile dropdown menu — same airy language */
.profile-dropdown-menu {
    border-radius: 12px;
    border: 1px solid #eef1f6;
    box-shadow: 0 16px 36px rgba(15, 40, 68, 0.14), 0 2px 8px rgba(15, 40, 68, 0.04);
    padding: 8px;
}

@media (prefers-reduced-motion: no-preference) {
    .profile-dropdown-menu.show {
        animation: muiSelectIn 0.18s var(--mui-ease);
    }
}

.profile-dropdown-menu .dropdown-item:hover {
    background: #f5f7fa;
    padding-left: 12px;
}

.profile-dropdown-menu .dropdown-header {
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #8194ab;
    padding: 8px 12px 4px;
}

/* ---- option help TOOLTIP — clean light card ---- */
.fancy-select-option-help {
    background: #ffffff;
    color: #1f324b;
    border: 1px solid #e2e9f3;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 12.5px;
    line-height: 1.5;
    max-width: 280px;
    box-shadow: 0 14px 32px rgba(15, 40, 68, 0.18), 0 2px 8px rgba(15, 40, 68, 0.06);
}

/* the "i" info button — quiet circular chip */
.fancy-select-option-info {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f1f4f9;
    border: 1px solid transparent;
    color: #8194ab;
    font-size: 11px;
    font-weight: 700;
}

.fancy-select-option-info:hover,
.fancy-select-option-info:focus-visible {
    background: #e8edf4;
    border-color: #d4dded;
    color: #51647e;
    transform: none;
}

/* ------------------------------------------------------------
   7. MOBILE SIDEBAR NAV - left aligned actions
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .sidebar .nav-menu a,
    .sidebar .nav-submenu-toggle {
        justify-content: flex-start !important;
        gap: 12px;
        padding-left: 24px;
        padding-right: 18px;
        text-align: left;
    }

    .sidebar .nav-menu a i,
    .sidebar .nav-submenu-main i {
        flex: 0 0 22px;
        width: 22px;
        margin-right: 0;
        text-align: center;
    }

    .sidebar .nav-menu a > span,
    .sidebar .nav-submenu-main > span {
        flex: 1 1 auto;
        min-width: 0;
    }

    .sidebar .nav-submenu-toggle {
        justify-content: space-between !important;
    }

    .sidebar .nav-submenu-main {
        flex: 1 1 auto;
        justify-content: flex-start;
        gap: 12px;
    }

    .sidebar .nav-submenu-chevron {
        flex: 0 0 auto;
        margin-left: 12px;
    }
}

/* ------------------------------------------------------------
   8. MOBILE BOTTOM NAV - light expandable pill
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        box-sizing: border-box;
        display: flex;
        align-items: center;
        gap: 6px;
        height: 54px;
        padding: 4px 6px;
        border: 1px solid rgba(167, 186, 209, 0.62);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 12px 28px rgba(5, 18, 32, 0.18);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.22s ease,
                    transform 0.28s var(--mui-ease),
                    box-shadow 0.22s ease;
        will-change: opacity, transform;
    }

    .mobile-bottom-nav.is-hidden {
        opacity: 0;
        pointer-events: none;
        transform: translateY(calc(18px + env(safe-area-inset-bottom)));
        box-shadow: 0 6px 18px rgba(5, 18, 32, 0.12);
    }

    .mobile-bottom-nav-item {
        flex: 0.82 1 0;
        height: 42px;
        min-width: 0;
        flex-direction: row;
        gap: 0;
        padding: 0 8px;
        border-radius: 13px;
        color: #65758a;
        font-size: 12px;
        font-weight: 700;
        overflow: hidden;
        transform: none;
        transition: flex-grow 0.34s var(--mui-ease),
                    gap 0.34s var(--mui-ease),
                    padding 0.34s var(--mui-ease),
                    background-color 0.2s ease,
                    color 0.2s ease,
                    box-shadow 0.2s ease;
    }

    .mobile-bottom-nav-item:hover,
    .mobile-bottom-nav-item:focus {
        color: var(--primary-color);
        background: #f1f6fb;
    }

    .mobile-bottom-nav-item.active {
        flex-grow: 3.15;
        gap: 8px;
        padding-left: 14px;
        padding-right: 14px;
        color: var(--primary-color);
        background: #eef8fb;
        box-shadow: inset 0 0 0 1px rgba(41, 234, 253, 0.48);
        transform: none;
    }

    .mobile-bottom-nav-item:first-child.active {
        flex-grow: 2.95;
        gap: 8px;
        padding-left: 12px;
        padding-right: 14px;
    }

    .mobile-bottom-nav-item:last-child.active {
        flex-grow: 2.95;
        gap: 8px;
        padding-left: 12px;
        padding-right: 14px;
    }

    .mobile-bottom-nav-item:not(:first-child):not(:last-child).active {
        flex-grow: 3.15;
    }

    .mobile-bottom-nav-icon {
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
        font-size: 17px;
    }

    .mobile-bottom-nav-item.active .mobile-bottom-nav-icon {
        color: #0b7080;
    }

    .mobile-bottom-nav-label {
        flex: 1 1 auto;
        min-width: 0;
        display: block;
        max-width: 0;
        opacity: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        transform: translateX(-4px);
        transition: max-width 0.34s var(--mui-ease),
                    opacity 0.2s ease 0.08s,
                    transform 0.34s var(--mui-ease);
    }

    .mobile-bottom-nav-item.active .mobile-bottom-nav-label {
        max-width: 120px;
        opacity: 1;
        transform: translateX(0);
    }

    .mobile-bottom-nav-item:first-child.active .mobile-bottom-nav-label,
    .mobile-bottom-nav-item:last-child.active .mobile-bottom-nav-label {
        max-width: 90px;
    }
}

/* ------------------------------------------------------------
   9. RESPECT REDUCED MOTION
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .btn-primary-custom,
    .btn-confirm,
    .advanced-search-actions .apply-filters-btn,
    .cargo-table tbody tr,
    .vehicle-list-card,
    .form-card,
    .cargo-card,
    .nav-menu a,
    .nav-menu a i,
    .nav-submenu-chevron,
    .profile-btn,
    .top-bar .login-btn,
    .hamburger,
    .cargo-form .form-group,
    .cargo-form-section,
    .profile-section,
    .profile-avatar,
    .mui-skeleton-row,
    .fancy-select-menu,
    .fancy-select.is-open .fancy-select-menu,
    .fancy-select-menu.is-open,
    .fancy-select-option,
    .profile-dropdown-menu.show,
    .mobile-bottom-nav,
    .mobile-bottom-nav-item,
    .mobile-bottom-nav-label {
        transition: none !important;
        animation: none !important;
    }
    .advanced-search-body {
        transition: height 0.01s linear, opacity 0.01s linear;
    }
    .cargo-card:hover,
    .mobile-bottom-nav-item.active,
    .profile-section:hover,
    .cargo-command:hover,
    .cargo-fact:hover {
        transform: none;
    }
    .btn-primary-custom::after,
    .btn-confirm::after,
    .advanced-search-actions .apply-filters-btn::after {
        display: none;
    }
}
