@scope (.admin-shell) {
.admin-shell {
    padding: 28px 24px 48px;
}

.admin-header,
.admin-detail-head,
.admin-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-header {
    margin-bottom: 22px;
}

.admin-detail {
    display: grid;
    gap: 16px;
}

.admin-overview {
    display: grid;
    gap: 16px;
}

.admin-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--color-border);
}

.admin-tab {
    appearance: none;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #686870;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 12px 14px 10px;
}

.admin-tab.active {
    border-bottom-color: var(--color-primary);
    color: var(--color-primary);
}

.admin-tab:hover,
.admin-tab:focus-visible {
    color: var(--color-primary);
}

.admin-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.admin-project-title {
    font-weight: 700;
    color: var(--color-ink);
}

.admin-muted {
    color: #6b6b75;
    font-size: 0.82rem;
}

.price-field-hidden {
    display: none !important;
}

.admin-actions {
    text-align: right;
    white-space: nowrap;
}

.admin-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.admin-list-filter {
    width: min(280px, 100%);
}

.admin-list-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-list-search {
    width: min(320px, 100%);
}

.admin-request-panel {
    display: grid;
    grid-template-columns: minmax(160px, 0.8fr) minmax(220px, 1fr) minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin: 10px 0 16px;
    padding: 12px;
    border: 1px solid rgba(13, 13, 13, 0.08);
    border-radius: 8px;
    background: #f7f7f8;
}

.admin-select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(13, 13, 13, 0.18);
    border-radius: 8px;
    background: #fff;
    color: #26262c;
    font: 700 0.88rem var(--font-body);
}

.admin-user-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr);
    gap: 12px;
    margin-top: 14px;
}

.admin-option-block {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.admin-option-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(13, 13, 13, 0.12);
    border-radius: 8px;
    background: #f7f7f8;
    color: #26262c;
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
}

.admin-option input {
    accent-color: var(--color-primary);
}

.admin-user-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.market-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
    padding: 28px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(119, 100, 197, 0.1), rgba(224, 65, 70, 0.08)),
        var(--color-neutral-0);
    box-shadow: var(--shadow-card);
}

.hero-copy {
    max-width: 740px;
}

.brand-kicker {
    color: var(--color-secondary);
    font-weight: 700;
}

.hero-title {
    margin-top: 4px;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.hero-subtitle {
    max-width: 620px;
    color: #57575f;
    line-height: 1.5;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(96px, 1fr));
    gap: 10px;
    min-width: 340px;
}

.metric-tile {
    padding: 14px 16px;
    border: 1px solid rgba(13, 13, 13, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
}

.metric-tile span {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 700;
}

.metric-tile small {
    color: #686870;
    font-weight: 600;
}

.market-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-neutral-0);
    box-shadow: var(--shadow-card);
}

.view-switch {
    display: inline-grid;
    grid-auto-flow: column;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(13, 13, 13, 0.08);
    border-radius: 8px;
    background: #f7f7f8;
}

.view-switch button {
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #4a4a52;
    font: 700 0.9rem var(--font-body);
    cursor: pointer;
}

