/* ============ Modern Logistics Row (Competitor Style) ============ */
.log-row {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 90px 1fr 180px 140px;
    /* Date | Route+Info | Specs | Price+Action */
    gap: 16px;
    transition: all 0.2s ease;
    align-items: center;
    position: relative;
}

.log-row:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
    transform: translateY(-1px);
    z-index: 2;
}

/* Date col */
.log-date {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 90px;
}

.date-range {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.time-ago {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Main col (Route) */
.log-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    /* Prevent spill */
}

.log-route {
    font-size: 1rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.3;
}

.log-route strong {
    font-weight: 700;
}

.route-arrow-modern {
    color: var(--text-light);
    font-size: 0.9rem;
}

.dist-badge {
    font-size: 0.75rem;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.log-cargo-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Specs col (Icons) */
.log-specs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text);
    border-left: 1px solid #f0f0f0;
    padding-left: 16px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.spec-icon {
    width: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
}

/* Price col */
.log-price-section {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    border-left: 1px solid #f0f0f0;
    padding-left: 16px;
}

.log-price {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
    white-space: nowrap;
}

.log-pay-term {
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: #f0fdf4;
    color: #166534;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.btn-details-sm {
    padding: 4px 14px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.2s;
    margin-top: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-details-sm:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0fdf4;
}

/* Status Badges Row */
.log-badges {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.log-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.badge-gray {
    background: #f3f4f6;
    color: #4b5563;
}

/* Responsive adjustments for the new row */
@media (max-width: 900px) {
    .log-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "date price"
            "main main"
            "specs specs";
        gap: 10px;
        padding: 12px;
    }

    .log-date {
        grid-area: date;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .log-price-section {
        grid-area: price;
        border-left: none;
        align-items: flex-end;
        padding-left: 0;
    }

    .log-main {
        grid-area: main;
        margin-top: 8px;
    }

    .log-specs {
        grid-area: specs;
        border-left: none;
        padding-left: 0;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #f0f0f0;
    }
}

@media (max-width: 480px) {
    .log-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .log-date {
        justify-content: space-between;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 8px;
    }

    .log-price-section {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        border-top: 1px solid #f0f0f0;
        padding-top: 12px;
        margin-top: 4px;
    }

    .btn-details-sm {
        margin-top: 0;
    }
}