:root {
    --navy: #102a43;
    --navy-2: #183b56;
    --orange: #f97316;
    --orange-dark: #d65f0f;
    --soft: #f5f7fb;
    --line: #d9e2ec;
    --text: #243b53;
}

body {
    background: var(--soft);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--navy-2);
}

.app-navbar {
    background: var(--navy);
    box-shadow: 0 8px 24px rgba(16, 42, 67, 0.16);
    overflow: visible;
    position: sticky;
    top: 0;
    z-index: 1200;
}

.app-navbar .container,
.app-navbar .navbar-collapse,
.app-navbar .navbar-nav,
.app-navbar .dropdown {
    overflow: visible;
}

.app-navbar .dropdown-menu {
    position: absolute;
    z-index: 2200;
}

.admin-header,
.admin-header .dropdown-menu,
.navbar .dropdown-menu {
    z-index: 2200;
}

.brand-mark {
    align-items: center;
    background: var(--orange);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.navbar-logo {
    border-radius: 8px;
    height: 34px;
    object-fit: contain;
    width: auto;
}

.notification-badge {
    align-items: center;
    background: var(--orange);
    border: 2px solid var(--navy);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 700;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 5px;
    position: absolute;
    right: 0;
    top: 2px;
}

.notification-nav .notification-badge {
    right: -8px;
    top: 0;
}

.notification-dropdown {
    max-height: min(76vh, 520px);
    overflow: auto;
    width: min(92vw, 390px);
}

.notification-dropdown-header,
.notification-dropdown-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
}

.notification-dropdown-header {
    border-bottom: 1px solid var(--line);
    color: var(--navy);
}

.notification-dropdown-header span {
    color: var(--orange-dark);
    font-size: 0.82rem;
    font-weight: 750;
}

.notification-dropdown-footer {
    background: #f8fafc;
    border-top: 1px solid var(--line);
}

.notification-dropdown-footer a {
    color: var(--orange-dark);
    font-weight: 750;
    text-decoration: none;
}

.notification-preview {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    white-space: normal;
}

.notification-preview.unread {
    background: #fff7ed;
}

.notification-preview-icon .company-logo,
.notification-preview-icon .company-logo-img {
    flex: 0 0 auto;
    height: 38px;
    width: 38px;
}

.notification-preview-body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.notification-preview-body strong {
    color: var(--navy);
    font-size: 0.92rem;
}

.notification-preview-body span,
.notification-preview-body small {
    color: #627d98;
    font-size: 0.82rem;
}