.view-switch button.active {
    background: var(--color-accent);
    color: #fff;
    box-shadow: var(--shadow-card);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.filter-row > * {
    min-width: 0;
}

.filter-row > .mud-input-control {
    flex: 1 1 180px;
    max-width: 220px;
}

.trade-filter,
.region-filter {
    display: flex;
    flex: 1 1 250px;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 210px;
}

.region-filter {
    flex: 0 1 260px;
}

.trade-filter button,
.region-filter button {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(13, 13, 13, 0.12);
    border-radius: 999px;
    background: #fff;
    color: #3c3c43;
    font: 700 0.86rem var(--font-body);
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.trade-filter button:hover,
.region-filter button:hover {
    border-color: rgba(119, 100, 197, 0.42);
    transform: translateY(-1px);
}

.trade-filter button.active,
.region-filter button.active {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #fff;
    box-shadow: var(--shadow-card);
}

.scheduled-filter {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(13, 13, 13, 0.12);
    border-radius: 8px;
    background: #fff;
    color: #3c3c43;
    font: 800 0.86rem var(--font-body);
    white-space: nowrap;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.scheduled-filter:hover {
    border-color: rgba(119, 100, 197, 0.42);
    transform: translateY(-1px);
}

.scheduled-filter.active {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #fff;
    box-shadow: var(--shadow-card);
}

.assigned-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    color: #3c3c43;
    font: 700 0.84rem var(--font-body);
    cursor: pointer;
    white-space: nowrap;
}

.assigned-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
}

.filter-actions {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.radius-filter {
    display: grid;
    flex: 0 1 180px;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 0 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
}

.radius-filter span {
    color: #3c3c43;
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
}

.refresh-button {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.muted {
    color: #6e6e76;
}

.market-grid {
    display: grid;
    grid-template-columns: minmax(440px, 0.86fr) minmax(520px, 1.14fr);
    gap: 20px;
    margin-top: 22px;
    min-height: 0;
    overflow: hidden;
    flex: 1 1 auto;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
}

.project-card {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    flex: 0 0 auto;
    min-height: 0;
    padding: 14px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.project-card:hover {
    border-color: rgba(119, 100, 197, 0.45);
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.detail-cover,
.photo-thumb {
    background-color: #ececf2;
    background-position: center;
    background-size: cover;
}

.project-card-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(119, 100, 197, 0.18);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(119, 100, 197, 0.16), rgba(224, 65, 70, 0.12)),
        #f0f0f4;
    color: var(--color-primary);
}

.project-card-icon .mud-icon-root {
    font-size: 1.7rem;
}

.project-body {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.project-card-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trade-pill,
.state-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
}

.trade-pill {
    color: #fff;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.state-pill.success {
    color: var(--color-success);
    border: 1px solid rgba(103,92,191,0.26);
    background: rgba(103,92,191,0.08);
}

.state-pill.assigned {
    color: #9a3412;
    border: 1px solid rgba(154, 52, 18, 0.24);
    background: #fff7ed;
}

.state-pill.warning {
    color: #8a5a00;
    border: 1px solid rgba(242, 153, 74, 0.3);
    background: rgba(242, 153, 74, 0.12);
}

.project-title,
.detail-title {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.22;
}

.project-title {
    font-size: 1.02rem !important;
    overflow-wrap: anywhere;
}

.location-line,
.project-meta-line {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: #4f4f58;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
}

.location-line .mud-icon-root,
.project-meta-line .mud-icon-root {
    flex: 0 0 auto;
    margin-top: 1px;
}

.location-line span,
.project-meta-line span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.trade-status-line {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: #9a3412;
    width: 100%;
    padding: 7px 9px;
    border-radius: 8px;
    background: #fff7ed;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.3;
}

.trade-status-line .mud-icon-root {
    flex: 0 0 auto;
    margin-top: 1px;
}

.bid-line {
    color: var(--color-primary);
    font-size: 0.84rem;
    font-weight: 800;
}

.card-action-row {
    display: flex;
    align-items: center;
    align-self: end;
    justify-content: flex-end;
    gap: 4px;
    color: var(--color-accent);
    font-size: 0.86rem;
    font-weight: 800;
}

.map-panel {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    contain: layout paint;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.map-panel-header {
    position: absolute;
    top: 14px;
    left: 58px;
    right: 14px;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid rgba(13, 13, 13, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
}

.map-panel-header strong {
    display: block;
    font-family: var(--font-heading);
}

.map-panel-header span {
    color: #696970;
    font-size: 0.82rem;
    font-weight: 700;
}

#project-map {
    width: 100%;
    height: 100%;
    overflow: hidden;
    contain: paint;
}

.leaflet-container {
    max-width: 100%;
    overflow: hidden;
}

.portal-loading {
    display: grid;
    grid-template-columns: minmax(440px, 0.86fr) minmax(520px, 1.14fr);
    gap: 20px;
    margin-top: 22px;
    min-height: 0;
    flex: 1 1 auto;
}

.skeleton-stack {
    display: grid;
    align-content: start;
    gap: 12px;
    overflow: hidden;
    min-height: 0;
}

.skeleton-card {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    min-height: 132px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.skeleton-card > div,
.skeleton-card span,
.skeleton-card strong,
.skeleton-card p {
    position: relative;
    overflow: hidden;
    background: #ececf2;
}

.skeleton-card > div::after,
.skeleton-card span::after,
.skeleton-card strong::after,
.skeleton-card p::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    animation: skeleton-shimmer 1.45s infinite;
}

.skeleton-card section {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 0;
}

.skeleton-card span {
    width: 96px;
    height: 24px;
    border-radius: 999px;
}

.skeleton-card strong {
    width: min(100%, 330px);
    height: 24px;
    border-radius: 6px;
}

.skeleton-card p {
    width: min(82%, 260px);
    height: 14px;
    margin: 0;
    border-radius: 999px;
}

.skeleton-card p:last-child {
    width: min(64%, 210px);
}

.skeleton-map {
    min-height: 520px;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(119, 100, 197, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(119, 100, 197, 0.08) 1px, transparent 1px),
        #eee9f6;
    background-size: 54px 54px;
    box-shadow: var(--shadow-card);
}

.skeleton-map::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
    animation: skeleton-scan 1.8s ease-in-out infinite;
}

.skeleton-map-header {
    position: absolute;
    top: 14px;
    left: 58px;
    right: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-card);
}

.skeleton-map-header section {
    display: grid;
    gap: 8px;
}

.skeleton-map-header strong,
.skeleton-map-header span,
.skeleton-map-header i {
    display: block;
    position: relative;
    overflow: hidden;
    background: #dfe1e7;
}

.skeleton-map-header strong {
    width: 92px;
    height: 18px;
    border-radius: 5px;
}

.skeleton-map-header span {
    width: 128px;
    height: 12px;
    border-radius: 999px;
}

.skeleton-map-header i {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.skeleton-map-grid {
    position: absolute;
    inset: 96px 34px 40px;
    border: 2px solid rgba(119, 100, 197, 0.18);
    border-radius: 50%;
}

.skeleton-radius {
    position: absolute;
    left: 28%;
    bottom: 16%;
    width: 42%;
    aspect-ratio: 1;
    border: 2px solid rgba(119, 100, 197, 0.32);
    border-radius: 50%;
    background: rgba(119, 100, 197, 0.08);
}

.skeleton-pin {
    position: absolute;
    z-index: 1;
    width: 18px;
    height: 18px;
    border-radius: 50% 50% 50% 0;
    background: var(--color-primary);
    box-shadow: 0 8px 16px rgba(13, 13, 13, 0.22);
    transform: rotate(-45deg);
}

.skeleton-pin::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

.pin-one {
    left: 30%;
    top: 52%;
}

.pin-two {
    left: 54%;
    top: 43%;
}

.pin-three {
    right: 22%;
    top: 60%;
}

@keyframes skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

@keyframes skeleton-scan {
    100% {
        transform: translateX(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-card > div::after,
    .skeleton-card span::after,
    .skeleton-card strong::after,
    .skeleton-card p::after,
    .skeleton-map::after {
        animation: none;
    }
}

.loading-row,
.empty-state {
    display: grid;
    place-items: center;
    min-height: 260px;
}

.empty-state {
    gap: 12px;
    padding: 36px 24px;
    border: 1px dashed rgba(13, 13, 13, 0.18);
    border-radius: 8px;
    background: #fff;
    color: #5b5b64;
    text-align: center;
}

.empty-state .mud-icon-root {
    width: 48px;
    height: 48px;
    padding: 10px;
    border-radius: 999px;
    color: var(--color-primary);
    background: rgba(119, 100, 197, 0.1);
}

.empty-state strong {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-accent);
}

.empty-state span {
    max-width: 320px;
    line-height: 1.45;
}

.detail-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1990;
    background: rgba(13, 13, 13, 0.34);
    backdrop-filter: blur(4px);
}

.detail-map-panel {
    position: fixed;
    top: 96px;
    right: 544px;
    bottom: 24px;
    left: 24px;
    z-index: 2000;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-card);
    contain: layout paint;
}

.detail-map-head {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(13, 13, 13, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
}

.detail-map-head strong,
.detail-map-head span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-map-head strong {
    font-family: var(--font-heading);
}

.detail-map-head span {
    margin-top: 2px;
    color: #696970;
    font-size: 0.82rem;
    font-weight: 700;
}

.detail-project-map {
    width: 100%;
    height: 100%;
    overflow: hidden;
    contain: paint;
}

.detail-inline-map {
    display: none;
}

.focus-map-marker span {
    position: relative;
    display: block;
    width: 28px;
    height: 28px;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: #e04146;
    box-shadow: 0 8px 18px rgba(13, 13, 13, 0.28);
    transform: rotate(-45deg);
}

.focus-map-marker span::after {
    content: "";
    position: absolute;
    top: 7px;
    left: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

.detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 2000;
    width: min(520px, 100vw);
    height: 100dvh;
    overflow-y: auto;
    background: #fff;
    box-shadow: -18px 0 44px rgba(13, 13, 13, 0.22);
}

.detail-cover {
    position: relative;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 16px 70px 16px 24px;
    background:
        linear-gradient(135deg, rgba(119, 100, 197, 0.16), rgba(224, 65, 70, 0.12)),
        #f0f0f4;
}

.detail-title-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.detail-title-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(119, 100, 197, 0.2);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(119, 100, 197, 0.16), rgba(224, 65, 70, 0.12)),
        #f0f0f4;
    color: var(--color-primary);
}

.detail-title-icon .mud-icon-root {
    font-size: 1.55rem;
}

.detail-cover-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

.detail-close {
    position: absolute;
    z-index: 2;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(13, 13, 13, 0.08);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: var(--shadow-card);
}

.detail-content {
    padding: 24px;
}

.detail-trade-status {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(234, 88, 12, 0.22);
    border-radius: 8px;
    background: #fff7ed;
    color: #7c2d12;
}

.contact-panel,
.request-response-panel {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid rgba(13, 13, 13, 0.1);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.contact-panel {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.contact-panel span {
    display: block;
    margin-bottom: 3px;
    color: var(--color-secondary);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.contact-panel strong,
.contact-panel small {
    display: block;
}

.contact-panel strong {
    color: var(--color-accent);
    font-family: var(--font-heading);
    line-height: 1.2;
}

.contact-panel small {
    margin-top: 4px;
    color: #5f5f68;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
}

.customer-contact {
    background: #faf9fc;
}

.request-response-panel {
    display: grid;
    gap: 12px;
}

.request-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.image-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 20px;
}

.photo-thumb {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(13, 13, 13, 0.08);
    background-color: #ececf2;
    background-position: center;
    background-size: cover;
    color: var(--color-primary);
    cursor: zoom-in;
}

.photo-thumb:disabled {
    cursor: default;
    opacity: 0.74;
}

.photo-thumb:not(:disabled):hover {
    border-color: rgba(119, 100, 197, 0.54);
    box-shadow: var(--shadow-hover);
}

.detail-empty-images {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 126px;
    margin-top: 20px;
    border: 1px dashed rgba(13, 13, 13, 0.18);
    border-radius: 8px;
    background: #f7f7f8;
    color: #686870;
    text-align: center;
    font-weight: 700;
}

.detail-image-loading {
    display: flex;
    justify-content: center;
    padding-top: 10px;
}

.authentication-shell {
    display: grid;
    min-height: calc(100vh - 72px);
    place-items: center;
    padding: 32px 20px;
    background:
        radial-gradient(circle at 15% 20%, rgba(119, 100, 197, 0.18), transparent 30%),
        radial-gradient(circle at 85% 75%, rgba(224, 65, 70, 0.14), transparent 32%),
        #f7f7f8;
}

.authentication-card {
    display: grid;
    justify-items: center;
    width: min(100%, 410px);
    gap: 16px;
    padding: 42px 36px;
    border: 1px solid rgba(13, 13, 13, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 72px rgba(30, 30, 46, 0.14);
    text-align: center;
}

.authentication-logo {
    width: 142px;
    height: auto;
    margin-bottom: 6px;
}

.authentication-spinner {
    width: 38px;
    height: 38px;
    border: 4px solid rgba(119, 100, 197, 0.18);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: authentication-spin 0.8s linear infinite;
}

.authentication-card h1 {
    margin: 2px 0 0;
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.authentication-card p {
    max-width: 280px;
    margin: 0;
    color: var(--color-secondary);
    font-weight: 600;
    line-height: 1.5;
}

.authentication-retry-hint {
    margin-top: -2px;
    color: var(--color-secondary);
    font-weight: 600;
}

@keyframes authentication-spin {
    to {
        transform: rotate(360deg);
    }
}

.oiltank-details-panel {
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid rgba(13, 13, 13, 0.1);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.oiltank-details-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.14), rgba(250, 204, 21, 0.12));
    color: #9a3412;
}

.oiltank-details-head span,
.oiltank-details-head strong {
    display: block;
}

.oiltank-details-head span {
    margin-bottom: 4px;
    color: var(--color-secondary);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.oiltank-details-head strong {
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: 1.02rem;
    line-height: 1.2;
}

.oiltank-answer-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 14px 16px 16px;
}

.oiltank-answer-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(13, 13, 13, 0.08);
    border-radius: 8px;
    background: #fafafa;
}

.oiltank-answer-list dt {
    color: #5f5f68;
    font-size: 0.84rem;
    font-weight: 800;
}

.oiltank-answer-list dd {
    margin: 0;
    color: var(--color-accent);
    font-weight: 800;
    overflow-wrap: anywhere;
    text-align: right;
}

.hero-ab-panel {
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid rgba(13, 13, 13, 0.1);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.hero-ab-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(119, 100, 197, 0.12), rgba(224, 65, 70, 0.08));
}

.hero-ab-head span {
    display: block;
    margin-bottom: 4px;
    color: var(--color-secondary);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-ab-head strong {
    display: block;
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: 1.02rem;
    line-height: 1.2;
}

.hero-ab-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 0;
}

.hero-ab-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #f3f3f6;
    color: #555560;
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-ab-lines {
    display: grid;
    gap: 8px;
    padding: 14px 16px 16px;
}

.hero-ab-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border: 1px solid rgba(13, 13, 13, 0.08);
    border-radius: 8px;
    background: #fafafa;
}

