.details-page {
    max-width: 1400px;
    margin: var(--spacing-xl) auto 40px;
    padding: 0 16px;
}

.back-to-listings-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #e62f7a, #cc1d67);
    padding: 12px 16px;
    box-shadow: 0 12px 28px rgba(204, 29, 103, 0.24);
}

.back-to-listings-btn:hover {
    transform: translateY(-1px);
}

.details-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.eyebrow {
    margin: 0;
    color: #537289;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.details-hero h1 {
    margin: 6px 0;
    color: #183952;
    font-size: 2.35rem;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 0;
    color: #667886;
    font-size: 0.98rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #e73680, #d02168);
    padding: 12px 18px;
    min-width: 172px;
    box-shadow: 0 14px 30px rgba(208, 33, 104, 0.18);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(108px, 1fr);
    gap: 14px;
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid #e1e8ef;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    box-shadow: 0 12px 28px rgba(18, 44, 66, 0.06);
    min-height: 630px;
}

.details-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 410px);
    gap: 16px;
    align-items: stretch;
}

/* Customers viewing their listing: no provider quote panel */
body.listing-details--customer .bid-sidebar {
    display: none;
}

body.listing-details--customer .details-workspace {
    grid-template-columns: minmax(0, 1fr);
}

.details-main-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.bid-sidebar {
    position: sticky;
    top: 92px;
    align-self: start;
    width: 100%;
    min-width: 0;
}

.details-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr);
    gap: 14px;
    align-items: start;
    margin-bottom: 14px;
}

.details-top-grid .details-card {
    margin-bottom: 0;
}

.quick-item {
    border: 1px solid #e5edf4;
    border-radius: 14px;
    padding: 18px 18px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(18, 44, 66, 0.02);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quick-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(18, 44, 66, 0.07);
}

.quick-label {
    display: block;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6a7b89;
    font-weight: 700;
    margin-bottom: 4px;
}

.quick-value {
    color: #183952;
    font-size: 1.03rem;
    font-weight: 700;
}

.details-card {
    border: 1px solid #dae8f4;
    border-radius: 12px;
    background: #fff;
    padding: 12px;
    margin-bottom: 14px;
}

.details-card h2 {
    margin: 0 0 10px;
    color: #143b57;
    font-size: 1.12rem;
}

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

.field-item {
    border: 1px solid #e4edf6;
    border-radius: 10px;
    padding: 10px;
    background: #fbfdff;
}

.field-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5f7b90;
    font-weight: 700;
    margin-bottom: 4px;
}

.field-value {
    color: #213f53;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.muted {
    margin: 0 0 10px;
    color: #5f7484;
}

.payload-box {
    margin: 0;
    border-radius: 10px;
    border: 1px solid #dce9f4;
    background: #0e1d2a;
    color: #e8f0f8;
    padding: 14px;
    overflow: auto;
    font-size: 0.84rem;
    line-height: 1.45;
}

.form-sections-grid {
    display: grid;
    gap: 10px;
}

.form-section-card {
    border: 1px solid #e4edf6;
    border-radius: 10px;
    background: #fbfdff;
    padding: 10px;
}

.form-section-title {
    margin: 0 0 10px;
    color: #143b57;
    font-size: 0.95rem;
    font-weight: 700;
}

.form-section-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.route-section-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.6fr);
    gap: 10px;
    align-items: stretch;
}

.route-map-panel {
    border: 1px solid #e8eff6;
    border-radius: 10px;
    overflow: hidden;
    background: #f7fbff;
    min-height: 260px;
    display: flex;
    flex-direction: column;
}

.inline-route-map {
    width: 100%;
    height: 260px;
    min-height: 260px;
    flex: 0 0 auto;
}

.inline-route-details {
    border-top: 1px solid #e3edf6;
    background: #ffffff;
    padding: 10px 10px 12px;
}

.route-details-summary {
    display: grid;
    gap: 4px;
    color: #2a4b61;
    font-size: 0.82rem;
    line-height: 1.35;
    margin-bottom: 8px;
}

.route-steps-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5f7b90;
    font-weight: 700;
    margin-bottom: 6px;
}

.route-steps-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.route-steps-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
    color: #213f53;
    font-size: 0.84rem;
}

.route-step-text {
    min-width: 0;
}

.route-step-distance {
    color: #5f7b90;
    font-weight: 700;
    white-space: nowrap;
}

.inline-route-empty {
    color: #5f7484;
    font-size: 0.84rem;
}

.route-metrics-panel {
    min-width: 0;
}

.route-metrics-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field-row {
    border: 1px solid #e8eff6;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.form-field-label {
    display: block;
    color: #5f7b90;
    font-size: 0.71rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    margin-bottom: 4px;
}

