.location-map-card {
    grid-column: 1 / -1;
    margin-top: 18px;
    padding: 16px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.location-map-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.location-map-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.location-map-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: #64748b;
}

.location-distance-badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.location-map-legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 13px;
    color: #334155;
}

.location-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-right: 6px;
}

.location-dot-target {
    background: #16a34a;
}

.location-dot-sent {
    background: #dc2626;
}

.location-compare-map {
    width: 100%;
    height: 360px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}

.location-map-empty {
    padding: 18px;
    color: #64748b;
    font-weight: 700;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px dashed #cbd5e1;
}

.location-point-marker {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
}

.location-point-marker.target {
    background: #16a34a;
}

.location-point-marker.sent {
    background: #dc2626;
}

@media (max-width: 700px) {
    .location-map-header {
        flex-direction: column;
    }

    .location-distance-badge {
        width: fit-content;
    }

    .location-compare-map {
        height: 300px;
    }
}

.detail-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.detail-grid-compact .kv {
    min-height: 58px;
}

.location-map-card {
    grid-column: 1 / -1;
}

.detail-side-card {
    max-height: calc(100vh - 135px);
    overflow: auto;
}

.events-compact .event {
    padding: 12px;
}

.event-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.event-actor {
    margin-top: 6px;
}

.event-status {
    margin-top: 6px;
}