.hero-ab-line strong,
.hero-ab-line span,
.hero-ab-line small {
    display: block;
}

.hero-ab-line strong {
    color: var(--color-accent);
    font-weight: 900;
    line-height: 1.25;
}

.hero-ab-line span {
    margin-top: 4px;
    color: #5f5f68;
    font-size: 0.86rem;
    line-height: 1.35;
}

.hero-ab-line .hero-ab-html {
    display: block;
}

.hero-ab-line .hero-ab-placeholder {
    color: #7b6f5f;
    font-style: italic;
}

.hero-ab-html p,
.hero-ab-html div {
    margin: 0 0 7px;
}

.hero-ab-html p:last-child,
.hero-ab-html div:last-child,
.hero-ab-html ul:last-child,
.hero-ab-html ol:last-child {
    margin-bottom: 0;
}

.hero-ab-html ul,
.hero-ab-html ol {
    margin: 7px 0 0;
    padding-left: 18px;
}

.hero-ab-html li {
    margin: 4px 0;
}

.hero-ab-line small {
    margin-top: 6px;
    color: #787882;
    font-size: 0.76rem;
    font-weight: 800;
}

.hero-ab-line em {
    padding: 5px 8px;
    border-radius: 999px;
    background: #fff;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.hero-ab-empty {
    padding: 14px 16px 16px;
    color: #6e6e76;
    font-weight: 700;
}