.form-field-value {
    color: #213f53;
    font-size: 0.88rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Map Section */
.details-map-card {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    min-height: 100%;
}

.details-map-card h2 {
    padding: 12px 12px 8px;
    margin: 0;
}

.route-map {
    width: 100%;
    height: 100%;
    min-height: 560px;
    background: linear-gradient(135deg, #e6f2ff 0%, #f0f4ff 100%);
    border-radius: 0;
}

/* Inventory List */
.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inventory-item {
    border: 1px solid #e4edf6;
    border-radius: 8px;
    padding: 12px;
    background: #fbfdff;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.inventory-item-name {
    font-weight: 600;
    color: #213f53;
    font-size: 0.95rem;
}

.inventory-item-meta {
    font-size: 0.86rem;
    color: #5f7b90;
    margin-top: 3px;
}

.inventory-item-qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 6px 10px;
    background: #e3f2fd;
    border: 1px solid #bbdbf5;
    border-radius: 6px;
    font-weight: 700;
    color: #0c5ba8;
    font-size: 0.9rem;
}

.empty-inventory {
    padding: 20px;
    text-align: center;
    color: #5f7484;
    font-size: 0.95rem;
}

/* Bid History Section */
.bid-history-section {
    border: 1px solid #dae8f4;
    border-radius: 10px;
    background: #f8fbff;
    padding: 14px;
}

.bid-history-header {
    font-size: 1rem;
    font-weight: 700;
    color: #143b57;
    margin: 0 0 12px;
}

.bid-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bid-item {
    border: 1px solid #e4edf6;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.bid-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bid-item-user {
    font-weight: 700;
    color: #213f53;
}

.bid-item-time {
    font-size: 0.84rem;
    color: #5f7b90;
}

.bid-item-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0c5ba8;
    text-align: right;
}

.empty-bids {
    text-align: center;
    color: #5f7484;
    font-size: 0.95rem;
    padding: 12px;
}

/* Legacy-style overrides for non-bid content to match image 1 structure */
.details-page {
    max-width: 1400px;
}

.details-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
    gap: 10px;
}

.details-hero {
    margin-bottom: 10px;
}

.details-hero h1 {
    margin: 4px 0;
    color: #3d4a56;
    font-size: 2.1rem;
    line-height: 1.1;
}

.subtitle {
    color: #7a8792;
    font-size: 1.08rem;
}

.details-main-column .quick-grid {
    margin-bottom: 10px;
    background: #f0f3f6;
    border: 1px solid #d5dce3;
    border-radius: 0;
    padding: 8px 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}

.details-main-column .quick-item {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 7px 8px;
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #dde3e8;
}

.details-main-column .quick-item:nth-child(odd) {
    border-right: 1px solid #dde3e8;
}

.details-main-column .quick-item:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.details-main-column .quick-label {
    margin: 0;
    font-size: 0.79rem;
    letter-spacing: 0;
    text-transform: none;
    color: #5d6b78;
}

.details-main-column .quick-label::after {
    content: ':';
}

.details-main-column .quick-value {
    font-size: 0.97rem;
    font-weight: 700;
    color: #353f49;
}

.details-main-column .details-card,
.details-main-column .form-section-card,
.details-main-column .form-field-row,
.details-main-column .route-map-panel,
.details-main-column .inline-route-details,
.details-main-column .inventory-item,
.details-main-column .bid-history-section,
.details-main-column .bid-item {
    border-radius: 0;
    background: #f0f3f6;
    border-color: #d5dce3;
}

.details-main-column .details-card {
    margin-bottom: 10px;
    padding: 10px;
}

.details-main-column .details-card h2 {
    color: #125a7d;
    font-size: 1.18rem;
    margin-bottom: 8px;
}

.details-main-column .muted {
    color: #6f7d89;
    font-size: 0.94rem;
}

.details-main-column .form-section-title {
    margin-bottom: 8px;
    color: #1a5f84;
    font-size: 1.03rem;
}

.details-main-column .form-section-fields {
    gap: 6px;
}

.details-main-column .form-field-label {
    font-size: 0.73rem;
    color: #5d6e7d;
}

.details-main-column .form-field-value {
    color: #31404f;
    font-size: 0.95rem;
}

.details-main-column .inventory-item {
    padding: 10px;
}

.details-main-column .inventory-item-qty {
    background: #e3ecf3;
    border-color: #cad7e2;
    color: #2f4558;
}

.modern-overview {
    display: block;
    margin-bottom: 16px;
}

.modern-overview-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border: 1px solid #dbe5ee;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    box-shadow: 0 18px 42px rgba(18, 44, 66, 0.08);
    min-height: 100%;
}

.modern-hero-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.95fr);
    gap: 16px;
    align-items: stretch;
}