.btn-orange {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

.btn-orange:hover,
.btn-orange:focus {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
    color: #fff;
}

.btn-outline-orange {
    border-color: var(--orange);
    color: var(--orange-dark);
}

.btn-outline-orange:hover,
.btn-outline-orange:focus {
    background: var(--orange);
    color: #fff;
}

.hero {
    background:
        linear-gradient(110deg, rgba(16, 42, 67, 0.95), rgba(24, 59, 86, 0.82)),
        var(--hero-image, url("../img/hero-logistics.svg")) center/cover;
    color: #fff;
    padding: 72px 0 64px;
}

.hero h1 {
    font-size: 2.4rem;
    letter-spacing: 0;
}

.hero-stat {
    border-left: 3px solid var(--orange);
    padding-left: 16px;
}

.hero-section {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.directory-hero {
    background:
        linear-gradient(110deg, rgba(16, 42, 67, 0.96), rgba(24, 59, 86, 0.78)),
        var(--hero-image, url("../img/hero-logistics.svg")) center/cover;
}

.panel-card,
.listing-card,
.filter-panel,
.auth-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(16, 42, 67, 0.06);
}

.filter-panel {
    margin-top: -34px;
    position: relative;
    z-index: 2;
}

.section-title {
    color: var(--navy);
    font-weight: 750;
}

.listing-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.listing-card:hover {
    box-shadow: 0 14px 34px rgba(16, 42, 67, 0.12);
    transform: translateY(-2px);
}

.route-line {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr auto 1fr;
}

.route-city {
    color: var(--navy);
    font-weight: 750;
    min-width: 0;
    overflow-wrap: anywhere;
}

.route-district {
    color: #627d98;
    font-size: 0.9rem;
}

.route-arrow {
    align-items: center;
    background: #fff2e8;
    border-radius: 999px;
    color: var(--orange-dark);
    display: inline-flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.meta-chip {
    align-items: center;
    background: #eef2f7;
    border-radius: 999px;
    color: #334e68;
    display: inline-flex;
    font-size: 0.88rem;
    gap: 6px;
    padding: 6px 10px;
}

.urgent-chip {
    background: #fff2e8;
    color: var(--orange-dark);
}

.featured-ribbon {
    color: var(--orange-dark);
    font-weight: 700;
}

.sidebar-menu .list-group-item {
    border-color: var(--line);
    color: var(--navy);
}

.sidebar-menu .list-group-item.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.form-label {
    color: var(--navy);
    font-weight: 650;
}

.table thead th {
    background: #eef2f7;
    color: var(--navy);
    white-space: nowrap;
}

.btn-group form {
    display: inline-flex;
}

.site-footer {
    background: var(--navy);
    color: #fff;
}

.footer-logo {
    border-radius: 8px;
    max-height: 42px;
    object-fit: contain;
    width: auto;
}

.footer-links a,
.footer-bottom a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
}

.footer-links a:hover,
.footer-bottom a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.legal-content {
    line-height: 1.75;
    white-space: normal;
}

.empty-state {
    border: 1px dashed #bcccdc;
    border-radius: 8px;
    padding: 28px;
    text-align: center;
}

.share-message {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    max-height: 260px;
    overflow: auto;
    padding: 14px;
    white-space: pre-wrap;
}

.stat-box {
    border-left: 4px solid var(--orange);
}

.detail-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.company-hero {
    background: #fff;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    position: relative;
}

.company-hero.has-cover {
    background: #fff;
}

.company-cover-banner {
    background-position: center;
    background-size: cover;
    height: clamp(150px, 26vw, 280px);
    position: relative;
}

.company-cover-banner::after {
    background: linear-gradient(180deg, rgba(16, 42, 67, 0.04), rgba(16, 42, 67, 0.32));
    content: "";
    inset: 0;
    position: absolute;
}

.company-hero.has-cover .company-hero-content {
    margin-top: -44px;
    position: relative;
    z-index: 1;
}

.company-hero.has-cover .company-hero-content > .d-flex {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(16, 42, 67, 0.12);
    padding: 20px;
}

.company-logo,
.company-logo-xl {
    align-items: center;
    background: var(--navy);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0;
}

.company-logo {
    height: 48px;
    width: 48px;
}

.company-logo-xl {
    font-size: 2rem;
    height: 86px;
    width: 86px;
}

.company-logo-img {
    object-fit: cover;
}

.company-identity {
    min-width: 0;
}

.company-identity-body {
    min-width: 0;
}

.region-chip {
    max-width: min(100%, 720px);
    min-width: 0;
}

.region-chip-text {
    display: inline-block;
    max-width: min(48vw, 560px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

.region-more-btn {
    background: transparent;
    border: 0;
    color: var(--orange-dark);
    font: inherit;
    font-weight: 750;
    padding: 0 0 0 4px;
}

.region-more-btn:hover,
.region-more-btn:focus {
    color: var(--navy);
    text-decoration: underline;
}

.profile-cover-preview {
    aspect-ratio: 4 / 1;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
    object-fit: cover;
    width: 100%;
}

.map-embed {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.map-embed iframe {
    aspect-ratio: 4 / 3;
    display: block;
    height: auto;
    min-height: 260px;
    width: 100%;
}

.verified-badge {
    align-items: center;
    background: #e6f6ec;
    border-radius: 999px;
    color: #197741;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 10px;
}

.social-tabs .nav-link {
    color: var(--navy);
    font-weight: 700;
}

.social-tabs .nav-link.active {
    color: var(--orange-dark);
}

.feed-card,
.company-card,
.notification-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(16, 42, 67, 0.05);
}

.feed-type {
    color: var(--orange-dark);
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
}

.notification-card.unread {
    border-left: 4px solid var(--orange);
}

.mobile-follow-bar {
    background: #fff;
    border-top: 1px solid var(--line);
    bottom: 0;
    box-shadow: 0 -8px 20px rgba(16, 42, 67, 0.12);
    left: 0;
    padding: 10px 16px;
    position: fixed;
    right: 0;
    z-index: 1030;
}

.route-map,
.listing-map {
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 360px;
    overflow: hidden;
    width: 100%;
}

.listing-map {
    min-height: 520px;
}

.map-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.route-marker span {
    border: 3px solid #fff;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(16, 42, 67, 0.25);
    display: block;
    height: 18px;
    width: 18px;
}

.mode-choice {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    padding: 12px;
}

.mode-choice i {
    color: var(--orange-dark);
    font-size: 1.2rem;
}

.service-choice {
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    padding: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-choice:hover,
.service-choice:has(input:checked) {
    border-color: var(--orange);
    box-shadow: 0 10px 24px rgba(240, 127, 31, 0.12);
}

.service-choice input {
    margin-top: 4px;
}

.service-choice small {
    color: var(--muted);
    display: block;
    margin-top: 4px;
}

.quote-fieldset {
    border: 0;
    margin: 0;
    min-inline-size: 0;
    padding: 0;
}

.comparison-table th,
.comparison-table td {
    min-width: 160px;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
    left: 0;
    position: sticky;
    z-index: 1;
}

.comparison-table th:first-child {
    background: #f8fafc;
}

.comparison-table td:first-child {
    background: #fff;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .hero {
        padding: 52px 0 56px;
    }

    .hero h1 {
        font-size: 1.9rem;
    }

    .filter-panel {
        margin-top: -22px;
    }

    .route-line {
        grid-template-columns: 1fr;
    }

    .route-arrow {
        transform: rotate(90deg);
    }

    body {
        padding-bottom: 68px;
    }

    .route-map,
    .listing-map {
        min-height: 320px;
    }

    .company-identity {
        align-items: flex-start !important;
    }

    .region-chip-text {
        max-width: 62vw;
    }
}