.photo-viewer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2090;
    background: rgba(13, 13, 13, 0.78);
    backdrop-filter: blur(6px);
}

.photo-viewer {
    position: fixed;
    inset: 28px;
    z-index: 2100;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: center;
    gap: 14px;
}

.photo-viewer img {
    max-width: 100%;
    max-height: calc(100dvh - 112px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
}

.photo-viewer-caption {
    max-width: min(780px, 84vw);
    padding: 8px 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--color-accent);
    font-size: 0.84rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-viewer-loading {
    display: grid;
    place-items: center;
    width: min(720px, 86vw);
    height: min(520px, 68dvh);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.photo-viewer-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: var(--shadow-card);
}

.photo-viewer-nav {
    position: absolute;
    top: 50%;
    width: 52px;
    height: 52px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: var(--shadow-card);
}

.photo-viewer-nav.previous {
    left: 0;
}

.photo-viewer-nav.next {
    right: 0;
}

.photo-viewer-nav:disabled {
    opacity: 0.34;
}

.onboarding-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2190;
    background: rgba(13, 13, 13, 0.42);
    backdrop-filter: blur(4px);
}

.onboarding-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 2200;
    width: min(560px, calc(100vw - 32px));
    padding: 28px;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 28px 72px rgba(13, 13, 13, 0.22);
}