.modern-hero-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modern-hero-map {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbe5ee;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.modern-overview-kicker {
    color: #5e7384;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.modern-title-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.modern-title {
    color: #183952;
    font-size: 2rem;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.modern-subtitle {
    margin-top: 6px;
    color: #6d7d8a;
    font-size: 0.92rem;
}

.modern-bid-count {
    min-width: 120px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #eef5fb;
    border: 1px solid #d6e4f0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    text-align: center;
}

.modern-bid-count span {
    display: block;
    color: #6e7f8e;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.modern-bid-count strong {
    color: #183952;
    font-size: 1.4rem;
}

.modern-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.modern-stat-grid-top {
    margin-top: 2px;
}

.modern-stat-card {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #e3ebf2;
    background: #fff;
    box-shadow: 0 1px 0 rgba(18, 44, 66, 0.02);
}

.modern-stat-card--accent {
    border-color: #cfe0ec;
    background: linear-gradient(180deg, #f7fbff 0%, #eef7ff 100%);
}

.modern-stat-card--transport-space {
    border-color: #f9a8d4;
    background: linear-gradient(180deg, #fff5f9 0%, #ffe8f1 100%);
}

.modern-stat-card--transport-space strong,
.modern-stat-card--transport-space .modern-stat-value {
    color: #be185d;
}

.modern-stat-card--span-2 {
    grid-column: 1 / -1;
}

.modern-stat-card span {
    display: block;
    color: #6b7c8a;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
}

.modern-stat-card .modern-stat-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modern-stat-card .modern-stat-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 1px solid #9db7cb;
    color: #46657d;
    font-size: 0.67rem;
    font-weight: 700;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
    background: #f2f8fd;
    cursor: help;
}

.modern-stat-card strong {
    display: block;
    color: #183952;
    font-size: 0.98rem;
    line-height: 1.35;
}

.modern-stat-subtext {
    display: block;
    margin-top: 4px;
    color: #567188;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
}

.modern-route-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #e6edf4;
}

.modern-route-summary > div {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f7fbfe;
    border: 1px solid #e1e9f0;
}

.modern-route-summary span {
    display: block;
    color: #6c7b89;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.modern-route-summary strong {
    color: #253647;
    font-size: 0.94rem;
    line-height: 1.35;
}

.modern-overview-map-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dbe5ee;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 18px 42px rgba(18, 44, 66, 0.08);
}

.modern-map-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    color: #183952;
    font-size: 0.9rem;
    font-weight: 700;
}

.modern-map-meta {
    color: #6d7d8a;
    font-size: 0.8rem;
    font-weight: 600;
}

.modern-map {
    width: 100%;
    min-height: 290px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #e9f3ff 0%, #f4f8fc 100%);
    border: 1px solid #dbe4ec;
}

.route-marker {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 18px rgba(18, 44, 66, 0.18);
    transform: translateY(-2px);
}

.route-marker::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: 10px;
    height: 10px;
    background: inherit;
    transform: translateX(-50%) rotate(45deg);
    border-radius: 2px;
    z-index: -1;
}