.side-photos-block {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.side-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.side-photos .cap {
    font-size: 12px;
}

@media (max-width: 1250px) {
    .detail-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .side-photos {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 850px) {
    .detail-grid-compact {
        grid-template-columns: 1fr;
    }

    .detail-side-card {
        max-height: none;
        overflow: visible;
    }
}

/* Request detail right panel: ixcham status tarixi */
.events-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.events-compact .event {
    margin: 0;
    min-height: 86px;
    padding: 10px;
}

.events-compact .event-head {
    align-items: flex-start;
}

.events-compact .event-head b {
    font-size: 13px;
    line-height: 1.25;
}

.events-compact .event-head small {
    font-size: 11px;
    white-space: nowrap;
}

.events-compact .event-actor,
.events-compact .event-status {
    font-size: 12px;
    line-height: 1.3;
}

/* Rasmlar kesilmasin */
.side-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.side-photos .photo {
    overflow: hidden;
}

.side-photos .photo img,
.side-photos .photo video {
    width: 100%;
    height: 170px;
    object-fit: contain;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.side-photos .cap {
    padding: 7px 8px;
    font-size: 11px;
    line-height: 1.2;
}

.side-photos .cap .muted {
    font-size: 10px;
}

/* Juda tor ekranda 1 ustunga tushsin */
@media (max-width: 1250px) {
    .events-compact {
        grid-template-columns: 1fr;
    }

    .side-photos {
        grid-template-columns: 1fr;
    }

    .side-photos .photo img,
    .side-photos .photo video {
        height: auto;
        max-height: none;
    }
}

/* Buyurtmalar jadvali — matn yirikroq, kataklar ixchamroq */
.requests-card {
    overflow: hidden;
}

.requests-card .table-wrap {
    width: 100%;
    overflow-x: auto;
}

.requests-table {
    width: 100%;
    min-width: 1040px;
    table-layout: fixed;
    border-collapse: collapse;
}

.requests-table th,
.requests-table td {
    padding: 9px 10px;
    font-size: 14px;
    line-height: 1.28;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.requests-table th {
    font-size: 12.8px;
    font-weight: 1000;
}

.requests-table td {
    font-weight: 700;
    color: #0f172a;
}

.requests-table .center {
    text-align: center;
}

.requests-table .badge {
    max-width: 100%;
    padding: 7px 10px;
    font-size: 12.5px;
    font-weight: 1000;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
}

.requests-table .btn.small {
    padding: 7px 10px;
    font-size: 12.5px;
    white-space: nowrap;
}

.requests-table .filter-mini,
.requests-table .filter-select {
    width: 100%;
    min-width: 0;
    height: 33px;
    padding: 5px 8px;
    font-size: 12.3px;
    font-weight: 800;
    box-sizing: border-box;
}

.requests-table .date-filter {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
}

.requests-table .date-filter-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 5px;
    align-items: center;
    margin: 0;
}

.requests-table .date-filter-line span {
    font-size: 10.8px;
    font-weight: 900;
    color: #475569;
    text-align: left;
    line-height: 1;
    white-space: nowrap;
}

.requests-table .date-filter input {
    height: 28px;
    font-size: 11.2px;
    padding: 4px 5px;
    min-width: 0;
}

.requests-table .filter-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
}

.requests-table .filter-actions .btn {
    width: 100%;
    padding: 6px 6px;
    font-size: 11.8px;
    text-align: center;
}

@media (max-width: 1350px) {
    .requests-table {
        min-width: 1080px;
    }
}

/* Chap menyu ixcham ko‘rinishi */
@media (min-width: 901px) {
    .layout {
        grid-template-columns: 272px 1fr;
    }

    .side {
        padding: 18px 14px;
    }
}

.brand {
    gap: 8px;
    margin: 0 4px 22px;
}

.logo-img {
    width: 116px;
    height: 116px;
    min-width: 116px;
    border-radius: 30px;
}

.brand h1 {
    font-size: 16px;
}

.brand p {
    margin-top: 4px;
    font-size: 12px;
}

.menu-title {
    margin: 0 8px 8px;
    font-size: 10.5px;
}

.nav,
.grouped-nav {
    gap: 7px;
}

.nav a,
.grouped-nav a {
    min-height: 42px;
    padding: 8px 10px;
    gap: 9px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.15;
}

.nav a .ico,
.grouped-nav a .ico {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 11px;
    font-size: 14px;
}

.nav a.active,
.nav a:hover {
    box-shadow: 0 8px 16px rgba(22, 163, 74, 0.18);
}

.nav-separator-title {
    margin: 9px 8px 4px !important;
    padding-top: 8px !important;
    font-size: 9.8px !important;
    letter-spacing: .10em !important;
    line-height: 1.2;
}

/* Status badge matnlari siqilib qolmasin */
.requests-table td .badge {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

/* Buyurtma 3 bosqichli status ko‘rinishi */
.repair-stage-block {
    margin-top: 16px;
    border: 1px solid #d7eadf;
    border-radius: 18px;
    background: #ffffff;
    padding: 14px;
}

.repair-stage-block h3 {
    margin: 0 0 12px;
}

.repair-stage-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.repair-stage-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid #d6e5dc;
    border-radius: 16px;
    background: #f8fafc;
    padding: 12px;
}

.repair-stage-card.done {
    background: #ecfdf3;
    border-color: #86efac;
}

.repair-stage-card.current {
    background: #fff7ed;
    border-color: #fdba74;
}

.repair-stage-card.pending {
    background: #f8fafc;
    border-color: #d6e5dc;
    opacity: .82;
}

.repair-stage-no {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #16a34a;
    color: #fff;
    font-weight: 1000;
}

.repair-stage-card p {
    margin: 5px 0 8px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.repair-stage-label {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 900;
}

.repair-stage-label.done {
    background: #dcfce7;
    color: #166534;
}

.repair-stage-label.current {
    background: #ffedd5;
    color: #9a3412;
}

.repair-stage-label.pending {
    background: #e2e8f0;
    color: #475569;
}

/* Rasmlarni 3 bosqichga ajratish */
.photo-stage-list {
    display: grid;
    gap: 14px;
}

.photo-stage-section {
    border: 1px solid #d7eadf;
    border-radius: 18px;
    padding: 12px;
    background: #ffffff;
}

.photo-stage-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 4px;
}

.photo-stage-head b {
    font-size: 14px;
}

.photo-stage-head span {
    background: #dcfce7;
    color: #166534;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 900;
}

.photo-stage-section p {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

@media (max-width: 980px) {
    .repair-stage-grid {
        grid-template-columns: 1fr;
    }
}