.onboarding-close {
    position: absolute;
    top: 12px;
    right: 12px;
}

.onboarding-title {
    max-width: 420px;
    margin: 8px 0 6px !important;
    color: var(--color-accent);
    font-weight: 900 !important;
}

.onboarding-subtitle {
    margin: 2px 0 0 !important;
    color: var(--color-accent);
    font-size: 1rem !important;
    font-weight: 850 !important;
}

.onboarding-bubbles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.region-bubbles {
    margin-top: 14px;
}

.onboarding-bubbles button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 74px;
    padding: 14px 16px;
    border: 1px solid rgba(13, 13, 13, 0.12);
    border-radius: 8px;
    background: #fff;
    color: var(--color-accent);
    font-weight: 850;
    text-align: left;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.onboarding-bubbles button:hover,
.onboarding-bubbles button.active {
    border-color: var(--color-primary);
    box-shadow: 0 12px 28px rgba(103,92,191,0.14);
    transform: translateY(-1px);
}

.onboarding-bubbles button.active {
    background: linear-gradient(135deg, rgba(103,92,191,0.11), rgba(233, 66, 122, 0.1));
}

.primary-action,
.secondary-action {
    min-height: 44px;
    border-radius: 8px !important;
    font-weight: 800 !important;
    text-transform: none !important;
}