.route-marker--pickup {
    background: linear-gradient(180deg, #32b77e 0%, #17885a 100%);
}

.route-marker--delivery {
    background: linear-gradient(180deg, #ff5a98 0%, #d91f68 100%);
}

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

.modern-map-links button {
    appearance: none;
    border: 1px solid #d3dce5;
    background: #fff;
    color: #2a93d0;
    font-weight: 700;
    font-size: 0.82rem;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(18, 44, 66, 0.02);
}

.modern-map-links button:hover {
    border-color: #b9c8d6;
    box-shadow: 0 8px 18px rgba(18, 44, 66, 0.06);
}

.modern-map-links button:first-child {
    color: #627181;
}

.inventory-open-btn {
    appearance: none;
    border: 1px solid #95bbd8;
    background: linear-gradient(180deg, #edf7ff 0%, #dceeff 100%);
    color: #0a4e7e;
    font-weight: 700;
    border-radius: 14px;
    padding: 14px 16px;
    width: 100%;
    min-height: 58px;
    font-size: 1rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 10px 18px rgba(33, 120, 176, 0.12);
}

.inventory-open-btn:hover {
    background: linear-gradient(180deg, #e4f3ff 0%, #d2e8ff 100%);
    border-color: #7daed2;
}

.inventory-inline-panel {
    margin-top: 14px;
    border: 1px solid #cfe1ee;
    border-radius: 14px;
    background: #f8fcff;
    box-shadow: 0 8px 18px rgba(18, 44, 66, 0.08);
    overflow: hidden;
    transform-origin: top center;
    will-change: opacity, transform, max-height;
}

.inventory-inline-panel.is-open {
    animation: inventoryPanelIn 260ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.inventory-inline-panel.is-closing {
    animation: inventoryPanelOut 220ms ease forwards;
    pointer-events: none;
}

.inventory-inline-header {
    padding: 12px 14px;
    border-bottom: 1px solid #dce9f4;
    background: #edf6ff;
}

.inventory-inline-header h3 {
    margin: 0;
    color: #124c74;
    font-size: 0.96rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inventory-inline-content {
    padding: 12px;
    display: grid;
    gap: 6px;
    overflow-x: hidden;
}

.inventory-inline-panel[hidden] {
    display: none !important;
}

@keyframes inventoryPanelIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scaleY(0.985);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0) scaleY(1);
        max-height: 1400px;
    }
}

@keyframes inventoryPanelOut {
    from {
        opacity: 1;
        transform: translateY(0) scaleY(1);
        max-height: 1400px;
    }

    to {
        opacity: 0;
        transform: translateY(-6px) scaleY(0.985);
        max-height: 0;
    }
}

.inventory-modal {
    position: fixed;
    inset: 0;
    background: transparent;
    display: none;
    z-index: 1200;
    pointer-events: none;
}

.inventory-modal.is-open {
    display: block;
}

.inventory-modal-dialog {
    position: fixed;
    top: 110px;
    left: max(20px, calc(100vw - min(920px, 62vw) - 20px));
    width: min(920px, 62vw);
    min-width: 360px;
    max-width: calc(100vw - 16px);
    max-height: min(84vh, 760px);
    border-radius: 18px;
    border: 1px solid #d0e0ed;
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
    box-shadow: 0 30px 60px rgba(8, 32, 48, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    resize: none;
}

.inventory-resize-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: #f4f9fe;
    border: 1px solid #8db3cf;
    z-index: 6;
    box-shadow: 0 1px 2px rgba(24, 57, 82, 0.16);
}

.inventory-resize-handle::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 2px;
    background:
        linear-gradient(135deg, transparent 42%, #4f88ad 42%, #4f88ad 52%, transparent 52%),
        linear-gradient(135deg, transparent 62%, #4f88ad 62%, #4f88ad 72%, transparent 72%);
}

.inventory-resize-nw {
    top: 6px;
    left: 6px;
    cursor: nwse-resize;
}

.inventory-resize-ne {
    top: 6px;
    right: 6px;
    cursor: nesw-resize;
}

.inventory-resize-sw {
    bottom: 6px;
    left: 6px;
    cursor: nesw-resize;
}

.inventory-resize-se {
    bottom: 6px;
    right: 6px;
    cursor: nwse-resize;
}

.inventory-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #dce9f4;
    background: #eef7ff;
    cursor: move;
    user-select: none;
}

.inventory-modal-header h3 {
    margin: 0;
    color: #124c74;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.inventory-window-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.inventory-close-btn {
    appearance: none;
    border: 1px solid #b4cce0;
    background: #fff;
    color: #2d607f;
    border-radius: 10px;
    padding: 7px 12px;
    font-weight: 700;
    cursor: pointer;
}

.inventory-close-btn:hover {
    border-color: #8fb2ce;
    background: #f5fbff;
}

.inventory-modal-dialog.is-dragging {
    box-shadow: 0 24px 46px rgba(8, 32, 48, 0.32);
}

.inventory-modal-content {
    padding: 12px;
    display: grid;
    gap: 6px;
    overflow-y: auto;
    overflow-x: hidden;
}

.inventory-modal-content::-webkit-scrollbar {
    width: 10px;
}

.inventory-modal-content::-webkit-scrollbar-thumb {
    background: #c8d9e8;
    border-radius: 999px;
}

.inventory-modal-content::-webkit-scrollbar-track {
    background: #edf4fa;
}

.inventory-floor-group {
    border: 1px solid #dce8f2;
    border-radius: 10px;
    background: #fff;
    padding: 8px;
}

.inventory-floor-title {
    margin: 0 0 6px;
    color: #1c4d70;
    font-size: 0.8rem;
}

.inventory-room-group {
    border-top: 1px solid #e7eff6;
    padding-top: 6px;
    margin-top: 6px;
}

.inventory-room-group:first-of-type {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}

.inventory-room-title {
    margin: 0 0 5px;
    color: #39586f;
    font-size: 0.74rem;
    font-weight: 700;
}

.inventory-detail-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}

.inventory-detail-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    align-items: flex-start;
    border: 1px solid #e8eff5;
    border-radius: 8px;
    padding: 5px 6px;
    background: #fbfdff;
    min-height: 56px;
}

.inventory-detail-name {
    color: #233f54;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.25;
}

.inventory-detail-volume {
    color: #1d4d8f;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
}

.inventory-detail-delivery {
    color: #547188;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: normal;
    line-height: 1.2;
}

.inventory-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.inventory-overview-column {
    border: 1px solid #dce8f2;
    border-radius: 10px;
    background: #f7fafc;
    padding: 10px;
}

.inventory-overview-column-title {
    margin: 0 0 10px;
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
}

.inventory-overview-floor-block {
    border: 1px solid #dbe7f1;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.inventory-overview-floor-block:last-child {
    margin-bottom: 0;
}

.inventory-overview-floor-title {
    margin: 0 0 6px;
    font-weight: 800;
    color: #1d4d8f;
    font-size: 0.84rem;
}

.inventory-overview-floor-items {
    margin: 0;
    padding-left: 0;
    list-style: none;
    color: #2f3f54;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
}

.inventory-overview-floor-items li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.inventory-overview-item-name {
    color: #233f54;
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1.25;
}

.inventory-overview-item-meta {
    color: #1d4d8f;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.inventory-overview-grid-compact {
    gap: 10px;
}

.inventory-overview-grid-has-storage {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.inventory-overview-grid-vehicle {
    grid-template-columns: 1fr;
}

.inventory-overview-grid-vehicle .vehicle-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.inventory-overview-grid-vehicle .vehicle-detail-card {
    margin-bottom: 0;
    height: 100%;
}

.inventory-overview-grid-vehicle .vehicle-detail-list {
    grid-template-columns: 1fr;
}

@media (max-width: 720px) {
    .inventory-overview-grid-vehicle .vehicle-detail-grid {
        grid-template-columns: 1fr;
    }
}

.services-transport-summary {
    margin-bottom: 12px;
}

.services-item-tags-block {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 2px 8px;
}

.service-badge-vehicle-job {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}

.inventory-overview-room-block {
    border-top: 1px solid #e7eff6;
    margin-top: 6px;
    padding-top: 6px;
}

.inventory-overview-room-block:first-of-type {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.inventory-overview-room-title {
    margin: 0 0 4px;
    color: #39586f;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}

.legacy-bid-comment {
    max-width: 280px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
    color: #24394d;
}

.listing-media-card {
    border: 1px solid #dce8f2;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    display: grid;
    gap: 8px;
}

.listing-media-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.listing-media-kind {
    font-size: 0.78rem;
    font-weight: 800;
    color: #1d4d8f;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.listing-media-floor {
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
}

.listing-media-frame {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fbff;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.listing-media-preview {
    width: 100%;
    max-height: 340px;
    object-fit: contain;
    background: #0b1220;
}

.listing-media-placeholder {
    padding: 12px;
    text-align: center;
    color: #64748b;
    font-size: 0.86rem;
}

.listing-media-file {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    word-break: break-word;
}

.listing-media-note-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
}

.listing-media-note {
    font-size: 0.84rem;
    line-height: 1.4;
    color: #1f2937;
    white-space: pre-wrap;
    word-break: break-word;
}

.services-modal-wrap {
    display: grid;
    gap: 10px;
}

.services-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid #dce8f2;
    border-radius: 10px;
    background: #f8fbff;
}

.services-packing-meta {
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.88rem;
    font-weight: 600;
}

.services-floor-block {
    border: 1px solid #dce8f2;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
}

.services-floor-title {
    margin: 0 0 8px;
    font-size: 0.98rem;
    font-weight: 800;
    color: #1d4d8f;
}

.services-item-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.services-item-row {
    border: 1px solid #e4edf6;
    border-radius: 10px;
    background: #fbfdff;
    padding: 8px;
    display: grid;
    gap: 6px;
}

.services-item-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.services-item-name {
    color: #213f53;
    font-size: 0.92rem;
    font-weight: 700;
}

.services-item-qty {
    color: #5f7b90;
    font-size: 0.82rem;
    font-weight: 700;
}

.services-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.service-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 4px 8px;
    border: 1px solid transparent;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1;
}

.service-badge-partial {
    border-style: dashed;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.service-badge-icon {
    font-size: 0.8rem;
    line-height: 1;
}

.service-badge-packing {
    background: #ecfdf3;
    color: #166534;
    border-color: #86efac;
}

.service-badge-disassemble {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fdba74;
}

.service-badge-assemble {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.service-badge-both {
    background: #f5f3ff;
    color: #5b21b6;
    border-color: #c4b5fd;
}

.service-badge-storage {
    background: #f0f9ff;
    color: #0369a1;
    border-color: #7dd3fc;
}

.service-badge-none {
    background: #f8fafc;
    color: #64748b;
    border-color: #cbd5e1;
}

.service-badge-filter {
    appearance: none;
    cursor: pointer;
    background: #f8fafc;
    color: #64748b;
    border-color: #cbd5e1;
    transition: all 0.2s ease;
}

.service-badge-filter:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.service-badge-filter.service-badge-active {
    opacity: 1;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3b82f6;
}

.service-badge-filter.service-badge-packing.service-badge-active {
    background: #ecfdf3;
    color: #166534;
    border-color: #86efac;
}

.service-badge-filter.service-badge-disassemble.service-badge-active {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fdba74;
}

.service-badge-filter.service-badge-assemble.service-badge-active {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.service-badge-filter.service-badge-both.service-badge-active {
    background: #f5f3ff;
    color: #5b21b6;
    border-color: #c4b5fd;
}

.service-badge-filter.service-badge-storage.service-badge-active {
    background: #f0f9ff;
    color: #0369a1;
    border-color: #7dd3fc;
}

@media (max-width: 680px) {
    .inventory-modal {
        pointer-events: auto;
    }

    .inventory-modal-dialog {
        left: 8px !important;
        top: 76px !important;
        width: calc(100vw - 16px) !important;
        min-width: 0;
        max-height: 88vh;
        border-radius: 14px;
        resize: none;
    }

    .inventory-resize-handle {
        display: none;
    }

    .inventory-detail-item {
        min-height: 0;
    }

    .inventory-detail-list {
        grid-template-columns: 1fr;
    }

    .inventory-overview-grid {
        grid-template-columns: 1fr;
    }

    .inventory-overview-floor-items {
        grid-template-columns: 1fr;
    }

    .listing-media-frame {
        min-height: 150px;
    }

    .services-item-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 1100px) {
    .modern-hero-row {
        grid-template-columns: 1fr;
    }

    .modern-map {
        min-height: 260px;
    }
}

@media (max-width: 680px) {
    .modern-title-row {
        flex-direction: column;
    }

    .modern-stat-grid,
    .modern-route-summary {
        grid-template-columns: 1fr;
    }

    .modern-overview-main,
    .modern-overview-map-card {
        border-radius: 18px;
        padding: 14px;
    }

    .modern-title {
        font-size: 1.45rem;
    }
}

.legacy-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 12px;
    margin-bottom: 10px;
}

.legacy-overview-main {
    border-top: 1px solid #d8dee4;
    border-bottom: 1px solid #d8dee4;
    padding: 8px 0;
}

.legacy-title {
    font-size: 2rem;
    line-height: 1.15;
    color: #404851;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.legacy-line-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 105px minmax(0, 1fr);
    gap: 6px 10px;
    align-items: start;
    margin-bottom: 7px;
}

.legacy-line-row-wide {
    grid-template-columns: 90px minmax(0, 1fr);
}

.legacy-key {
    color: #596671;
    font-size: 0.78rem;
}

.legacy-val {
    color: #34424f;
    font-size: 0.89rem;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.legacy-items-mini {
    margin-top: 8px;
}

.legacy-items-mini h3 {
    margin: 0 0 6px;
    color: #156891;
    font-size: 1.05rem;
}

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

.legacy-move-grid span {
    display: block;
    color: #2ca4df;
    font-size: 0.86rem;
    margin-bottom: 3px;
}

.legacy-move-grid strong {
    color: #2f3e4d;
    font-size: 0.95rem;
}

.legacy-overview-map {
    border: 1px solid #d0d8de;
    background: #f0f4f7;
    padding: 4px;
}

.legacy-map {
    width: 100%;
    height: 248px;
    background: #dfe7ee;
}

.legacy-map-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.legacy-map-links span {
    color: #1f8cc5;
    font-size: 0.82rem;
    text-decoration: underline;
}

.legacy-map-links button {
    border: 1px solid #c7d1db;
    background: #e9eef2;
    color: #2f93c8;
    font-size: 0.83rem;
    font-weight: 700;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
}

.compact-form-section {
    padding: 8px !important;
}

.compact-details-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 12px;
}

.compact-detail-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #dbe2e9;
}

.compact-detail-label {
    color: #60707f;
    font-size: 0.8rem;
    font-weight: 600;
}

.compact-detail-value {
    color: #2f3d49;
    font-size: 0.88rem;
    font-weight: 700;
}

.inventory-more-note {
    margin-top: 4px;
    color: #5f6f7e;
    font-size: 0.78rem;
}

.legacy-bids-panel {
    padding: 0 !important;
    overflow: hidden;
    margin-top: 10px;
}

.legacy-bids-title {
    margin: 0;
    padding: 12px 16px;
    background: #2f9bc9;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.legacy-bids-body {
    padding: 0;
    background: #f0f3f6;
}

.legacy-bids-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d5dce3;
    background: #fff;
    font-size: 0.82rem;
}

.legacy-bids-table th {
    text-align: left;
    background: #edf2f6;
    color: #4e6273;
    font-weight: 700;
    border-bottom: 1px solid #d5dce3;
    padding: 6px 7px;
}

.legacy-bids-table td {
    border-top: 1px solid #e1e7ed;
    padding: 6px 7px;
    color: #314250;
}

.legacy-bids-table-bottom {
    border: 0;
    font-size: 0.98rem;
}

.legacy-bids-table-bottom th {
    padding: 10px 12px;
    color: #3f505f;
    background: #f7f9fb;
}

.legacy-bids-table-bottom td {
    padding: 13px 12px;
    font-size: 0.96rem;
    vertical-align: top;
}

.legacy-bidder-cell {
    white-space: nowrap;
    font-weight: 700;
}

.legacy-bidder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    border-radius: 999px;
    background: #66b72f;
    color: #fff;
    font-weight: 800;
}

.legacy-bids-view-btn {
    appearance: none;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #e62f7a, #cc1d67);
    color: #fff;
    font-weight: 700;
    padding: 9px 20px;
    cursor: pointer;
}

/* Bid Form Panel */
.bid-form-panel {
    border: 1px solid #d8e3ed;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    font-family: inherit;
    box-shadow: 0 18px 42px rgba(18, 44, 66, 0.10);
}

.bid-form-panel-title {
    margin: 0;
    padding: 14px 16px;
    background: linear-gradient(135deg, #2ea6df, #1f8ad1);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
}

.bid-form-body {
    padding: 18px;
    background: #fff;
}

.bid-warning {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff5f7;
    color: #e24f6f;
    font-size: 0.77rem;
    line-height: 1.45;
}

.bid-user-context {
    margin: 0 0 14px;
    color: #6b7a88;
    font-size: 0.82rem;
}

.bid-entry-form {
    padding: 0;
    display: grid;
    gap: 12px;
}

.bid-entry-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 12px;
    border: 1px solid #e6edf4;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.bid-entry-form label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #253647;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bid-entry-form .form-input {
    padding: 11px 14px;
    border: 1px solid #d5e0ea;
    border-radius: 14px;
    font-size: 0.94rem;
    color: #1f2f41;
    background: #fff;
    min-height: 46px;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgba(18, 44, 66, 0.02);
}

.bid-entry-form .form-input:focus {
    outline: none;
    border-color: #2ea6df;
    box-shadow: 0 0 0 4px rgba(46, 166, 223, 0.12);
}

.bid-entry-form .form-input::placeholder {
    color: #8e9aa8;
}

.currency-input {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    border: 1px solid #d5e0ea;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.currency-input span {
    padding: 0;
    text-align: center;
    background: #fff;
    color: #607080;
    border-right: 1px solid #d5e0ea;
    font-size: 0.95rem;
    min-height: 46px;
    display: grid;
    place-items: center;
}

.currency-input .form-input {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.helper-text {
    color: #7a8894;
    font-size: 0.72rem;
}

.expiry-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 94px;
    gap: 10px;
    align-items: center;
}

#bid-expiry-mode {
    margin-bottom: 10px;
}

