:root {
    --uz-navy: #092452;
    --uz-navy-soft: #113a78;
    --uz-green: #0f8f55;
    --uz-green-dark: #0b6d41;
    --uz-gold: #f2a51a;
    --uz-red: #d83b3b;
    --uz-ink: #172033;
    --uz-muted: #657084;
    --uz-bg: #f3f6fa;
    --uz-panel: #ffffff;
    --uz-border: #d7e0ea;
}

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

a {
    color: var(--uz-navy-soft);
}

a:hover {
    color: var(--uz-green-dark);
}

.navbar {
    background: var(--uz-navy) !important;
    border-bottom: 4px solid var(--uz-green) !important;
}

.navbar .navbar-brand,
.navbar .nav-link {
    color: #fff !important;
}

.navbar .nav-link {
    font-weight: 600;
    opacity: .88;
}

.navbar .nav-link:hover {
    opacity: 1;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding-top: .25rem;
    padding-bottom: .25rem;
    text-decoration: none;
}

.site-logo {
    display: block;
    width: auto;
    height: 52px;
    max-width: 210px;
    object-fit: contain;
}

.site-brand-text {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
}

.navbar-toggler {
    background: #fff;
}

.btn {
    border-radius: 8px;
    font-weight: 700;
}

.btn-success {
    background-color: var(--uz-green);
    border-color: var(--uz-green);
}

.btn-success:hover {
    background-color: var(--uz-green-dark);
    border-color: var(--uz-green-dark);
}

.btn-outline-success {
    color: var(--uz-green-dark);
    border-color: var(--uz-green);
    background: #fff;
}

.btn-outline-success:hover {
    background: var(--uz-green);
    border-color: var(--uz-green);
    color: #fff;
}

.btn-outline-secondary {
    color: var(--uz-navy);
    border-color: var(--uz-border);
    background: #fff;
}

.card {
    background: #fff;
    border: 1px solid #c4d3e3;
    border-top: 4px solid #9fb7d0;
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(9, 36, 82, .09);
    overflow: hidden;
}

.card-body {
    background: #fbfdff;
    padding: 1.2rem;
}

.directory-tools {
    padding: .8rem;
    background: #eef3f7;
    border: 1px solid #dbe5ee;
    border-radius: 8px;
}

.directory-tools .form-label,
.directory-tools .form-check-label {
    color: var(--uz-muted);
    font-size: .78rem;
    font-weight: 800;
}

.directory-tools .form-control,
.directory-tools .form-select {
    min-height: 40px;
    border-color: #cfdbe7;
    border-radius: 8px;
    font-size: .92rem;
}

.directory-tools .btn {
    min-height: 40px;
}

.directory-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    padding: .7rem .9rem;
    background: #f8fbf9;
    border: 1px solid var(--uz-border);
    border-left: 3px solid var(--uz-green);
    border-radius: 8px;
    color: var(--uz-muted);
}

.directory-context-main {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.directory-context-flag {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    background: #eef6f1;
    border: 1px solid #cbe5d6;
    border-radius: 8px;
    font-size: 1.45rem;
    line-height: 1;
}

.directory-context-label {
    color: var(--uz-green-dark);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.directory-context-title {
    color: var(--uz-ink);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.directory-context p {
    font-size: .88rem;
}

.directory-context-symbol {
    color: var(--uz-muted);
    font-size: .8rem;
    font-weight: 500;
}

.country-list-flag {
    display: inline-block;
    margin-right: .3rem;
    width: 1.35em;
    text-align: center;
}

.hero-band {
    background: var(--uz-navy);
    color: #fff;
    border-bottom: 6px solid var(--uz-green);
}

.hero-band .lead,
.hero-band .text-secondary {
    color: #d9e5f3 !important;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .7rem;
    border-radius: 999px;
    background: #fff;
    color: var(--uz-navy);
    font-weight: 800;
    font-size: .85rem;
}

.hero-search {
    max-width: 680px;
}

.hero-search .form-control {
    border: 0;
    min-height: 54px;
}

.hero-search .btn {
    min-width: 58px;
}

.hero-actions .btn-outline-success {
    border-color: #fff;
    color: #fff;
    background: transparent;
}

.hero-actions .btn-outline-success:hover {
    background: #fff;
    color: var(--uz-navy);
}

.community-map {
    width: 100%;
    min-height: 430px;
    border: 4px solid #fff;
    border-radius: 8px;
    background: #dce8f3;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
}

.map-fallback {
    min-height: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: 2rem;
    text-align: center;
    color: var(--uz-muted);
    background: #fff;
}

.map-fallback i {
    font-size: 2rem;
    color: var(--uz-green);
}

.map-fallback strong {
    color: var(--uz-ink);
}

.section-panel {
    background: var(--uz-panel);
    border-top: 1px solid var(--uz-border);
    border-bottom: 1px solid var(--uz-border);
}

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

.category-tile {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 64px;
    padding: .9rem;
    border: 1px solid var(--uz-border);
    border-left: 5px solid var(--uz-green);
    border-radius: 8px;
    text-decoration: none;
    background: #fff;
    color: var(--uz-ink);
}

.category-tile:hover {
    border-color: var(--uz-green);
    transform: translateY(-1px);
}

.category-tile i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--uz-navy);
    color: #fff;
    font-size: 1.1rem;
}

.category-tile span {
    flex: 1;
    font-weight: 800;
}

.category-tile small {
    min-width: 30px;
    text-align: center;
    border-radius: 999px;
    padding: .2rem .4rem;
    background: #eaf7f0;
    color: var(--uz-green-dark);
    font-weight: 800;
}

.listing-card {
    border: 1px solid #cbd8e6;
    border-top: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(9, 36, 82, .11);
}

.listing-card-media {
    position: relative;
    min-height: 168px;
    overflow: hidden;
    background: var(--uz-navy);
}

.listing-card-media img,
.listing-card-media-fallback {
    width: 100%;
    height: 168px;
}

.listing-card-media img {
    display: block;
    object-fit: cover;
}

.listing-card-media-fallback {
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(9, 36, 82, .92), rgba(15, 143, 85, .78)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 18px);
    color: #fff;
    font-size: 3rem;
}