.primary-action {
    color: #fff !important;
    background: var(--color-accent) !important;
}

.primary-action:hover {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)) !important;
    box-shadow: var(--shadow-hover);
}

.secondary-action {
    color: var(--color-accent) !important;
    border-color: var(--color-accent) !important;
}

.interest-action-active {
    color: #fff !important;
    border-color: var(--color-success) !important;
    background: var(--color-success) !important;
}

.interest-action-active:hover {
    background: #675cbf !important;
    box-shadow: var(--shadow-hover);
}

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fff3cd;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

@media (max-width: 980px) {
    .market-shell {
        height: auto;
        min-height: 0;
        display: block;
        overflow: visible;
    }

    .market-hero,
    .market-controls {
        align-items: stretch;
        flex-direction: column;
    }

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

    .filter-row {
        grid-template-columns: 1fr;
    }

    .admin-user-form {
        grid-template-columns: 1fr;
    }

    .admin-user-actions {
        justify-content: flex-start;
    }

    .portal-loading {
        grid-template-columns: 1fr;
    }

    .photo-viewer {
        inset: 16px;
    }

    .photo-viewer-nav {
        width: 46px;
        height: 46px;
    }

    .refresh-button {
        justify-self: start;
    }

    .market-grid {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .map-panel,
    .skeleton-map {
        position: static;
        height: 420px;
        min-height: 420px;
    }
}

@media (max-width: 620px) {
    .topbar {
        height: 60px;
    }

    .mud-main-content {
        padding-top: 60px !important;
    }

    .brand-logo {
        width: 118px;
    }

    .brand-copy {
        display: none;
    }

    .mud-main-content,
    .market-shell {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .market-shell {
        padding: 20px 14px 24px;
    }

    .market-hero {
        gap: 16px;
        padding: 18px;
        overflow: hidden;
    }

    .hero-copy {
        max-width: 100%;
        min-width: 0;
    }

    .brand-kicker {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .hero-title {
        font-size: 1.85rem !important;
        line-height: 1.08;
    }

    .hero-subtitle {
        font-size: 0.92rem !important;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .hero-metrics,
    .view-switch {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-flow: column;
    }

    .filter-row > * {
        width: 100%;
        min-width: 0;
    }

    .market-controls {
        padding: 12px;
        overflow: hidden;
    }

    .view-switch {
        width: 100%;
    }

    .view-switch button {
        padding: 0 10px;
        white-space: normal;
    }

    .trade-filter,
    .region-filter {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trade-filter button,
    .region-filter button {
        width: 100%;
        padding: 0 10px;
        justify-content: center;
    }

    .project-list {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .project-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .project-card-icon {
        width: 48px;
        height: 48px;
    }

    .map-panel {
        height: 320px;
        min-height: 320px;
    }

    .map-panel-header {
        left: 54px;
        right: 10px;
        padding: 10px;
    }

    .detail-panel {
        inset: 0;
        width: 100vw;
        max-width: none;
        height: 100dvh;
        box-shadow: none;
    }

    .detail-map-panel {
        display: none;
    }

    .detail-inline-map {
        position: relative;
        display: block;
        height: 240px;
        margin-top: 16px;
        overflow: hidden;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: #fff;
    }

    .detail-inline-map .detail-map-head {
        top: 10px;
        left: 10px;
        right: 10px;
        padding: 10px;
    }

    .detail-cover {
        height: 68px;
        padding: 14px 58px 14px 16px;
    }

    .detail-title-row {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 10px;
    }

    .detail-title-icon {
        width: 44px;
        height: 44px;
    }

    .detail-title-icon .mud-icon-root {
        font-size: 1.45rem;
    }

    .detail-close {
        position: fixed;
        top: 10px;
        right: 10px;
    }

    .detail-content {
        padding: 18px 16px 24px;
    }

    .detail-title {
        font-size: 1.45rem !important;
        overflow-wrap: anywhere;
    }

    .detail-trade-status {
        padding: 10px;
    }

    .hero-ab-head,
    .hero-ab-lines {
        padding-right: 12px;
        padding-left: 12px;
    }

    .oiltank-details-head,
    .oiltank-answer-list {
        padding-right: 12px;
        padding-left: 12px;
    }

    .oiltank-answer-list > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .oiltank-answer-list dd {
        text-align: left;
    }

    .hero-ab-meta {
        padding-right: 12px;
        padding-left: 12px;
    }

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

    .hero-ab-line em {
        width: fit-content;
    }

    .image-strip {
        display: flex;
        gap: 10px;
        margin: 16px -16px 0;
        padding: 0 16px 4px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
    }

    .photo-thumb {
        flex: 0 0 86px;
        width: 86px;
        height: 86px;
        scroll-snap-align: start;
    }

    .photo-viewer {
        inset: 10px;
    }

    .photo-viewer img {
        max-height: calc(100dvh - 92px);
    }

    .photo-viewer-nav {
        width: 42px;
        height: 42px;
    }

    .photo-viewer-nav.previous {
        left: -2px;
    }

    .photo-viewer-nav.next {
        right: -2px;
    }

    .onboarding-panel {
        width: calc(100vw - 24px);
        padding: 22px;
    }

    .onboarding-bubbles {
        grid-template-columns: 1fr;
    }

    .admin-shell {
        padding: 20px 12px 36px;
    }

    .admin-header,
    .admin-detail-head,
    .admin-section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-tabs {
        align-items: stretch;
        flex-direction: column;
        border-bottom: 0;
    }

    .admin-tab {
        border: 1px solid var(--color-border);
        border-radius: 8px;
        text-align: left;
    }

    .admin-tab.active {
        border-color: var(--color-primary);
    }

    .admin-list-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-list-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-actions {
        text-align: left;
    }
}

}