#bid-custom-expiry-group {
    margin-top: 2px;
}

.at-separator {
    color: #7a8894;
    font-size: 0.74rem;
}

#bid-expire-date {
    letter-spacing: 0.01em;
}

#bid-expire-time {
    padding-right: 10px;
}

#bid-template {
    min-height: 46px;
}

#bid-message {
    min-height: 190px;
    resize: vertical;
    line-height: 1.25;
}

.save-template-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 2px;
    color: #5f6c7b;
    font-size: 0.78rem;
    font-weight: 400;
    padding: 0 2px;
}

.save-template-row label {
    font-weight: 700;
    font-size: 0.83rem;
    color: #394655;
}

#bid-save-template {
    width: 13px;
    height: 13px;
    margin: 0;
}

.save-message-title-group {
    margin-top: 12px;
    padding: 10px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.save-message-title-group #bid-message-title {
    padding: 8px 10px;
    font-size: 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    font-family: inherit;
}

.save-message-title-group #bid-message-title::placeholder {
    color: #9ca3af;
}

.save-message-title-group .helper-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 2px;
}

.saved-messages-info {
    margin-top: 8px;
    padding: 8px 10px;
    background-color: #f0f4f8;
    border-left: 3px solid #1976d2;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.saved-messages-info small {
    font-size: 0.8rem;
    color: #5a7a8c;
    flex: 1;
}