.listing-card-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 36, 82, .1), rgba(9, 36, 82, .62));
}

.listing-category-badge,
.listing-verified-badge {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 800;
}

.listing-category-badge {
    left: 1rem;
    bottom: .9rem;
    padding: .55rem .8rem;
    background: var(--uz-green);
    color: #fff;
    box-shadow: 0 8px 18px rgba(9, 36, 82, .22);
}

.listing-verified-badge {
    top: .8rem;
    right: .8rem;
    padding: .45rem .65rem;
    background: rgba(255, 255, 255, .94);
    color: var(--uz-green-dark);
}

.listing-card .card-body {
    padding: 1rem;
}

.listing-card h3 {
    color: var(--uz-navy);
    font-size: 1.02rem;
    font-weight: 800;
}

.listing-card p {
    color: #2b3548;
    line-height: 1.45;
}

.listing-logo,
.profile-logo {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    border: 1px solid var(--uz-border);
    display: grid;
    place-items: center;
    background: var(--uz-navy);
    color: #fff;
    flex: 0 0 auto;
    overflow: hidden;
}

.listing-logo img,
.profile-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-actions {
    padding-top: .35rem;
    border-top: 1px solid #edf1f5;
}

.listing-actions .btn {
    font-size: .8rem;
}

.directory-pagination .pagination {
    justify-content: center;
    gap: .25rem;
}

.directory-pagination .page-link {
    color: var(--uz-muted);
    background: transparent;
    border-color: #dbe5ee;
    border-radius: 8px;
    font-weight: 700;
}

.directory-pagination .page-item.active .page-link {
    background: var(--uz-navy);
    border-color: var(--uz-navy);
    color: #fff;
}

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

.contact-panel,
.metric,
.location-picker {
    border: 1px solid #cbd8e6;
    border-top: 3px solid #b7c9dc;
    border-radius: 8px;
    padding: 1rem;
    background: #fbfdff;
    box-shadow: 0 10px 24px rgba(9, 36, 82, .07);
}

.profile-map {
    width: 100%;
    min-height: 320px;
    border: 1px solid var(--uz-border);
    border-radius: 8px;
}

.rating-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
}

.rating-stars {
    color: var(--uz-gold);
    letter-spacing: 0;
    white-space: nowrap;
}

.rating-stars-empty {
    color: #aeb9c8;
}

.review-form,
.review-card {
    background: #fbfdff;
    border: 1px solid #cbd8e6;
    border-top: 3px solid #b7c9dc;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(9, 36, 82, .06);
}

.rating-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: .2rem;
}

.rating-input input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating-input label {
    color: #c9d2df;
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
    color: var(--uz-gold);
}

.listing-location-map {
    width: 100%;
    min-height: 360px;
    border: 1px solid var(--uz-border);
    border-radius: 8px;
    background: #dce8f3;
}

.auth-box,
.narrow-content {
    max-width: 620px;
}

.metric span {
    display: block;
    color: var(--uz-navy);
    font-size: 2rem;
    font-weight: 800;
}

.metric small {
    color: var(--uz-muted);
    font-weight: 700;
}

.admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.admin-links a {
    border: 1px solid var(--uz-border);
    border-radius: 8px;
    padding: .6rem .85rem;
    text-decoration: none;
    background: #fff;
    font-weight: 700;
}

.list-group-item.active,
.list-group-item:first-child {
    background: var(--uz-navy);
    color: #fff;
    border-color: var(--uz-navy);
    font-weight: 800;
}

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

footer {
    background: var(--uz-navy) !important;
    color: #d9e5f3;
    border-top: 0 !important;
}

footer a {
    color: #fff;
}

@media (max-width: 767.98px) {
    .hero-band {
        padding-top: 2rem !important;
    }

    .community-map {
        min-height: 360px;
        box-shadow: none;
    }

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

    .display-5 {
        font-size: 2.1rem;
    }

    .site-logo {
        height: 44px;
        max-width: 170px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .directory-context {
        align-items: stretch;
        flex-direction: column;
    }

    .directory-context-main {
        align-items: flex-start;
    }

    .directory-context-flag {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }
}