.clear-saved-btn {
    background-color: transparent;
    border: 1px solid #d0d5db;
    color: #6b7280;
    padding: 4px 8px;
    margin-left: 8px;
    font-size: 0.75rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.clear-saved-btn:hover {
    background-color: #fee;
    border-color: #ef5350;
    color: #d32f2f;
}

.bid-date-lines {
    display: grid;
    gap: 6px;
    color: #4f5f70;
    font-size: 0.8rem;
    padding: 4px 2px 0;
}

.bid-date-lines span {
    color: #e3536f;
    font-weight: 700;
}

.included-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #e7edf3;
    padding-top: 10px;
    margin-top: 4px;
    color: #2f3d4c;
    font-weight: 700;
    font-size: 1.02rem;
}

.expand-btn {
    border: 0;
    background: none;
    color: #7f8b98;
    font-size: 0.74rem;
    cursor: pointer;
    padding: 0;
}

.bid-submit-btn {
    width: 100%;
    justify-self: end;
    color: #fff;
    background: linear-gradient(135deg, #e62f7a, #cc1d67);
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 0.95rem;
    line-height: 1;
    box-shadow: 0 14px 26px rgba(204, 29, 103, 0.24);
}

.bid-submit-btn:hover {
    background: linear-gradient(135deg, #d52870, #b91a5d);
    box-shadow: 0 4px 12px rgba(204, 29, 103, 0.25);
}

.bid-note {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f7fafc;
    color: #73808d;
    font-size: 0.73rem;
    line-height: 1.35;
}

/* Hard override layer so global .form-* rules cannot reshape this legacy-style panel */
#bid-form-section.bid-form-panel {
    border: 1px solid #d8e3ed !important;
    background: #fff !important;
    border-radius: 24px !important;
    font-family: inherit !important;
    box-shadow: 0 18px 42px rgba(18, 44, 66, 0.10) !important;
}

#bid-form-section .bid-form-panel-title {
    background: linear-gradient(135deg, #2ea6df, #1f8ad1) !important;
    color: #fff !important;
    font-size: 1rem !important;
    padding: 14px 16px !important;
    font-weight: 700 !important;
}

#bid-form-section .bid-entry-form .form-group {
    margin: 0 !important;
    gap: 7px !important;
    padding: 12px !important;
    border: 1px solid #e6edf4 !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

#bid-form-section .bid-entry-form label {
    margin: 0 !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #394655 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}

#bid-form-section .bid-entry-form .form-input {
    width: 100% !important;
    padding: 11px 14px !important;
    min-height: 46px !important;
    border: 1px solid #d5e0ea !important;
    border-radius: 14px !important;
    box-shadow: inset 0 1px 0 rgba(18, 44, 66, 0.02) !important;
    font-size: 0.94rem !important;
    line-height: 1.2 !important;
    background: #fff !important;
}

#bid-form-section .currency-input {
    border: 1px solid #d5e0ea !important;
    grid-template-columns: 38px 1fr !important;
    border-radius: 14px !important;
    background: #fff !important;
}

#bid-form-section .currency-input span {
    border-right: 1px solid #d5e0ea !important;
    background: #fff !important;
    font-size: 0.95rem !important;
    min-height: 46px !important;
}

#bid-form-section .bid-form-body,
#bid-form-section .bid-entry-form,
#bid-form-section .form-group,
#bid-form-section .expiry-row,
#bid-form-section .bid-date-lines,
#bid-form-section .included-price-row {
    background: #fff !important;
}

#bid-form-section .expiry-row {
    grid-template-columns: minmax(0, 1fr) auto 94px !important;
    gap: 10px !important;
}

#bid-form-section #bid-message {
    min-height: 190px !important;
}

#bid-form-section .save-template-row {
    justify-content: flex-end !important;
}

#bid-form-section .included-price-row {
    font-size: 1.02rem !important;
}

#bid-form-section .bid-submit-btn {
    width: 100% !important;
    justify-self: end !important;
    border-radius: 14px !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    background: linear-gradient(135deg, #e62f7a, #cc1d67) !important;
    color: #fff !important;
}

#bid-form-section .bid-note {
    margin: 10px 0 0 !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    background: #f7fafc !important;
}

.btn {
    appearance: none;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    padding: 11px 18px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #3db2ea, #2f8ed8);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2fa5d8, #2680c6);
    box-shadow: 0 4px 12px rgba(61, 178, 234, 0.28);
}

.btn-primary:active {
    transform: translateY(1px);
}

@media (max-width: 900px) {
    .details-workspace {
        grid-template-columns: 1fr;
    }

    .legacy-overview {
        grid-template-columns: 1fr;
    }

    .legacy-map {
        height: 220px;
    }

    .compact-details-table {
        grid-template-columns: 1fr;
    }

    .bid-sidebar {
        position: static;
    }

    .details-top-grid {
        grid-template-columns: 1fr;
    }

    .quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    .form-section-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 680px) {
    .details-page {
        margin-top: 96px;
    }

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

    .back-to-listings-btn {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
    }

    .back-btn {
        width: 100%;
    }

    .quick-grid {
        grid-template-columns: 1fr;
    }

    .legacy-title {
        font-size: 1.32rem;
    }

    .legacy-line-row,
    .legacy-line-row-wide {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .legacy-move-grid {
        grid-template-columns: 1fr;
    }

    .route-map {
        height: 250px;
        min-height: 250px;
    }

    .form-section-fields {
        grid-template-columns: 1fr;
    }

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

    .at-separator {
        display: none;
    }

    .route-map-panel {
        min-height: 0;
    }

    .inline-route-map {
        min-height: 220px;
        height: 220px;
    }

    .bid-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .bid-item-amount {
        text-align: left;
    }
}

#bid-form-section .bid-autobid-group {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #d5e0ea;
}

#bid-form-section .bid-autobid-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
}

#bid-form-section .bid-autobid-fields {
    margin-top: 8px;
}

.autobid-history-list {
    margin: 8px 0 0;
    padding-left: 1.2rem;
    color: #334155;
    font-size: 0.92rem;
}
